@jaimevalasek/aioson 1.28.1 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +7 -5
  3. package/docs/en/5-reference/cli-reference.md +40 -10
  4. package/docs/pt/4-agentes/briefing.md +2 -0
  5. package/docs/pt/4-agentes/copywriter.md +2 -0
  6. package/docs/pt/4-agentes/genome.md +1 -0
  7. package/docs/pt/4-agentes/pm.md +1 -1
  8. package/docs/pt/4-agentes/profiler-enricher.md +2 -0
  9. package/docs/pt/4-agentes/profiler-forge.md +2 -0
  10. package/docs/pt/4-agentes/sheldon.md +2 -0
  11. package/docs/pt/4-agentes/squad.md +12 -10
  12. package/docs/pt/5-referencia/autopilot-handoff.md +4 -4
  13. package/docs/pt/5-referencia/comandos-cli.md +7 -3
  14. package/docs/pt/5-referencia/fluxo-artefatos.md +1 -1
  15. package/docs/pt/5-referencia/memoria-e-contexto.md +62 -2
  16. package/docs/pt/_arquivo/monitor-de-contexto.md +2 -2
  17. package/package.json +4 -2
  18. package/src/cli.js +72 -24
  19. package/src/commands/ac-test-audit.js +45 -0
  20. package/src/commands/artifact-validate.js +62 -50
  21. package/src/commands/classify.js +73 -2
  22. package/src/commands/context-brief.js +59 -0
  23. package/src/commands/context-guard.js +88 -0
  24. package/src/commands/context-monitor.js +1 -1
  25. package/src/commands/context-search.js +101 -52
  26. package/src/commands/context-select.js +11 -2
  27. package/src/commands/feature-archive.js +21 -12
  28. package/src/commands/feature-current.js +82 -0
  29. package/src/commands/gate-check.js +32 -15
  30. package/src/commands/harness-check.js +17 -1
  31. package/src/commands/hooks-install.js +169 -26
  32. package/src/commands/hygiene-scan.js +423 -0
  33. package/src/commands/rules-lint.js +124 -0
  34. package/src/commands/sdd-benchmark.js +134 -0
  35. package/src/commands/spec-analyze.js +6 -4
  36. package/src/commands/store-system.js +329 -49
  37. package/src/constants.js +8 -3
  38. package/src/context-brief.js +585 -0
  39. package/src/context-guard.js +209 -0
  40. package/src/context-search.js +796 -96
  41. package/src/context-selector.js +802 -420
  42. package/src/handoff-contract.js +14 -6
  43. package/src/harness/contract-schema.js +1 -1
  44. package/src/i18n/messages/en.js +12 -5
  45. package/src/i18n/messages/es.js +11 -4
  46. package/src/i18n/messages/fr.js +11 -4
  47. package/src/i18n/messages/pt-BR.js +12 -5
  48. package/src/lib/ac-test-audit.js +194 -0
  49. package/src/preflight-engine.js +10 -6
  50. package/src/squad/state-manager.js +1 -1
  51. package/template/.aioson/agents/analyst.md +93 -53
  52. package/template/.aioson/agents/architect.md +41 -32
  53. package/template/.aioson/agents/briefing-refiner.md +15 -2
  54. package/template/.aioson/agents/briefing.md +105 -86
  55. package/template/.aioson/agents/committer.md +1 -1
  56. package/template/.aioson/agents/copywriter.md +53 -10
  57. package/template/.aioson/agents/design-hybrid-forge.md +9 -5
  58. package/template/.aioson/agents/dev.md +22 -25
  59. package/template/.aioson/agents/deyvin.md +126 -124
  60. package/template/.aioson/agents/discover.md +8 -9
  61. package/template/.aioson/agents/discovery-design-doc.md +52 -36
  62. package/template/.aioson/agents/forge-run.md +3 -0
  63. package/template/.aioson/agents/genome.md +12 -6
  64. package/template/.aioson/agents/neo.md +30 -24
  65. package/template/.aioson/agents/orache.md +16 -21
  66. package/template/.aioson/agents/orchestrator.md +40 -31
  67. package/template/.aioson/agents/pentester.md +22 -12
  68. package/template/.aioson/agents/pm.md +11 -2
  69. package/template/.aioson/agents/product.md +162 -183
  70. package/template/.aioson/agents/profiler-enricher.md +29 -6
  71. package/template/.aioson/agents/profiler-forge.md +16 -6
  72. package/template/.aioson/agents/profiler-researcher.md +10 -6
  73. package/template/.aioson/agents/qa.md +29 -19
  74. package/template/.aioson/agents/scope-check.md +14 -2
  75. package/template/.aioson/agents/sheldon.md +51 -21
  76. package/template/.aioson/agents/site-forge.md +4 -6
  77. package/template/.aioson/agents/squad.md +7 -12
  78. package/template/.aioson/agents/tester.md +40 -30
  79. package/template/.aioson/agents/ux-ui.md +56 -41
  80. package/template/.aioson/agents/validator.md +2 -2
  81. package/template/.aioson/config.md +4 -3
  82. package/template/.aioson/design-docs/agent-loading-contract.md +3 -3
  83. package/template/.aioson/docs/LAYERS.md +2 -0
  84. package/template/.aioson/docs/autonomy-protocol.md +7 -5
  85. package/template/.aioson/docs/autopilot-handoff.md +5 -3
  86. package/template/.aioson/docs/dev/execution-discipline.md +3 -0
  87. package/template/.aioson/docs/dev/simple-plan-lane.md +126 -77
  88. package/template/.aioson/docs/dev/stack-conventions.md +4 -1
  89. package/template/.aioson/docs/deyvin/continuity-recovery.md +21 -18
  90. package/template/.aioson/docs/deyvin/debugging-escalation.md +3 -0
  91. package/template/.aioson/docs/deyvin/pair-execution.md +3 -0
  92. package/template/.aioson/docs/deyvin/runtime-handoffs.md +6 -3
  93. package/template/.aioson/docs/dossier/agent-templates.md +3 -0
  94. package/template/.aioson/docs/dossier/schema.md +3 -0
  95. package/template/.aioson/docs/example-external-api-context.md +2 -0
  96. package/template/.aioson/docs/feature-expansion-taxonomy.md +53 -0
  97. package/template/.aioson/docs/handoff-persistence.md +95 -91
  98. package/template/.aioson/docs/pentester/app-playbooks.md +3 -0
  99. package/template/.aioson/docs/pentester/browser-dast-playbook.md +401 -398
  100. package/template/.aioson/docs/pentester/llm-supplychain.md +3 -0
  101. package/template/.aioson/docs/product/conversation-playbook.md +1 -1
  102. package/template/.aioson/docs/quality/code-health-analysis.md +2 -0
  103. package/template/.aioson/docs/sheldon/enrichment-paths.md +47 -1
  104. package/template/.aioson/docs/sheldon/harness-contract.md +26 -21
  105. package/template/.aioson/docs/sheldon/quality-lens.md +3 -0
  106. package/template/.aioson/docs/sheldon/research-loop.md +3 -0
  107. package/template/.aioson/docs/sheldon/web-intelligence.md +3 -0
  108. package/template/.aioson/docs/site-forge-build.md +4 -2
  109. package/template/.aioson/docs/site-forge-extraction.md +2 -0
  110. package/template/.aioson/docs/site-forge-qa.md +2 -0
  111. package/template/.aioson/docs/site-forge-recon.md +7 -5
  112. package/template/.aioson/docs/site-forge-transform.md +2 -0
  113. package/template/.aioson/docs/squad/content-output.md +3 -0
  114. package/template/.aioson/docs/squad/creation-flow.md +22 -1
  115. package/template/.aioson/docs/squad/domain-breadth.md +3 -0
  116. package/template/.aioson/docs/squad/domain-classification.md +3 -0
  117. package/template/.aioson/docs/squad/eval-gate.md +3 -0
  118. package/template/.aioson/docs/squad/genome-bindings.md +14 -0
  119. package/template/.aioson/docs/squad/package-contract.md +5 -0
  120. package/template/.aioson/docs/squad/persona-grounding.md +65 -62
  121. package/template/.aioson/docs/squad/quality-lens.md +3 -0
  122. package/template/.aioson/docs/squad/research-loop.md +3 -0
  123. package/template/.aioson/docs/squad/session-operations.md +3 -0
  124. package/template/.aioson/docs/squad/workflow-quality.md +3 -0
  125. package/template/.aioson/docs/tester/coverage-quality.md +4 -1
  126. package/template/.aioson/docs/ux-ui/design-execution.md +9 -7
  127. package/template/.aioson/rules/README.md +48 -2
  128. package/template/.aioson/rules/agent-language-policy.md +26 -21
  129. package/template/.aioson/rules/agent-structural-contract.md +168 -158
  130. package/template/.aioson/rules/aioson-context-boundary.md +7 -1
  131. package/template/.aioson/rules/canonical-path-contract.md +16 -10
  132. package/template/.aioson/rules/data-format-convention.md +17 -11
  133. package/template/.aioson/rules/disk-first-artifacts.md +12 -8
  134. package/template/.aioson/rules/example-monetary-values.md +4 -0
  135. package/template/.aioson/rules/implementation-structure-and-data-access.md +50 -0
  136. package/template/.aioson/rules/output-brevity.md +2 -0
  137. package/template/.aioson/rules/prd-section-ownership.md +17 -12
  138. package/template/.aioson/rules/security-baseline.md +8 -3
  139. package/template/.aioson/rules/simple-plan-lane.md +22 -5
  140. package/template/.aioson/rules/source-code-language-convention.md +34 -0
  141. package/template/.aioson/rules/spec-level-ownership.md +10 -5
  142. package/template/.aioson/rules/squad-driver-pattern.md +5 -0
  143. package/template/.aioson/skills/process/aioson-spec-driven/references/artifact-map.md +24 -23
  144. package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +4 -0
  145. package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +2 -2
  146. package/template/.aioson/skills/process/aioson-spec-driven/references/qa.md +1 -1
  147. package/template/.aioson/skills/process/briefing-expansion-scout/SKILL.md +72 -0
  148. package/template/.aioson/skills/process/product-scope-expansion/SKILL.md +74 -0
  149. package/template/.aioson/skills/process/sheldon-expansion-audit/SKILL.md +67 -0
  150. package/template/.aioson/skills/static/context-budget-guide.md +1 -1
  151. package/template/.aioson/skills/static/multi-agent-patterns.md +5 -4
  152. package/template/.aioson/tasks/squad-create.md +11 -0
  153. package/template/.aioson/tasks/squad-design.md +3 -3
  154. package/template/AGENTS.md +36 -19
  155. package/template/CLAUDE.md +9 -5
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  description: "Deyvin pair execution — working mode, small-slice loop, memory updates, and implementation governance."
3
+ agents: [deyvin]
4
+ task_types: [implementation, pair-session]
5
+ triggers: [pair execution, small slice, polish]
3
6
  ---
