@jaimevalasek/aioson 1.23.1 → 1.28.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 +56 -0
- package/docs/en/4-agents/README.md +11 -8
- package/docs/en/4-agents/forge-run.md +165 -0
- package/docs/en/5-reference/README.md +1 -0
- package/docs/en/5-reference/cli-reference.md +199 -85
- package/docs/en/5-reference/executable-verification.md +165 -0
- package/docs/pt/4-agentes/README.md +2 -1
- package/docs/pt/4-agentes/forge-run.md +150 -0
- package/docs/pt/4-agentes/pm.md +8 -0
- package/docs/pt/4-agentes/qa.md +2 -0
- package/docs/pt/4-agentes/scope-check.md +19 -1
- package/docs/pt/4-agentes/sheldon.md +2 -0
- package/docs/pt/4-agentes/validator.md +20 -0
- package/docs/pt/5-referencia/autopilot-handoff.md +33 -0
- package/docs/pt/5-referencia/comandos-cli.md +64 -9
- package/docs/pt/5-referencia/fluxo-artefatos.md +40 -15
- package/docs/pt/5-referencia/loop-guardrails.md +19 -0
- package/docs/pt/5-referencia/sdd-automation-scripts.md +130 -26
- package/package.json +1 -1
- package/src/cli.js +70 -54
- package/src/commands/context-select.js +1 -0
- package/src/commands/forge-compile.js +330 -0
- package/src/commands/harness-check.js +159 -0
- package/src/commands/harness.js +37 -2
- package/src/commands/spec-analyze.js +324 -0
- package/src/constants.js +118 -108
- package/src/context-selector.js +28 -2
- package/src/gateway-pointer-merge.js +25 -4
- package/src/harness/contract-schema.js +8 -0
- package/src/harness/plan-waves.js +77 -0
- package/src/harness/review-payload.js +230 -0
- package/src/i18n/messages/en.js +21 -15
- package/src/i18n/messages/es.js +15 -13
- package/src/i18n/messages/fr.js +15 -13
- package/src/i18n/messages/pt-BR.js +21 -15
- package/src/parser.js +3 -1
- package/template/.aioson/agents/dev.md +67 -66
- package/template/.aioson/agents/deyvin.md +79 -74
- package/template/.aioson/agents/forge-run.md +57 -0
- package/template/.aioson/agents/pm.md +51 -45
- package/template/.aioson/agents/qa.md +22 -22
- package/template/.aioson/agents/scope-check.md +49 -46
- package/template/.aioson/agents/sheldon.md +1 -1
- package/template/.aioson/agents/validator.md +16 -5
- package/template/.aioson/docs/autopilot-handoff.md +34 -32
- package/template/.aioson/docs/sheldon/harness-contract.md +19 -2
- package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +9 -7
- package/template/.aioson/skills/process/aioson-spec-driven/references/deyvin.md +19 -15
- package/template/.claude/commands/aioson/agent/forge-run.md +17 -0
- package/template/AGENTS.md +7 -5
- package/template/CLAUDE.md +4 -3
- package/template/OPENCODE.md +24 -22
|
@@ -22,16 +22,16 @@ module.exports = {
|
|
|
22
22
|
'aioson agent:prompt <agent> [path] [--tool=codex|claude|opencode] [--lang=<bcp47-tag>] [--locale=pt-BR]',
|
|
23
23
|
help_agent_help:
|
|
24
24
|
'aioson agent:help [agent] [--json]',
|
|
25
|
-
help_agent_invoke:
|
|
26
|
-
'aioson agent:invoke <agent> [path] [--tool=codex|claude|opencode] [--mode=framework_target|app_target] [--feature=<slug>] [--scope=<area>] [--lang=<bcp47-tag>] [--locale=pt-BR]',
|
|
27
|
-
help_agent_epilogue:
|
|
28
|
-
'aioson agent:epilogue [path] --agent=<agente> --summary=<texto> [--feature=<slug>] [--approve-gate=A|B|C|D] [--json] [--locale=pt-BR]',
|
|
25
|
+
help_agent_invoke:
|
|
26
|
+
'aioson agent:invoke <agent> [path] [--tool=codex|claude|opencode] [--mode=framework_target|app_target] [--feature=<slug>] [--scope=<area>] [--lang=<bcp47-tag>] [--locale=pt-BR]',
|
|
27
|
+
help_agent_epilogue:
|
|
28
|
+
'aioson agent:epilogue [path] --agent=<agente> --summary=<texto> [--feature=<slug>] [--approve-gate=A|B|C|D] [--json] [--locale=pt-BR]',
|
|
29
29
|
help_context_validate: 'aioson context:validate [path] [--json] [--locale=pt-BR]',
|
|
30
|
-
help_context_pack:
|
|
31
|
-
'aioson context:pack [path] [--agent=<agente>] [--goal=<texto>] [--module=<modulo-ou-pasta>] [--max-files=8] [--json] [--locale=pt-BR]',
|
|
32
|
-
help_context_select:
|
|
33
|
-
'aioson context:select [path] [--agent=<agente>] [--mode=planning|executing] [--task=<texto>] [--paths=<caminho[,caminho2]>] [--feature=<slug>] [--json] [--locale=pt-BR]',
|
|
34
|
-
help_context_load:
|
|
30
|
+
help_context_pack:
|
|
31
|
+
'aioson context:pack [path] [--agent=<agente>] [--goal=<texto>] [--module=<modulo-ou-pasta>] [--max-files=8] [--json] [--locale=pt-BR]',
|
|
32
|
+
help_context_select:
|
|
33
|
+
'aioson context:select [path] [--agent=<agente>] [--mode=planning|executing] [--task=<texto>] [--paths=<caminho[,caminho2]>] [--feature=<slug>] [--json] [--locale=pt-BR]',
|
|
34
|
+
help_context_load:
|
|
35
35
|
'aioson context:load [path] --target=<rule|brain>:<slug> --agent=<nome> [--batch="slug1,slug2"] [--feature=<slug>] [--classification=<MICRO|SMALL|MEDIUM>] [--verbose] [--json] [--locale=pt-BR]',
|
|
36
36
|
help_chain_audit:
|
|
37
37
|
'aioson chain:audit <arquivo> [path] [--limit=N] [--feature=<slug>] [--json] [--locale=pt-BR]',
|
|
@@ -124,10 +124,10 @@ module.exports = {
|
|
|
124
124
|
'aioson workflow:next [path] [--complete[=<agente>]] [--agent=<agente>] [--skip=<agente>] [--status] [--suggest] [--tool=codex|claude|opencode] [--json] [--locale=pt-BR]',
|
|
125
125
|
help_workflow_status:
|
|
126
126
|
'aioson workflow:status [path] [--suggest] [--tool=codex|claude|opencode] [--json] [--locale=pt-BR]',
|
|
127
|
-
help_workflow_execute:
|
|
128
|
-
'aioson workflow:execute [path] [--feature=<slug>] [--agentic] [--max-dev-qa-cycles=<n>] [--max-tester-cycles=<n>] [--max-pentester-cycles=<n>] [--dry-run] [--lane=<n>] [--json] [--locale=pt-BR]',
|
|
129
|
-
help_review_cycle:
|
|
130
|
-
'aioson review-cycle:<status|advance|resolve|reset> [path] --feature=<slug> [--plan=<path>] [--source=qa|tester|pentester] [--json] [--locale=pt-BR]',
|
|
127
|
+
help_workflow_execute:
|
|
128
|
+
'aioson workflow:execute [path] [--feature=<slug>] [--agentic] [--max-dev-qa-cycles=<n>] [--max-tester-cycles=<n>] [--max-pentester-cycles=<n>] [--dry-run] [--lane=<n>] [--json] [--locale=pt-BR]',
|
|
129
|
+
help_review_cycle:
|
|
130
|
+
'aioson review-cycle:<status|advance|resolve|reset> [path] --feature=<slug> [--plan=<path>] [--source=qa|tester|pentester] [--json] [--locale=pt-BR]',
|
|
131
131
|
help_parallel_init:
|
|
132
132
|
'aioson parallel:init [path] [--workers=2..6] [--force] [--dry-run] [--json] [--locale=pt-BR]',
|
|
133
133
|
help_parallel_doctor:
|
|
@@ -157,7 +157,9 @@ module.exports = {
|
|
|
157
157
|
help_harness_init:
|
|
158
158
|
'aioson harness:init [path] --slug=<slug> [--mode=BALANCED|URGENT|ECONOMICAL] [--locale=pt-BR]',
|
|
159
159
|
help_harness_validate:
|
|
160
|
-
'aioson harness:validate [path] --slug=<slug> [--artifact=<path>] [--locale=pt-BR]',
|
|
160
|
+
'aioson harness:validate [path] --slug=<slug> [--base=<ref>] [--no-diff] [--max-diff-bytes=<n>] [--artifact=<path>] [--locale=pt-BR]',
|
|
161
|
+
help_harness_check:
|
|
162
|
+
'aioson harness:check [path] --slug=<slug> [--criteria=C1,C2] [--timeout=<ms>] [--json] [--locale=pt-BR]',
|
|
161
163
|
help_harness_retro:
|
|
162
164
|
'aioson harness:retro [path] --feature=<slug> | --last=<N> [--json] [--locale=pt-BR]',
|
|
163
165
|
help_harness_preview:
|
|
@@ -1106,7 +1108,11 @@ module.exports = {
|
|
|
1106
1108
|
contract_not_found: 'Contrato nao encontrado para o slug: {slug}',
|
|
1107
1109
|
validating: 'Validando harness para {slug}...',
|
|
1108
1110
|
blocked: 'Execucao pausada: {reason}',
|
|
1109
|
-
init_dry_run: '[dry-run] Inicializaria harness para {slug}'
|
|
1111
|
+
init_dry_run: '[dry-run] Inicializaria harness para {slug}',
|
|
1112
|
+
check_header: 'Harness check — {slug}',
|
|
1113
|
+
check_no_executable: ' Nenhum criterio com comando de verification ({total} criterios no total). @validator julga todos.',
|
|
1114
|
+
check_summary: ' Checks: {passed}/{executable} passaram ({skipped} sem verification — julgados pelo @validator)',
|
|
1115
|
+
check_unknown_criteria: 'Ids de criterios desconhecidos: {ids}'
|
|
1110
1116
|
},
|
|
1111
1117
|
web_map: {
|
|
1112
1118
|
url_missing: 'Opcao obrigatoria ausente: --url=<url>.',
|
package/src/parser.js
CHANGED
|
@@ -29,13 +29,15 @@ function parseArgv(argv) {
|
|
|
29
29
|
'all', 'force', 'dry-run', 'no-interactive', 'fix', 'json',
|
|
30
30
|
'help', 'version', 'no-launch', 'attach', 'tmux',
|
|
31
31
|
'allow-warnings', 'install-hook', 'uninstall-hook', 'remove-hook',
|
|
32
|
-
'agent-safe', 'agentic',
|
|
32
|
+
'agent-safe', 'agentic',
|
|
33
33
|
'selective',
|
|
34
34
|
'status', 'suggest', 'apply',
|
|
35
35
|
'runtime-only', 'template-only', 'inception', 'locales',
|
|
36
36
|
// feature:export structure/output toggles — pure booleans; without these
|
|
37
37
|
// a following positional (e.g. `--flatten .`) would be swallowed as the value.
|
|
38
38
|
'flatten', 'no-index',
|
|
39
|
+
// harness:validate — pure boolean; `--no-diff .` must not swallow the path.
|
|
40
|
+
'no-diff',
|
|
39
41
|
// `--resume` alone means "resume last"; `--resume=<id>` carries a value
|
|
40
42
|
// and is handled by the `=` branch above. Without this entry, `--resume`
|
|
41
43
|
// followed by `--tool=claude` would swallow the next token as its value.
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
> **LANGUAGE BOUNDARY:** Agent instructions are canonical in English. All user-facing communication must follow `interaction_language` from project context. If it is absent, fall back to `conversation_language`.
|
|
4
4
|
|
|
5
|
-
## Context loading modes
|
|
6
|
-
|
|
7
|
-
Use two modes and do not blur them:
|
|
8
|
-
|
|
9
|
-
- **PLANNING** — inspect status, frontmatter, indexes, and `aioson context:select`; do not load full rules/docs/design governance.
|
|
10
|
-
- **EXECUTING** — before the first code edit, load only the files selected for the concrete task and paths.
|
|
11
|
-
|
|
12
|
-
If `aioson` is available, select context with:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
aioson context:select . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
16
|
-
aioson context:select . --agent=dev --mode=executing --task="<task>" --paths="<files to touch>"
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
If the CLI is unavailable, read YAML frontmatter only and apply the same rule: `agents`, `modes`, `task_types`, `triggers`, and `paths` decide what to load. Rules and governance override this file only after they are selected by mode/task/path.
|
|
5
|
+
## Context loading modes
|
|
6
|
+
|
|
7
|
+
Use two modes and do not blur them:
|
|
8
|
+
|
|
9
|
+
- **PLANNING** — inspect status, frontmatter, indexes, and `aioson context:select`; do not load full rules/docs/design governance.
|
|
10
|
+
- **EXECUTING** — before the first code edit, load only the files selected for the concrete task and paths.
|
|
11
|
+
|
|
12
|
+
If `aioson` is available, select context with:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
aioson context:select . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
16
|
+
aioson context:select . --agent=dev --mode=executing --task="<task>" --paths="<files to touch>"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If the CLI is unavailable, read YAML frontmatter only and apply the same rule: `agents`, `modes`, `task_types`, `triggers`, and `paths` decide what to load. Rules and governance override this file only after they are selected by mode/task/path.
|
|
20
20
|
|
|
21
21
|
## Mission
|
|
22
22
|
Implement features according to architecture while preserving stack conventions and project simplicity.
|
|
@@ -26,14 +26,14 @@ Implement features according to architecture while preserving stack conventions
|
|
|
26
26
|
**Step 0 — Tool-first preflight (before reading any file):**
|
|
27
27
|
If `aioson` is available:
|
|
28
28
|
```bash
|
|
29
|
-
aioson workflow:status .
|
|
30
|
-
aioson context:validate .
|
|
31
|
-
aioson preflight . --agent=dev --feature={slug}
|
|
32
|
-
aioson context:select . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
33
|
-
aioson preflight:context . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
34
|
-
aioson memory:status .
|
|
35
|
-
```
|
|
36
|
-
Use output to orient. Do not load full `rules`, `.aioson/docs/`, or `.aioson/design-docs/` until `context:select --mode=executing` names them for the concrete edit. If CLI is unavailable, proceed to Step 1 with frontmatter-only selection.
|
|
29
|
+
aioson workflow:status .
|
|
30
|
+
aioson context:validate .
|
|
31
|
+
aioson preflight . --agent=dev --feature={slug}
|
|
32
|
+
aioson context:select . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
33
|
+
aioson preflight:context . --agent=dev --mode=planning --task="<task>" --paths="<known paths>"
|
|
34
|
+
aioson memory:status .
|
|
35
|
+
```
|
|
36
|
+
Use output to orient. Do not load full `rules`, `.aioson/docs/`, or `.aioson/design-docs/` until `context:select --mode=executing` names them for the concrete edit. If CLI is unavailable, proceed to Step 1 with frontmatter-only selection.
|
|
37
37
|
|
|
38
38
|
**Step 0.1 — Bootstrap gate (Living Memory):** read `aioson memory:status .` output. If `Bootstrap < 4/4` or the bootstrap files are older than 30 days, emit a warning at the top of your response:
|
|
39
39
|
|
|
@@ -44,11 +44,11 @@ This is advisory — proceed with the user's task, but the warning surfaces the
|
|
|
44
44
|
**Step 1 — Check dev-state:**
|
|
45
45
|
Read `.aioson/context/dev-state.md` if it exists.
|
|
46
46
|
|
|
47
|
-
**dev-state.md found:**
|
|
48
|
-
- It contains the exact primary `context_package` (2–4 files max) for the current task.
|
|
49
|
-
- Load ONLY those primary files at activation.
|
|
50
|
-
- Open plan-listed phase loads only when starting that phase and touching related paths.
|
|
51
|
-
- Start on `next_step` immediately — no exploration, no discovery pass.
|
|
47
|
+
**dev-state.md found:**
|
|
48
|
+
- It contains the exact primary `context_package` (2–4 files max) for the current task.
|
|
49
|
+
- Load ONLY those primary files at activation.
|
|
50
|
+
- Open plan-listed phase loads only when starting that phase and touching related paths.
|
|
51
|
+
- Start on `next_step` immediately — no exploration, no discovery pass.
|
|
52
52
|
|
|
53
53
|
**dev-state.md NOT found (cold start):**
|
|
54
54
|
- Read only: `project.context.md` + `features.md` (if present). Stop there.
|
|
@@ -61,12 +61,12 @@ Read `.aioson/context/dev-state.md` if it exists.
|
|
|
61
61
|
|
|
62
62
|
| Mode | Load — nothing more |
|
|
63
63
|
|------|---------------------|
|
|
64
|
-
| Simple Plan | `project.context.md` + `simple-plans/{slug}.md` |
|
|
65
|
-
| Feature MICRO | `project.context.md` + `prd-{slug}.md` |
|
|
66
|
-
| Feature SMALL | `project.context.md` + `spec-{slug}.md` + `design-doc-{slug}.md` or `readiness-{slug}.md` |
|
|
67
|
-
| Feature MEDIUM | `project.context.md` + `spec-{slug}.md` + `implementation-plan-{slug}.md` + one readiness/design handoff artifact |
|
|
68
|
-
| Feature with Sheldon plan | `project.context.md` + `spec-{slug}.md` + `.aioson/plans/{slug}/manifest.md` + current phase file |
|
|
69
|
-
| Project mode | `project.context.md` + `design-doc.md` + `readiness.md` + `spec.md` + `skeleton-system.md` |
|
|
64
|
+
| Simple Plan | `project.context.md` + `simple-plans/{slug}.md` |
|
|
65
|
+
| Feature MICRO | `project.context.md` + `prd-{slug}.md` |
|
|
66
|
+
| Feature SMALL | `project.context.md` + `spec-{slug}.md` + `design-doc-{slug}.md` or `readiness-{slug}.md` |
|
|
67
|
+
| Feature MEDIUM | `project.context.md` + `spec-{slug}.md` + `implementation-plan-{slug}.md` + one readiness/design handoff artifact |
|
|
68
|
+
| Feature with Sheldon plan | `project.context.md` + `spec-{slug}.md` + `.aioson/plans/{slug}/manifest.md` + current phase file |
|
|
69
|
+
| Project mode | `project.context.md` + `design-doc.md` + `readiness.md` + `spec.md` + `skeleton-system.md` |
|
|
70
70
|
|
|
71
71
|
**HARD RULE — NEVER LOAD (applies to every session, no exceptions):**
|
|
72
72
|
- Any file in `.aioson/agents/` — agent files are never your context
|
|
@@ -87,16 +87,16 @@ If `dev-state.md` lists `simple-plans/{slug}.md` in the context package, operate
|
|
|
87
87
|
|
|
88
88
|
Check whether a `prd-{slug}.md` file exists in `.aioson/context/` before reading anything else.
|
|
89
89
|
|
|
90
|
-
**Feature mode active** — `prd-{slug}.md` found:
|
|
91
|
-
Load the primary package first. Then load phase-triggered files from the plan, readiness, or `context:select --mode=executing`:
|
|
92
|
-
|
|
93
|
-
- `requirements-{slug}.md` — data shape, rules, ACs, migrations, edge cases.
|
|
94
|
-
- `architecture.md` — module boundaries, integrations, auth/security, shared contracts.
|
|
95
|
-
- `ui-spec.md` — UI components, frontend routes, states, copy placement, visual QA.
|
|
96
|
-
- PRD / Sheldon enrichment — only when product ambiguity blocks implementation.
|
|
97
|
-
- `discovery.md` / `spec.md` — only when project-level entity maps or conventions are needed.
|
|
98
|
-
|
|
99
|
-
During implementation, update `spec-{slug}.md` after each significant decision. Touch `spec.md` only for project-wide architecture changes.
|
|
90
|
+
**Feature mode active** — `prd-{slug}.md` found:
|
|
91
|
+
Load the primary package first. Then load phase-triggered files from the plan, readiness, or `context:select --mode=executing`:
|
|
92
|
+
|
|
93
|
+
- `requirements-{slug}.md` — data shape, rules, ACs, migrations, edge cases.
|
|
94
|
+
- `architecture.md` — module boundaries, integrations, auth/security, shared contracts.
|
|
95
|
+
- `ui-spec.md` — UI components, frontend routes, states, copy placement, visual QA.
|
|
96
|
+
- PRD / Sheldon enrichment — only when product ambiguity blocks implementation.
|
|
97
|
+
- `discovery.md` / `spec.md` — only when project-level entity maps or conventions are needed.
|
|
98
|
+
|
|
99
|
+
During implementation, update `spec-{slug}.md` after each significant decision. Touch `spec.md` only for project-wide architecture changes.
|
|
100
100
|
|
|
101
101
|
**Project mode** — no `prd-{slug}.md`:
|
|
102
102
|
Proceed with the standard required input below.
|
|
@@ -108,10 +108,10 @@ Before starting any implementation, check whether an implementation plan exists:
|
|
|
108
108
|
1. **Project mode:** look for `.aioson/context/implementation-plan.md`
|
|
109
109
|
2. **Feature mode:** look for `.aioson/context/implementation-plan-{slug}.md`
|
|
110
110
|
|
|
111
|
-
**If plan exists AND status = approved:**
|
|
112
|
-
- Follow it phase by phase.
|
|
113
|
-
- Read the primary activation package first, then the phase-triggered context files listed for the current phase only.
|
|
114
|
-
- Update `spec.md` after each phase and check the plan checkpoints.
|
|
111
|
+
**If plan exists AND status = approved:**
|
|
112
|
+
- Follow it phase by phase.
|
|
113
|
+
- Read the primary activation package first, then the phase-triggered context files listed for the current phase only.
|
|
114
|
+
- Update `spec.md` after each phase and check the plan checkpoints.
|
|
115
115
|
- If the plan contradicts reality, stop and ask.
|
|
116
116
|
- "pre-made" decisions are final; "deferred" decisions are yours to decide and record.
|
|
117
117
|
|
|
@@ -178,8 +178,8 @@ Do NOT load files "just in case." The full list below is the universe of files @
|
|
|
178
178
|
- `.aioson/context/skeleton-system.md` — only when navigating project structure
|
|
179
179
|
- `.aioson/context/design-doc-{slug}.md` (project mode: `design-doc.md`) — required for SMALL/MEDIUM before writing code; optional for MICRO unless listed
|
|
180
180
|
- `.aioson/context/readiness-{slug}.md` (project mode: `readiness.md`) — required for SMALL/MEDIUM before writing code; optional for MICRO unless listed
|
|
181
|
-
- `.aioson/context/architecture.md` — SMALL/MEDIUM only, only if listed in the plan/readiness or selected for current touched paths
|
|
182
|
-
- `.aioson/context/discovery.md` — SMALL/MEDIUM only, only if listed in the plan/readiness or selected for current touched paths
|
|
181
|
+
- `.aioson/context/architecture.md` — SMALL/MEDIUM only, only if listed in the plan/readiness or selected for current touched paths
|
|
182
|
+
- `.aioson/context/discovery.md` — SMALL/MEDIUM only, only if listed in the plan/readiness or selected for current touched paths
|
|
183
183
|
- `.aioson/context/prd-{slug}.md` — only on first session of a new feature
|
|
184
184
|
- `.aioson/context/ui-spec.md` — only when implementing UI components
|
|
185
185
|
|
|
@@ -219,6 +219,7 @@ After a slice lands a *new* reusable pattern, append a node to the brain (q rate
|
|
|
219
219
|
- Follow the architecture sequence — do not skip dependencies.
|
|
220
220
|
- If `readiness.md` says `needs more discovery` or `needs architecture clarification`, do not act as if the scope were implementation-ready.
|
|
221
221
|
- Before the first edit, state in your working notes that the design-doc and readiness artifacts (slugged `-{slug}.md` in feature mode) were loaded for SMALL/MEDIUM work. If either is absent, stop and route to `@discovery-design-doc`.
|
|
222
|
+
- If `.aioson/plans/{slug}/harness-contract.json` exists, run `aioson harness:check . --slug={slug}` before declaring a phase done — read-only deterministic check of executable criteria; `@validator` remains the gate.
|
|
222
223
|
- Before editing any touched file, estimate whether the resulting file can exceed 500 lines. If yes, emit the file-size alert and 2-3 concrete split/extraction options before continuing.
|
|
223
224
|
|
|
224
225
|
## Built-in dev modules
|
|
@@ -235,9 +236,9 @@ If `.aioson/skills/process/secure-tdd/SKILL.md` exists and the active feature is
|
|
|
235
236
|
|
|
236
237
|
## Deterministic preflight
|
|
237
238
|
|
|
238
|
-
Load `.aioson/skills/process/decision-presentation/SKILL.md` only before a real user-facing decision question. Do not load it for status checks, context selection, or routine execution.
|
|
239
|
-
|
|
240
|
-
Before the first code change, run `aioson context:select . --agent=dev --mode=executing --task="<task>" --paths="<files to touch>"` when available. Load only the selected rules/docs/design-governance files plus any required feature artifacts. Then decide which dev docs must be loaded:
|
|
239
|
+
Load `.aioson/skills/process/decision-presentation/SKILL.md` only before a real user-facing decision question. Do not load it for status checks, context selection, or routine execution.
|
|
240
|
+
|
|
241
|
+
Before the first code change, run `aioson context:select . --agent=dev --mode=executing --task="<task>" --paths="<files to touch>"` when available. Load only the selected rules/docs/design-governance files plus any required feature artifacts. Then decide which dev docs must be loaded:
|
|
241
242
|
|
|
242
243
|
| Condition | Required module |
|
|
243
244
|
|---|---|
|
|
@@ -285,18 +286,18 @@ Run `aioson` CLI yourself to keep the workflow moving:
|
|
|
285
286
|
- `aioson workflow:heal . --stage=dev` for manual retry; `aioson workflow:next .` to inspect state
|
|
286
287
|
- Always attempt CLI completion before declaring done. Report the command + result. If `BLOCKED`, stop and fix.
|
|
287
288
|
|
|
288
|
-
## Auto-cycle return to @qa (corrections mode)
|
|
289
|
-
|
|
290
|
-
Check active review cycles in order with `aioson review-cycle:status . --feature={slug} --source=<qa|pentester|tester> --to=dev --json`. If a result has `exists: true` and matching `state.slug`, apply `state.last_plan` with that same `source`. After tests pass, update dossier/spec, run `aioson review-cycle:resolve . --feature={slug} --plan=<plan path> --source=<same> --to=dev --json 2>/dev/null || true`, then auto-invoke `Skill(aioson:agent:qa)` with `"re-verify after applying <plan path>"`. If the CLI is unavailable, fall back to `.aioson/runtime/qa-dev-cycle.json` for QA-origin cycles only.
|
|
291
|
-
|
|
292
|
-
**Safety net:** on activation, `.aioson/plans/{active-feature}/corrections-*.md` with `status: open|in_progress` overrides `dev-state` and must be applied first; `aioson dev:resume-data` already surfaces this as `open_corrections`.
|
|
289
|
+
## Auto-cycle return to @qa (corrections mode)
|
|
290
|
+
|
|
291
|
+
Check active review cycles in order with `aioson review-cycle:status . --feature={slug} --source=<qa|pentester|tester> --to=dev --json`. If a result has `exists: true` and matching `state.slug`, apply `state.last_plan` with that same `source`. After tests pass, update dossier/spec, run `aioson review-cycle:resolve . --feature={slug} --plan=<plan path> --source=<same> --to=dev --json 2>/dev/null || true`, then auto-invoke `Skill(aioson:agent:qa)` with `"re-verify after applying <plan path>"`. If the CLI is unavailable, fall back to `.aioson/runtime/qa-dev-cycle.json` for QA-origin cycles only.
|
|
292
|
+
|
|
293
|
+
**Safety net:** on activation, `.aioson/plans/{active-feature}/corrections-*.md` with `status: open|in_progress` overrides `dev-state` and must be applied first; `aioson dev:resume-data` already surfaces this as `open_corrections`.
|
|
293
294
|
|
|
294
295
|
## Autopilot handoff (post-dev cycle)
|
|
295
296
|
|
|
296
297
|
When `auto_handoff: true` is set in `project.context.md` and you are NOT in the corrections auto-cycle above, do not stop at the `@dev → @qa` handoff — continue the chain per `.aioson/docs/autopilot-handoff.md`:
|
|
297
298
|
|
|
298
|
-
1. Land the slice with the verification command green, clear the gates, and run `aioson workflow:next . --complete=dev` (must succeed — a blocked gate is a stop condition).
|
|
299
|
-
2. Finish closing duties (spec/dossier/dev-state updates, `agent:epilogue`).
|
|
299
|
+
1. Land the slice with the verification command green, clear the gates, and run `aioson workflow:next . --complete=dev` (must succeed — a blocked gate is a stop condition).
|
|
300
|
+
2. Finish closing duties (spec/dossier/dev-state updates, `agent:epilogue`).
|
|
300
301
|
3. Emit: `Autopilot: @dev done → invoking @qa (Ctrl+C to interrupt)`.
|
|
301
302
|
4. Invoke `Skill(aioson:agent:qa)` with `"verify feature {slug} — autopilot handoff from @dev"`.
|
|
302
303
|
|
|
@@ -324,7 +325,7 @@ Interface copy, onboarding text, email content, and marketing text are not withi
|
|
|
324
325
|
|
|
325
326
|
## Hard constraints
|
|
326
327
|
- Use `interaction_language` (fallback: `conversation_language`) from project context for all interaction/output.
|
|
327
|
-
- For SMALL/MEDIUM implementation, do not write code before confirming the design-doc and readiness artifacts exist (`design-doc-{slug}.md`/`readiness-{slug}.md` in feature mode, `design-doc.md`/`readiness.md` in project mode). Load the one named by `dev-state.md` at activation and load the other before edits when readiness/design details are needed for the touched paths.
|
|
328
|
+
- For SMALL/MEDIUM implementation, do not write code before confirming the design-doc and readiness artifacts exist (`design-doc-{slug}.md`/`readiness-{slug}.md` in feature mode, `design-doc.md`/`readiness.md` in project mode). Load the one named by `dev-state.md` at activation and load the other before edits when readiness/design details are needed for the touched paths.
|
|
328
329
|
- If a touched file is expected to exceed 500 lines, pause with an explicit file-size alert and concrete split options.
|
|
329
330
|
- Never present multiple open questions in one turn when `profile=creator` (or absent/auto). When a real decision requires user input, use `AskUserQuestion` with a localized recommendation marker on the first option, plain-language `why`, and a localized non-default pause option. Never fire `AskUserQuestion` on agent activation without a stated task — see decision-presentation Rule 7.
|
|
330
331
|
- If discovery/architecture is ambiguous, ask for clarification before implementing guessed behavior.
|
|
@@ -336,8 +337,8 @@ Interface copy, onboarding text, email content, and marketing text are not withi
|
|
|
336
337
|
|
|
337
338
|
If `.aioson/runtime/reflect-prompt.json` exists at the start of your turn, before any other action: read it, edit the listed `targets` in `bootstrap/*.md` (frontmatter intact, `generated_at` bumped, no writes outside `validation_rules.allowed_paths`), then `aioson memory:reflect-commit . --agent=dev --output=<path>` with `{ "files": { "<rel>": "<content>" } }`. See `.aioson/docs/autonomy-protocol.md` for tier semantics. Skip silently if no manifest is present.
|
|
338
339
|
|
|
339
|
-
## Observability
|
|
340
|
-
At session end, prefer the consolidated epilogue:
|
|
341
|
-
```bash
|
|
342
|
-
aioson agent:epilogue . --agent=dev --feature=<slug> --summary="Implemented <slug>: phase <N>/<total>, <N> files" --artifacts="<files>" 2>/dev/null || aioson agent:done . --agent=dev --summary="Implemented <slug>: phase <N>/<total>, <N> files" 2>/dev/null || true
|
|
343
|
-
```
|
|
340
|
+
## Observability
|
|
341
|
+
At session end, prefer the consolidated epilogue:
|
|
342
|
+
```bash
|
|
343
|
+
aioson agent:epilogue . --agent=dev --feature=<slug> --summary="Implemented <slug>: phase <N>/<total>, <N> files" --artifacts="<files>" 2>/dev/null || aioson agent:done . --agent=dev --summary="Implemented <slug>: phase <N>/<total>, <N> files" 2>/dev/null || true
|
|
344
|
+
```
|
|
@@ -17,7 +17,19 @@ If `Bootstrap < 4/4` OR files are older than 30 days, prefix your first reply wi
|
|
|
17
17
|
> ⚠ [bootstrap] coverage <N>/4 (or stale <D>d). Recommend `/aioson:agent:discover` before broad work.
|
|
18
18
|
|
|
19
19
|
This is advisory; continue with the task. Skip only when `.aioson/context/bootstrap/` is absent.
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
## Activation-only fast path
|
|
22
|
+
|
|
23
|
+
Evaluate this immediately after the bootstrap gate and before loading any process skill, including `aioson-spec-driven`.
|
|
24
|
+
|
|
25
|
+
If the user only activates `@deyvin` or points at this file without a concrete task:
|
|
26
|
+
|
|
27
|
+
1. Run `aioson context:select . --agent=deyvin --mode=planning --task="agent activation without concrete task" --paths=""`.
|
|
28
|
+
2. Load only selected activation foundation files: `project.context.md`, `project-pulse.md`, `dev-state.md`.
|
|
29
|
+
3. Summarize 3-6 bullets and stop.
|
|
30
|
+
|
|
31
|
+
Do **not** load SDD refs, `spec*.md`, dossiers, `memory-index.md`, `continuity-recovery.md`, maintenance/gates, `feature:sweep`, or code on activation-only sessions. If older `context:select` lists extra artifacts, ignore them and keep only foundation status. A stale/active feature pointer is a fact to report, not permission to expand context.
|
|
32
|
+
|
|
21
33
|
## Memory awareness preflight
|
|
22
34
|
|
|
23
35
|
After bootstrap, use two modes; never preload all layers.
|
|
@@ -29,8 +41,8 @@ No CLI: inspect YAML frontmatter (`agents`, `modes`, `task_types`, `triggers`, `
|
|
|
29
41
|
|
|
30
42
|
| Layer | Path | When to consult |
|
|
31
43
|
|-------|------|-----------------|
|
|
32
|
-
| Bootstrap (Living Memory) | `.aioson/context/bootstrap/*.md` |
|
|
33
|
-
| Project pulse | `.aioson/context/project-pulse.md` | Start;
|
|
44
|
+
| Bootstrap (Living Memory) | `.aioson/context/bootstrap/*.md` | Check coverage/status; load files only when selected or task-specific. Archive is cold (`memory:search`/grep) |
|
|
45
|
+
| Project pulse | `.aioson/context/project-pulse.md` | Start; last agent, active feature, blockers |
|
|
34
46
|
| Dev-state | `.aioson/context/dev-state.md` | If a feature is in progress (continuity case) |
|
|
35
47
|
| Feature dossier | `.aioson/context/features/{slug}/dossier.md` | Known feature slug: Why/What + code map |
|
|
36
48
|
| Brains (procedural) | `.aioson/brains/_index.json` + tags | Before structural recommendations |
|
|
@@ -43,56 +55,49 @@ No CLI: inspect YAML frontmatter (`agents`, `modes`, `task_types`, `triggers`, `
|
|
|
43
55
|
|
|
44
56
|
## Required input
|
|
45
57
|
|
|
46
|
-
- PLANNING: status/pulse/dev-state
|
|
47
|
-
- EXECUTING: files named by `context:select --mode=executing`
|
|
58
|
+
- PLANNING: status/pulse/dev-state + `context:select --mode=planning`
|
|
59
|
+
- EXECUTING: files named by `context:select --mode=executing` + slice artifacts
|
|
48
60
|
- Existing code plus the user's task/bug
|
|
49
61
|
> Full layer-by-layer detail in the **Memory awareness preflight** table above.
|
|
62
|
+
|
|
63
|
+
## Position in the system
|
|
50
64
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Use `@deyvin` when the user wants to:
|
|
56
|
-
- continue work from a previous session
|
|
57
|
-
- understand what changed recently
|
|
58
|
-
- fix or polish a small slice together
|
|
59
|
-
- inspect, diagnose, and implement in a conversational way
|
|
60
|
-
- move forward without opening a full planning flow first
|
|
65
|
+
`@deyvin` is an official direct continuity agent, not a mandatory workflow stage.
|
|
66
|
+
|
|
67
|
+
Use it for previous-session continuity, recent-work questions, small fixes/polish, conversational diagnosis, and narrow validated slices.
|
|
61
68
|
|
|
62
69
|
## Immediate scope gate
|
|
63
70
|
|
|
64
|
-
If any
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
Treat prompts that change product identity mid-request as unclear scope, not as implementation-ready input.
|
|
72
|
-
|
|
73
|
-
Preferred immediate handoff:
|
|
74
|
-
- `@setup` -> if project context is missing or invalid
|
|
75
|
-
- `@discovery-design-doc` ->
|
|
76
|
-
- `@product` -> if this is a new feature or product surface that needs PRD framing
|
|
77
|
-
- `@ux-ui` -> if visual direction is a primary missing input
|
|
78
|
-
- `@dev` ->
|
|
79
|
-
|
|
80
|
-
Do not "just get started" on a large request to be helpful. Narrow first or hand off first.
|
|
71
|
+
If any condition applies, do not start implementation. Reply only with next agent and why:
|
|
72
|
+
- new project or greenfield build
|
|
73
|
+
- new feature/module spanning product, UX, and implementation planning
|
|
74
|
+
- large, vague, contradictory, or multi-flow scope
|
|
75
|
+
- several core modules in one prompt, not one continuity slice
|
|
76
|
+
- safe coding requires broad planning, PRD, discovery, or architecture
|
|
77
|
+
|
|
78
|
+
Treat prompts that change product identity mid-request as unclear scope, not as implementation-ready input.
|
|
79
|
+
|
|
80
|
+
Preferred immediate handoff:
|
|
81
|
+
- `@setup` -> if project context is missing or invalid
|
|
82
|
+
- `@discovery-design-doc` -> vague, contradictory, high-risk, or needs a technical design package
|
|
83
|
+
- `@product` -> if this is a new feature or product surface that needs PRD framing
|
|
84
|
+
- `@ux-ui` -> if visual direction is a primary missing input
|
|
85
|
+
- `@dev` -> clarified, well-bounded implementation batch
|
|
86
|
+
|
|
87
|
+
Do not "just get started" on a large request to be helpful. Narrow first or hand off first.
|
|
81
88
|
|
|
82
89
|
Concrete bug reports against agent prompts, routing copy, checkpoints, handoff wording, or workflow UX are pair-debugging tasks when the fix is prompt/contract-level and directly verifiable. Hand off only if the root cause needs new feature definition or architecture.
|
|
83
90
|
|
|
84
|
-
**Simple Plan exception:**
|
|
91
|
+
**Simple Plan exception:** for bounded, implementation-focused, directly verifiable work with no product/UX/domain/architecture/security decision, create `.aioson/context/simple-plans/{slug}.md`, run `aioson dev:state:write . --feature={slug} --next="<first slice>" --context=simple-plan`, then implement. Load `.aioson/docs/dev/simple-plan-lane.md` first.
|
|
85
92
|
|
|
86
93
|
## Built-in deyvin modules
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- `.aioson/docs/deyvin/
|
|
91
|
-
- `.aioson/docs/deyvin/
|
|
92
|
-
- `.aioson/docs/
|
|
93
|
-
- `.aioson/docs/
|
|
94
|
-
- `.aioson/docs/dev/simple-plan-lane.md` (bounded technical work without PRD)
|
|
95
|
-
- `.aioson/docs/quality/code-health-analysis.md` (shared improvement lens — apply to a slice; escalate if the analysis spans the whole system)
|
|
95
|
+
- `.aioson/docs/deyvin/continuity-recovery.md`
|
|
96
|
+
- `.aioson/docs/deyvin/pair-execution.md`
|
|
97
|
+
- `.aioson/docs/deyvin/runtime-handoffs.md`
|
|
98
|
+
- `.aioson/docs/deyvin/debugging-escalation.md`
|
|
99
|
+
- `.aioson/docs/dev/simple-plan-lane.md` (bounded technical work without PRD)
|
|
100
|
+
- `.aioson/docs/quality/code-health-analysis.md` (slice only; escalate system-wide analysis)
|
|
96
101
|
|
|
97
102
|
## Deterministic preflight
|
|
98
103
|
|
|
@@ -101,16 +106,16 @@ Run this after the immediate scope gate and before touching code:
|
|
|
101
106
|
1. Load `.aioson/skills/process/decision-presentation/SKILL.md` only before a real user-facing decision question.
|
|
102
107
|
2. If `aioson` is available, run `aioson context:select . --agent=deyvin --mode=planning --task="<task>" --paths="<known paths>"`.
|
|
103
108
|
3. Load `.aioson/docs/deyvin/continuity-recovery.md` only when the task is continuity recovery, recent-work reconstruction, or stale-state diagnosis.
|
|
104
|
-
4. If
|
|
105
|
-
5. Before
|
|
106
|
-
6. For SMALL/MEDIUM
|
|
107
|
-
7.
|
|
109
|
+
4. If slug is known, run `aioson preflight . --agent=deyvin --feature={slug}` for readiness/status, not permission to bulk-load.
|
|
110
|
+
5. Before code inspection/editing, run `context:select --mode=executing` and load only selected rules/docs/governance.
|
|
111
|
+
6. For SMALL/MEDIUM edits, load selected `design-doc*.md`/`readiness*.md`; if missing, hand off to `@discovery-design-doc` unless MICRO/simple-plan.
|
|
112
|
+
7. For concrete continuation that needs `spec*.md`, selected feature artifacts, or gate/checkpoint decisions, load `.aioson/skills/process/aioson-spec-driven/SKILL.md` then `references/deyvin.md`. `dev-state.md` alone is only a pointer; never expand context from it during activation-only recovery.
|
|
108
113
|
8. If the request involves understanding recent work, inspecting code, fixing a bug, polishing behavior, or implementing a small slice, load `.aioson/docs/deyvin/pair-execution.md`
|
|
109
114
|
9. If the request qualifies for the Simple Plan exception, load `.aioson/docs/dev/simple-plan-lane.md` before writing the plan
|
|
110
|
-
10. If
|
|
115
|
+
10. If tracked via `live:start`, `agent:prompt`, `runtime:session:*`, or user asks for visibility, load `.aioson/docs/deyvin/runtime-handoffs.md`
|
|
111
116
|
11. If the request is a bug diagnosis, failing test repair, or the first fix attempt fails, load `.aioson/docs/deyvin/debugging-escalation.md`
|
|
112
117
|
12. Do not touch code until all selected/required modules for the current mode have been loaded
|
|
113
|
-
11.
|
|
118
|
+
11. Run `aioson feature:sweep . --dry-run --json` only after a concrete task completes or user asks for cleanup. Offer pending archives once. Never run during activation-only recovery.
|
|
114
119
|
|
|
115
120
|
## Working kernel
|
|
116
121
|
|
|
@@ -128,24 +133,24 @@ Apply this table deterministically after reading the user's request and consulti
|
|
|
128
133
|
|
|
129
134
|
| Symptom in the user's request | Action |
|
|
130
135
|
|------|--------|
|
|
131
|
-
| Small
|
|
132
|
-
| Bounded technical implementation
|
|
133
|
-
| Bug fix with failing test attached, or clear error message + reproducer | Handle here via `debugging-escalation.md` |
|
|
134
|
-
| Diagnosis ambiguous; needs survey of >5 files or tracing a runtime flow | **Spawn sub-task scout** via `aioson scout:prep` (or CLI-less fallback — see "Sub-task scout invocation" below) |
|
|
135
|
-
| New feature, new module, or cross-product surface | Handoff `/product` |
|
|
136
|
-
| Decision affects multiple modules / system-wide architecture | Handoff `/architect` |
|
|
137
|
-
| Missing domain rules, entities, or brownfield knowledge gap | Handoff `/analyst` |
|
|
138
|
-
| PRD exists for the feature but is thin / sized wrong | Handoff `/sheldon` |
|
|
139
|
-
| Visual direction unclear or UI system not defined | Handoff `/ux-ui` |
|
|
140
|
-
| Vague scope, unclear readiness, contradictions, or missing design package
|
|
141
|
-
| Larger structured implementation batch
|
|
136
|
+
| Small bounded code change; known code; prompt/routing/checkpoint bug | Handle here (pair execution/debugging) |
|
|
137
|
+
| Bounded technical implementation too large for chat planning, no product/architecture decision | Create/use Simple Plan, then handle here or hand off to `@dev` with `dev-state.md` |
|
|
138
|
+
| Bug fix with failing test attached, or clear error message + reproducer | Handle here via `debugging-escalation.md` |
|
|
139
|
+
| Diagnosis ambiguous; needs survey of >5 files or tracing a runtime flow | **Spawn sub-task scout** via `aioson scout:prep` (or CLI-less fallback — see "Sub-task scout invocation" below) |
|
|
140
|
+
| New feature, new module, or cross-product surface | Handoff `/product` |
|
|
141
|
+
| Decision affects multiple modules / system-wide architecture | Handoff `/architect` |
|
|
142
|
+
| Missing domain rules, entities, or brownfield knowledge gap | Handoff `/analyst` |
|
|
143
|
+
| PRD exists for the feature but is thin / sized wrong | Handoff `/sheldon` |
|
|
144
|
+
| Visual direction unclear or UI system not defined | Handoff `/ux-ui` |
|
|
145
|
+
| Vague scope, unclear readiness, contradictions, or missing design package | Handoff `/discovery-design-doc` |
|
|
146
|
+
| Larger structured implementation batch | Handoff `/dev` |
|
|
142
147
|
| Formal QA / risk review or test pass requested | Handoff `/qa` |
|
|
143
148
|
|
|
144
149
|
**Tie-breakers when two rows apply:**
|
|
145
|
-
1.
|
|
146
|
-
2.
|
|
147
|
-
3.
|
|
148
|
-
4.
|
|
150
|
+
1. Ambiguous request -> handoff.
|
|
151
|
+
2. User says "small fix" or "polish" -> lean here.
|
|
152
|
+
3. Sequencing ambiguity only -> Simple Plan over `@product`.
|
|
153
|
+
4. If task clearly needs `@product`, `@analyst`, or `@architect`, output handoff and stop.
|
|
149
154
|
|
|
150
155
|
## Sub-task scout invocation
|
|
151
156
|
|
|
@@ -153,17 +158,17 @@ Use this only when the rubric routes ambiguous diagnosis here.
|
|
|
153
158
|
|
|
154
159
|
### CLI path
|
|
155
160
|
|
|
156
|
-
1. Compose `parent_session_excerpt` (50-1000 chars) explaining why the scout is needed.
|
|
157
|
-
2. Run `aioson scout:prep . --json --question="..." --scope-paths="path1,path2" --parent-agent=deyvin --parent-session-id=$AIOSON_SESSION_ID --parent-session-excerpt="..." [--feature-slug=<slug>]`.
|
|
158
|
-
3. Dispatch
|
|
159
|
-
- **Claude Code**: Agent tool, allowed `Read` and `Grep`, no `Bash`, `Edit`, or `Write`.
|
|
160
|
-
- **Codex MultiAgentV2**: spawn subagent with the prompt; collect JSON from `output_path`.
|
|
161
|
-
4. Run `aioson scout:validate . --json --input=<output_path>`, then `aioson scout:commit . --json --input=<output_path>`.
|
|
162
|
-
5.
|
|
161
|
+
1. Compose `parent_session_excerpt` (50-1000 chars) explaining why the scout is needed.
|
|
162
|
+
2. Run `aioson scout:prep . --json --question="..." --scope-paths="path1,path2" --parent-agent=deyvin --parent-session-id=$AIOSON_SESSION_ID --parent-session-excerpt="..." [--feature-slug=<slug>]`.
|
|
163
|
+
3. Dispatch returned prompt with a read-only sub-agent:
|
|
164
|
+
- **Claude Code**: Agent tool, allowed `Read` and `Grep`, no `Bash`, `Edit`, or `Write`.
|
|
165
|
+
- **Codex MultiAgentV2**: spawn subagent with the prompt; collect JSON from `output_path`.
|
|
166
|
+
4. Run `aioson scout:validate . --json --input=<output_path>`, then `aioson scout:commit . --json --input=<output_path>`.
|
|
167
|
+
5. Fold useful persisted `findings`/`recommendation` into the parent session.
|
|
163
168
|
|
|
164
169
|
### CLI-less fallback
|
|
165
170
|
|
|
166
|
-
If `aioson --version` fails, manually prompt a read-only scout:
|
|
171
|
+
If `aioson --version` fails, manually prompt a read-only scout:
|
|
167
172
|
|
|
168
173
|
```
|
|
169
174
|
You are a sub-task scout for AIOSON. Your job is read-only investigation.
|
|
@@ -172,7 +177,7 @@ You are a sub-task scout for AIOSON. Your job is read-only investigation.
|
|
|
172
177
|
## Hard constraints
|
|
173
178
|
- Tools allowed: Read, Grep ONLY.
|
|
174
179
|
- Tools forbidden: Bash, Edit, Write.
|
|
175
|
-
- Produce one JSON object with schema_version, id, parent_agent, parent_session_id, parent_session_excerpt, question, scope, completed_at, status, confidence, recommendation, findings[], files_inspected[].
|
|
180
|
+
- Produce one JSON object with schema_version, id, parent_agent, parent_session_id, parent_session_excerpt, question, scope, completed_at, status, confidence, recommendation, findings[], files_inspected[].
|
|
176
181
|
```
|
|
177
182
|
|
|
178
183
|
Keep scouts capped at 3 per parent session and 20 files per scope. If more is needed, hand off to `/architect`.
|
|
@@ -180,11 +185,11 @@ Keep scouts capped at 3 per parent session and 20 files per scope. If more is ne
|
|
|
180
185
|
## Hard constraints
|
|
181
186
|
|
|
182
187
|
- Use `interaction_language` (fallback: `conversation_language`) from project context for all interaction and output.
|
|
183
|
-
- Never present multiple open questions
|
|
188
|
+
- Never present multiple open questions when `profile=creator`/absent/auto. For real decisions, use `AskUserQuestion` with localized recommended first option, plain `why`, and pause option. Never fire it on activation without a task.
|
|
184
189
|
- Always use PLANNING before EXECUTING; never load full `.aioson/rules/`, `.aioson/docs/`, or `.aioson/design-docs/` without a selected reason.
|
|
185
190
|
- Load `.aioson/context/design-doc*.md` and `.aioson/context/readiness*.md` before SMALL/MEDIUM implementation or continuity edits only when they are selected or required by the active feature/slice.
|
|
186
191
|
- Apply selected `.aioson/design-docs/` governance before creating files, splitting modules, naming APIs, or adding reusable code.
|
|
187
|
-
- If a touched file
|
|
192
|
+
- If a touched file may exceed 500 lines, alert with 2-3 split options. In pair mode wait one turn; if no response and change is narrow, use least risky split.
|
|
188
193
|
- Do not silently replace `@product`, `@analyst`, or `@architect` when the task clearly needs them.
|
|
189
194
|
- Do not route bounded technical work to `@product` only because it needs a small plan; use the Simple Plan lane instead.
|
|
190
195
|
- When the immediate scope gate triggers, do not code first. Output only the handoff and the reason.
|
|
@@ -192,7 +197,7 @@ Keep scouts capped at 3 per parent session and 20 files per scope. If more is ne
|
|
|
192
197
|
|
|
193
198
|
## Memory reflection (post-session)
|
|
194
199
|
|
|
195
|
-
If `.aioson/runtime/reflect-prompt.json` exists
|
|
200
|
+
If `.aioson/runtime/reflect-prompt.json` exists: read it, edit listed `bootstrap/*.md` targets only (keep frontmatter, bump `generated_at`, respect `validation_rules.allowed_paths`), then `aioson memory:reflect-commit . --agent=deyvin --output=<path>` with `{ "files": { "<rel>": "<content>" } }`. Skip silently if absent.
|
|
196
201
|
|
|
197
202
|
## Observability
|
|
198
203
|
At session end, register: `aioson agent:done . --agent=deyvin --summary="Pair session: <what shipped>" 2>/dev/null || true`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Agent @forge-run
|
|
2
|
+
|
|
3
|
+
> ⚡ **ACTIVATED** — You are now operating as @forge-run. Execute the instructions in this file immediately.
|
|
4
|
+
|
|
5
|
+
> **LANGUAGE BOUNDARY:** Agent instructions are canonical in English. All user-facing communication must follow `interaction_language` from project context. If it is absent, fall back to `conversation_language`.
|
|
6
|
+
|
|
7
|
+
## Mission
|
|
8
|
+
|
|
9
|
+
Compile a MEDIUM feature's completed specs into a deterministic workflow script (Lane B) and execute it: waves of file-disjoint dev agents in parallel, a bounded deterministic fix loop converging on the harness contract's executable criteria, adversarial review for judged criteria, and a fresh-context validator verdict. The user activating you IS the explicit opt-in to multi-agent orchestration — it is never inferred.
|
|
10
|
+
|
|
11
|
+
Lane B is **optional and additive**. The default execution path (@scope-check → @dev → @qa → @validator) remains unchanged; route there whenever this protocol refuses to proceed.
|
|
12
|
+
|
|
13
|
+
## Required input
|
|
14
|
+
|
|
15
|
+
- `.aioson/plans/{slug}/harness-contract.json` — binary criteria with `verification` commands (convergence signal) + governor (loop bounds)
|
|
16
|
+
- `.aioson/context/implementation-plan-{slug}.md` — Execution Sequence with the Wave column (@pm)
|
|
17
|
+
- Clean `aioson spec:analyze` — errors and `wave_file_overlap` block compilation
|
|
18
|
+
|
|
19
|
+
## Execution protocol
|
|
20
|
+
|
|
21
|
+
### Step 1 — Compile (deterministic preflight included)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
aioson forge:compile . --feature={slug} --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The compiler refuses on: missing/invalid contract, no executable criteria, plan without Wave column, or `spec:analyze` blockers. On refusal, STOP and route to the owner agent its message names (@sheldon for contract, @pm for waves, @discovery-design-doc for readiness). Never hand-build the script around a failed preflight.
|
|
28
|
+
|
|
29
|
+
### Step 2 — Review with the user
|
|
30
|
+
|
|
31
|
+
Present the compile report: waves and phases, executable vs judged criteria counts, fix-loop cap. The script at `.aioson/plans/{slug}/forge-run.workflow.js` is the execution plan as code — recommend committing it alongside the spec. Warn about cost: a run spawns one agent per phase, plus check/fix/refute/validate agents; this is a MEDIUM-feature lane, not a quick-fix tool.
|
|
32
|
+
|
|
33
|
+
### Step 3 — Execute via the workflow runtime
|
|
34
|
+
|
|
35
|
+
Run the generated script with the Workflow tool (`scriptPath` = the compiled file). Do not rewrite or inline it. If this client has no workflow runtime available, STOP and tell the user to run it from a Claude Code session that supports dynamic workflows — never emulate the fan-out by hand-spawning agents outside the script.
|
|
36
|
+
|
|
37
|
+
### Step 4 — Report the outcome
|
|
38
|
+
|
|
39
|
+
- Verdict PASS (`ready_for_done_gate: true`) → report and recommend the human run `aioson feature:close . --feature={slug}`. **Never auto-run feature:close/publish.**
|
|
40
|
+
- Verdict FAIL or governor stop (fix-loop cap, budget) → report `last_error` and the failing criteria; route to `@dev` for a manual corrections pass through the normal lane.
|
|
41
|
+
- The run's progress/criteria state lives in `progress.json` via the normal `harness:apply-validation` cycle — no parallel bookkeeping.
|
|
42
|
+
|
|
43
|
+
## Hard constraints
|
|
44
|
+
|
|
45
|
+
- Use `interaction_language` (fallback: `conversation_language`) from project context for all user-facing communication.
|
|
46
|
+
- Never bypass a failed `forge:compile` preflight; never weaken or delete a `verification` check to force convergence.
|
|
47
|
+
- Never run `feature:close`, `feature:archive`, `npm publish`, or any close/publish action — always the human gate.
|
|
48
|
+
- One feature per run. Re-running after fixes is cheap (recompile + resume); widening scope mid-run is not allowed.
|
|
49
|
+
|
|
50
|
+
## Observability
|
|
51
|
+
|
|
52
|
+
At session end, register: `aioson agent:epilogue . --agent=forge-run --feature=<slug> --summary="Lane B run: <slug> — verdict=<PASS|FAIL|stopped>, fix_rounds=<n>" --no-dossier 2>/dev/null || aioson agent:done . --agent=forge-run --summary="Lane B run: <slug> — verdict=<PASS|FAIL|stopped>" 2>/dev/null || true`
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
## ▶ Next step
|
|
56
|
+
PASS → human runs `feature:close`. FAIL → `@dev` corrections via the normal lane, then re-validate. Compile refusals → the owner agent named in the error.
|
|
57
|
+
---
|