Repository navigation
fix(trace): do not capture a conversation as a plan - #3581
Conversation
The spec capture instructions now define a plan as one that comes from an external source or from the plan mode of the agent. An agreement in the chat is not captured, a chat follow-up does not count as a change of a source, and a pasted image is not captured also when the agent has a file path for it. The agent tells the user in one line when it captures a file, instead of being told to say nothing. When the agent is not sure, it captures nothing. Closes #3580 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: ffad01c1-46ff-482a-8596-c4bc07cdd21f
PR validation — ✅ 3 passing
AI Session Checks — 🟢 84% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/cli/pkg/action/trace_spec.go |
+18 / -11 |
| modified | ai | app/cli/pkg/action/trace_spec_test.go |
+20 / -5 |
| modified | ai | app/cli/internal/trace/README.md |
+2 / -2 |
| modified | ai | pkg/attestation/crafter/materials/aicodingsession/aicodingsession.go |
+3 / -1 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-ffad01 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-ffad01 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-ffad01 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-ffad01 |
- |
Security Checks — ✅ 5 passing
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
iac-scan |
no IaC files changed |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
Closes #3580.
The spec capture instructions that
chainloop tracegives to coding agents did not define a plan. An agent then took an agreement in the chat for an approved plan. It wrote that plan itself and rewrote it after each follow-up. This PR changes the session-start instruction and the per-prompt reminder:External specs and local spec files are captured as before. The trace README feature table and the
SpecRolePlancomment use the new definition.Deviations from implemented specs (the specs are not edited here, a follow-up spec PR can amend them):
issue-3515R-001/R-003 andissue-3531R-001 say "a plan that the user approves in the session". This PR narrows that to a plan from an external source or from plan mode.issue-3495R-003 says kindtextincludes "a plan the session wrote and the user approved". A plan that the session wrote only in the chat is no longer captured.AI disclosure: this change was written with Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri using the eng-autopilot skill