4
7
 
5
8
  # Deyvin Pair Execution
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  description: "Deyvin runtime and handoffs — tracked session behavior, live milestones, direct sessions, and dashboard visibility."
3
+ agents: [deyvin]
4
+ task_types: [runtime, handoff]
5
+ triggers: [live session, runtime handoff, tracked session]
3
6
  ---
4
7
 
5
8
  # Deyvin Runtime and Handoffs
@@ -35,8 +38,8 @@ If the user did not enter through `aioson live:start`, keep one direct session o
35
38
 
36
39
  Plain natural-language agent activation in an external client does not create runtime records by itself. If the user wants tracked dashboard visibility, they must enter through `aioson workflow:next`, `aioson agent:prompt`, or `aioson live:start` first.
37
40
 
38
- ## Cross-session handoffs — persist before /clear
39
-
40
- The runtime helpers above cover same-session handoffs (`live:handoff`, `runtime:session:finish`). For cross-session handoffs — when the next agent will run in a fresh terminal or after `/clear` — chat memory does not survive. Before suggesting `/clear`, persist the diagnostic to `plans/{slug}.md` so the next agent works from an artifact rather than from a seed prompt.
41
+ ## Cross-session handoffs — persist before /compact or /clear
42
+
43
+ The runtime helpers above cover same-session handoffs (`live:handoff`, `runtime:session:finish`). For cross-session handoffs — when the next agent will run in a fresh terminal, after `/compact`, or after `/clear` — chat memory may be compressed or unavailable. Before suggesting `/compact` or `/clear`, persist the diagnostic to `plans/{slug}.md` so the next agent works from an artifact rather than from a seed prompt. Prefer `/compact` for same-feature continuation; use `/clear` only for a hard reset, feature switch, polluted context, or security-sensitive reset.
41
44
 
