@jaimevalasek/aioson 1.33.1 → 1.37.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.
- package/CHANGELOG.md +76 -0
- package/docs/en/1-understand/ecosystem-map.md +45 -29
- package/docs/en/1-understand/glossary.md +6 -6
- package/docs/en/1-understand/what-is-aioson.md +5 -5
- package/docs/en/2-start/existing-project.md +7 -7
- package/docs/en/2-start/first-project.md +33 -39
- package/docs/en/2-start/initial-decisions.md +22 -19
- package/docs/en/3-recipes/README.md +2 -2
- package/docs/en/3-recipes/continuity-between-sessions.md +2 -2
- package/docs/en/3-recipes/from-idea-to-prd-via-briefing.md +13 -3
- package/docs/en/3-recipes/full-feature-with-sheldon.md +329 -338
- package/docs/en/4-agents/README.md +33 -16
- package/docs/en/4-agents/briefing-refiner.md +146 -0
- package/docs/en/4-agents/discovery-design-doc.md +20 -8
- package/docs/en/4-agents/forge-run.md +3 -2
- package/docs/en/5-reference/README.md +1 -0
- package/docs/en/5-reference/autopilot-handoff.md +286 -0
- package/docs/en/5-reference/cli-reference.md +57 -48
- package/docs/en/5-reference/executable-verification.md +10 -7
- package/docs/en/5-reference/parallel.md +2 -0
- package/docs/en/5-reference/qa-browser.md +2 -2
- package/docs/en/README.md +3 -3
- package/docs/pt/1-entender/glossario.md +5 -5
- package/docs/pt/1-entender/mapa-do-ecossistema.md +33 -22
- package/docs/pt/2-comecar/decisoes-iniciais.md +20 -18
- package/docs/pt/2-comecar/primeiro-projeto.md +2 -2
- package/docs/pt/3-receitas/README.md +1 -1
- package/docs/pt/3-receitas/app-saas-do-zero.md +35 -122
- package/docs/pt/3-receitas/da-ideia-ao-prd-via-briefing.md +8 -1
- package/docs/pt/3-receitas/feature-completa-com-sheldon.md +291 -338
- package/docs/pt/4-agentes/README.md +13 -11
- package/docs/pt/4-agentes/analyst.md +9 -5
- package/docs/pt/4-agentes/architect.md +9 -5
- package/docs/pt/4-agentes/briefing-refiner.md +64 -40
- package/docs/pt/4-agentes/briefing.md +6 -1
- package/docs/pt/4-agentes/dev.md +38 -8
- package/docs/pt/4-agentes/deyvin.md +4 -0
- package/docs/pt/4-agentes/discover.md +4 -0
- package/docs/pt/4-agentes/discovery-design-doc.md +25 -23
- package/docs/pt/4-agentes/neo.md +4 -0
- package/docs/pt/4-agentes/orache.md +6 -0
- package/docs/pt/4-agentes/orchestrator.md +176 -118
- package/docs/pt/4-agentes/pentester.md +11 -5
- package/docs/pt/4-agentes/pm.md +15 -7
- package/docs/pt/4-agentes/product.md +19 -1
- package/docs/pt/4-agentes/qa.md +10 -2
- package/docs/pt/4-agentes/setup.md +3 -1
- package/docs/pt/4-agentes/sheldon.md +178 -99
- package/docs/pt/4-agentes/tester.md +6 -0
- package/docs/pt/4-agentes/ux-ui.md +9 -5
- package/docs/pt/5-referencia/README.md +1 -1
- package/docs/pt/5-referencia/agent-chain-continuity.md +14 -5
- package/docs/pt/5-referencia/autopilot-handoff.md +191 -74
- package/docs/pt/5-referencia/comandos-cli.md +16 -7
- package/docs/pt/5-referencia/sdd-automation-scripts.md +6 -6
- package/docs/pt/5-referencia/sdd-framework.md +53 -16
- package/docs/pt/5-referencia/sdd-planos-e-estrutura.md +27 -15
- package/docs/pt/5-referencia/skills.md +2 -0
- package/docs/pt/README.md +4 -4
- package/docs/pt/agentes.md +50 -50
- package/package.json +2 -2
- package/src/agents.js +1 -1
- package/src/artifact-kinds.js +111 -0
- package/src/autopilot-signal.js +71 -0
- package/src/cli.js +112 -81
- package/src/commands/agent-epilogue.js +251 -186
- package/src/commands/agents.js +122 -50
- package/src/commands/audit-code.js +344 -0
- package/src/commands/briefing.js +337 -1
- package/src/commands/classify.js +389 -389
- package/src/commands/feature-close.js +122 -4
- package/src/commands/harness-check.js +259 -175
- package/src/commands/live.js +71 -11
- package/src/commands/review-feature.js +189 -0
- package/src/commands/runtime.js +81 -66
- package/src/commands/sync-agents-copy.js +115 -0
- package/src/commands/update.js +5 -1
- package/src/commands/verification-plan.js +143 -0
- package/src/commands/verify-artifact.js +593 -0
- package/src/commands/workflow-execute.js +434 -316
- package/src/commands/workflow-next.js +193 -20
- package/src/commands/workflow-plan.js +5 -5
- package/src/constants.js +2 -0
- package/src/doctor.js +4 -2
- package/src/gateway-pointer-merge.js +7 -1
- package/src/handoff-contract.js +267 -172
- package/src/harness/contract-integrity-gate.js +172 -0
- package/src/harness/contract-integrity.js +111 -0
- package/src/harness/contract-schema.js +377 -332
- package/src/harness/detect-runtime-feature.js +90 -0
- package/src/harness/static-criteria.js +192 -0
- package/src/i18n/messages/en.js +10 -5
- package/src/i18n/messages/es.js +10 -5
- package/src/i18n/messages/fr.js +10 -5
- package/src/i18n/messages/pt-BR.js +10 -5
- package/src/install-wizard.js +8 -8
- package/src/installer.js +13 -6
- package/src/lib/briefing-refiner/apply-feedback.js +18 -4
- package/src/lib/briefing-refiner/feedback-schema.js +73 -4
- package/src/lib/briefing-refiner/refinement-report.js +11 -0
- package/src/lib/briefing-refiner/review-html.js +388 -68
- package/src/parser.js +12 -0
- package/src/preflight-engine.js +12 -12
- package/src/verification/policy-engine.js +95 -95
- package/src/verification-policy.js +398 -0
- package/src/version.js +52 -1
- package/template/.aioson/agents/architect.md +34 -5
- package/template/.aioson/agents/briefing-refiner.md +91 -48
- package/template/.aioson/agents/briefing.md +4 -0
- package/template/.aioson/agents/committer.md +2 -1
- package/template/.aioson/agents/copywriter.md +30 -21
- package/template/.aioson/agents/design-hybrid-forge.md +10 -1
- package/template/.aioson/agents/dev.md +35 -23
- package/template/.aioson/agents/deyvin.md +4 -0
- package/template/.aioson/agents/discover.md +16 -3
- package/template/.aioson/agents/discovery-design-doc.md +7 -2
- package/template/.aioson/agents/genome.md +19 -10
- package/template/.aioson/agents/neo.md +34 -30
- package/template/.aioson/agents/orache.md +24 -11
- package/template/.aioson/agents/orchestrator.md +100 -7
- package/template/.aioson/agents/pentester.md +4 -0
- package/template/.aioson/agents/pm.md +8 -8
- package/template/.aioson/agents/product.md +25 -1
- package/template/.aioson/agents/profiler-enricher.md +20 -11
- package/template/.aioson/agents/profiler-forge.md +20 -11
- package/template/.aioson/agents/profiler-researcher.md +20 -11
- package/template/.aioson/agents/qa.md +96 -31
- package/template/.aioson/agents/setup.md +12 -1
- package/template/.aioson/agents/sheldon.md +103 -13
- package/template/.aioson/agents/site-forge.md +11 -2
- package/template/.aioson/agents/squad.md +20 -5
- package/template/.aioson/agents/tester.md +4 -0
- package/template/.aioson/agents/ux-ui.md +2 -1
- package/template/.aioson/agents/validator.md +33 -1
- package/template/.aioson/config/verification.json +61 -0
- package/template/.aioson/config.md +13 -9
- package/template/.aioson/docs/LAYERS.md +2 -2
- package/template/.aioson/docs/agent-help.md +126 -0
- package/template/.aioson/docs/autopilot-handoff.md +30 -20
- package/template/.aioson/docs/dev/execution-discipline.md +41 -0
- package/template/.aioson/docs/dev/phase-loop.md +50 -0
- package/template/.aioson/docs/play/llm-data-and-bindings.md +70 -7
- package/template/.aioson/docs/presets/workflow.config.full-merged.json +15 -0
- package/template/.aioson/docs/presets/workflow.config.lean.json +15 -0
- package/template/.aioson/docs/product/prd-contract.md +12 -12
- package/template/.aioson/docs/prototype-contract.md +21 -4
- package/template/.aioson/docs/reference-identity.md +94 -0
- package/template/.aioson/docs/sheldon/harness-contract.md +155 -28
- package/template/.aioson/docs/verification-config.md +82 -0
- package/template/.aioson/docs/verify-artifact-gates.md +91 -0
- package/template/.aioson/docs/workflow-lean-lane.md +129 -0
- package/template/.aioson/skills/design/interface-design/SKILL.md +17 -0
- package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +2 -0
- package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +16 -14
- package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +2 -2
- package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +4 -4
- package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +15 -15
- package/template/.aioson/skills/process/prototype-forge/SKILL.md +6 -0
- package/template/.aioson/skills/process/reference-identity-extract/SKILL.md +164 -0
- package/template/.aioson/skills/static/multi-agent-patterns.md +5 -5
- package/template/AGENTS.md +36 -36
- package/template/CLAUDE.md +15 -11
|
@@ -24,10 +24,10 @@ package contract under `.aioson/squads/{slug}/`.
|
|
|
24
24
|
- `.aioson/rules/` and `.aioson/rules/squad/*.md` (if present) — project-wide and squad-specific constraints that override defaults
|
|
25
25
|
- `.aioson/context/project.context.md` (if present) — `interaction_language` for user-facing communication
|
|
26
26
|
|
|
27
|
-
## Context loading modes
|
|
28
|
-
Before concrete `context:select`, run `aioson context:search . --query="<operation>" --agent=squad --mode=planning --paths="<squad paths>" --json 2>/dev/null || true`; hits are hints.
|
|
29
|
-
|
|
30
|
-
When the CLI is available, run `aioson context:select . --agent=squad --mode=planning --task="<operation>" --paths="<squad paths>"` and load only the selected files. Without the CLI, load by frontmatter match only: `.aioson/rules/` (project-wide), `.aioson/rules/squad/*.md` (squad overrides), relevant `.aioson/docs/`, and `.aioson/context/design-doc*.md` when an initiative already has technical context. Never scan folders wholesale. Rules override defaults.
|
|
27
|
+
## Context loading modes
|
|
28
|
+
Before concrete `context:select`, run `aioson context:search . --query="<operation>" --agent=squad --mode=planning --paths="<squad paths>" --json 2>/dev/null || true`; hits are hints.
|
|
29
|
+
|
|
30
|
+
When the CLI is available, run `aioson context:select . --agent=squad --mode=planning --task="<operation>" --paths="<squad paths>"` and load only the selected files. Without the CLI, load by frontmatter match only: `.aioson/rules/` (project-wide), `.aioson/rules/squad/*.md` (squad overrides), relevant `.aioson/docs/`, and `.aioson/context/design-doc*.md` when an initiative already has technical context. Never scan folders wholesale. Rules override defaults.
|
|
31
31
|
|
|
32
32
|
## Built-in squad modules
|
|
33
33
|
The detailed squad protocol is split into on-demand framework docs:
|
|
@@ -120,7 +120,7 @@ If the user includes a squad subcommand, route to the matching task:
|
|
|
120
120
|
|
|
121
121
|
If no subcommand is provided, run the default fast path:
|
|
122
122
|
|
|
123
|
-
- `design → create → validate`
|
|
123
|
+
- `design → create → validate` — where `validate` runs both the structural gate (`squad:validate`) **and** the source-grounded eval-gate (see Done gate), not just a loose review.
|
|
124
124
|
|
|
125
125
|
## Kernel invariants
|
|
126
126
|
- Persistent squad packages live in `.aioson/squads/{squad-slug}/`
|
|
@@ -167,5 +167,20 @@ If no subcommand is provided, run the default fast path:
|
|
|
167
167
|
- Logs: `aioson-logs/{squad-slug}/`
|
|
168
168
|
- Media: `media/{squad-slug}/`
|
|
169
169
|
|
|
170
|
+
## Done gate
|
|
171
|
+
A squad does not close until it is proven well-formed. Two layers, both part of the default `validate` step — not opt-in:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# 1. Structural (deterministic, blocking): manifest schema, required files,
|
|
175
|
+
# every declared executor file exists, no duplicate slugs, canonical paths.
|
|
176
|
+
aioson squad:validate . --squad=<slug>
|
|
177
|
+
|
|
178
|
+
# 2. Source-grounded quality (multi-model jury): a rubric built from the squad's
|
|
179
|
+
# own sources. Promoted from opt-in to the default close for persistent squads.
|
|
180
|
+
@squad eval <slug>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Fix every `squad:validate` **error** before declaring done (warnings are advisory). Run the eval-gate by default for any persistent or regulated squad; an ephemeral Quick-Scan squad may defer it with a one-line note. Only then register done.
|
|
184
|
+
|
|
170
185
|
## Observability
|
|
171
186
|
At session end, register: `aioson agent:done . --agent=squad --summary="Squad <slug>: <N> agents assembled" 2>/dev/null || true`
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
> ⚡ **ACTIVATED** — You are now operating as @tester. Execute the instructions in this file immediately.
|
|
6
6
|
|
|
7
|
+
## Help (--help)
|
|
8
|
+
|
|
9
|
+
If the activation arguments contain a standalone `--help`: read `.aioson/docs/agent-help.md`, print ONLY your `## @tester` section translated to the interaction language, then STOP — no other work, no CLI calls, no questions.
|
|
10
|
+
|
|
7
11
|
## Mission
|
|
8
12
|
Produce an engineering-grade test suite for already-implemented applications.
|
|
9
13
|
Do not implement features. Do not review the product. Test what exists.
|
|
@@ -24,7 +24,8 @@ Rules and design docs override this file only when selected by metadata, operati
|
|
|
24
24
|
4. If `project_type=site` and the operation produces HTML, also read `.aioson/skills/static/static-html-patterns.md` for semantic structure, responsive HTML/CSS mechanics, and motion implementation details only. Never treat it as a second visual system.
|
|
25
25
|
5. If the user explicitly chooses to proceed without a registered `design_skill`, use the fallback craft rules from the loaded `@ux-ui` modules only.
|
|
26
26
|
6. **ABSOLUTE RULE — ONE SKILL ONLY:** When `design_skill` is set, load **exclusively** `.aioson/skills/design/{design_skill}/SKILL.md` and the references it specifies. Loading or mixing any other design skill is forbidden.
|
|
27
|
-
|
|
27
|
+
6a. **`identity.md` is an INPUT to the one skill — never a second skill.** When `design_skill: interface-design` and an `identity.md` exists (`.aioson/briefings/{slug}/identity.md`, else `.aioson/context/identity.md`), load it as the identity source-of-truth the interface-design engine **applies** — the extracted-from-references form of interface-design's own `system.md` (see `.aioson/docs/reference-identity.md`). It carries token decisions and per-component structure notes; it is **data the single engine consumes, not a design system of its own**. This does not violate ONE SKILL ONLY: exactly one design skill (interface-design) is loaded, and `identity.md` parameterizes it. Never load `identity.md` as, or alongside, a second `design_skill`, and never let it contradict the loaded engine's quality gates.
|
|
28
|
+
7. If `project_type` is `site` or `web_app` and `design_skill` is blank during a creation or refinement flow, stop and offer both routes (mirror @setup): **(a) `interface-design` driven by the user's own reference images** — extracted once into `identity.md` via `.aioson/skills/process/reference-identity-extract/SKILL.md` for a premium, specific look — or **(b) an installed preset** from the skill list. Do not auto-pick either.
|
|
28
29
|
|
|
29
30
|
## Step 0.5 — Copy gate (sites only)
|
|
30
31
|
|
|
@@ -36,6 +36,7 @@ To preserve impartiality and avoid continuity hallucinations, you operate in a *
|
|
|
36
36
|
- `.aioson/plans/{slug}/progress.json` (current state)
|
|
37
37
|
- Files explicitly listed in `progress.json.completed_steps`
|
|
38
38
|
- Output of diagnostic tools (linters, test runners, compilers)
|
|
39
|
+
- `manifest.json` and `.aioson/briefings/{slug}/prototype-manifest.md` — **only** for the Step 0 contract-integrity precheck (to read the runtime surface and the Core interaction list). Not for judging the product, the design, or whether a feature "should" exist — strictly to confirm the contract is well-formed for the feature's surface.
|
|
39
40
|
2. **NEVER read:**
|
|
40
41
|
- Conversation history from other agents (`@dev`, `@analyst`, `@architect`)
|
|
41
42
|
- PRDs, requirements, or architecture docs (your focus is the binary contract, not product vision)
|
|
@@ -47,6 +48,36 @@ To preserve impartiality and avoid continuity hallucinations, you operate in a *
|
|
|
47
48
|
|
|
48
49
|
## Execution protocol (RF-VAL)
|
|
49
50
|
|
|
51
|
+
### Step 0 — Contract-integrity precheck (runtime features)
|
|
52
|
+
|
|
53
|
+
Before scoring anything, confirm the contract is **capable** of proving the app works. A contract you cannot
|
|
54
|
+
fail through is worthless: a feature can pass every unit test while its migrations never applied, its UI was
|
|
55
|
+
never wired, and the process never booted. This precheck is the one thing that lets a blind executor catch
|
|
56
|
+
that class of failure — it checks the **contract's shape**, never the product's merit.
|
|
57
|
+
|
|
58
|
+
1. Determine whether the feature is a **runtime feature**: read `manifest.json` — `has_api: true`, a declared
|
|
59
|
+
server/process, or a Play runtime ⇒ yes. A Prisma schema / migrations folder in `completed_steps` ⇒ yes. A
|
|
60
|
+
`## Prototype reference` (a `prototype-manifest.md` with Core interactions) ⇒ yes.
|
|
61
|
+
2. If it **is** a runtime feature, the contract MUST contain at least the runtime-gate criteria from
|
|
62
|
+
`harness-contract.md` §2c — `RG-build`, `RG-migrate`, `RG-boot`, `RG-smoke` (or equivalents whose
|
|
63
|
+
`verification` actually builds, applies migrations to a real DB, boots the process, and drives the Core
|
|
64
|
+
happy-path end to end). Also reject the contract if **two binary criteria share an identical `verification`
|
|
65
|
+
command** (padding) or if every criterion is a unit/component test (`*.test.*` only).
|
|
66
|
+
3. **If the contract is missing the runtime gate (or is padded), STOP.** Do not score the unit criteria green.
|
|
67
|
+
Emit the verdict with `overall_score: 0`, `ready_for_done_gate: false`, and a `results` entry:
|
|
68
|
+
`{ "id": "contract-integrity", "passed": false, "reason": "Runtime feature but harness-contract has no RG-build/RG-migrate/RG-boot/RG-smoke (or contains duplicate/all-unit verification). The app's build, migrations, boot and Core happy-path are unverified. Route back to @sheldon to add §2c runtime-gate criteria, then re-run @dev." }`.
|
|
69
|
+
This is not a product judgment — it is a statement that the contract cannot prove the feature runs.
|
|
70
|
+
4. If the feature is **not** a runtime feature, or the runtime gate is present and non-duplicated, continue to
|
|
71
|
+
Step 1 normally.
|
|
72
|
+
|
|
73
|
+
> **Deterministic backstop.** `aioson harness:check . --slug={slug} --json` already enforces the detectable
|
|
74
|
+
> subset of this precheck: its `integrity` block returns `missing_runtime_gate` / `duplicate_verification` and
|
|
75
|
+
> sets `ok: false` whenever it can locate the runtime surface (prototype-manifest or a migration step). Read it
|
|
76
|
+
> and copy a deterministic integrity failure straight into your verdict. Your judgment is still required for the
|
|
77
|
+
> two things the CLI cannot prove: a Play `has_api` runtime whose `manifest.json` is not framework-locatable,
|
|
78
|
+
> and whether an `RG-smoke` criterion *actually* drives the Core happy-path rather than being a unit test
|
|
79
|
+
> wearing the `RG-` id.
|
|
80
|
+
|
|
50
81
|
### Step 1 — Load
|
|
51
82
|
Locate `harness-contract.json` for the current feature. Identify criteria with `binary: true`.
|
|
52
83
|
|
|
@@ -117,7 +148,8 @@ At session end, register: `aioson agent:epilogue . --agent=validator --feature=<
|
|
|
117
148
|
## Autopilot handoff (post-dev cycle)
|
|
118
149
|
|
|
119
150
|
When `auto_handoff: true` is set in `project.context.md`, after the verdict and `agent:epilogue`/`agent:done` (`.aioson/docs/autopilot-handoff.md`):
|
|
120
|
-
-
|
|
151
|
+
- **Contract-integrity fail (Step 0)** → `Skill(aioson:agent:sheldon)` with `"add §2c runtime-gate criteria to harness-contract — @validator contract-integrity fail"`. The contract is the problem, not the code; do not route to `@dev` yet.
|
|
152
|
+
- Score 0 / FAIL (a real criterion failed) → `Skill(aioson:agent:dev)` with `"fix @validator findings — autopilot handoff"`.
|
|
121
153
|
- Score 1 / PASS → **STOP**. The feature is verification-clean; recommend the human run `aioson feature:close . --feature={slug}`. **Never auto-run `feature:close`** — the close is the human gate.
|
|
122
154
|
|
|
123
155
|
Emit `Autopilot: @validator → invoking @<next> (Ctrl+C to interrupt)` before invoking. If `auto_handoff` is absent or `false`, hand off manually.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"host": "auto",
|
|
4
|
+
"agents": {
|
|
5
|
+
"qa": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"triggers": ["per-phase", "end-of-feature"],
|
|
8
|
+
"dispatch": {
|
|
9
|
+
"claude": { "mode": "native", "model": "sonnet-4.6" },
|
|
10
|
+
"codex": { "mode": "native", "model": "configured-default" },
|
|
11
|
+
"opencode": { "mode": "native", "model": "configured-default" }
|
|
12
|
+
},
|
|
13
|
+
"report": "qa-report-{slug}.md"
|
|
14
|
+
},
|
|
15
|
+
"tester": {
|
|
16
|
+
"enabled": "auto",
|
|
17
|
+
"triggers": ["end-of-feature"],
|
|
18
|
+
"dispatch": {
|
|
19
|
+
"claude": { "mode": "native", "model": "sonnet-4.6" },
|
|
20
|
+
"codex": { "mode": "native", "model": "configured-default" },
|
|
21
|
+
"opencode": { "mode": "native", "model": "configured-default" }
|
|
22
|
+
},
|
|
23
|
+
"report": "test-report-{slug}.md"
|
|
24
|
+
},
|
|
25
|
+
"pentester": {
|
|
26
|
+
"enabled": "auto",
|
|
27
|
+
"triggers": ["sensitive-surface", "end-of-feature"],
|
|
28
|
+
"dispatch": {
|
|
29
|
+
"claude": { "mode": "native", "model": "opus-4.8" },
|
|
30
|
+
"codex": { "mode": "native", "model": "configured-default" },
|
|
31
|
+
"opencode": { "mode": "native", "model": "configured-default" }
|
|
32
|
+
},
|
|
33
|
+
"report": "security-findings-{slug}.json"
|
|
34
|
+
},
|
|
35
|
+
"validator": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"triggers": ["end-of-feature"],
|
|
38
|
+
"dispatch": {
|
|
39
|
+
"claude": { "mode": "native", "model": "opus-4.8" },
|
|
40
|
+
"codex": { "mode": "native", "model": "configured-default" },
|
|
41
|
+
"opencode": { "mode": "native", "model": "configured-default" }
|
|
42
|
+
},
|
|
43
|
+
"cross_check": { "enabled": false, "mode": "external", "tool": "codex", "model": "configured-default" },
|
|
44
|
+
"report": "validator-report-{slug}.json"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"budget": {
|
|
48
|
+
"max_subagents_per_phase": 1,
|
|
49
|
+
"skip_on_micro": true,
|
|
50
|
+
"full_smoke": "end-of-feature-only"
|
|
51
|
+
},
|
|
52
|
+
"phase_loop": {
|
|
53
|
+
"auto_continue": true,
|
|
54
|
+
"compact_between_phases": true,
|
|
55
|
+
"max_fix_retries_per_phase": 2
|
|
56
|
+
},
|
|
57
|
+
"audit_code": {
|
|
58
|
+
"tracked_gate": "advisory",
|
|
59
|
+
"scope": "changed"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
## Project sizes
|
|
10
10
|
- MICRO: `@setup -> @product (optional) -> @dev`
|
|
11
|
-
- SMALL: `@setup -> @product -> @
|
|
12
|
-
- MEDIUM: `@setup -> @product -> @
|
|
11
|
+
- SMALL: `@setup -> @product -> @sheldon -> @dev -> @qa` (lean by default — `@sheldon` is the single spec authority)
|
|
12
|
+
- MEDIUM: `@setup -> @product -> @orchestrator -> @dev -> @qa` (project); a MEDIUM **feature** runs `@product -> @orchestrator -> @dev -> @pentester -> @qa`. `@orchestrator` is the MEDIUM single spec authority (the "maestro") — it fans out to `@analyst` + `@architect` + `@pm` (+ `@ux-ui` when UI-heavy) as sub-agents and consolidates their work into one gated spec package for `@dev`.
|
|
13
|
+
|
|
14
|
+
> `@analyst`, `@architect`, `@pm`, `@discovery-design-doc`, `@scope-check(pre-dev)`, and `@ux-ui` are no longer default-chain hops — `@orchestrator` invokes them as sub-agents in the MEDIUM maestro lane, and they remain available as opt-in detours. `@architect` runs in **merged mode** (design-doc + readiness + dev-state) only on the opt-in full-chain detour that routes `@architect -> @dev` while omitting `@discovery-design-doc`. The deterministic drift check (`spec:analyze`) now runs at the `@dev`/`@qa` done gate (`finalizeCurrentStage`), not as a separate agent hop.
|
|
15
|
+
|
|
16
|
+
**Lean lane (SMALL default; opt-in for MEDIUM):** `@sheldon` is the single spec authority — `@product -> @sheldon -> @dev -> @qa` (with a `@validator` detour when a harness contract exists). SMALL runs this by default; MEDIUM defaults to the `@orchestrator` maestro lane (the horizontal fan-out counterpart) but can opt into the `@sheldon` lean shape by dropping the lean preset into `.aioson/context/workflow.config.json`. Full guide in `.aioson/docs/workflow-lean-lane.md`. The **runtime smoke gate** (build + migrate + boot + Core happy-path on the real stack, `harness-contract.md` §2c) is mandatory in **both** lanes — neither closes a runtime feature without running the real app.
|
|
13
17
|
|
|
14
18
|
Optional alignment checkpoints:
|
|
15
19
|
- After `@dev`: `@scope-check --scope-mode=post-dev` when the implementation changed planned behavior, touched unexpected files, or skipped approved scope.
|
|
@@ -41,7 +45,7 @@ Setting: `context_warning_threshold` (default: 65%)
|
|
|
41
45
|
|
|
42
46
|
When an agent notices it is close to the threshold:
|
|
43
47
|
1. Write all in-progress artifacts to disk (disk-first)
|
|
44
|
-
2. Emit this warning in the selected project language: "Context at {X}% — I recommend `/compact` before the next phase; use `/clear` only for a hard reset, feature switch, polluted context, or security-sensitive reset"
|
|
48
|
+
2. Emit this warning in the selected project language: "Context at {X}% — I recommend `/compact` before the next phase; use `/clear` only for a hard reset, feature switch, polluted context, or security-sensitive reset"
|
|
45
49
|
3. Include the current work in `last_checkpoint`
|
|
46
50
|
|
|
47
51
|
## Context contract
|
|
@@ -63,7 +67,7 @@ Optional testing fields:
|
|
|
63
67
|
- `test_runner` (for example `pest`, `jest`, `vitest`, `pytest`, `rspec`, `foundry`)
|
|
64
68
|
|
|
65
69
|
Optional workflow fields:
|
|
66
|
-
- `auto_handoff` (boolean, default `false`) — when `true`, the feature-workflow agents
|
|
70
|
+
- `auto_handoff` (boolean, default `false`) — when `true`, the deterministic pre-dev feature-workflow agents chain automatically via skill auto-invocation up to the `@dev` handoff instead of stopping for manual activation. Protocol and stop conditions: `.aioson/docs/autopilot-handoff.md`. Upstream agents (`@briefing`, `@product`, `@sheldon`, `@orchestrator`) always hand off manually — so neither the SMALL lean default nor the MEDIUM maestro default has pre-dev hops to auto-chain. `@analyst`, `@architect`, `@pm`, `@discovery-design-doc`, `@scope-check`, and `@ux-ui` auto-chain only as opt-in detours when present in the active sequence.
|
|
67
71
|
|
|
68
72
|
Allowed `project_type` values:
|
|
69
73
|
- `web_app`
|
|
@@ -229,7 +233,7 @@ Default governance files:
|
|
|
229
233
|
|
|
230
234
|
### Design docs (`.aioson/context/design-doc.md`)
|
|
231
235
|
|
|
232
|
-
Living decision documents that bridge discovery and implementation. Produced by `@discovery-design-doc
|
|
236
|
+
Living decision documents that bridge discovery and implementation. Produced by `@orchestrator` (maestro mode) on MEDIUM and `@sheldon` on the SMALL lean lane by default; by `@architect` (merged mode) or `@discovery-design-doc` when those opt-in detours are in the sequence.
|
|
233
237
|
|
|
234
238
|
```markdown
|
|
235
239
|
---
|
|
@@ -243,7 +247,7 @@ agents: [dev, architect] # empty [] = all agents load it
|
|
|
243
247
|
|
|
244
248
|
| | PRD (`prd.md`) | Code governance (`.aioson/design-docs/`) | Design doc (`design-doc.md`) |
|
|
245
249
|
|---|---|---|---|
|
|
246
|
-
| **Produced by** | `@product` | Installer + project team | `@discovery-design-doc` |
|
|
250
|
+
| **Produced by** | `@product` | Installer + project team | `@orchestrator` maestro / `@sheldon` lean (`@architect` merged or `@discovery-design-doc` detour) |
|
|
247
251
|
| **Focus** | What and why — vision, users, problem, features | Structural code quality rules | How — technical flows, decisions, risks, slices |
|
|
248
252
|
| **Audience** | All agents | Agents doing structural planning or implementation | Technical agents (dev, architect, qa) |
|
|
249
253
|
| **Lifecycle** | Written once, enhanced by @pm | Stable, edited when conventions change | Living document, updated as decisions are made |
|
|
@@ -275,12 +279,12 @@ AIOSON ships three types of skills in `.aioson/skills/`:
|
|
|
275
279
|
| **Design skills** | `.aioson/skills/design/` | Explicit — via `design_skill` in project.context.md. Only ONE can be active. |
|
|
276
280
|
| **Static skills** | `.aioson/skills/static/` | Automatic — agents match by `framework` in project.context.md |
|
|
277
281
|
| **Dynamic skills** | `.aioson/skills/dynamic/` | Automatic — agents load when task references external services |
|
|
278
|
-
| **Process skills** | `.aioson/skills/process/` | Loaded on demand when an agent needs a workflow method such as SDD, decision presentation, prompt sharpening, feature expansion, or design-skill creation |
|
|
282
|
+
| **Process skills** | `.aioson/skills/process/` | Loaded on demand when an agent needs a workflow method such as SDD, decision presentation, prompt sharpening, feature expansion, or design-skill creation |
|
|
279
283
|
|
|
280
284
|
First-party process skills include:
|
|
281
285
|
|
|
282
|
-
- `prompt-sharpener` — improves agent prompts, skills, PRDs, plans, and handoffs by turning vague guidance into evidence-driven decision behavior while preserving workflow contracts.
|
|
283
|
-
- `briefing-expansion-scout`, `product-scope-expansion`, `sheldon-expansion-audit` — enrich feature thinking only when a rich surface or prior expansion artifact justifies it, using `.aioson/docs/feature-expansion-taxonomy.md`.
|
|
286
|
+
- `prompt-sharpener` — improves agent prompts, skills, PRDs, plans, and handoffs by turning vague guidance into evidence-driven decision behavior while preserving workflow contracts.
|
|
287
|
+
- `briefing-expansion-scout`, `product-scope-expansion`, `sheldon-expansion-audit` — enrich feature thinking only when a rich surface or prior expansion artifact justifies it, using `.aioson/docs/feature-expansion-taxonomy.md`.
|
|
284
288
|
|
|
285
289
|
### Installed skills (`.aioson/installed-skills/`)
|
|
286
290
|
|
|
@@ -56,8 +56,8 @@ See `docs/README.md` for format and naming conventions.
|
|
|
56
56
|
## Layer 4 — `.aioson/context/design-doc*.md`
|
|
57
57
|
|
|
58
58
|
**What it is:** living decision document for the current feature or project scope.
|
|
59
|
-
**Who writes it:** @discovery-design-doc.
|
|
60
|
-
**Who updates it:** @dev at feature close
|
|
59
|
+
**Who writes it:** @orchestrator (maestro mode) on MEDIUM and @sheldon on the SMALL lean lane by default; @architect (merged mode) or @discovery-design-doc when those opt-in detours are in the sequence.
|
|
60
|
+
**Who updates it:** @dev at feature close; the design-doc producer (@orchestrator maestro / @sheldon lean / @architect merged or @discovery-design-doc detour) when resuming.
|
|
61
61
|
**When to use:** automatically — one per feature (`design-doc-{slug}.md`) or one project-wide (`design-doc.md`).
|
|
62
62
|
**Cadence:** updated at the end of each feature implementation session. Decisions are append-only — never deleted.
|
|
63
63
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Per-agent quick help printed by the --help activation token. Each section is keyed by `## @<agent>`; the agent prints ONLY its own section, translated to the interaction language, and stops."
|
|
3
|
+
task_types: [help]
|
|
4
|
+
triggers: [help, --help, agent options]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent quick help (--help token)
|
|
8
|
+
|
|
9
|
+
Consumed by the `## Help (--help)` section of each agent kernel: a standalone `--help` in the activation arguments makes the agent print its section below (localized) and stop — no work, no CLI calls, no questions. Keep every section short: what / when / options / typical calls / produces / next.
|
|
10
|
+
|
|
11
|
+
## @product
|
|
12
|
+
|
|
13
|
+
- **What:** product discovery — defines what to build, for whom, and why; writes the PRD base.
|
|
14
|
+
- **When:** starting a new feature or project definition; the kickoff of every feature chain.
|
|
15
|
+
- **Options:** `--auto` (run this feature on autopilot to `feature:close`), `--step` (drive each stage manually). Without a token and no standing choice, asks the run mode once at the PRD handoff.
|
|
16
|
+
- **Typical:** `/product --auto build email notifications`, `/product redesign checkout`.
|
|
17
|
+
- **Produces:** `prd-{slug}.md`, `features.md` row; seeds the autopilot scheme when armed.
|
|
18
|
+
- **Next:** `@sheldon` (SMALL), `@orchestrator` (MEDIUM), `@dev` (MICRO), `@copywriter` (site).
|
|
19
|
+
|
|
20
|
+
## @briefing
|
|
21
|
+
|
|
22
|
+
- **What:** turns raw sketches from `plans/` into a structured, approved pre-production briefing.
|
|
23
|
+
- **When:** an early idea needs framing and evaluation BEFORE committing to a PRD.
|
|
24
|
+
- **Options:** none — point it at a `plans/` sketch or describe the idea.
|
|
25
|
+
- **Typical:** `/briefing evaluate plans/loyalty-program.md`, `/briefing frame this idea: ...`.
|
|
26
|
+
- **Produces:** `.aioson/briefings/{slug}/briefings.md` (+ prototype when the flow calls for it).
|
|
27
|
+
- **Next:** `@briefing-refiner` (refine) or `@product` (PRD).
|
|
28
|
+
|
|
29
|
+
## @briefing-refiner
|
|
30
|
+
|
|
31
|
+
- **What:** iterative review of an existing briefing before PRD generation — the agent audits (findings), the CLI renders `review.html` (`aioson briefing:review`), you decide in the browser, structured feedback is applied back (`aioson briefing:apply-feedback`), and the loop repeats until nothing blocks the PRD.
|
|
32
|
+
- **When:** a briefing exists but needs corrections, scope trims, or decisions; optionally a clickable prototype (and a reference-image visual identity) before @product.
|
|
33
|
+
- **Options:** none — it locates the briefing by slug or asks which one.
|
|
34
|
+
- **Typical:** `/briefing-refiner refine loyalty-program`.
|
|
35
|
+
- **Produces:** review rounds (`review.html` + feedback JSON + report, archived per round) and the updated briefing (contract preserved); optionally `identity.md` + `prototype.html`.
|
|
36
|
+
- **Next:** `@product` (after `aioson briefing:approve`), or prototype mode first for rich surfaces.
|
|
37
|
+
|
|
38
|
+
## @dev
|
|
39
|
+
|
|
40
|
+
- **What:** implements features per the spec/plan — code, migrations, interfaces, tests; drives all phases in one continuous run.
|
|
41
|
+
- **When:** implementation entry point, resume after a break, or QA corrections.
|
|
42
|
+
- **Options:** `--auto` (arm autopilot from here: implementation + review cycle run autonomously), `--step` (disarm autopilot for this feature — stop at the `@qa` handoff even in an always-autopilot project).
|
|
43
|
+
- **Typical:** `/dev --auto`, `/dev` (follows the seeded scheme/flag), `/dev continue feature checkout`.
|
|
44
|
+
- **Produces:** the implementation + tests, `spec-{slug}.md` updates, `dev-state.md` checkpoints.
|
|
45
|
+
- **Next:** `@qa` (hub of the post-dev review cycle).
|
|
46
|
+
|
|
47
|
+
## @deyvin
|
|
48
|
+
|
|
49
|
+
- **What:** continuity-first pair programming — recovers recent context, works in small validated slices. Alias: `/pair`.
|
|
50
|
+
- **When:** resuming known work, debugging together, a bounded fix on existing context.
|
|
51
|
+
- **Options:** none. Hard boundary: new project/feature, broad redesign, or mixed product+UX+implementation scope → hands off immediately, never codes first.
|
|
52
|
+
- **Typical:** `/deyvin continue yesterday's fix`, `/pair debug the failing upload test`.
|
|
53
|
+
- **Produces:** the validated slice + session continuity records.
|
|
54
|
+
- **Next:** the proper workflow agent when scope expands (`@product`/`@dev`).
|
|
55
|
+
|
|
56
|
+
## @discover
|
|
57
|
+
|
|
58
|
+
- **What:** reads key files/artifacts and builds the semantic knowledge cache in `.aioson/context/bootstrap/` (what the system is, does, how it works, current state).
|
|
59
|
+
- **When:** session start on broad work, after big landings, or when agents warn `bootstrap < 4/4` / stale.
|
|
60
|
+
- **Options:** none.
|
|
61
|
+
- **Typical:** `/discover` (full refresh).
|
|
62
|
+
- **Produces:** `bootstrap/how-it-works.md`, `bootstrap/current-state.md` (+ archive), instant context for every other agent.
|
|
63
|
+
- **Next:** whatever agent you originally needed — discover is a preparation step.
|
|
64
|
+
|
|
65
|
+
## @neo
|
|
66
|
+
|
|
67
|
+
- **What:** the system router — shows the full picture (project state, workflow stage, pending work) and routes you to the right agent. Never implements, never produces artifacts.
|
|
68
|
+
- **When:** you are lost, between features, or unsure which agent/lane fits the task.
|
|
69
|
+
- **Options:** none.
|
|
70
|
+
- **Typical:** `/neo where are we?`, `/neo what should I run next?`.
|
|
71
|
+
- **Produces:** orientation + a concrete routing recommendation.
|
|
72
|
+
- **Next:** the agent it names.
|
|
73
|
+
|
|
74
|
+
## @orache
|
|
75
|
+
|
|
76
|
+
- **What:** deep domain investigation before a squad/product push — real frameworks, anti-patterns, benchmarks, reference voices, vocabulary of the field.
|
|
77
|
+
- **When:** entering an unfamiliar domain, or before `@squad` assembles specialists.
|
|
78
|
+
- **Options:** none — give it the domain/question; it reuses the `researchs/` cache (7-day TTL).
|
|
79
|
+
- **Typical:** `/orache investigate the B2B onboarding-tools market`.
|
|
80
|
+
- **Produces:** a domain dossier + cached research under `researchs/`.
|
|
81
|
+
- **Next:** `@squad`, `@product`, or `@briefing` depending on the goal.
|
|
82
|
+
|
|
83
|
+
## @orchestrator
|
|
84
|
+
|
|
85
|
+
- **What:** the MEDIUM spec maestro — fans out to analyst/architect/pm (+ux-ui) as sub-agents and consolidates one gated spec package (requirements, spec with Gates A/B/C, design-doc, readiness, plan, harness contract). MEDIUM only.
|
|
86
|
+
- **When:** feature classified MEDIUM, right after `@product`.
|
|
87
|
+
- **Options:** none at activation — under autopilot it seeds the scheme, completes its stage, and crosses into `@dev` automatically.
|
|
88
|
+
- **Typical:** `/orchestrator continue feature billing-portal`.
|
|
89
|
+
- **Produces:** the gated spec package + `dev-state.md` cold-start packet.
|
|
90
|
+
- **Next:** `@dev`.
|
|
91
|
+
|
|
92
|
+
## @tester
|
|
93
|
+
|
|
94
|
+
- **What:** engineering-grade test suite for already-implemented apps — coverage gaps, edge cases, mutation-style checks. Tests what exists; never implements features.
|
|
95
|
+
- **When:** `@qa` flags a coverage gap, or you want a systematic test pass on a finished surface.
|
|
96
|
+
- **Options:** feature-scoped via the workflow (`--feature=<slug>` when invoked through the CLI prompt).
|
|
97
|
+
- **Typical:** `/tester cover feature checkout`, or auto-invoked by `@qa` under autopilot.
|
|
98
|
+
- **Produces:** the test suite + a coverage report; surfaces dev-owned blocking gaps.
|
|
99
|
+
- **Next:** `@dev` (blocking gaps) or back to `@qa` (sign-off).
|
|
100
|
+
|
|
101
|
+
## @pentester
|
|
102
|
+
|
|
103
|
+
- **What:** structured adversarial security review — maps the threat surface and produces reproducible findings under an explicit scope contract (not a free-form hacker).
|
|
104
|
+
- **When:** sensitive surface (auth, money, uploads, secrets, external URLs) — via `@qa`'s trigger or on demand.
|
|
105
|
+
- **Options:** `--mode=app_target --feature=<slug> --scope=<target>` via `aioson agent:prompt pentester`.
|
|
106
|
+
- **Typical:** `/pentester review the auth endpoints of feature accounts`.
|
|
107
|
+
- **Produces:** `security-findings-{slug}.json` (owners + severities; `@qa` owns closure).
|
|
108
|
+
- **Next:** `@dev` (open dev-owned findings) or back to `@qa`.
|
|
109
|
+
|
|
110
|
+
## @qa
|
|
111
|
+
|
|
112
|
+
- **What:** risk-first review — objective findings, the runtime smoke gate (build + migrate + boot + Core happy-path on the real stack), and the post-dev routing hub.
|
|
113
|
+
- **When:** right after `@dev`; re-verification after corrections.
|
|
114
|
+
- **Options:** none at activation — verdicts and routing are evidence-driven.
|
|
115
|
+
- **Typical:** `/qa verify feature checkout`, or auto-invoked by `@dev` under autopilot.
|
|
116
|
+
- **Produces:** QA report + verdict (PASS/FAIL), Gate D, corrections plans on FAIL.
|
|
117
|
+
- **Next:** `@dev` (FAIL), `@tester`/`@pentester` (triggers), `@validator` (harness contract), or STOP recommending `aioson feature:close` (human gate).
|
|
118
|
+
|
|
119
|
+
## @sheldon
|
|
120
|
+
|
|
121
|
+
- **What:** the SMALL single spec authority (lean lane) — PRD gap analysis, sizing, enrichment, and the full collapsed spec package in one pass.
|
|
122
|
+
- **When:** feature classified SMALL, right after `@product`; or PRD quality review on demand.
|
|
123
|
+
- **Options:** none at activation — under autopilot it seeds the scheme, completes its stage (`--complete=sheldon`), and crosses into `@dev` automatically.
|
|
124
|
+
- **Typical:** `/sheldon continue feature quick-filters`.
|
|
125
|
+
- **Produces:** `sheldon-enrichment-{slug}.md`, `spec-{slug}.md` (Gates A/B/C), design-doc, readiness, plan, harness contract, `dev-state.md`.
|
|
126
|
+
- **Next:** `@dev`.
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Autopilot handoff protocol: automatic agent chaining across the feature workflow — the
|
|
2
|
+
description: "Autopilot handoff protocol: automatic agent chaining across the feature workflow — the opt-in pre-dev detour chain and the post-dev review cycle (dev→qa→tester/pentester→validator) — with deterministic routing and explicit stop conditions. The chain never auto-runs feature:close/publish."
|
|
3
3
|
task_types: [handoff, autopilot]
|
|
4
4
|
triggers: [auto handoff, autopilot, next agent]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Autopilot handoff (
|
|
7
|
+
# Autopilot handoff (feature start → dev → review cycle)
|
|
8
8
|
|
|
9
|
-
Opt-in protocol that removes
|
|
9
|
+
Opt-in protocol that removes the **mechanical** handoff confirmations across the whole feature workflow — the "type /sheldon", "type /dev", "run phase 2", "run qa" stops. Genuine human decisions (product scope, sizing/enrichment) still happen interactively inside their agents; autopilot only removes the mechanical "run the next thing" step once an agent's own work is settled. Two segments:
|
|
10
10
|
|
|
11
|
-
1. **
|
|
12
|
-
2. **Post-dev review cycle (`@dev` → `@qa` → `@tester`/`@pentester` → `@validator`):**
|
|
11
|
+
1. **Spec → dev chain (`@product → @sheldon`/`@orchestrator` → `@dev`):** when autopilot is on, each spec agent — once its own decisions are resolved (no open `AskUserQuestion`, the gates it owns approved) — seeds the agentic scheme and auto-invokes the next stage instead of stopping. It crosses the pre-dev boundary via the `dev-state.md` cold-start packet, not by carrying raw upstream chat forward. `@analyst`, `@architect`, `@pm`, `@scope-check`, and `@discovery-design-doc` chain automatically only when an opt-in detour adds them to the active sequence.
|
|
12
|
+
2. **Post-dev review cycle (`@dev` → `@qa` → `@tester`/`@pentester` → `@validator`):** the implementation and review agents chain automatically until the feature is ready to close. `@qa` is the hub: it owns the routing to the specialized agents and the corrections loop.
|
|
13
|
+
|
|
14
|
+
Both segments stop only at the human close/publish gate (`feature:close`) and at the hard stop conditions below. Historically Segment 1 stayed manual (upstream agents end on human decisions); autopilot now crosses it too, but only mechanically — a real product/sizing decision still pauses for the human before any auto-invoke.
|
|
13
15
|
|
|
14
16
|
## Activation
|
|
15
17
|
|
|
16
|
-
Autopilot is active
|
|
18
|
+
Autopilot is active when BOTH of the first two hold, gated by the third:
|
|
19
|
+
|
|
20
|
+
1. Either `project.context.md` frontmatter has `auto_handoff: true`, OR `.aioson/context/workflow-execute.json` exists with `agentic_policy.enabled: true` **and `feature` matching the current slug** (the seeded scheme — a scheme left by a different/closed feature does NOT count, for any agent in the chain). **Per-feature disarm wins over the flag:** a scheme for the current slug with `agentic_policy.enabled: false` (written by `aioson workflow:execute . --feature={slug} --seed --step`) turns autopilot OFF for that feature even when `auto_handoff: true` — an explicit per-feature choice always beats the project default.
|
|
21
|
+
|
|
22
|
+
**Inline run-mode tokens (highest precedence, human entry points only):** a standalone `--auto` or `--step` in the activation arguments of `@product` (kickoff) or `@dev` (late entry/override) IS the run-mode decision — the agent strips it from the task text and never asks. `--auto` seeds the scheme (arming the whole chain from that point); `--step` writes the disarmed scheme. Downstream agents (`@qa`/`@tester`/`@pentester`/`@validator`) do not parse tokens — they read the flag/scheme. Absent both, the run mode is not yet chosen: **`@product` asks it on screen at feature kickoff** (Autopilot / Step by step / Always autopilot — see product.md "Run mode"). Picking Autopilot seeds the scheme (activating this segment); "Always autopilot" also writes `auto_handoff: true`; Step by step leaves both unset = manual handoffs. Only `@product` asks — downstream agents read the flag/scheme and never re-prompt.
|
|
23
|
+
2. A feature workflow is active (feature slug known).
|
|
24
|
+
3. The current agent's own gate/verdict passed AND no genuine human decision is open (see stop conditions).
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
2. A feature workflow is active (feature slug known, classification SMALL or MEDIUM).
|
|
20
|
-
3. The current agent's own gate/verdict passed (see stop conditions).
|
|
26
|
+
## Seeding the agentic scheme
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
The first spec agent to finish under autopilot seeds the run's contract — this is the "scheme" the whole chain follows, and it is what makes a feature built the normal way (`@product → @sheldon`/`@orchestrator` → …) run to `feature:close` without the user launching anything:
|
|
23
29
|
|
|
24
30
|
```bash
|
|
25
|
-
aioson workflow:execute . --feature={slug} --tool=<tool>
|
|
31
|
+
aioson workflow:execute . --feature={slug} --seed --tool=<tool>
|
|
26
32
|
```
|
|
27
33
|
|
|
28
|
-
`
|
|
34
|
+
`--seed` writes `.aioson/context/workflow-execute.json` (with `agentic_policy.enabled: true` — review-loop caps, `feature_close: human_gate`, and the stop conditions) plus `.aioson/context/workflow.state.json`. It is **seed-only**: it records the policy the interactive agents follow but does NOT drive stage transitions itself (the agents do, via `Skill(aioson:agent:<next>)` + `aioson workflow:next . --complete=<agent>`). Re-seeding the same slug is idempotent, and a stale `workflow.state.json` left by a feature that is no longer active in `features.md` is discarded and reseeded. Once the scheme exists with `agentic_policy.enabled`, autopilot is on for the whole feature even if `auto_handoff` was never written to frontmatter.
|
|
35
|
+
|
|
36
|
+
**Seed failure is a stop condition.** The seeding agent must check the command result: a `different_active_feature` failure means another feature is genuinely active in `workflow.state.json` — surface it to the user (close/pause it, or `aioson feature:sweep .`) and stop with the manual handoff. Never continue the chain as if autopilot were armed when the seed failed.
|
|
37
|
+
|
|
38
|
+
The headless/tracked runner `aioson workflow:execute . --feature={slug} --tool=<tool> --agentic` (without `--seed`) is the same contract but also advances checkpoints from the CLI — use it for non-interactive runs. Prompt-level `Skill(...)` chaining is how interactive Claude Code / codex sessions consume the scheme.
|
|
29
39
|
|
|
30
40
|
## Routing — deterministic, never LLM-chosen
|
|
31
41
|
|
|
@@ -45,13 +55,13 @@ When autopilot is active and no stop condition applies:
|
|
|
45
55
|
3. If no runtime gateway is available, emit a one-line transition notice: `Autopilot: @<current> done → invoking @<next> (Ctrl+C to interrupt)`.
|
|
46
56
|
4. Invoke `Skill(aioson:agent:<next>)` with the task `"continue feature {slug} — autopilot handoff from @<current>"`. No user prompt — Ctrl+C interrupts.
|
|
47
57
|
|
|
48
|
-
## Segment 1 —
|
|
58
|
+
## Segment 1 — spec → dev chain
|
|
49
59
|
|
|
50
|
-
SMALL feature: `@
|
|
60
|
+
SMALL feature (lean default): `@product` → `@sheldon` → `@dev`. Under autopilot: `@product`, once the PRD is settled, seeds the scheme and invokes `@sheldon`; `@sheldon`, once sizing/enrichment is confirmed and its lean-lane artifacts + `dev-state.md` are written, completes its own stage (`aioson workflow:next . --complete=sheldon`) and invokes `@dev`. The full-merged SMALL detour auto-chains `@analyst` → `@architect` → `@dev` when opted in (with `@scope-check`/`@discovery-design-doc` only if the sequence adds them).
|
|
51
61
|
|
|
52
|
-
MEDIUM feature: `@
|
|
62
|
+
MEDIUM feature (maestro default): `@product` → `@orchestrator` → `@dev`. Under autopilot: `@product` seeds + invokes `@orchestrator`; `@orchestrator`, once its gated spec package (Gates A/B/C approved, readiness ready) + `dev-state.md` are written, invokes `@dev`. The maestro fans out to `@analyst`/`@architect`/`@pm` as sub-agents, not as workflow stages; those chain as stages only under an opt-in full-chain detour.
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
Crossing into `@dev` goes through the `dev-state.md` cold-start packet the spec agent writes — `@dev`'s session-start protocol loads only that minimal package, so `@dev` does not inherit the heavy upstream chat; transparent auto-compact trims the rest. That is why the crossing is safe without a manual `/compact`. The spec agent still stops with the normal manual `/dev` recommendation if it has an open product/scope/sizing decision or a gate it owns is not approved. Recommend `/clear` only when the user needs a hard reset, a feature switch, polluted context, or a security-sensitive reset.
|
|
55
65
|
|
|
56
66
|
## Segment 2 — post-dev review cycle (hub = `@qa`)
|
|
57
67
|
|
|
@@ -84,15 +94,15 @@ Routing table (each row is followed only when autopilot is active and no stop co
|
|
|
84
94
|
## Stop conditions — break the chain and emit the normal manual handoff
|
|
85
95
|
|
|
86
96
|
1. **`feature:close` / publish** — ALWAYS the human gate. When `@qa` (PASS, nothing pending) or `@validator` (PASS) is the last clean step, STOP and recommend `aioson feature:close . --feature={slug}`. Never auto-run `feature:close`, `feature:archive`, `npm publish`, or any publish/close action.
|
|
87
|
-
2. **
|
|
97
|
+
2. **Genuine human decision open** — a spec agent with an unresolved product/scope/sizing question (an open `AskUserQuestion`, or a gate it owns not yet approved) finishes that decision with the human before any auto-invoke, and stops with the normal manual handoff. Autopilot removes mechanical stops, never real decisions. (This replaces the old "always stop before the first `@dev`" rule: the crossing is now automatic once the spec agent's own decisions are settled and `dev-state.md` is written.)
|
|
88
98
|
3. **Corrections cap reached** — review cycles are bounded by `agentic_policy.review_cycle` (default 3); when `review-cycle:advance` returns `stop_cycle_limit`, stop and escalate to the human.
|
|
89
99
|
4. **Critical security finding** — the `@qa` corrections security gate (auth/secret/credential/session/password/token/PII/encryption keywords) blocks the auto-loop; stop and require human intervention.
|
|
90
|
-
5. **Verdict not clean / gate or readiness blocked** — `@
|
|
91
|
-
6. **Context budget** — estimated usage ≥ `context_warning_threshold` (`.aioson/config.md`): write the compaction checkpoint to `.aioson/context/last-handoff.json`, stop, and recommend `/compact` for same-feature continuation. The workflow resumes from `.aioson/context/workflow.state.json` — the next session re-enters autopilot automatically. Recommend `/clear` only for a hard reset, feature switch, polluted context, or security-sensitive reset.
|
|
100
|
+
5. **Verdict not clean / gate or readiness blocked** — the `@orchestrator` maestro spec package not gate-approved (Gates A/B/C) or its readiness `blocked`, `@validator` FAIL with no safe corrections path (and, when present as detours, `@architect` Gate B / merged-mode readiness `blocked`, `@pm` Gate C blocked, `@scope-check` not `approved`/`patched`, or `@discovery-design-doc` readiness `blocked`): stop and route to the owner manually.
|
|
101
|
+
6. **Context budget** — estimated usage ≥ `context_warning_threshold` (`.aioson/config.md`): write the compaction checkpoint to `.aioson/context/last-handoff.json`, stop, and recommend `/compact` for same-feature continuation. The workflow resumes from `.aioson/context/workflow.state.json` — the next session re-enters autopilot automatically. Recommend `/clear` only for a hard reset, feature switch, polluted context, or security-sensitive reset.
|
|
92
102
|
7. **Ambiguity** — workflow state unavailable AND routing ambiguous, or any real decision requires user input: stop and ask, manually.
|
|
93
103
|
|
|
94
104
|
The user can interrupt at any time (Ctrl+C); autopilot never retries an interrupted invocation.
|
|
95
105
|
|
|
96
106
|
## Rationale
|
|
97
107
|
|
|
98
|
-
Industry-validated design (see `researchs/auto-handoff-pipeline-2026/summary.md`): deterministic routing beats LLM routing; human gates belong where they catch mistakes — at the start of implementation (`@dev` entry: compact operational handoff) and at the irreversible boundary (`feature:close`/publish). Every autonomous loop needs explicit exit conditions and bounds (the corrections cap, the re-entry guard); per-hop context checkpointing is the load-bearing cost mitigation.
|
|
108
|
+
Industry-validated design (see `researchs/auto-handoff-pipeline-2026/summary.md`): deterministic routing beats LLM routing; human gates belong where they catch mistakes — at the start of implementation (`@dev` entry: compact operational handoff) and at the irreversible boundary (`feature:close`/publish). Every autonomous loop needs explicit exit conditions and bounds (the corrections cap, the re-entry guard); per-hop context checkpointing is the load-bearing cost mitigation.
|
|
@@ -83,6 +83,47 @@ Before marking any task or feature done:
|
|
|
83
83
|
3. confirm exit code `0`
|
|
84
84
|
4. only then mark done
|
|
85
85
|
|
|
86
|
+
### Exit-code honesty (never auto-deceive)
|
|
87
|
+
|
|
88
|
+
A gate's verdict is its exit code, not your impression of it:
|
|
89
|
+
|
|
90
|
+
- **Exit 127 = command not found.** That is a FAILURE, not a pass — a missing
|
|
91
|
+
tool/dependency. Stop and report; never read "no error output" as "no errors".
|
|
92
|
+
- **Exit 0 with empty output** on a command that should produce output (a
|
|
93
|
+
typecheck over N files, a test run) means the command did **not** run. Verify
|
|
94
|
+
it actually executed (e.g. the output file exists and is non-empty) before
|
|
95
|
+
trusting it.
|
|
96
|
+
- **Exit 124 = timeout.** The command hung — investigate, do not blind-retry.
|
|
97
|
+
- When you cite a gate as evidence ("typecheck clean", "smoke passed"), paste the
|
|
98
|
+
exact command, the exit code, and the last lines of output. "exit 0" without
|
|
99
|
+
the command is not evidence.
|
|
100
|
+
|
|
101
|
+
### Static gate (`SG-*`) — proof per acceptance criterion
|
|
102
|
+
|
|
103
|
+
`aioson harness:check . --slug={slug}` also evaluates the contract's build-free
|
|
104
|
+
**`SG-*`** static criteria (`must_match` / `must_not_match` + parse-check) on
|
|
105
|
+
every run — they gate `@dev`-done even before the app builds. When you self-review
|
|
106
|
+
an AC backed by an `SG-*` criterion, the evidence **is** the pattern hit: cite the
|
|
107
|
+
`file:line` where `must_match` matched. A failing `SG-*` (a missing pattern, a
|
|
108
|
+
forbidden `TODO`/`as any`, a truncated file) blocks done exactly like a failing
|
|
109
|
+
test — fix the code, never relax the pattern.
|
|
110
|
+
|
|
111
|
+
### Runtime sub-gate (runtime features — has_api / DB / prototype)
|
|
112
|
+
|
|
113
|
+
A passing unit suite is not "done" for a feature that ships a backend, a database, or a clickable prototype.
|
|
114
|
+
Unit tests mock the DB/auth/network; they prove the parts in isolation, not the whole running app. Before
|
|
115
|
+
declaring such a feature done, you must have **run the real stack at least once**:
|
|
116
|
+
|
|
117
|
+
1. **build** the app (`pnpm build` / `npm run build` / `tsc -p .`) — the whole thing, not a subset
|
|
118
|
+
2. **apply** the migrations to a real/ephemeral DB (`prisma migrate reset --force` / `migrate deploy`) — a
|
|
119
|
+
`.sql` file on disk is not an applied migration
|
|
120
|
+
3. **boot** server + client; confirm a health probe (`/api/health`) returns 200
|
|
121
|
+
4. **drive** the prototype's Core happy-path (create/list/switch/edit/archive of the primary objects) end to
|
|
122
|
+
end on the running stack
|
|
123
|
+
|
|
124
|
+
If no smoke/boot harness exists, building one is part of the slice — do not substitute a unit test. This is
|
|
125
|
+
the same evidence `@qa`'s Runtime smoke gate and the §2c `RG-*` contract criteria require.
|
|
126
|
+
|
|
86
127
|
Update `skeleton-system.md` whenever files are created, deleted, or materially changed.
|
|
87
128
|
|
|
88
129
|
## `*update-skeleton`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Dev phase loop — auto-continue across phases, per-phase verification sub-agents, and compaction between phases."
|
|
3
|
+
agents: [dev, deyvin]
|
|
4
|
+
task_types: [implementation, verification]
|
|
5
|
+
triggers: [phase loop, auto-continue phases, per-phase verification, compact between phases]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Dev phase loop — auto-continue, per-phase verification, compaction
|
|
9
|
+
|
|
10
|
+
On-demand detail for @dev's `## Phase loop` kernel section. Applies when a phased plan drives the work (`implementation-plan-{slug}.md` or a Sheldon `.aioson/plans/{slug}/manifest.md`).
|
|
11
|
+
|
|
12
|
+
## The loop
|
|
13
|
+
|
|
14
|
+
**Auto-continue is the default and it is imperative — a phased plan runs to the END OF THE FEATURE in one continuous drive, not one phase per turn** (`phase_loop.auto_continue` in `.aioson/config/verification.json`). After a phase's gate is clean you will feel the pull to stop and report "Phase N done — continue?"; that pull is the exact bug this loop exists to defeat. Do NOT stop, do NOT ask, do NOT summarize-and-end between phases — proceed straight into the next phase. The per-phase verification report is the checkpoint that replaces the human "continue?": a clean report advances automatically; a failing one (after in-phase fix retries) is the only thing that halts the loop mid-feature. The run otherwise halts only at the end-of-feature gate or at a genuine hard stop (real ambiguity, a blocked gate, or a context ceiling on a host without transparent auto-compact). Set `auto_continue: false` only if you deliberately want to pause for confirmation between phases.
|
|
15
|
+
|
|
16
|
+
After finishing each phase:
|
|
17
|
+
|
|
18
|
+
1. **Close the phase.** Mark it `done` in the manifest (`pending → in_progress → done`, never skip ahead) and update `spec-{slug}.md` checkpoints.
|
|
19
|
+
2. **Per-phase gate.** If `.aioson/plans/{slug}/harness-contract.json` exists, run `aioson harness:check . --slug={slug}` (add `--strict` for MEDIUM / harness-driven work) — this also evaluates the build-free `SG-*` static criteria, so a stubbed/placeholder slice fails here before the build even runs. Then run `aioson audit:code . --changed --json` for a fast, build-free code-quality scan of this phase's diff (anti-patterns / TODOs / dead code / duplication): a HIGH finding is fix-before-advancing, MED/LOW advisory.
|
|
20
|
+
3. **Per-phase verification.** Run:
|
|
21
|
+
```bash
|
|
22
|
+
aioson verification:plan . --feature={slug} --trigger=per-phase --json
|
|
23
|
+
```
|
|
24
|
+
For every agent with `run: true`, dispatch it as a sub-agent on the plan's top-level `host` plus that agent's `mode` / `model`, scoped to this phase's changed files:
|
|
25
|
+
- `mode: native` → an in-harness sub-agent. On Claude Code use the Task tool with that `model` tier (e.g. `sonnet-4.6`); on codex/opencode use their own configured model. The sub-agent writes its `report` file (e.g. `qa-report-{slug}.md`) and returns it to @dev.
|
|
26
|
+
- `mode: external` → only the explicitly configured cross-vendor auditor (`cross_check`); never spawn one otherwise.
|
|
27
|
+
Read the report: **PASS** → continue. **Bugs** → fix them within this phase, re-run `harness:check`, and re-dispatch — up to `phase_loop.max_fix_retries_per_phase` times, then stop and surface the failure instead of advancing.
|
|
28
|
+
4. **Checkpoint, then keep going — do NOT end the turn.** Write the cold-start packet as a crash/interrupt safety net:
|
|
29
|
+
```bash
|
|
30
|
+
aioson dev:state:write # slug, completed phase, next phase, manifest path, required context, decisions
|
|
31
|
+
```
|
|
32
|
+
Then continue **immediately** into the next phase in the SAME turn. Context management is the host's job, never a reason to stop:
|
|
33
|
+
- **Claude Code (and any host with transparent auto-compact):** never self-issue `/compact` and never end your turn between phases. Auto-compact shrinks context in place when it fills — you just keep implementing. With `compact_between_phases: true`, "compact" means *write the checkpoint above*, NOT *stop for a manual compaction*.
|
|
34
|
+
- **codex / opencode (no transparent auto-compact):** the host wrapper re-enters on a fresh context and reloads via `aioson dev:resume-data .`. Only these hosts break the turn, and only their wrapper — never a bare prompt — restarts the loop.
|
|
35
|
+
The checkpoint exists so an interrupted run resumes cheaply, not so you pause. A phase boundary with a clean gate is a checkpoint, never a stopping point.
|
|
36
|
+
5. **End-of-feature gate (after the last phase only).** Hand off to `@qa`, which runs the full runtime smoke (build + migrate + boot + Core happy-path) plus `@tester`/`@pentester`/`@validator` per:
|
|
37
|
+
```bash
|
|
38
|
+
aioson verification:plan . --feature={slug} --trigger=end-of-feature
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Token economy
|
|
42
|
+
|
|
43
|
+
- The per-phase check is **light**: one cheap-tier sub-agent, changed-files scope, capped by `budget.max_subagents_per_phase`.
|
|
44
|
+
- It is **suppressed on MICRO** (`budget.skip_on_micro`) — MICRO phases just auto-continue with no sub-agent.
|
|
45
|
+
- The **expensive full runtime smoke runs once**, at end-of-feature only (`budget.full_smoke = end-of-feature-only`) — never per phase.
|
|
46
|
+
- Context stays small without stopping: on Claude Code transparent auto-compact shrinks it in place as it fills, and the between-phase `dev:state:write` checkpoint lets any compaction (auto or a host-driven fresh context) resume the next phase cheaply. You get the small-context savings without ever ending the turn.
|
|
47
|
+
|
|
48
|
+
## Configuration
|
|
49
|
+
|
|
50
|
+
All knobs live in `.aioson/config/verification.json` (see `.aioson/docs/verification-config.md`): per-agent `enabled` / `triggers` / `dispatch` (per host), `cross_check`, `budget`, and `phase_loop` (`auto_continue`, `compact_between_phases`, `max_fix_retries_per_phase`).
|