@jaimevalasek/aioson 1.23.0 → 1.23.3

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 (82) hide show
  1. package/docs/en/5-reference/cli-reference.md +85 -0
  2. package/docs/pt/4-agentes/pm.md +31 -4
  3. package/docs/pt/5-referencia/README.md +3 -0
  4. package/docs/pt/5-referencia/autopilot-handoff.md +131 -0
  5. package/docs/pt/5-referencia/comandos-cli.md +72 -6
  6. package/docs/pt/5-referencia/harness-retro.md +133 -0
  7. package/docs/pt/5-referencia/loop-guardrails.md +225 -0
  8. package/docs/pt/5-referencia/sdd-automation-scripts.md +25 -13
  9. package/package.json +1 -1
  10. package/src/cli.js +54 -29
  11. package/src/commands/agent-epilogue.js +186 -0
  12. package/src/commands/context-select.js +34 -0
  13. package/src/commands/preflight-context.js +13 -9
  14. package/src/commands/review-cycle.js +328 -0
  15. package/src/commands/runtime.js +4 -4
  16. package/src/commands/state-save.js +2 -0
  17. package/src/commands/workflow-execute.js +138 -28
  18. package/src/commands/workflow-next.js +3 -2
  19. package/src/commands/workflow-status.js +30 -10
  20. package/src/constants.js +15 -13
  21. package/src/context-memory.js +50 -25
  22. package/src/context-selector.js +420 -0
  23. package/src/gateway-pointer-merge.js +25 -4
  24. package/src/i18n/messages/en.js +13 -7
  25. package/src/i18n/messages/es.js +13 -7
  26. package/src/i18n/messages/fr.js +13 -7
  27. package/src/i18n/messages/pt-BR.js +13 -7
  28. package/src/parser.js +1 -1
  29. package/src/squad/preflight-context.js +26 -27
  30. package/template/.aioson/agents/analyst.md +41 -46
  31. package/template/.aioson/agents/architect.md +33 -46
  32. package/template/.aioson/agents/briefing.md +76 -67
  33. package/template/.aioson/agents/dev.md +66 -59
  34. package/template/.aioson/agents/deyvin.md +124 -114
  35. package/template/.aioson/agents/discovery-design-doc.md +35 -22
  36. package/template/.aioson/agents/manifests/architect.manifest.json +11 -1
  37. package/template/.aioson/agents/manifests/dev.manifest.json +15 -0
  38. package/template/.aioson/agents/manifests/pm.manifest.json +20 -0
  39. package/template/.aioson/agents/orchestrator.md +31 -18
  40. package/template/.aioson/agents/pentester.md +7 -7
  41. package/template/.aioson/agents/pm.md +41 -35
  42. package/template/.aioson/agents/product.md +116 -165
  43. package/template/.aioson/agents/qa.md +21 -14
  44. package/template/.aioson/agents/scope-check.md +46 -24
  45. package/template/.aioson/agents/tester.md +12 -6
  46. package/template/.aioson/agents/ux-ui.md +36 -31
  47. package/template/.aioson/agents/validator.md +3 -3
  48. package/template/.aioson/config/autonomy-protocol.json +7 -0
  49. package/template/.aioson/design-docs/code-reuse.md +10 -5
  50. package/template/.aioson/design-docs/componentization.md +10 -5
  51. package/template/.aioson/design-docs/file-size.md +10 -5
  52. package/template/.aioson/design-docs/folder-structure.md +10 -5
  53. package/template/.aioson/design-docs/naming.md +10 -5
  54. package/template/.aioson/docs/autonomy-protocol.md +2 -2
  55. package/template/.aioson/docs/autopilot-handoff.md +32 -21
  56. package/template/.aioson/docs/briefing/briefing-craft.md +9 -3
  57. package/template/.aioson/docs/deyvin/continuity-recovery.md +18 -22
  58. package/template/.aioson/docs/product/conversation-playbook.md +8 -3
  59. package/template/.aioson/docs/product/prd-contract.md +8 -3
  60. package/template/.aioson/docs/product/quality-lens.md +8 -3
  61. package/template/.aioson/docs/product/research-loop.md +8 -3
  62. package/template/.aioson/docs/ux-ui/accessibility-audit.md +7 -2
  63. package/template/.aioson/docs/ux-ui/audit-mode.md +7 -2
  64. package/template/.aioson/docs/ux-ui/component-map.md +7 -2
  65. package/template/.aioson/docs/ux-ui/design-execution.md +7 -2
  66. package/template/.aioson/docs/ux-ui/design-gate.md +7 -2
  67. package/template/.aioson/docs/ux-ui/research-mode.md +7 -2
  68. package/template/.aioson/docs/ux-ui/site-delivery.md +7 -2
  69. package/template/.aioson/docs/ux-ui/token-contract.md +7 -2
  70. package/template/.aioson/rules/aioson-context-boundary.md +1 -1
  71. package/template/.aioson/rules/disk-first-artifacts.md +1 -1
  72. package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +9 -7
  73. package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +1 -1
  74. package/template/.aioson/skills/process/aioson-spec-driven/references/architect.md +3 -2
  75. package/template/.aioson/skills/process/aioson-spec-driven/references/artifact-map.md +21 -9
  76. package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +2 -1
  77. package/template/.aioson/skills/process/aioson-spec-driven/references/deyvin.md +19 -15
  78. package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +2 -1
  79. package/template/.aioson/skills/static/web-research-cache.md +29 -8
  80. package/template/AGENTS.md +13 -13
  81. package/template/CLAUDE.md +9 -9
  82. package/template/OPENCODE.md +3 -2