42
45
  Load `.aioson/docs/handoff-persistence.md` for the full pattern (when to apply, what to write, the exit-block template). Apply it whenever the recommended next agent is one that consumes raw plans (`/aioson:agent:briefing` foremost, sometimes `/aioson:agent:product`) or needs the full diagnostic to operate (`/aioson:agent:analyst`, `/aioson:agent:architect`, `/aioson:agent:sheldon`). Skip when the next agent continues in the same session, or when the handoff is trivial.
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  description: "Templates concretos por agente da cadeia (9 chain agents) para escrita no dossier via dossier:add-finding, dossier:add-codemap, dossier:link-rule e dossier:add-research. Bumped Phase 4 (agent-chain-continuity): @sheldon override (Why → Agent Trail + Research Index); novos templates para @ux-ui, @pm, @orchestrator; convenção DRIFT: para @dev."
3
+ agents: [product, analyst, sheldon, architect, pm, dev, qa, tester, briefing]
4
+ task_types: [dossier]
5
+ triggers: [dossier, agent trail, add finding]
3
6
  ---
4
7
 
5
8
  # Agent Dossier Templates
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  description: "Feature dossier schema (canônico v1.0 + v1.1 Phase 3 + v1.2 Research Index) e handoff-protocol artifact_uris v2. Lido por src/dossier/schema.js e src/session-handoff.js — toda mudança aqui exige bump de schema_version."
3
+ agents: [product, analyst, sheldon, architect, pm, dev, qa, tester, briefing]
4
+ task_types: [dossier]
5
+ triggers: [dossier schema, dossier structure]
3
6
  ---
