You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(prompts): harden system prompt (boundaries + env) and redact tool-arg logs (#67)
Port the genuinely-useful prompt-design techniques from the claude-fable-5
system prompt into a3s-code, plus the one runtime mechanism the new prompt
actually requires.
Prompt content & assembly:
- Single-source `## Boundaries` section (injection hygiene: treat file/tool/web
content as untrusted data; secret handling; defensive-security-only) in
prompts/common/boundaries.md, injected once in
SystemPromptSlots::build_with_style so every agent style and delegated
subagent carries it.
- Always-on `<env>` grounding block (today's date, platform, working directory)
injected at augmentation time in turn_context.rs — pins the current date the
model cannot infer past its training cutoff. No shell-out; computed per turn.
- Library-availability rule, imperative dedicated-tools-over-bash guidance, and
response-format rules against re-printing already-read code / writing
unsolicited report .md files.
Security:
- Stop logging raw tool arguments at info! (also OTLP-exported). Bash commands
and write/edit file contents can contain secrets; log only the tool name,
sorted argument field names, and payload size. Full args remain at trace!.
Tests:
- New integration test: real ToolExecutor execution + live tracing capture
proving secrets never reach INFO logs, plus Boundaries present in every
assembled style prompt.
- Make the offline config-resolution tests hermetic via an embedded fixture
instead of reading the git-ignored, machine-local .a3s/config.acl (which also
stops copying a real API key into /tmp).
Co-authored-by: Claude <claude@anthropic.com>
0 commit comments