@@ -1,6 +1,11 @@
1
- ---
2
- description: "Product quality lens — strong patterns, anti-pattern replacements, and a compact scorecard for higher-quality PRDs."
3
- ---
1
+ ---
2
+ description: "Product quality lens — strong patterns, anti-pattern replacements, and a compact scorecard for higher-quality PRDs."
3
+ agents: [product]
4
+ modes: [executing]
5
+ task_types: [prd-writing, prd-finalization, prd-review, quality-review]
6
+ load_tier: trigger
7
+ triggers: [writing PRD, updating PRD, finalize PRD, PRD quality, review scorecard]
8
+ ---
4
9
 
5
10
  # Product Quality Lens
6
11
 
@@ -1,6 +1,11 @@
1
- ---
2
- description: "Product research loop — extract short keyword phrases, consult research cache, search fresh sources, and fold the findings back into the PRD conversation."
3
- ---
1
+ ---
2
+ description: "Product research loop — extract short keyword phrases, consult research cache, search fresh sources, and fold the findings back into the PRD conversation."
3
+ agents: [product]
4
+ modes: [planning, executing]
5
+ task_types: [product-research, external-validation, market-scouting, competitor-research, product-patterns]
6
+ load_tier: trigger
7
+ triggers: [web search, research cache, market assumptions, competitor, pricing, compliance, time-sensitive UX, external evidence]
8
+ ---
4
9
 
5
10
  # Product Research Loop
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX accessibility audit mode — WCAG-focused scan, remediation format, and QA handoff guidance for UI accessibility issues."
3
- ---
2
+ description: "UI/UX accessibility audit mode — WCAG-focused scan, remediation format, and QA handoff guidance for UI accessibility issues."
3
+ agents: [ux-ui]
4
+ modes: [planning, executing]
5
+ task_types: [accessibility, a11y, wcag, ui-audit]
6
+ load_tier: trigger
7
+ triggers: [a11y, accessibility, WCAG, screen reader, keyboard navigation, contrast]
8
+ ---
4
9
 
5
10
  # UX/UI Accessibility Audit
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX audit mode — inventory scan, design quality checks, severity-based reporting, and fix recommendation format for existing UI."
3
- ---
2
+ description: "UI/UX audit mode — inventory scan, design quality checks, severity-based reporting, and fix recommendation format for existing UI."
3
+ agents: [ux-ui]
4
+ modes: [planning, executing]
5
+ task_types: [ui-audit, design-review, visual-qa]
6
+ load_tier: trigger
7
+ triggers: [audit, existing UI, design quality, visual QA, review UI]
8
+ ---
4
9
 