4
7
 
5
8
  # Feature Dossier — Schema canônico
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  description: "Template for documenting an external API integration context — replace with real content"
3
+ task_types: [integration]
4
+ triggers: [external api, integration context]
3
5
  scope: "global"
4
6
  agents: []
5
7
  ---
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: feature-expansion-taxonomy
3
+ description: "Shared taxonomy for optional feature expansion: classify richer product possibilities without inflating MVP scope."
4
+ agents: [briefing, briefing-refiner, product, sheldon]
5
+ modes: [planning, executing]
6
+ task_types: [feature-expansion, product-discovery, prd-enrichment, briefing-refinement]
7
+ load_tier: trigger
8
+ triggers: [feature expansion, rich surface, MVP options, product scope, capability map, Trello, generator, dashboard, workflow, editor, collaboration]
9
+ ---
10
+
11
+ # Feature Expansion Taxonomy
12
+
13
+ Use this shared vocabulary when a feature has a rich surface: workflow tools, collaboration, editors/builders, generators, media outputs, dashboards, CRM/Kanban-style systems, automation, templates, customization, or repeated operational use.
14
+
15
+ Expansion is not approval. It reveals options, classifies value and risk, and makes scope easier to choose.
16
+
17
+ ## Buckets
18
+
19
+ | Bucket | Meaning |
20
+ |---|---|
21
+ | Core | The minimum needed for the feature to exist. |
22
+ | Recommended MVP | The smallest version that feels genuinely useful, not just technically present. |
23
+ | Optional V1 | Useful additions that can ship in V1 if cost/risk stays low. |
24
+ | Delight | Experience boosters that make the feature feel polished, but are not required. |
25
+ | V2 / Later | Good ideas that should not enter MVP without explicit approval. |
26
+ | Cut List | Ideas that look attractive but should be rejected or deferred for this feature. |
27
+
28
+ ## Expansion Lenses
29
+
30
+ Check only lenses relevant to the feature:
31
+
32
+ - Primary objects: entities, documents, posts, cards, boards, templates, reports.
33
+ - User roles: creator, viewer, collaborator, admin, reviewer, owner.
34
+ - Lifecycle states: draft, active, archived, failed, approved, published, scheduled.
35
+ - Actions: create, edit, duplicate, move, assign, comment, approve, export, restore.
36
+ - Repeated-use UX: presets, defaults, saved views, bulk actions, keyboard/drag interactions.
37
+ - Collaboration: members, mentions, comments, assignment, activity log, notifications.
38
+ - Control and trust: permissions, audit trail, undo/redo, validation, moderation, safety limits.
39
+ - Discovery: search, filters, sort, tags, labels, grouping, saved filters.
40
+ - Output quality: preview, variants, formats, export, accessibility, localization.
41
+ - Integrations and automation: imports, exports, webhooks, scheduled jobs, simple rules.
42
+ - Implementation leverage: framework-native features, low-cost libraries, existing modules.
43
+
44
+ ## Required Trace
45
+
46
+ Every expansion artifact should state:
47
+
48
+ - whether prior expansion artifacts were found
49
+ - which bucket each suggestion belongs to
50
+ - which ideas need explicit user approval
51
+ - which ideas are intentionally deferred
52
+ - how the expansion affects project classification or delivery risk
53
+
@@ -1,94 +1,98 @@
1
- ---
2
- description: "Persist context to plans/{slug}.md before suggesting /clear in a cross-session handoff — preserves the diagnostic so the next agent works from an artifact, not from chat memory."
3
- ---
4
-
5
- # Handoff Persistence
6
-
7
- Load this when you are about to issue a routing recommendation that involves `/clear`, a fresh terminal, or any other context boundary that drops the current conversation. Same-session handoffs (the next agent inherits the same chat) do not need this — skip the doc.
8
-
9
- ## The problem
10
-
1
+ ---
2
+ description: "Persist context to plans/{slug}.md before suggesting /compact or /clear in a cross-session handoff — preserves the diagnostic so the next agent works from an artifact, not from chat memory."
3
+ task_types: [handoff]
4
+ triggers: [handoff, session persistence, last handoff]
5
+ ---
6
+
7
+ # Handoff Persistence
8
+
9
+ Load this when you are about to issue a routing recommendation that involves `/compact`, `/clear`, a fresh terminal, or any other context boundary that may compress or drop the current conversation. Same-session handoffs that remain inside the same feature and do not depend on session-only diagnostics usually do not need this — skip the doc unless nuance would be lost.
10
+
11
+ ## The problem
12
+
11
13
  A routing agent (`@neo`, `@deyvin`) ends a session by suggesting:
