@jaimevalasek/aioson 1.23.0 → 1.23.1
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/docs/en/5-reference/cli-reference.md +85 -0
- package/docs/pt/4-agentes/pm.md +31 -4
- package/docs/pt/5-referencia/README.md +3 -0
- package/docs/pt/5-referencia/autopilot-handoff.md +131 -0
- package/docs/pt/5-referencia/comandos-cli.md +72 -6
- package/docs/pt/5-referencia/harness-retro.md +133 -0
- package/docs/pt/5-referencia/loop-guardrails.md +225 -0
- package/docs/pt/5-referencia/sdd-automation-scripts.md +25 -13
- package/package.json +1 -1
- package/src/cli.js +54 -29
- package/src/commands/agent-epilogue.js +186 -0
- package/src/commands/context-select.js +33 -0
- package/src/commands/preflight-context.js +13 -9
- package/src/commands/review-cycle.js +328 -0
- package/src/commands/runtime.js +4 -4
- package/src/commands/state-save.js +2 -0
- package/src/commands/workflow-execute.js +138 -28
- package/src/commands/workflow-next.js +3 -2
- package/src/commands/workflow-status.js +30 -10
- package/src/constants.js +15 -13
- package/src/context-memory.js +50 -25
- package/src/context-selector.js +394 -0
- package/src/i18n/messages/en.js +13 -7
- package/src/i18n/messages/es.js +13 -7
- package/src/i18n/messages/fr.js +13 -7
- package/src/i18n/messages/pt-BR.js +13 -7
- package/src/parser.js +1 -1
- package/src/squad/preflight-context.js +26 -27
- package/template/.aioson/agents/analyst.md +41 -46
- package/template/.aioson/agents/architect.md +33 -46
- package/template/.aioson/agents/briefing.md +76 -67
- package/template/.aioson/agents/dev.md +66 -59
- package/template/.aioson/agents/deyvin.md +55 -50
- package/template/.aioson/agents/discovery-design-doc.md +35 -22
- package/template/.aioson/agents/manifests/architect.manifest.json +11 -1
- package/template/.aioson/agents/manifests/dev.manifest.json +15 -0
- package/template/.aioson/agents/manifests/pm.manifest.json +20 -0
- package/template/.aioson/agents/orchestrator.md +31 -18
- package/template/.aioson/agents/pentester.md +7 -7
- package/template/.aioson/agents/pm.md +41 -35
- package/template/.aioson/agents/product.md +116 -165
- package/template/.aioson/agents/qa.md +21 -14
- package/template/.aioson/agents/scope-check.md +46 -24
- package/template/.aioson/agents/tester.md +12 -6
- package/template/.aioson/agents/ux-ui.md +36 -31
- package/template/.aioson/agents/validator.md +3 -3
- package/template/.aioson/config/autonomy-protocol.json +7 -0
- package/template/.aioson/design-docs/code-reuse.md +10 -5
- package/template/.aioson/design-docs/componentization.md +10 -5
- package/template/.aioson/design-docs/file-size.md +10 -5
- package/template/.aioson/design-docs/folder-structure.md +10 -5
- package/template/.aioson/design-docs/naming.md +10 -5
- package/template/.aioson/docs/autonomy-protocol.md +2 -2
- package/template/.aioson/docs/autopilot-handoff.md +32 -21
- package/template/.aioson/docs/briefing/briefing-craft.md +9 -3
- package/template/.aioson/docs/deyvin/continuity-recovery.md +18 -22
- package/template/.aioson/docs/product/conversation-playbook.md +8 -3
- package/template/.aioson/docs/product/prd-contract.md +8 -3
- package/template/.aioson/docs/product/quality-lens.md +8 -3
- package/template/.aioson/docs/product/research-loop.md +8 -3
- package/template/.aioson/docs/ux-ui/accessibility-audit.md +7 -2
- package/template/.aioson/docs/ux-ui/audit-mode.md +7 -2
- package/template/.aioson/docs/ux-ui/component-map.md +7 -2
- package/template/.aioson/docs/ux-ui/design-execution.md +7 -2
- package/template/.aioson/docs/ux-ui/design-gate.md +7 -2
- package/template/.aioson/docs/ux-ui/research-mode.md +7 -2
- package/template/.aioson/docs/ux-ui/site-delivery.md +7 -2
- package/template/.aioson/docs/ux-ui/token-contract.md +7 -2
- package/template/.aioson/rules/aioson-context-boundary.md +1 -1
- package/template/.aioson/rules/disk-first-artifacts.md +1 -1
- package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +1 -1
- package/template/.aioson/skills/process/aioson-spec-driven/references/architect.md +3 -2
- package/template/.aioson/skills/process/aioson-spec-driven/references/artifact-map.md +21 -9
- package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +2 -1
- package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +2 -1
- package/template/.aioson/skills/static/web-research-cache.md +29 -8
package/src/i18n/messages/fr.js
CHANGED
|
@@ -22,12 +22,16 @@ module.exports = {
|
|
|
22
22
|
'aioson agent:prompt <agent> [path] [--tool=codex|claude|opencode] [--lang=<bcp47-tag>] [--locale=fr]',
|
|
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=fr]',
|
|
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=fr]',
|
|
27
|
+
help_agent_epilogue:
|
|
28
|
+
'aioson agent:epilogue [path] --agent=<agent> --summary=<texte> [--feature=<slug>] [--approve-gate=A|B|C|D] [--json] [--locale=fr]',
|
|
27
29
|
help_context_validate: 'aioson context:validate [path] [--json] [--locale=fr]',
|
|
28
|
-
help_context_pack:
|
|
29
|
-
'aioson context:pack [path] [--agent=<agent>] [--goal=<texte>] [--module=<module-ou-dossier>] [--max-files=8] [--json] [--locale=fr]',
|
|
30
|
-
|
|
30
|
+
help_context_pack:
|
|
31
|
+
'aioson context:pack [path] [--agent=<agent>] [--goal=<texte>] [--module=<module-ou-dossier>] [--max-files=8] [--json] [--locale=fr]',
|
|
32
|
+
help_context_select:
|
|
33
|
+
'aioson context:select [path] [--agent=<agent>] [--mode=planning|executing] [--task=<texte>] [--paths=<chemin[,chemin2]>] [--feature=<slug>] [--json] [--locale=fr]',
|
|
34
|
+
help_context_load:
|
|
31
35
|
'aioson context:load [path] --target=<rule|brain>:<slug> --agent=<nom> [--batch="slug1,slug2"] [--feature=<slug>] [--classification=<MICRO|SMALL|MEDIUM>] [--verbose] [--json] [--locale=fr]',
|
|
32
36
|
help_chain_audit:
|
|
33
37
|
'aioson chain:audit <fichier> [path] [--limit=N] [--feature=<slug>] [--json] [--locale=fr]',
|
|
@@ -108,8 +112,10 @@ module.exports = {
|
|
|
108
112
|
'aioson test:package [source-path] [--keep] [--dry-run] [--json] [--locale=fr]',
|
|
109
113
|
help_workflow_plan:
|
|
110
114
|
'aioson workflow:plan [path] [--classification=MICRO|SMALL|MEDIUM] [--json] [--locale=fr]',
|
|
111
|
-
help_workflow_execute:
|
|
112
|
-
'aioson workflow:execute [path] [--
|
|
115
|
+
help_workflow_execute:
|
|
116
|
+
'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=fr]',
|
|
117
|
+
help_review_cycle:
|
|
118
|
+
'aioson review-cycle:<status|advance|resolve|reset> [path] --feature=<slug> [--plan=<path>] [--source=qa|tester|pentester] [--json] [--locale=fr]',
|
|
113
119
|
help_parallel_init:
|
|
114
120
|
'aioson parallel:init [path] [--workers=2..6] [--force] [--dry-run] [--json] [--locale=fr]',
|
|
115
121
|
help_parallel_doctor:
|
|
@@ -22,12 +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]',
|
|
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]',
|
|
27
29
|
help_context_validate: 'aioson context:validate [path] [--json] [--locale=pt-BR]',
|
|
28
|
-
help_context_pack:
|
|
29
|
-
'aioson context:pack [path] [--agent=<agente>] [--goal=<texto>] [--module=<modulo-ou-pasta>] [--max-files=8] [--json] [--locale=pt-BR]',
|
|
30
|
-
|
|
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:
|
|
31
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]',
|
|
32
36
|
help_chain_audit:
|
|
33
37
|
'aioson chain:audit <arquivo> [path] [--limit=N] [--feature=<slug>] [--json] [--locale=pt-BR]',
|
|
@@ -120,8 +124,10 @@ module.exports = {
|
|
|
120
124
|
'aioson workflow:next [path] [--complete[=<agente>]] [--agent=<agente>] [--skip=<agente>] [--status] [--suggest] [--tool=codex|claude|opencode] [--json] [--locale=pt-BR]',
|
|
121
125
|
help_workflow_status:
|
|
122
126
|
'aioson workflow:status [path] [--suggest] [--tool=codex|claude|opencode] [--json] [--locale=pt-BR]',
|
|
123
|
-
help_workflow_execute:
|
|
124
|
-
'aioson workflow:execute [path] [--
|
|
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]',
|
|
125
131
|
help_parallel_init:
|
|
126
132
|
'aioson parallel:init [path] [--workers=2..6] [--force] [--dry-run] [--json] [--locale=pt-BR]',
|
|
127
133
|
help_parallel_doctor:
|
package/src/parser.js
CHANGED
|
@@ -29,7 +29,7 @@ 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',
|
|
32
|
+
'agent-safe', 'agentic',
|
|
33
33
|
'selective',
|
|
34
34
|
'status', 'suggest', 'apply',
|
|
35
35
|
'runtime-only', 'template-only', 'inception', 'locales',
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* Output: visual bar chart of context budget per component.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
const fs = require('node:fs/promises');
|
|
17
|
-
const path = require('node:path');
|
|
18
|
-
const crypto = require('node:crypto');
|
|
16
|
+
const fs = require('node:fs/promises');
|
|
17
|
+
const path = require('node:path');
|
|
18
|
+
const crypto = require('node:crypto');
|
|
19
|
+
const { selectContext } = require('../context-selector');
|
|
19
20
|
|
|
20
21
|
const SQUADS_DIR = path.join('.aioson', 'squads');
|
|
21
22
|
|
|
@@ -120,10 +121,10 @@ function formatSize(chars) {
|
|
|
120
121
|
* @param {object} options — { agent, squad, verbose }
|
|
121
122
|
* @returns {Promise<object>} — { components[], total, totalLimit, duplicates[], warnings[] }
|
|
122
123
|
*/
|
|
123
|
-
async function estimateContext(projectDir, options = {}) {
|
|
124
|
-
const { agent = 'dev', squad, verbose } = options;
|
|
125
|
-
const components = [];
|
|
126
|
-
const warnings = [];
|
|
124
|
+
async function estimateContext(projectDir, options = {}) {
|
|
125
|
+
const { agent = 'dev', squad, verbose, mode = 'planning', task = '', paths = '' } = options;
|
|
126
|
+
const components = [];
|
|
127
|
+
const warnings = [];
|
|
127
128
|
|
|
128
129
|
// 1. Agent file
|
|
129
130
|
const agentPath = path.join(projectDir, '.aioson', 'agents', `${agent}.md`);
|
|
@@ -164,26 +165,24 @@ async function estimateContext(projectDir, options = {}) {
|
|
|
164
165
|
content: ctxFile.content
|
|
165
166
|
});
|
|
166
167
|
|
|
167
|
-
// 4.
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
let
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
content: rulesContent
|
|
186
|
-
});
|
|
168
|
+
// 4. Selected context (rules/docs/design governance/memory) by mode + task.
|
|
169
|
+
const selection = await selectContext(projectDir, { agent, mode, task, paths });
|
|
170
|
+
let selectedChars = 0;
|
|
171
|
+
let selectedContent = '';
|
|
172
|
+
for (const item of selection.selected) {
|
|
173
|
+
if (item.path === '.aioson/context/project.context.md') continue;
|
|
174
|
+
const selected = await readFileChars(path.join(projectDir, item.path));
|
|
175
|
+
selectedChars += selected.chars;
|
|
176
|
+
selectedContent += selected.content + '\n';
|
|
177
|
+
}
|
|
178
|
+
components.push({
|
|
179
|
+
label: `selected context (${mode})`,
|
|
180
|
+
path: path.join(projectDir, '.aioson'),
|
|
181
|
+
chars: selectedChars,
|
|
182
|
+
limit: DEFAULT_LIMITS.rules,
|
|
183
|
+
content: selectedContent,
|
|
184
|
+
selected: selection.selected.map((item) => item.path)
|
|
185
|
+
});
|
|
187
186
|
|
|
188
187
|
// 5. Squad-specific files (if --squad provided)
|
|
189
188
|
if (squad) {
|
|
@@ -2,41 +2,34 @@
|
|
|
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
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. `.aioson/docs/` — load only docs whose `description` is relevant to the current analysis task, or that are referenced by a loaded rule.
|
|
14
|
-
3. `.aioson/context/design-doc*.md` — load when `scope`, `description`, or `agents:` matches the current feature or analysis task.
|
|
15
|
-
4. `.aioson/design-docs/*.md` — load only when requirements imply module boundaries, file creation, naming, reuse, or componentization. Treat loaded governance docs as structural constraints for downstream agents.
|
|
16
|
-
|
|
17
|
-
Loaded rules and governance override the default conventions in this file.
|
|
5
|
+
## Context loading modes
|
|
6
|
+
|
|
7
|
+
Use two explicit modes so analysis starts from evidence without bulk-loading rules, docs, or memories.
|
|
8
|
+
|
|
9
|
+
- **PLANNING** — inspect workflow status, project context, feature/frontmatter, dossier index, research cache summaries, and `context:select` output. Do not load full `.aioson/rules/`, `.aioson/docs/`, `.aioson/design-docs/`, or bootstrap folders.
|
|
10
|
+
- **EXECUTING** — before writing `discovery.md`, `requirements-{slug}.md`, or `spec-{slug}.md`, run `context:select --mode=executing` and load only the selected rules/docs/design governance plus the source artifacts needed for the current output.
|
|
11
|
+
|
|
12
|
+
Project rules and governance are active only when selected by frontmatter metadata, path match, task trigger, or an explicit reference from an already loaded artifact. Loaded rules override this file.
|
|
18
13
|
|
|
19
14
|
## Mission
|
|
20
15
|
Discover requirements deeply and produce implementation-ready artifacts. For new projects: `discovery.md`. For new features: `requirements-{slug}.md` + `spec-{slug}.md`.
|
|
21
16
|
|
|
22
|
-
## Bootstrap context
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- `.aioson/context/bootstrap/what-is.md` — system identity and users
|
|
26
|
-
- `.aioson/context/bootstrap/what-it-does.md` — features, business rules, constraints
|
|
27
|
-
|
|
28
|
-
Use this semantic knowledge to avoid re-discovering domain basics that are already documented.
|
|
17
|
+
## Bootstrap context
|
|
18
|
+
|
|
19
|
+
Do not read `.aioson/context/bootstrap/` wholesale. Let `context:select --mode=planning` choose `what-is.md` or `what-it-does.md` only when the current analysis needs system identity, existing features, business rules, or constraints. Never load `current-state-archive.md` at activation.
|
|
29
20
|
|
|
30
21
|
## Tool-first session preflight
|
|
31
22
|
|
|
32
23
|
Before any manual checks, run these commands if the `aioson` CLI is available:
|
|
33
24
|
|
|
34
|
-
```bash
|
|
35
|
-
aioson workflow:status . # confirm current stage and what is expected
|
|
36
|
-
aioson context:validate . # validate project.context.md; detects brownfield state
|
|
37
|
-
aioson
|
|
38
|
-
aioson
|
|
39
|
-
|
|
25
|
+
```bash
|
|
26
|
+
aioson workflow:status . # confirm current stage and what is expected
|
|
27
|
+
aioson context:validate . # validate project.context.md; detects brownfield state
|
|
28
|
+
aioson context:select . --agent=analyst --mode=planning --task="<task>" --paths="<known source files>"
|
|
29
|
+
aioson preflight:context . --agent=analyst --mode=planning --task="<task>" --paths="<known source files>"
|
|
30
|
+
aioson preflight . --agent=analyst --feature={slug} # readiness/status only; do not treat it as permission to load every listed rule
|
|
31
|
+
aioson classify . # auto-detect project classification (MICRO/SMALL/MEDIUM) for cross-reference
|
|
32
|
+
```
|
|
40
33
|
|
|
41
34
|
For feature mode with existing requirements, run before the synchronization gate:
|
|
42
35
|
```bash
|
|
@@ -70,12 +63,11 @@ If the CLI is not available, compare modification dates manually:
|
|
|
70
63
|
|
|
71
64
|
Check the following before doing anything else:
|
|
72
65
|
|
|
73
|
-
**Feature mode** — a `prd-{slug}.md` file exists in `.aioson/context/`:
|
|
74
|
-
- Read `prd-{slug}.md` to understand the feature scope.
|
|
75
|
-
- Read `design-doc.md
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- Output: `requirements-{slug}.md` + `spec-{slug}.md`.
|
|
66
|
+
**Feature mode** — a `prd-{slug}.md` file exists in `.aioson/context/`:
|
|
67
|
+
- Read `prd-{slug}.md` to understand the feature scope.
|
|
68
|
+
- Read only selected `design-doc*`, `readiness*`, `discovery.md`, or `spec.md` when `context:select` or a dossier/PRD reference says they are needed for the current feature.
|
|
69
|
+
- Run the **Feature discovery** process below (lighter, feature-scoped).
|
|
70
|
+
- Output: `requirements-{slug}.md` + `spec-{slug}.md`.
|
|
79
71
|
|
|
80
72
|
**Project mode** — no `prd-{slug}.md`, only `prd.md` or nothing:
|
|
81
73
|
- Run the full 3-phase project discovery below.
|
|
@@ -264,14 +256,16 @@ For each new or modified entity, produce field-level detail (same format as Phas
|
|
|
264
256
|
### Output contract — feature mode
|
|
265
257
|
|
|
266
258
|
**`requirements-{slug}.md`** — implementation spec for the feature:
|
|
267
|
-
1. Feature summary (1–2 lines from prd-{slug}.md)
|
|
268
|
-
2.
|
|
269
|
-
3.
|
|
270
|
-
4.
|
|
271
|
-
5.
|
|
272
|
-
6.
|
|
273
|
-
7.
|
|
274
|
-
8.
|
|
259
|
+
1. Feature summary (1–2 lines from prd-{slug}.md)
|
|
260
|
+
2. Requirement IDs (`REQ-{slug}-01...`) with source references
|
|
261
|
+
3. Acceptance criteria IDs (`AC-{slug}-01...`) mapped to requirement IDs
|
|
262
|
+
4. New entities and fields (full table format)
|
|
263
|
+
5. Changes to existing entities
|
|
264
|
+
6. Relationships (with existing entities from discovery.md when loaded)
|
|
265
|
+
7. Migration additions (ordered)
|
|
266
|
+
8. Business rules
|
|
267
|
+
9. Edge cases
|
|
268
|
+
10. Out of scope for this feature
|
|
275
269
|
|
|
276
270
|
**`spec-{slug}.md`** — feature memory skeleton (will be enriched by @dev):
|
|
277
271
|
|
|
@@ -345,7 +339,7 @@ Generate `.aioson/context/discovery.md` with the following sections:
|
|
|
345
339
|
|
|
346
340
|
## Dev handoff producer
|
|
347
341
|
|
|
348
|
-
Before the final `agent:done` call, when the next agent in the workflow is `@dev`, produce `dev-state.md` so the next `/aioson:agent:dev` session auto-resumes on cold start instead of pinging the user for context:
|
|
342
|
+
Before the final `agent:epilogue`/`agent:done` call, when the next agent in the workflow is `@dev`, produce `dev-state.md` so the next `/aioson:agent:dev` session auto-resumes on cold start instead of pinging the user for context:
|
|
349
343
|
|
|
350
344
|
```bash
|
|
351
345
|
aioson dev:state:write . --feature={slug} --phase=1 \
|
|
@@ -353,7 +347,9 @@ aioson dev:state:write . --feature={slug} --phase=1 \
|
|
|
353
347
|
--context=spec,requirements
|
|
354
348
|
```
|
|
355
349
|
|
|
356
|
-
`--context` accepts canonical tokens (`prd`, `requirements`, `spec`, `architecture`, `impl-plan`, `sheldon`, `design-doc`, `dossier`, `simple-plan`), max 4 entries total; missing files emit a warning and are skipped. Always include the artifacts @dev will need to start the first slice — typically `spec` + `requirements` for SMALL features. Idempotent: re-running with the same args does not duplicate state.
|
|
350
|
+
`--context` accepts canonical tokens (`prd`, `requirements`, `spec`, `architecture`, `impl-plan`, `sheldon`, `design-doc`, `readiness`, `ui-spec`, `dossier`, `simple-plan`), max 4 entries total; missing files emit a warning and are skipped. Always include the artifacts @dev will need to start the first slice — typically `spec` + `requirements` for SMALL features. Idempotent: re-running with the same args does not duplicate state.
|
|
351
|
+
|
|
352
|
+
If any workflow stage remains before `@dev` (`@scope-check`, `@architect`, `@discovery-design-doc`, or `@pm`), do not guess the final implementation package here. The last pre-dev stage writes the final `dev-state.md`; `@analyst` only produces it for direct-to-dev shortcuts.
|
|
357
353
|
|
|
358
354
|
**Handoff message:**
|
|
359
355
|
```
|
|
@@ -387,7 +383,6 @@ aioson runtime:emit . --agent=analyst --type=milestone --summary="Spec skeleton
|
|
|
387
383
|
|
|
388
384
|
At session end, register:
|
|
389
385
|
```bash
|
|
390
|
-
aioson gate:approve . --feature={slug} --gate=A 2>/dev/null || true
|
|
391
|
-
aioson
|
|
392
|
-
|
|
393
|
-
```
|
|
386
|
+
aioson gate:approve . --feature={slug} --gate=A 2>/dev/null || true
|
|
387
|
+
aioson agent:epilogue . --agent=analyst --feature={slug} --summary="Discovery <slug>: <N> entities, <N> rules" --action="Discovery completed: {N} entities, {N} rules" --next="<next agent recommendation>" --gate="Gate A: approved" 2>/dev/null || aioson agent:done . --agent=analyst --summary="Discovery <slug>: <N> entities, <N> rules" 2>/dev/null || true
|
|
388
|
+
```
|
|
@@ -2,38 +2,23 @@
|
|
|
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
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. `.aioson/docs/` — load only docs whose `description` is relevant to the current architecture task, or that are referenced by a loaded rule.
|
|
14
|
-
3. `.aioson/context/design-doc*.md` — load when `scope`, `description`, or `agents:` matches the current feature or architecture task.
|
|
15
|
-
4. `.aioson/design-docs/*.md` — load relevant governance docs before deciding folder structure, component boundaries, naming, reuse strategy, or file-size split guidance.
|
|
16
|
-
|
|
17
|
-
Loaded rules and governance override the default conventions in this file.
|
|
5
|
+
## Context loading modes
|
|
6
|
+
|
|
7
|
+
Use two explicit modes. Architecture needs enough evidence to decide structure, but not every rule, doc, or memory file.
|
|
8
|
+
|
|
9
|
+
- **PLANNING** — inspect workflow status, project context, Gate A status, artifact frontmatter, dossier/code-map, and `context:select` output. Do not load full `.aioson/rules/`, `.aioson/docs/`, `.aioson/design-docs/`, or bootstrap folders.
|
|
10
|
+
- **EXECUTING** — before writing `architecture.md`, run `context:select --mode=executing` with the feature goal and candidate implementation paths. Load only selected rules/design governance plus the source artifacts required for the decisions being written.
|
|
11
|
+
|
|
12
|
+
Rules and governance override this file only when selected by metadata, path match, task trigger, or explicit reference.
|
|
18
13
|
|
|
19
14
|
## Mission
|
|
20
15
|
Transform discovery into technical architecture with concrete implementation direction.
|
|
21
16
|
|
|
22
|
-
## Bootstrap context
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- `current-state.md`
|
|
28
|
-
- `how-it-works.md`
|
|
29
|
-
|
|
30
|
-
Also read when present:
|
|
31
|
-
- `what-is.md`
|
|
32
|
-
- `what-it-does.md`
|
|
33
|
-
|
|
34
|
-
This gives you full semantic understanding of the system without reading the codebase directly.
|
|
35
|
-
|
|
36
|
-
> `current-state.md` is the **hot log** (recent + active-feature entries only). Older shipped capabilities are in `current-state-archive.md` (cold) — `grep` it or run `aioson memory:search` for historical decisions before assuming a subsystem is unbuilt. Never load the archive at activation. See `.aioson/design-docs/agent-loading-contract.md`.
|
|
17
|
+
## Bootstrap context
|
|
18
|
+
|
|
19
|
+
Do not read `.aioson/context/bootstrap/` wholesale. Let `context:select --mode=planning` choose `how-it-works.md`, `what-is.md`, or `what-it-does.md` only when the architecture decision depends on system identity, existing flows, or business constraints.
|
|
20
|
+
|
|
21
|
+
> `current-state.md` is the **hot log** (recent + active-feature entries only). Older shipped capabilities are in `current-state-archive.md` (cold) — `grep` it or run `aioson memory:search` for historical decisions before assuming a subsystem is unbuilt. Never load the archive at activation. See `.aioson/design-docs/agent-loading-contract.md`.
|
|
37
22
|
|
|
38
23
|
## Feature dossier
|
|
39
24
|
|
|
@@ -68,11 +53,13 @@ Full templates: `.aioson/docs/dossier/agent-templates.md`
|
|
|
68
53
|
|
|
69
54
|
Before entering PLANNING MODE, run these commands if the `aioson` CLI is available:
|
|
70
55
|
|
|
71
|
-
```bash
|
|
72
|
-
aioson workflow:status . # confirm Gate A passed and @architect is the active stage
|
|
73
|
-
aioson context:validate . # validate project.context.md; confirms discovery.md exists
|
|
74
|
-
aioson context:health . # shows context file sizes and token costs before loading
|
|
75
|
-
|
|
56
|
+
```bash
|
|
57
|
+
aioson workflow:status . # confirm Gate A passed and @architect is the active stage
|
|
58
|
+
aioson context:validate . # validate project.context.md; confirms discovery.md exists
|
|
59
|
+
aioson context:health . # shows context file sizes and token costs before loading
|
|
60
|
+
aioson context:select . --agent=architect --mode=planning --task="<architecture task>" --paths="<candidate paths>"
|
|
61
|
+
aioson preflight:context . --agent=architect --mode=planning --task="<architecture task>" --paths="<candidate paths>"
|
|
62
|
+
```
|
|
76
63
|
|
|
77
64
|
For feature mode, also run:
|
|
78
65
|
```bash
|
|
@@ -131,14 +118,14 @@ When Gate B passes, register it via CLI:
|
|
|
131
118
|
aioson gate:approve . --feature={slug} --gate=B 2>/dev/null || true
|
|
132
119
|
```
|
|
133
120
|
|
|
134
|
-
**Handoff message:**
|
|
135
|
-
```
|
|
136
|
-
Architecture defined: .aioson/context/architecture.md
|
|
137
|
-
Gate B: {approved|blocked}
|
|
138
|
-
Next agent: @pm
|
|
139
|
-
Action:
|
|
140
|
-
```
|
|
141
|
-
> Recommended: `/clear` before activating — fresh context window.
|
|
121
|
+
**Handoff message:**
|
|
122
|
+
```
|
|
123
|
+
Architecture defined: .aioson/context/architecture.md
|
|
124
|
+
Gate B: {approved|blocked}
|
|
125
|
+
Next agent: from the workflow state machine (usually @discovery-design-doc, then @pm on MEDIUM features, then @scope-check before @dev)
|
|
126
|
+
Action: aioson workflow:next . --complete=architect --tool=<tool>
|
|
127
|
+
```
|
|
128
|
+
> Recommended: `/clear` before activating — fresh context window.
|
|
142
129
|
|
|
143
130
|
## Autopilot handoff
|
|
144
131
|
|
|
@@ -322,8 +309,9 @@ Generate `.aioson/context/architecture.md` with:
|
|
|
322
309
|
4. **Models and relationships** — concrete mapping from discovery entities
|
|
323
310
|
5. **Integration architecture** — external services and how they connect
|
|
324
311
|
6. **Cross-cutting concerns** — auth, validation, logging, error handling decisions
|
|
325
|
-
7. **Implementation sequence for `@dev`** — order in which modules should be built
|
|
326
|
-
8. **
|
|
312
|
+
7. **Implementation sequence for `@dev`** — order in which modules should be built
|
|
313
|
+
8. **Dev context triggers** — exactly when `@dev` must load `architecture.md` sections (module boundaries, integrations, auth/security, migrations, cross-cutting concerns)
|
|
314
|
+
9. **Explicit non-goals/deferred items** — what was deliberately excluded and why
|
|
327
315
|
|
|
328
316
|
When frontend quality is important, add a handoff section for `@ux-ui` covering:
|
|
329
317
|
- Key screens
|
|
@@ -359,6 +347,5 @@ aioson runtime:emit . --agent=architect --type=gate_check --summary="Gate B: {ap
|
|
|
359
347
|
|
|
360
348
|
At session end, register:
|
|
361
349
|
```bash
|
|
362
|
-
aioson
|
|
363
|
-
|
|
364
|
-
```
|
|
350
|
+
aioson agent:epilogue . --agent=architect --feature={slug} --summary="Architecture <slug>: <stack>, <N> modules" --action="Architecture defined: {stack}, {N} modules" --next="<next agent recommendation>" --gate="Gate B: approved" 2>/dev/null || aioson agent:done . --agent=architect --summary="Architecture <slug>: <stack>, <N> modules" 2>/dev/null || true
|
|
351
|
+
```
|