5
10
  # UX/UI Audit Mode
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX component map mode — component inventory, atomic classification, variants, states, and gap analysis between spec and implementation."
3
- ---
2
+ description: "UI/UX component map mode — component inventory, atomic classification, variants, states, and gap analysis between spec and implementation."
3
+ agents: [ux-ui]
4
+ modes: [planning, executing]
5
+ task_types: [component-map, component-inventory, ui-components]
6
+ load_tier: trigger
7
+ triggers: [component-map, component inventory, variants, states, duplicate components]
8
+ ---
4
9
 
5
10
  # UX/UI Component Map
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX design execution — entry check, refine-vs-rebuild routing, design intent, domain exploration, direction selection, and delivery quality rules."
3
- ---
2
+ description: "UI/UX design execution — entry check, refine-vs-rebuild routing, design intent, domain exploration, direction selection, and delivery quality rules."
3
+ agents: [ux-ui]
4
+ modes: [executing]
5
+ task_types: [ui-design, ui-spec-writing, refine-spec, visual-direction]
6
+ load_tier: trigger
7
+ triggers: [default-create, refine-spec, writing ui-spec, rebuild UI, existing UI]
8
+ ---
4
9
 
5
10
  # UX/UI Design Execution
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX design gate — context repair, design skill selection, isolation rules, and style ambiguity handling before visual direction is chosen."
3
- ---
2
+ description: "UI/UX design gate — context repair, design skill selection, isolation rules, and style ambiguity handling before visual direction is chosen."
3
+ agents: [ux-ui]
4
+ modes: [planning, executing]
5
+ task_types: [ui-design, design-skill-selection, visual-direction]
6
+ load_tier: trigger
7
+ triggers: [design skill, visual direction, style ambiguity, project_type site, project_type web_app]
8
+ ---
4
9
 
5
10
  # UX/UI Design Gate
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX research mode — visual benchmarking, domain patterns, anti-patterns, and directional hypotheses before design work begins."
3
- ---
2
+ description: "UI/UX research mode — visual benchmarking, domain patterns, anti-patterns, and directional hypotheses before design work begins."
3
+ agents: [ux-ui]
4
+ modes: [planning]
5
+ task_types: [ui-research, visual-benchmarking, domain-patterns]
6
+ load_tier: trigger
7
+ triggers: [research, benchmark, visual references, competitor UI, domain patterns]
8
+ ---
4
9
 
5
10
  # UX/UI Research Mode
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX site delivery — landing-page composition rules, hero law, motion standards, copy expectations, CSS techniques, and final HTML structure."
3
- ---
2
+ description: "UI/UX site delivery — landing-page composition rules, hero law, motion standards, copy expectations, CSS techniques, and final HTML structure."
3
+ agents: [ux-ui]
4
+ modes: [executing]
5
+ task_types: [site-delivery, landing-page, static-html]
6
+ load_tier: trigger
7
+ triggers: [project_type site, landing page, marketing page, index.html, static site, full-page HTML]
8
+ ---
4
9
 
5
10
  # UX/UI Site Delivery
6
11
 
@@ -1,6 +1,11 @@
1
1
  ---
2
- description: "UI/UX token contract mode — extraction and normalization of design tokens for colors, spacing, typography, and semantic ownership."
3
- ---
2
+ description: "UI/UX token contract mode — extraction and normalization of design tokens for colors, spacing, typography, and semantic ownership."
3
+ agents: [ux-ui]
4
+ modes: [executing]
5
+ task_types: [design-tokens, token-contract, visual-system]
6
+ load_tier: trigger
7
+ triggers: [tokens, design tokens, colors, spacing, typography, visual system]
8
+ ---
4
9
 
5
10
  # UX/UI Token Contract
6
11
 