12
14
  1. `/agent` — activate the next agent
13
- 2. `/clear` — fresh context window before continuing
14
-
15
- If the recommendation depends on diagnostic work done in this session (file reads, line numbers, decisions made, options weighed), and the user runs `/clear` first, **all of that context is lost**. The next agent reads only the seed prompt the user types which can never capture the nuance of the actual diagnostic.
16
-
17
- A seed prompt is a memory of a conversation. An artifact is a memory of work.
18
-
19
- ## The rule
20
-
21
- Before suggesting `/clear` to the user, persist the actionable diagnostic to `plans/{slug}.md` at the project root. Then the recommendation becomes:
22
-
23
- ```
15
+ 2. `/compact` — preserve continuity while freeing context before continuing
16
+
17
+ If the recommendation depends on diagnostic work done in this session (file reads, line numbers, decisions made, options weighed), and the user runs `/clear` first, **all of that context is lost**. `/compact` keeps a summary, but it can still compress away low-salience details. The next agent should read a durable artifact instead of relying on a seed prompt or chat memory.
18
+
19
+ A seed prompt is a memory of a conversation. An artifact is a memory of work.
20
+
21
+ ## The rule
22
+
23
+ Before suggesting `/compact` or `/clear` to the user, persist the actionable diagnostic to `plans/{slug}.md` at the project root. Then the recommendation becomes:
24
+
25
+ ```
24
26
  1. Activate /briefing (or /product / /architect / …)
