@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,8 +1,12 @@
1
1
  ---
2
2
  name: disk-first-artifacts
3
- description: Every artifact generated by an agent must be written to disk before session end — never only displayed in chat
3
+ description: Every artifact generated by an agent must be written to disk before session end — never only displayed in chat
4
4
  priority: 10
5
5
  version: 1.0.0
6
+ modes: [executing]
7
+ load_tier: always
8
+ task_types: [artifact-write, delivery]
9
+ triggers: [writing artifacts, session end, delivering output]
6
10
  ---
7
11
 
8
12
  # Disk-First: Artifacts Always on Disk
@@ -18,12 +22,12 @@ Every artifact produced by an AIOSON agent MUST be written to disk before sessio
18
22
  | `@analyst` | Discovery | `.aioson/context/discovery.md` |
19
23
  | `@analyst` | Requirements | `.aioson/context/requirements-{slug}.md` |
20
24
  | `@architect` | Architecture | `.aioson/context/architecture.md` |
21
- | `@ux-ui` | UI Spec | `.aioson/context/ui-spec.md` (current canonical; `ui-spec-{slug}.md` is accepted only when explicitly feature-scoped) |
25
+ | `@ux-ui` | UI Spec | `.aioson/context/ui-spec.md` (current canonical; `ui-spec-{slug}.md` is accepted only when explicitly feature-scoped) |
22
26
  | `@sheldon` | Manifest | `.aioson/plans/{slug}/manifest.md` |
23
- | `@pm` | Implementation Plan | `.aioson/context/implementation-plan-{slug}.md` |
24
- | `@dev` | Feature spec | `.aioson/context/spec-{slug}.md` |
25
- | `@dev` / `@deyvin` | Simple plan | `.aioson/context/simple-plans/{slug}.md` |
26
- | `@qa` | QA report | `.aioson/context/qa-report-{slug}.md` |
27
+ | `@pm` | Implementation Plan | `.aioson/context/implementation-plan-{slug}.md` |
28
+ | `@dev` | Feature spec | `.aioson/context/spec-{slug}.md` |
29
+ | `@dev` / `@deyvin` | Simple plan | `.aioson/context/simple-plans/{slug}.md` |
30
+ | `@qa` | QA report | `.aioson/context/qa-report-{slug}.md` |
27
31
  | `@squad` | Squad manifest | `.aioson/squads/{slug}/squad.manifest.json` |
28
32
  | `@squad` | Agent prompts | `.aioson/squads/{slug}/agents/{agent}.md` |
29
33
 
@@ -36,10 +40,10 @@ Every artifact produced by an AIOSON agent MUST be written to disk before sessio
36
40
 
37
41
  Exceptions: drafts shown mid-session for validation (before final save), artifacts explicitly cancelled by user.
38
42
 
39
- `project-pulse.md` must be updated at session end regardless of other artifacts.
43
+ `.aioson/context/project-pulse.md` must be updated at session end regardless of other artifacts.
40
44
 
41
45
  ## On violation detected
42
46
 
43
47
  1. Write the artifact before closing — never defer to next session.
44
48
  2. If content was shown in chat, use it to write the file now.
45
- 3. Update `project-pulse.md`.
49
+ 3. Update `.aioson/context/project-pulse.md`.
@@ -4,6 +4,10 @@ description: All monetary values must be stored as integer cents, never as float
4
4
  agents: [dev, architect, qa]
5
5
  priority: 5
6
6
  version: 1.0.0
7
+ modes: [planning, executing]
8
+ task_types: [payment, billing, pricing]
9
+ load_tier: trigger
10
+ triggers: [money, monetary values, price, pricing, currency, cents, payment, billing, checkout, invoice, refund]
7
11
  ---
8
12
 