@@ -44,7 +44,7 @@ project.context.md ← setup
44
44
  discovery.md ← analyst
45
45
  requirements-{slug}.md ← analyst
46
46
  architecture.md ← architect
47
- ui-spec-{slug}.md ← ux-ui
47
+ ui-spec.md / ui-spec-{slug}.md ← ux-ui (`ui-spec.md` is the current canonical runtime artifact)
48
48
  prd.md / prd-{slug}.md ← product
49
49
  spec-{slug}.md ← dev
50
50
  implementation-plan-{slug}.md ← pm
@@ -18,7 +18,7 @@ Every artifact produced by an AIOSON agent MUST be written to disk before sessio
18
18
  | `@analyst` | Discovery | `.aioson/context/discovery.md` |
19
19
  | `@analyst` | Requirements | `.aioson/context/requirements-{slug}.md` |
20
20
  | `@architect` | Architecture | `.aioson/context/architecture.md` |
21
- | `@ux-ui` | UI Spec | `.aioson/context/ui-spec-{slug}.md` |
21
+ | `@ux-ui` | UI Spec | `.aioson/context/ui-spec.md` (current canonical; `ui-spec-{slug}.md` is accepted only when explicitly feature-scoped) |
22
22
  | `@sheldon` | Manifest | `.aioson/plans/{slug}/manifest.md` |
23
23
  | `@pm` | Implementation Plan | `.aioson/context/implementation-plan-{slug}.md` |
24
24
  | `@dev` | Feature spec | `.aioson/context/spec-{slug}.md` |
@@ -5,13 +5,15 @@
5
5
 
6
6
  ## When to use
7
7
 
8
- Load this skill when:
9
- - starting spec work for a new feature or project (any agent)
10
- - deciding phase depth based on classification (MICRO / SMALL / MEDIUM)
11
- - preparing a clean handoff to the next agent
12
- - retaking work after a session break (check `last_checkpoint` + `phase_gates` first)
13
-
14
- Do NOT load the entire `references/` folder. Load only the file matching your current need.
8
+ Load this skill when:
9
+ - starting spec work for a new feature or project (any agent)
10
+ - deciding phase depth based on classification (MICRO / SMALL / MEDIUM)
11
+ - preparing a clean handoff to the next agent
12
+ - retaking work after a session break (check `last_checkpoint` + `phase_gates` first)
13
+
14
+ Do not load this skill for `@deyvin` activation-only recovery. A bare `@deyvin` activation is status recovery, not spec work; run Deyvin's fast path and stop before opening this file.
15
+
16
+ Do NOT load the entire `references/` folder. Load only the file matching your current need.
15
17
 
16
18
  ## What phases exist
17
19
 
@@ -54,7 +54,7 @@ Required for the gate to pass:
54
54
  Required for the gate to pass:
55
55
  - [ ] Execution sequence is defined
56
56
  - [ ] Checkpoints are listed with criteria of done
57
- - [ ] Context package is listed (which files to read before each phase)
57
+ - [ ] Context package is listed as a short primary activation package plus phase-triggered loads (which files to read before each phase, and why)
58
58
  - [ ] Review / QA requirements are noted
59
59
  - [ ] Decisions marked "pre-taken" are FINAL — @dev does not re-discuss
60
60
 
@@ -19,5 +19,6 @@
19
19
 
20
20
  - Classification depth from `classification-map.md` controls whether `architecture.md` is required, selective, or skippable
21
21
  - Gate B is the handoff signal — @dev must not start implementation without Gate B passing (MEDIUM) or being explicitly waived (SMALL)