25
- 2. /clear is safe — the next agent reads plans/{slug}.md
26
- ```
27
-
28
- `plans/` is the canonical input directory for `/aioson:agent:briefing` (and a useful seed for `/aioson:agent:product` too). The directory may not exist yet — create it.
29
-
30
- ## When to apply
31
-
32
- | Situation | Persist? |
33
- |---|---|
34
- | Handoff routes to an agent that takes raw plans (`/aioson:agent:briefing` first and foremost, sometimes `/aioson:agent:product`) | Yes |
35
- | Handoff routes to an agent that needs a discovery pass (`/aioson:agent:analyst`, `/aioson:agent:architect`, `/aioson:agent:sheldon`) | Yes — they read context from `.aioson/context/` AND from raw plans |
36
- | Same-session continuation (`/aioson:agent:dev` keeps going, `/aioson:agent:qa` reviews implementation just done) | No context is in chat |
37
- | Handoff happens via tracked live session (`aioson live:handoff`) | No — telemetry already carries the trail |
38
- | Trivial routing ("you want `/aioson:agent:setup` first") with no diagnostic to preserve | No |
39
-
40
- ## What to write
41
-
42
- Structure of `plans/{slug}.md` (lightweight — `/aioson:agent:briefing` will enrich it):
43
-
44
- ```md
45
- # {Short title} — raw plan
46
-
47
- > Status: raw input for /{next-agent}. Generated {date} during a /{this-agent} session.
48
-
49
- ## Why this exists
50
- 1-2 paragraphs framing the problem in the user's terms.
51
-
52
- ## Symptoms observed
53
- Concrete pinned facts: line numbers, file paths, command outputs. Not opinions.
54
-
55
- ## What's already delivered
56
- If part of the work landed in this session, name the commits/files.
57
-
58
- ## Proposed scope (if applicable)
59
- Layers / phases / options the next agent should consider. Mark recommendations.
60
-
61
- ## Open decisions for the next agent to surface
62
- Questions that need user input but were out of scope for this session.
63
-
64
- ## Pointers
65
- Files, commits, line numbers, related plans/. The next agent reads these directly.
66
-
67
- ## Out of scope
68
- What you deliberately did NOT cover. Prevents the next agent from re-litigating.
69
- ```
70
-
71
- Slug rules: kebab-case, descriptive, unique inside `plans/`. Examples: `lay-user-agent-mode.md`, `payment-integration.md`, `auth-rewrite-rfc.md`. Avoid generic names like `notes.md` or `plan.md`.
72
-
73
- ## What to tell the user
74
-
75
- After persisting, end with a clear handoff block. Example:
76
-
77
- ```
78
- ## Next Up
79
- - Routed to: /briefing
80
- - Activate: /briefing
81
- - Context persisted: plans/lay-user-agent-mode.md
82
- - /clear is safe — the next agent reads from the file
83
-
84
- Session artifacts written:
85
- - [x] plans/lay-user-agent-mode.md
86
- - [x] {any other files this session produced}
87
- ```
88
-
89
- ## Anti-patterns
90
-
91
- - **Inlining 2 KB of diagnostic as a "seed prompt" in the routing message.** The user shouldn't have to copy-paste a wall of text. Persist it.
92
- - **Persisting trivial routings.** A user who asks "what does `/aioson:agent:setup` do" doesn't need a `plans/` file written. Apply the table above.
93
- - **Persisting code archaeology.** Code lives in code; reading recommendations live in the artifact only when they would otherwise be lost across `/clear`.
94
- - **Forgetting to mention the file.** If you wrote `plans/{slug}.md` but the handoff message doesn't reference it, the user won't know to read it (or to let the next agent read it).
27
+ 2. /compact is safe for same-feature continuation — the next agent reads plans/{slug}.md
28
+ 3. /clear is safe only if the user wants a hard reset — the next agent still reads plans/{slug}.md
29
+ ```
30
+
31
+ `plans/` is the canonical input directory for `/aioson:agent:briefing` (and a useful seed for `/aioson:agent:product` too). The directory may not exist yet — create it.
32
+
33
+ ## When to apply
34
+
35
+ | Situation | Persist? |
36
+ |---|---|
37
+ | Handoff routes to an agent that takes raw plans (`/aioson:agent:briefing` first and foremost, sometimes `/aioson:agent:product`) | Yes |
38
+ | Handoff routes to an agent that needs a discovery pass (`/aioson:agent:analyst`, `/aioson:agent:architect`, `/aioson:agent:sheldon`) | Yes they read context from `.aioson/context/` AND from raw plans |
39
+ | Same-session continuation (`/aioson:agent:dev` keeps going, `/aioson:agent:qa` reviews implementation just done) | No — context is in chat |
40
+ | Handoff happens via tracked live session (`aioson live:handoff`) | No telemetry already carries the trail |
41
+ | Trivial routing ("you want `/aioson:agent:setup` first") with no diagnostic to preserve | No |
42
+
43
+ ## What to write
44
+
45
+ Structure of `plans/{slug}.md` (lightweight — `/aioson:agent:briefing` will enrich it):
46
+
47
+ ```md
48
+ # {Short title} — raw plan
49
+
50
+ > Status: raw input for /{next-agent}. Generated {date} during a /{this-agent} session.
51
+
52
+ ## Why this exists
53
+ 1-2 paragraphs framing the problem in the user's terms.
54
+
55
+ ## Symptoms observed
56
+ Concrete pinned facts: line numbers, file paths, command outputs. Not opinions.
57
+
58
+ ## What's already delivered
59
+ If part of the work landed in this session, name the commits/files.
60
+
61
+ ## Proposed scope (if applicable)
62
+ Layers / phases / options the next agent should consider. Mark recommendations.
63
+
64
+ ## Open decisions for the next agent to surface
65
+ Questions that need user input but were out of scope for this session.
66
+
67
+ ## Pointers
68
+ Files, commits, line numbers, related plans/. The next agent reads these directly.
69
+
70
+ ## Out of scope
71
+ What you deliberately did NOT cover. Prevents the next agent from re-litigating.
72
+ ```
73
+
74
+ Slug rules: kebab-case, descriptive, unique inside `plans/`. Examples: `lay-user-agent-mode.md`, `payment-integration.md`, `auth-rewrite-rfc.md`. Avoid generic names like `notes.md` or `plan.md`.
75
+
76
+ ## What to tell the user
77
+
78
+ After persisting, end with a clear handoff block. Example:
79
+
80
+ ```
81
+ ## Next Up
82
+ - Routed to: /briefing
83
+ - Activate: /briefing
84
+ - Context persisted: plans/lay-user-agent-mode.md
85
+ - /compact is recommended — the next agent reads from the file
86
+ - /clear is safe only if you want a hard reset
87
+
88
+ Session artifacts written:
89
+ - [x] plans/lay-user-agent-mode.md
90
+ - [x] {any other files this session produced}
91
+ ```
92
+
93
+ ## Anti-patterns
94
+
95
+ - **Inlining 2 KB of diagnostic as a "seed prompt" in the routing message.** The user shouldn't have to copy-paste a wall of text. Persist it.
96
+ - **Persisting trivial routings.** A user who asks "what does `/aioson:agent:setup` do" doesn't need a `plans/` file written. Apply the table above.
97
+ - **Persisting code archaeology.** Code lives in code; reading recommendations live in the artifact only when they would otherwise be lost across `/compact` or `/clear`.
98
+ - **Forgetting to mention the file.** If you wrote `plans/{slug}.md` but the handoff message doesn't reference it, the user won't know to read it (or to let the next agent read it).
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  description: "Pentester deep playbooks for app_target surfaces TS-A01..A07 — IDOR/BOLA, secrets/crypto, injection/XSS, race/insecure design, auth/rate-limit. Load when review_contract.target_mode = app_target."
3
+ agents: [pentester]
4
+ task_types: [security, pentest]
5
+ triggers: [pentest, app target, security review]
3
6
  ---
4
7
 
5
8
  # Pentester — App Target Playbooks