9
13
  # Monetary Values Convention
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: implementation-structure-and-data-access
3
+ description: Build maintainable implementation slices with framework-first structure, small files, clear module boundaries, and data access kept out of presentation/control flow.
4
+ priority: 8
5
+ version: 1.0.0
6
+ agents: [architect, dev, deyvin, qa, tester, pentester]
7
+ modes: [planning, executing]
8
+ task_types: [implementation-architecture, implementation, refactor, module-boundary, data-access, framework-implementation]
9
+ load_tier: trigger
10
+ triggers: [componentization, split module, folder structure, framework conventions, Laravel, controller, service layer, repository, query builder, database query, raw SQL, maintainability, files too large]
11
+ paths: [app/**, src/**, lib/**, routes/**, database/**, tests/**, resources/**, config/**, template/**]
12
+ ---
13
+
14
+ # Implementation Structure And Data Access
15
+
16
+ Build code in small, maintainable units that fit the installed framework. Prefer the project's existing structure and the framework's official extension points before creating pure custom plumbing.
17
+
18
+ ## Framework-First Rule
19
+
20
+ - Detect the installed framework from project context, package manifests, lockfiles, config files, and existing directories.
21
+ - Use framework-native features before hand-rolled alternatives when they solve the same problem cleanly.
22
+ - If a framework convention exists locally, follow the local convention first; if the project has no pattern yet, follow the framework convention.
23
+ - Do not introduce a new architectural pattern when a nearby module already solves the same class of problem.
24
+
25
+ ## Componentization
26
+
27
+ - Keep files focused on one responsibility. Split large files before adding unrelated behavior.
28
+ - Put orchestration in services/actions/use-cases, not in controllers, route handlers, UI components, commands, or jobs.
29
+ - Keep controllers and route handlers thin: validate input, call application logic, return a response.
30
+ - Keep UI components focused on rendering and interaction state; move business rules and data access to the appropriate application layer.
31
+ - Prefer cohesive folders/subfolders when a feature grows: requests, resources, actions/services, queries/repositories, policies, jobs, events/listeners, tests, and feature-local components where the framework supports them.
32
+ - Add an abstraction only when it removes real duplication, clarifies a boundary, or matches an established local pattern.
33
+
34
+ ## Data Access Boundary
35
+
36
+ - Do not expose raw SQL, query builders, ORM chains, or database filtering deep inside controllers, route handlers, UI components, views, jobs, or unrelated services.
37
+ - Put data access in the framework-recommended place: model scopes, repositories, query objects, data mappers, service methods, or dedicated persistence modules depending on the stack.
38
+ - Parameterize all queries. Never interpolate user input into SQL strings or query fragments.
39
+ - Keep read queries and write transactions explicit. Use framework transaction helpers for multi-step writes.
40
+ - For Laravel, prefer FormRequest for validation, Eloquent scopes or dedicated query classes for reusable filters, policies for authorization, resources for API shape, jobs for background work, and service/action classes for application workflows.
41
+ - For non-Laravel stacks, translate the same boundary to the framework's idioms instead of copying Laravel folder names blindly.
42
+
43
+ ## Review Checklist
44
+
45
+ - The implementation follows existing project/framework conventions.
46
+ - Files stay small enough to scan and test.
47
+ - Controllers, route handlers, UI components, and views do not contain persistence details.
48
+ - Queries live in the proper data access layer and are parameterized.
49
+ - Scan controllers, routes, views, and components for `DB::`, raw SQL, or long query-builder chains; move them to the data access layer.
50
+ - New folders are justified by framework convention or repeated local structure.
@@ -3,6 +3,8 @@ name: output-brevity
3
3
  description: All agents must produce terse, direct output — no preambles, no trailing summaries, no narration of actions
4
4
  priority: 8
5
5
  version: 1.0.0
6
+ modes: [planning, executing]
7
+ load_tier: always
6
8
  ---
7
9
 
8
10
  # Output Brevity
@@ -1,9 +1,14 @@
1
1
  ---
2
2
  name: prd-section-ownership
3
- description: Defines which agent owns each PRD section — other agents cannot modify sections they do not own
3
+ description: Defines which agent owns each PRD section — other agents cannot modify sections they do not own
4
4
  priority: 9
5
5
  version: 1.0.0
6
6
  agents: [product, pm, analyst, architect, ux-ui, sheldon]
7
+ modes: [planning, executing]
8
+ task_types: [prd-edit, prd-enrichment]
9
+ load_tier: trigger
10
+ triggers: [prd, acceptance criteria, delivery phases, editing prd, enriching prd]
11
+ paths: [.aioson/context/prd*.md]
7
12
  ---
8
13
 
9
14
  # PRD Section Ownership
@@ -14,16 +19,16 @@ agents: [product, pm, analyst, architect, ux-ui, sheldon]
14
19
 
15
20
  | PRD Section | Owner | Others may |
16
21
  |---|---|---|
17
- | `## Objective` | `@product` | Read only |
18
- | `## Problem` | `@product` | Read only |
19
- | `## Users And Personas` | `@product` | Read only |
20
- | `## Features` | `@product` | Read only |
21
- | `## Acceptance Criteria` | `@product` (structure) / `@pm` (enrichment) | `@analyst`, `@architect` add technical sub-items |
22
- | `## Delivery Phases` | `@pm` | Read only |
23
- | `## Technical Constraints` | `@architect` | Read only |
24
- | `## UX Considerations` | `@ux-ui` | Read only |
25
- | `## Risks` | `@pm` | `@analyst`, `@architect` add new risks only |
26
- | `## Registered Decisions` | `@sheldon` (project) / `@pm` (feature) | Read only |
22
+ | `## Objective` | `@product` | Read only |
23
+ | `## Problem` | `@product` | Read only |
24
+ | `## Users And Personas` | `@product` | Read only |
25
+ | `## Features` | `@product` | Read only |
26
+ | `## Acceptance Criteria` | `@product` (structure) / `@pm` (enrichment) | `@analyst`, `@architect` add technical sub-items |
27
+ | `## Delivery Phases` | `@pm` | Read only |
28
+ | `## Technical Constraints` | `@architect` | Read only |
29
+ | `## UX Considerations` | `@ux-ui` | Read only |
30
+ | `## Risks` | `@pm` | `@analyst`, `@architect` add new risks only |
31
+ | `## Registered Decisions` | `@sheldon` (project) / `@pm` (feature) | Read only |
27
32
 
28
33
  ## Modification rule
29
34
 
@@ -32,7 +37,7 @@ An agent may only modify sections it owns. Non-owners may only **add** a new sub
32
37
  ## Safe addition pattern
33
38
 
34
39
  ```markdown
35
- ## Acceptance Criteria
40
+ ## Acceptance Criteria
36
41
  <!-- @product: owner of this section -->
37
42
 
38
43
  - CA-01: User can schedule an appointment
@@ -3,14 +3,19 @@ name: security-baseline
3
3
  description: Secure by Default baseline controls for technical agents
4
4
  priority: 10
5
5
  version: 1.0.0
6
- agents: [analyst, architect, dev, qa]
6
+ agents: [analyst, architect, sheldon, dev, qa, tester, pentester]
7
+ modes: [planning, executing]
8
+ task_types: [security, auth, hardening]
9
+ load_tier: trigger
10
+ triggers: [security, auth, login, password, upload, secret, token, permission, ownership, rate limit, payment, multi-tenant, sanitize]
7
11
  ---
8
12
 
9
13
  # Security Baseline — Secure by Default
10
14
 
11
15
  > Implements `Article VII — Zero Trust by Default` of the AIOSON constitution.
12
- > Loaded by `@analyst`, `@architect`, `@dev`, and `@qa`. Other agents must not
13
- > load this rule product, copy, design and orchestration scopes are out of band.
16
+ > Loaded by technical and PRD-enrichment agents when security triggers fire:
17
+ > `@analyst`, `@architect`, `@sheldon`, `@dev`, `@qa`, `@tester`, and
18
+ > `@pentester`. Product, copy, design and orchestration scopes are out of band.
14
19
 
15
20
  This rule defines the minimum security baseline every technical agent must
16
21
  respect. It does **not** promise absolute security. It declares concrete
@@ -1,9 +1,14 @@
1
1
  ---
2
2
  name: simple-plan-lane
3
- description: Lightweight implementation lane for bounded technical work that does not justify a PRD or full workflow.
3
+ description: Lightweight implementation lane for bounded technical work that does not justify a PRD or full workflow, with an implementation intelligence checkpoint before coding.
4
4
  priority: 9
5
5
  version: 1.0.0
6
6
  agents: [dev, deyvin, qa, neo]
7
+ modes: [planning, executing]
8
+ task_types: [simple-plan, bounded-work, refactor]
9
+ load_tier: trigger
10
+ triggers: [simple plan, bounded technical work, small fix, refactor, polish, implementation intelligence]
11
+ paths: [.aioson/context/simple-plans/**]
7
12
  ---
8
13
 
9
14
  # Simple Plan Lane
@@ -14,6 +19,14 @@ Canonical artifact:
14
19
 
15
20
  - `.aioson/context/simple-plans/{slug}.md`
16
21
 
22
+ A simple plan is not valid as a bare TODO list. Before implementation it must record:
23
+
24
+ - selected context/rules/docs or the CLI-less fallback evidence
25
+ - the existing project/framework pattern to follow, or `none found`
26
+ - framework leverage before custom code
27
+ - structure and data boundary placement
28
+ - useful options considered as `include now`, `defer`, or `escalate`
29
+
17
30
  Use this lane only when all conditions are true:
18
31
 
19
32
  - Objective fits in one sentence.
@@ -24,6 +37,7 @@ Use this lane only when all conditions are true:
24
37
  - The work does not touch auth, money, ownership, permissions, secrets, destructive deletion, or sensitive data storage.
25
38
  - Expected implementation is small and reviewable.
26
39
  - Done criteria and verification command can be written before coding.
40
+ - Useful implementation options can be classified without changing product, UX, domain, architecture, or security ownership.
27
41
 
28
42
  Escalate instead:
29
43
 
@@ -32,6 +46,8 @@ Escalate instead:
32
46
  - `@architect` for cross-module architecture or structural decisions.
33
47
  - `@pentester` / `@qa` for sensitive surfaces or formal verification.
34
48
 
49
+ If an option would widen behavior, UX, permissions, data sensitivity, architecture, integration scope, or verification ownership, do not implement it as part of the simple plan. Park it under `Useful options considered -> Escalate` and hand off.
50
+
35
51
  Lifecycle:
36
52
 
37
53
  - `draft` -> `in_progress` -> `done`, `paused`, or `abandoned`
@@ -40,9 +56,10 @@ Lifecycle:
40
56
  When `@dev` or `@deyvin` uses this lane:
41
57
 
42
58
  1. Write the simple plan to disk before implementation.
43
- 2. Run `aioson dev:state:write . --feature={slug} --next="<first slice>" --context=simple-plan`.
44
- 3. Implement in small slices.
45
- 4. Run the listed verification.
46
- 5. Update the simple plan status and session state before closing.
59
+ 2. Include `Context selected`, `Implementation intelligence`, and `Useful options considered` sections.
60
+ 3. Run `aioson dev:state:write . --feature={slug} --next="<first slice>" --context=simple-plan`.
61
+ 4. Implement in small slices, only including options classified as `include now`.
62
+ 5. Run the listed verification.
63
+ 6. Update the simple plan status and session state before closing.
47
64
 
48
65
  Detailed guide: `.aioson/docs/dev/simple-plan-lane.md`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: source-code-language-convention
3
+ description: Source code identifiers and generated implementation code use technical English; user-facing copy still follows the project language.
4
+ priority: 8
5
+ version: 1.0.0
6
+ agents: [architect, dev, deyvin, qa, tester]
7
+ modes: [planning, executing]
8
+ task_types: [implementation, refactor, code-generation, naming, framework-implementation]
9
+ load_tier: trigger
10
+ triggers: [source code, code language, naming, variables, functions, classes, implement, refactor, Laravel, PHP, controller, service, repository, migration]
11
+ paths: [app/**, src/**, lib/**, routes/**, database/**, tests/**, resources/**, config/**, template/**]
12
+ ---
13
+
14
+ # Source Code Language Convention
15
+
16
+ Source code is implementation interface. Write identifiers, filenames, classes, functions, variables, database artifacts, migrations, service names, comments that explain code behavior, and generated framework code in technical English.
17
+
18
+ User-facing copy, documentation artifacts, PRDs, specs, CLI explanations, validation messages, and product text follow `interaction_language` from project context, falling back to `conversation_language`.
19
+
20
+ ## Required Behavior
21
+
22
+ - Use English for source code identifiers: classes, methods, functions, variables, enums, constants, routes, migrations, factories, seeders, tests, services, jobs, events, listeners, policies, resources, repositories, query objects, and component names.
23
+ - Before inventing names, inspect nearby code and follow the project's naming pattern.
24
+ - If the project pattern is unclear, inspect `.aioson/context/bootstrap/how-it-works.md` and `.aioson/context/bootstrap/current-state.md` when selected by `context:select`; otherwise use the framework's official naming conventions.
25
+ - Keep framework-generated names conventional. For Laravel, prefer standard names such as `OrderController`, `StoreOrderRequest`, `OrderPolicy`, `OrderResource`, `CreateOrdersTable`, and `OrderFactory`.
26
+ - Do not translate technical identifiers into the conversation language. Avoid names like `PedidoController`, `criarUsuario`, `valorTotalEmCentavos`, or `servicoPagamento` in source code.
27
+ - Domain terms with established local legal or regulatory meaning may appear in user-facing copy or comments that quote regulation, but code identifiers still need a clear English abstraction.
28
+
29
+ ## Review Checklist
30
+
31
+ - New source files and identifiers are in English.
32
+ - Names match the local framework and project pattern.
33
+ - User-facing text remains in the project language.
34
+ - No implementation layer uses translated variable, class, method, or migration names.
@@ -1,9 +1,14 @@
1
1
  ---
2
2
  name: spec-level-ownership
3
- description: spec.md is project-level, spec-{slug}.md is feature-level — the two levels never mix
3
+ description: spec.md is project-level, spec-{slug}.md is feature-level — the two levels never mix
4
4
  priority: 9
5
5
  version: 1.0.0
6
6
  agents: [dev, qa, pm, sheldon]
7
+ modes: [planning, executing]
8
+ task_types: [spec-write, spec-update]
9
+ load_tier: trigger
10
+ triggers: [spec, feature spec, project spec, updating spec, writing spec]
11
+ paths: [.aioson/context/spec*.md]
7
12
  ---
8
13
 
9
14
  # Spec Ownership: Project vs Feature Level
@@ -19,16 +24,16 @@ Two distinct levels — never mix them.
19
24
 
20
25
  1. `spec.md` never receives feature-specific content → create `spec-{slug}.md` for that.
21
26
  2. `spec-{slug}.md` never receives project decisions → stack decisions go in `spec.md` or `architecture.md`.
22
- 3. `spec-{slug}.md` is created by `@dev` at feature implementation start. One file per slug. Slug must match `prd-{slug}.md` and `implementation-plan-{slug}.md`.
23
- 4. No `spec-{slug}.md` without a corresponding `prd-{slug}.md`.
24
- 5. Simple-plan work does not require `spec-{slug}.md`; keep its scope and decisions in `.aioson/context/simple-plans/{slug}.md` unless the work expands into a real feature.
27
+ 3. `spec-{slug}.md` is created by `@dev` at feature implementation start. One file per slug. Slug must match `prd-{slug}.md` and `implementation-plan-{slug}.md`.
28
+ 4. No `spec-{slug}.md` without a corresponding `prd-{slug}.md`.
29
+ 5. Simple-plan work does not require `spec-{slug}.md`; keep its scope and decisions in `.aioson/context/simple-plans/{slug}.md` unless the work expands into a real feature.
25
30
 
26
31
  ## Mandatory structure: spec-{slug}.md
27
32
 
28
33
  ```markdown
29
34
  ---
30
35
  feature: {slug}
31
- status: in_progress | paused | done | abandoned
36
+ status: in_progress | paused | done | abandoned
32
37
  phase_gates:
33
38
  requirements: approved | pending | skipped
34
39
  design: approved | pending | skipped
@@ -4,6 +4,11 @@ description: Territory boundaries and integration pattern for AIOSON squads —
4
4
  priority: 9
5
5
  version: 1.0.0
6
6
  agents: [dev, sheldon, pm, qa, architect]
7
+ modes: [planning, executing]
8
+ task_types: [squad-integration, driver]
9
+ load_tier: trigger
10
+ triggers: [squad, driver, embedding prompts, squad runner, llm call]
11
+ paths: [.aioson/squads/**, src/services/**]
7
12
  ---
8
13
 
9
14
  # Squad Driver Pattern
@@ -8,12 +8,12 @@
8
8
  prd*.md
9
9
  → sheldon-enrichment-{slug}.md (optional enrichment layer)
10
10
  → requirements-{slug}.md (entities, rules, ACs — @analyst)
11
- → spec-{slug}.md (feature memory — @analyst seeds, @dev fills)
12
- → architecture.md (tech decisions — @architect)
13
- → ui-spec.md (UI/UX contract — @ux-ui when UI is in scope)
14
- → design-doc*.md (scope-specific decisions — @architect)
15
- → implementation-plan-{slug}.md (execution sequence — @pm for MEDIUM, AC-SDLC-15)
16
- → spec-{slug}.md (updated) (living state during execution — @dev)
11
+ → spec-{slug}.md (feature memory — @analyst seeds, @dev fills)
12
+ → architecture.md (tech decisions — @architect)
13
+ → ui-spec-{slug}.md (UI/UX contract — @ux-ui when UI is in scope)
14
+ → design-doc*.md (scope-specific decisions — @architect)
15
+ → implementation-plan-{slug}.md (execution sequence — @pm for MEDIUM, AC-SDLC-15)
16
+ → spec-{slug}.md (updated) (living state during execution — @dev)
17
17
  ```
18
18
 
19
19
  ## Artifact ownership
@@ -22,32 +22,33 @@ prd*.md
22
22
  |----------|-----------|-------------|---------|
23
23
  | `prd.md` / `prd-{slug}.md` | @product | @sheldon (via sheldon-enrichment) | all downstream |
24
24
  | `sheldon-enrichment-{slug}.md` | @sheldon | @sheldon | @sheldon (re-entry), @analyst |
25
- | `sheldon-validation.md` | @sheldon | — | all agents before starting MEDIUM |
25
+ | `sheldon-validation-{slug}.md` (project: `sheldon-validation.md`) | @sheldon (MEDIUM only) | — | downstream agents when present; `artifact:validate` surfaces it separately from enrichment |
26
26
  | `discovery.md` | @analyst | — | @architect, @dev |
27
27
  | `requirements-{slug}.md` | @analyst | — | @architect, @dev, @qa |
28
28
  | `spec-{slug}.md` | @analyst (skeleton) | @dev (execution state) | @dev, @deyvin, @qa |
29
29
  | `spec.md` | @dev | @dev | @dev, @deyvin |
30
- | `architecture.md` | @architect | — | @dev, @ux-ui |
31
- | `design-doc*.md` | @architect | — | @dev, @ux-ui |
32
- | `ui-spec.md` | @ux-ui | — | @dev only for UI/frontend implementation, @pm/@orchestrator when UI phases exist |
33
- | `implementation-plan-{slug}.md` | @pm (MEDIUM, AC-SDLC-15) | — | @dev, @deyvin, @orchestrator |
34
-
35
- ## Dev context contract
36
-
37
- `@dev` should not activate with the entire artifact chain loaded. The final pre-dev agent writes `dev-state.md` with a short primary package, and `implementation-plan-{slug}.md` carries phase-triggered loads:
38
-
39
- - `requirements-{slug}.md` — data, rules, ACs, migrations, edge cases
40
- - `architecture.md` — module boundaries, integrations, security, cross-cutting concerns
41
- - `design-doc*.md` / `readiness*.md` — implementation paths, reuse decisions, readiness blockers
42
- - `ui-spec.md` — UI components, frontend routes, interaction states, visual QA
43
- - PRD / Sheldon enrichment — only for product ambiguity
30
+ | `architecture.md` | @architect | — | @dev, @ux-ui |
31
+ | `design-doc*.md` | @architect | — | @dev, @ux-ui |
32
+ | `ui-spec-{slug}.md` (project: `ui-spec.md`) | @ux-ui | — | @dev only for UI/frontend implementation, @pm/@orchestrator when UI phases exist |
33
+ | `implementation-plan-{slug}.md` | @pm (MEDIUM, AC-SDLC-15) | — | @dev, @deyvin, @orchestrator |
34
+
35
+ ## Dev context contract
36
+
37
+ `@dev` should not activate with the entire artifact chain loaded. The final pre-dev agent writes `dev-state.md` with a short primary package, and `implementation-plan-{slug}.md` carries phase-triggered loads:
38
+
39
+ - `requirements-{slug}.md` — data, rules, ACs, migrations, edge cases
40
+ - `architecture.md` — module boundaries, integrations, security, cross-cutting concerns
41
+ - `design-doc*.md` / `readiness*.md` — implementation paths, reuse decisions, readiness blockers
42
+ - `ui-spec-{slug}.md` (project: `ui-spec.md`) — UI components, frontend routes, interaction states, visual QA
43
+ - PRD / Sheldon enrichment — only for product ambiguity
44
44
 
45
45
  ## Naming conventions
46
46
 
47
- - Project-level artifacts: `prd.md`, `discovery.md`, `spec.md`, `architecture.md`, `ui-spec.md`
48
- - Feature-level artifacts: always use `{slug}` suffix — `prd-{slug}.md`, `requirements-{slug}.md`, `spec-{slug}.md`
47
+ - Project-level artifacts: `prd.md`, `discovery.md`, `spec.md`, `architecture.md`
48
+ - Feature-level artifacts: always use `{slug}` suffix — `prd-{slug}.md`, `requirements-{slug}.md`, `spec-{slug}.md`, `design-doc-{slug}.md`, `readiness-{slug}.md`, `scope-check-{slug}.md`, `ui-spec-{slug}.md`, `sheldon-enrichment-{slug}.md`, `sheldon-validation-{slug}.md`
49
49
  - Enrichment: `sheldon-enrichment.md` (project) or `sheldon-enrichment-{slug}.md` (feature)
50
50
  - Plans: `.aioson/plans/{slug}/manifest.md` + `plan-{slug-fase}.md` files
51
+ - **Resolving `{slug}`:** agents must run `aioson feature:current .` (single source of truth — pulse `active_feature`, else the unique `in_progress` feature in `features.md`) before choosing an output path. A bare feature artifact path is a bug: it collides across features. Reserve bare names for genuine project-level work only.
51
52
 
52
53
  ## What NOT to create
53
54
 
@@ -30,6 +30,10 @@
30
30
 
31
31
  **0–1 = MICRO / 2–3 = SMALL / 4–6 = MEDIUM**
32
32
 
33
+ ## Sensitive-surface floor
34
+
35
+ Independent of the 0–6 score, a feature touching any sensitive surface — money/payments, auth, ownership/authz boundaries, uploads, external URLs/webhooks, secrets/credentials, or sensitive storage — has a **floor of SMALL** (never MICRO). `aioson classify` applies this deterministically and reports `floored: true` + `sensitive_surfaces`. The floor only raises the tier; an explicit `sensitive_surfaces: [..]` in the PRD frontmatter forces it when content detection misses.
36
+
33
37
  ## Gate behavior by classification
34
38
 
35
39
  - **MICRO**: gates are informational, never blocking. @dev may proceed without explicit approval.
@@ -35,7 +35,7 @@ At session start, after reading `spec-{slug}.md`:
35
35
  3. If versions match: proceed normally
36
36
 
37
37
  Additionally, at session start for SMALL/MEDIUM:
38
- 4. Check if any `AC-{slug}-{N}` from `requirements-{slug}.md` has a corresponding test file
38
+ 4. Run `aioson ac:test-audit . --feature={slug}` when a feature slug exists, or manually check that each `AC-*` from `requirements-{slug}.md` appears in a corresponding test file
39
39
  5. If coverage is < 50%:
40
40
  > "⚠ AC coverage is low ({N}/{M} ACs have tests). Consider writing missing tests before adding new behavior."
41
41
  This is informational, not blocking.
@@ -45,6 +45,6 @@ Additionally, at session start for SMALL/MEDIUM:
45
45
  - `spec-{slug}.md` must be updated at the end of every implementation session — see `maintenance-and-state.md` for format
46
46
  - Gate C from `approval-gates.md` means the implementation plan is locked — do not re-discuss pre-taken decisions
47
47
  - Treat `dev-state.md` as the primary activation package and `implementation-plan-{slug}.md` as the source for phase-triggered context loads
48
- - Gate D verification must happen before marking a phase complete — not just "I think it works"
48
+ - Gate D verification must happen before marking a phase complete — not just "I think it works". The deterministic floor is `aioson ac:test-audit . --feature={slug}` plus the real test command.
49
49
  - If `phase_gates.plan` is `pending` and classification is SMALL/MEDIUM, suggest generating an implementation plan before proceeding
50
50
  - If `design-doc.md` or `readiness.md` is missing for SMALL/MEDIUM, route to `@discovery-design-doc` instead of coding first
@@ -27,4 +27,4 @@
27
27
  - @qa is the external verifier of @dev's Gate D self-certification — "I think it works" from @dev is not evidence until @qa confirms
28
28
  - Gate D verification from `approval-gates.md` maps directly to @qa's adversarial probe protocol: truths = behavior tests, artifacts = file existence checks, key_links = wiring verification
29
29
  - For MEDIUM projects, @qa should verify that `spec_version` in `spec-{slug}.md` matches the version that @dev was working from — if not, flag as potential drift
30
- - AC coverage mapping in the QA report should use the same `AC-{slug}-{N}` format from `requirements-{slug}.md`
30
+ - AC coverage mapping in the QA report should use the same `AC-*` format from `requirements-{slug}.md`; run `aioson ac:test-audit . --feature={slug}` and treat missing AC test evidence as Gate D blocked.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: briefing-expansion-scout
3
+ description: "Briefing process skill for early feature expansion scouting. Use in @briefing or @briefing-refiner when an idea may have a rich surface and the user wants to explore whether it is worth pursuing before PRD: tools, workflows, generators, dashboards, editors, collaboration, automation, templates, media outputs, or Trello/CRM/Kanban-like systems."
4
+ ---
5
+
6
+ # Briefing Expansion Scout
7
+
8
+ Use this skill to explore possibilities before scope is committed. Do not turn ideas into PRD scope. Produce discussion material that helps the user or team decide whether the idea deserves product definition.
9
+
10
+ ## Load
11
+
12
+ Read `.aioson/docs/feature-expansion-taxonomy.md` before writing the artifact.
13
+
14
+ Also read existing expansion artifacts when present:
15
+
16
+ - `.aioson/briefings/{slug}/expansion-scout.md`
17
+ - `.aioson/context/features/{slug}/scope-expansion.md`
18
+ - `.aioson/context/features/{slug}/expansion-audit.md`
19
+
20
+ ## Trigger Guard
21
+
22
+ Run only when one is true:
23
+
24
+ - user asks to explore, expand, evaluate, or pressure-test an idea
25
+ - the idea has a rich surface: workflow, collaboration, editor/builder, generator, dashboard, automation, templates, media output, repeated operational use
26
+ - briefing-refiner detects that an existing briefing feels too thin for team discussion
27
+
28
+ If the idea is a tiny bugfix or a one-field CRUD addition, skip and say the normal briefing path is enough.
29
+
30
+ ## Output
31
+
32
+ Write `.aioson/briefings/{slug}/expansion-scout.md`.
33
+
34
+ Use this structure:
35
+
36
+ ```md
37
+ # Expansion Scout - {Feature}
38
+
39
+ ## Why Scout
40
+ - Trigger:
41
+ - Prior expansion artifacts found:
42
+
43
+ ## Possibility Map
44
+ | Lens | Useful possibilities | Why it matters | Risk |
45
+ |---|---|---|---|
46
+
47
+ ## Likely MVP Shape
48
+ - Core:
49
+ - Recommended MVP:
50
+ - Not enough evidence yet:
51
+
52
+ ## Discussion Questions
53
+ - [decision-required] ...
54
+ - [research-able] ...
55
+ - [testable] ...
56
+
57
+ ## Do Not Pull Into MVP Yet
58
+ - ...
59
+
60
+ ## Recommendation
61
+ Proceed to product definition? yes / no / only after questions.
62
+ ```
63
+
64
+ ## Rules
65
+
66
+ - Keep this artifact exploratory.
67
+ - Mark assumptions explicitly.
68
+ - Separate attractive ideas from useful ideas.
69
+ - Prefer 3-7 high-signal possibilities over exhaustive lists.
70
+ - Do not approve V2 ideas; park them.
71
+ - Do not modify the PRD.
72
+
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: product-scope-expansion
3
+ description: "Product process skill for controlled scope expansion before writing or updating a PRD. Use in @product when a feature has a rich surface, when a briefing expansion scout exists, or when the user asks for a more complete MVP without turning the feature into an oversized V2."
4
+ ---
5
+
6
+ # Product Scope Expansion
7
+
8
+ Use this skill to convert product possibilities into an approvable scope. The output informs the PRD; it does not replace user approval.
9
+
10
+ ## Load
11
+
12
+ Read `.aioson/docs/feature-expansion-taxonomy.md`.
13
+
14
+ Read prior expansion artifacts when present:
15
+
16
+ - `.aioson/briefings/{slug}/expansion-scout.md`
17
+ - `.aioson/context/features/{slug}/scope-expansion.md`
18
+ - `.aioson/context/features/{slug}/expansion-audit.md`
19
+
20
+ ## Ask Before Expanding
21
+
22
+ When the feature is not obviously rich, ask a short choice:
23
+
24
+ 1. Continue with simple MVP
25
+ 2. Run recommended expansion
26
+ 3. Run full expansion, then cut back to MVP
27
+
28
+ When a scout artifact exists or the user explicitly asks for richer product thinking, run the skill without re-asking unless expansion would materially change classification or timeline.
29
+
30
+ ## Output
31
+
32
+ Write `.aioson/context/features/{slug}/scope-expansion.md`.
33
+
34
+ Use this structure:
35
+
36
+ ```md
37
+ # Scope Expansion - {Feature}
38
+
39
+ ## Inputs
40
+ - PRD/briefing source:
41
+ - Prior expansion artifacts:
42
+ - User approval mode: simple / recommended / full
43
+
44
+ ## Scope Buckets
45
+ | Bucket | Items | Why | Approval needed |
46
+ |---|---|---|---|
47
+ | Core | ... | ... | no |
48
+ | Recommended MVP | ... | ... | maybe |
49
+ | Optional V1 | ... | ... | yes |
50
+ | Delight | ... | ... | yes |
51
+ | V2 / Later | ... | ... | yes, future |
52
+ | Cut List | ... | ... | no |
53
+
54
+ ## Recommended Product Shape
55
+ - Include in PRD:
56
+ - Keep as optional:
57
+ - Explicitly defer:
58
+
59
+ ## Risks And Classification
60
+ - Scope risk:
61
+ - Delivery risk:
62
+ - Classification impact:
63
+
64
+ ## Cheap / Native Implementation Ideas
65
+ - ...
66
+ ```
67
+
68
+ ## PRD Incorporation Rules
69
+
70
+ - Incorporate Core and approved Recommended MVP into the PRD.
71
+ - Do not silently include Optional V1, Delight, or V2 items.
72
+ - If expansion raises classification, surface that before finalizing.
73
+ - Preserve "small project, small solution": a rich feature can still have a small first release.
74
+