22
- - Decision rationale is mandatory for non-obvious choices — `approval-gates.md` Gate B checklist item applies
23
- - `design-doc*.md` is @architect's scope-specific decision document — see `artifact-map.md`
22
+ - Decision rationale is mandatory for non-obvious choices — `approval-gates.md` Gate B checklist item applies
23
+ - `design-doc*.md` is @architect's scope-specific decision document — see `artifact-map.md`
24
+ - `architecture.md` should include dev context triggers so @dev knows when to load architecture sections instead of reading the full file at activation
@@ -8,11 +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
- design-doc*.md (scope-specific decisions — @architect)
14
- implementation-plan-{slug}.md (execution sequence — @pm for MEDIUM, AC-SDLC-15)
15
- 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.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)
16
17
  ```
17
18
 
18
19
  ## Artifact ownership
@@ -26,13 +27,24 @@ prd*.md
26
27
  | `requirements-{slug}.md` | @analyst | — | @architect, @dev, @qa |
27
28
  | `spec-{slug}.md` | @analyst (skeleton) | @dev (execution state) | @dev, @deyvin, @qa |
28
29
  | `spec.md` | @dev | @dev | @dev, @deyvin |
29
- | `architecture.md` | @architect | — | @dev, @ux-ui |
30
- | `design-doc*.md` | @architect | — | @dev, @ux-ui |
31
- | `implementation-plan-{slug}.md` | @pm (MEDIUM, AC-SDLC-15) | — | @dev, @deyvin, @orchestrator |
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
32
44
 
33
45
  ## Naming conventions
34
46
 
35
- - Project-level artifacts: `prd.md`, `discovery.md`, `spec.md`, `architecture.md`
47
+ - Project-level artifacts: `prd.md`, `discovery.md`, `spec.md`, `architecture.md`, `ui-spec.md`
36
48
  - Feature-level artifacts: always use `{slug}` suffix — `prd-{slug}.md`, `requirements-{slug}.md`, `spec-{slug}.md`
37
49
  - Enrichment: `sheldon-enrichment.md` (project) or `sheldon-enrichment-{slug}.md` (feature)
38
50
  - Plans: `.aioson/plans/{slug}/manifest.md` + `plan-{slug-fase}.md` files
@@ -8,7 +8,7 @@
8
8
 
9
9
  - `maintenance-and-state.md` — use to write and update `spec-{slug}.md` correctly: `phase_gates`, `last_checkpoint`, `pending_review`, and `Key decisions` format
10
10
  - `approval-gates.md` — Gate C (plan approval) must be checked before executing a significant batch; Gate D (execution verification) defines done criteria for each phase
11
- - For SMALL/MEDIUM work, confirm `.aioson/context/design-doc.md` and `.aioson/context/readiness.md` were produced by `@discovery-design-doc` before implementation starts
11
+ - For SMALL/MEDIUM work, confirm `.aioson/context/design-doc*.md` and `.aioson/context/readiness*.md` were produced by `@discovery-design-doc` before implementation starts. Load them only when `dev-state.md`, readiness, the plan, or touched paths require their details.
12
12
 
13
13
  ### Load when starting a new feature with classification context
14
14
 
@@ -44,6 +44,7 @@ Additionally, at session start for SMALL/MEDIUM:
44
44
 
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
+ - Treat `dev-state.md` as the primary activation package and `implementation-plan-{slug}.md` as the source for phase-triggered context loads
47
48
  - Gate D verification must happen before marking a phase complete — not just "I think it works"
48
49
  - If `phase_gates.plan` is `pending` and classification is SMALL/MEDIUM, suggest generating an implementation plan before proceeding
49
50
  - If `design-doc.md` or `readiness.md` is missing for SMALL/MEDIUM, route to `@discovery-design-doc` instead of coding first
@@ -2,17 +2,21 @@
2
2
 
3
3
  > Router file. Do not duplicate logic from the generic references — load those directly.
4
4
 
5
- ## Which references to load for continuation and resume flows
6
-
7
- ### Always load when this skill is active
8
-
9
- - `maintenance-and-state.md` @deyvin's primary job is resumption; use this to read `phase_gates`, `last_checkpoint`, and `pending_review` correctly before any action
10
- - `approval-gates.md` — use to check which gates are already approved before proceeding; never advance past a gate that is not yet passed
11
-
12
- ### Load when the continuation context is unclear
13
-
14
- - `artifact-map.md` — use to quickly orient which artifacts exist and which are missing when resuming a session with incomplete context
15
-
5
+ ## Which references to load for continuation and resume flows
6
+
7
+ ### Activation-only sessions
8
+
9
+ If the user only activates `@deyvin` without a concrete task, stop after the lightweight context summary from `context:select`. Do not load this reference's downstream files.
10
+
11
+ ### Load only for concrete continuation
12
+
13
+ - `maintenance-and-state.md` — load when the concrete task requires reading or writing `spec*.md`, `last_checkpoint`, or `pending_review`
14
+ - `approval-gates.md` — load when the next action could cross a phase gate, approve/deny readiness, or continue implementation past Gate C/D
15
+
16
+ ### Load when the continuation context is unclear
17
+
18
+ - `artifact-map.md` — use to quickly orient which artifacts exist and which are missing after a concrete continuation task names a feature but the selected artifacts contradict each other
19
+
16
20
  ### Do not load for @deyvin
17
21
 
18
22
  - `hardening-lane.md` — by the time @deyvin is active, the spec pack should already be hardened
@@ -21,7 +25,7 @@
21
25
 
22
26
  ## Behavioral notes
23
27
 
24
- - `last_checkpoint` in `spec-{slug}.md` is the first thing @deyvin reads — see `maintenance-and-state.md` for format
25
- - Do not re-read the full spec pack unless `last_checkpoint` is null or contradictory
26
- - `phase_gates` from `approval-gates.md` defines what is locked — @deyvin does not re-open locked decisions
27
- - `pending_review` items must be surfaced to the user before proceeding past them
28
+ - `last_checkpoint` in `spec-{slug}.md` is the first thing @deyvin reads only after a concrete continuation task selects that spec — see `maintenance-and-state.md` for format
29
+ - Do not re-read the full spec pack unless `last_checkpoint` is null or contradictory
30
+ - `phase_gates` from `approval-gates.md` defines what is locked — @deyvin does not re-open locked decisions
31
+ - `pending_review` items must be surfaced to the user before proceeding past them
@@ -22,7 +22,8 @@
22
22
  ## Behavioral notes for @pm under SDD
23
23
 
24
24
  - @pm is the **Gate C owner** — the plan is not complete until `spec-{slug}.md` has `phase_gates.plan: approved` and `implementation-plan-{slug}.md` (if MEDIUM) has `status: approved`
25
- - Gate C is **blocking in MEDIUM** — @dev and @orchestrator must not execute without Gate C passing
25
+ - Gate C is **blocking in MEDIUM** — @dev and @orchestrator must not execute without Gate C passing
26
+ - The implementation plan's context package must stay short at activation and list phase-triggered loads separately; @dev should not need to re-read the whole artifact chain to start
26
27
  - Gate C is **informational in SMALL** — flag if the plan looks thin, but do not block
27
28
  - Gate C is **skipped in MICRO** — @dev reads prd.md directly; @pm does not run for MICRO
28
29
  - ACs produced by @pm must match or extend the ACs in `conformance-{slug}.yaml` when it exists — never contradict the analyst's behavioral contracts
@@ -26,11 +26,31 @@ Before running any WebSearch:
26
26
  4. If `searched_at` is within the last **7 days** → use the cached result, do not search again
27
27
  5. If older than 7 days or missing → proceed to search
28
28
 
29
- ## Step 2 — Run the search
30
-
31
- - Formulate the query including the **current year** so results are fresh
32
- - Maximum **4 queries per session** focus on the decisions with highest risk of being outdated
33
- - If WebSearch fails for a query: record the error in `summary.md` and continue do not block
29
+ ## Step 2 — Run the search
30
+
31
+ - Formulate the query including the **current year** when recency matters
32
+ - Prefer specific keyword phrases over broad prompts: user segment, domain noun, workflow, technology, pricing/compliance/risk term
33
+ - For technical/library decisions, prefer primary sources first: official docs, changelog/release notes, GitHub repo, standards, or vendor API reference
34
+ - For product/domain decisions, prefer sources that expose real patterns: official product docs, pricing pages, support docs, market reports, competitor docs, or credible case studies
35
+ - Open/extract the source pages before using them. Search result snippets are routing signals, not evidence.
36
+ - Run at most one query expansion pass if the first query returns weak results: add domain/source constraints, synonyms, or the concrete decision being evaluated
37
+ - Maximum **4 queries per session** — focus on decisions with highest risk of being outdated or materially wrong
38
+ - If WebSearch fails for a query: record the error in `summary.md` and continue — do not block
39
+
40
+ ## Search quality model
41
+
42
+ Good research is a pipeline, not a single search call:
43
+
44
+ 1. **Plan** — name the decision and what would change if the answer is different.
45
+ 2. **Search** — retrieve candidate sources.
46
+ 3. **Read/extract** — inspect the pages that actually support the finding.
47
+ 4. **Compress** — keep only source-grounded deltas that change options, risks, defaults, or open questions.
48
+
49
+ Optional provider guidance for future integrations:
50
+
51
+ - Agent/RAG search APIs such as Tavily, Exa, Firecrawl, or Brave can improve retrieval and extraction, especially when they return page content, highlights, or grounded answers.
52
+ - Open-source extraction tools such as Crawl4AI are useful when AIOSON needs self-hosted crawling/scraping.
53
+ - Do not make any provider mandatory in the core prompt. Use adapters behind the same cache contract so agents keep working with built-in web tools.
34
54
 
35
55
  ## Step 3 — Save results
36
56
 
@@ -106,9 +126,10 @@ If all findings are `confirmed`:
106
126
 
107
127
  ## Rules
108
128
 
109
- - **Never search without saving** — unsaved results are lost after the session
110
- - **Never block on search failure** — record the error and continue
111
- - **Never show `confirmed` findings** — they add noise without value
129
+ - **Never search without saving** — unsaved results are lost after the session
130
+ - **Never block on search failure** — record the error and continue
131
+ - **Never use snippets as final evidence** — inspect source pages or use cached summaries
132
+ - **Never show `confirmed` findings** — they add noise without value
112
133
  - **Never modify the PRD/plan without user confirmation** — surface findings, let the user decide
113
134
  - **Cache is shared across all agents** — if another agent already searched the same topic this week, use their result
114
135
  - `@product`, `@sheldon`, and `@squad` should derive short keyword phrases from the active task and scout the cache before finalizing substantial output
@@ -2,12 +2,12 @@
2
2
 
3
3
  You operate as AIOSON — an AI development squad with specialized agents.
4
4
 
5
- ## Mandatory first action
6
- 1. Read `.aioson/config.md`
7
- 2. Check whether `.aioson/context/project.context.md` exists
8
- - If missing: activate @setup agent immediately
9
- - If present: read it before any action
10
- 3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
5
+ ## Mandatory first action
6
+ 1. Check whether `.aioson/context/project.context.md` exists
7
+ - If missing: activate @setup agent immediately
8
+ - If present: read it before any action
9
+ 2. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details.
10
+ 3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
11
11
 
12
12
  ## Project knowledge
13
13
 
@@ -167,8 +167,8 @@ AIOSON uses the `aioson-spec-driven` process skill to enforce specification-firs
167
167
 
168
168
  Gates are blocking in MEDIUM, informational in MICRO/SMALL.
169
169
 
170
- ### How agents load SDD
171
- Each agent checks for `aioson-spec-driven` in `.aioson/installed-skills/` or `.aioson/skills/process/` and loads its role-specific reference file (e.g., `references/dev.md`, `references/qa.md`).
170
+ ### How agents load SDD
171
+ For concrete spec/workflow work, the active agent checks for `aioson-spec-driven` in `.aioson/installed-skills/` or `.aioson/skills/process/` and loads only its role-specific reference file (e.g., `references/dev.md`, `references/qa.md`). A bare `@deyvin` activation is not spec work: follow Deyvin's activation-only fast path and do not open this skill.
172
172
 
173
173
  ### Project pulse convention
174
174
  Every agent updates `project-pulse.md` at session end with: last_agent, last_gate, active features, blockers, and next recommended action. This enables crash recovery — any agent can read project-pulse.md and know where to resume.
@@ -179,9 +179,9 @@ Located at: `.aioson/skills/process/aioson-spec-driven/SKILL.md`
179
179
 
180
180
  This is a first-party process skill. It teaches agents how phases connect, when to apply which depth, and how to prepare clean handoffs.
181
181
 
182
- Agents that load it: @product, @analyst, @scope-check, @architect, @sheldon, @dev, @deyvin, @qa, @tester, @orchestrator, @pm
183
- When to load: at the start of any spec work (PRD, requirements, architecture, implementation, testing)
184
- What to load: `SKILL.md` first, then only the `references/` file relevant to the current phase
182
+ Agents that load it: @product, @analyst, @scope-check, @architect, @sheldon, @dev, @deyvin, @qa, @tester, @orchestrator, @pm
183
+ When to load: at the start of concrete spec work (PRD, requirements, architecture, implementation, testing); not during `@deyvin` activation-only recovery
184
+ What to load: `SKILL.md` first, then only the `references/` file relevant to the current phase
185
185
 
186
186
  ## Process skill: design-hybrid-forge
187
187
 
@@ -225,8 +225,8 @@ researchs/
225
225
  Primary recurring writers here: @product, @sheldon, and @squad
226
226
  All agents may read from here to avoid redundant searches.
227
227
 
228
- ## Session protocol
229
- If `.aioson/context/spec.md` exists, read it at session start and update it at session end.
228
+ ## Session protocol
229
+ Do not read `.aioson/context/spec.md` globally at session start. Agents load `spec*.md` only when `context:select`, their SDD reference, or a concrete task selects it; update it at session end only if the active agent loaded and changed that spec context.
230
230
 
231
231
  ## Golden rule
232
232
  Small project, small solution.
@@ -2,12 +2,12 @@
2
2
 
3
3
  You operate as AIOSON.
4
4
 
5
- ## Mandatory first action
6
- 1. Read `.aioson/config.md`
7
- 2. Check whether `.aioson/context/project.context.md` exists
8
- - If missing: run `/setup`
9
- - If present: read it before any action
10
- 3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
5
+ ## Mandatory first action
6
+ 1. Check whether `.aioson/context/project.context.md` exists
7
+ - If missing: run `/setup`
8
+ - If present: read it before any action
9
+ 2. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details.
10
+ 3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
11
11
 
12
12
  ## Project knowledge
13
13
 
@@ -83,9 +83,9 @@ Capture is best-effort — do not crash, retry, or surface failures to the user.
83
83
 
84
84
  AIOSON follows a Spec-Driven Development (SDD) methodology. Key governance files:
85
85
 
86
- - **`.aioson/constitution.md`** — 6 governing principles all agents must respect
87
- - **`.aioson/context/project-pulse.md`** — global project state; read at session start, update at session end
88
- - **`.aioson/skills/process/aioson-spec-driven/SKILL.md`** — process methodology; agents load this automatically
86
+ - **`.aioson/constitution.md`** — 6 governing principles all agents must respect
87
+ - **`.aioson/context/project-pulse.md`** — global project state; read at session start, update at session end
88
+ - **`.aioson/skills/process/aioson-spec-driven/SKILL.md`** — process methodology; agents load this on demand for concrete spec/workflow work. `/deyvin` activation-only recovery must not load it.
89
89
 
90
90
  The process depth scales with project classification:
91
91
  - **MICRO** (0-1): lightweight — @product → @dev
@@ -1,9 +1,10 @@
1
1
  # AIOSON - OpenCode
2
2
 
3
3
  ## Boot
4
- 1. Read `.aioson/config.md`
5
- 2. Check `.aioson/context/project.context.md`
4
+ 1. Check `.aioson/context/project.context.md`
5
+ 2. If present, read it before any action
6
6
  3. If missing, start with `setup`
7
+ 4. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details
7
8
 
8
9
  ## No agent selected
9
10