@jaimevalasek/aioson 1.23.1 → 1.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/context-select.js +1 -0
- package/src/context-selector.js +28 -2
- package/src/gateway-pointer-merge.js +25 -4
- package/template/.aioson/agents/deyvin.md +79 -74
- 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/AGENTS.md +13 -13
- package/template/CLAUDE.md +9 -9
- package/template/OPENCODE.md +3 -2
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ async function runContextSelect({ args, options = {}, logger }) {
|
|
|
18
18
|
logger.log(`Context selection for @${result.agent} (${result.mode})`);
|
|
19
19
|
if (result.task) logger.log(`Task: ${result.task}`);
|
|
20
20
|
if (result.paths.length > 0) logger.log(`Paths: ${result.paths.join(', ')}`);
|
|
21
|
+
logger.log('Boundary: load only the selected files until the task, mode, feature, or touched paths change.');
|
|
21
22
|
if (result.selected.length === 0) {
|
|
22
23
|
logger.log('No context files selected.');
|
|
23
24
|
return result;
|
package/src/context-selector.js
CHANGED
|
@@ -29,6 +29,12 @@ const FOUNDATION_CONTEXT_BASENAMES = new Set([
|
|
|
29
29
|
'memory-index.md'
|
|
30
30
|
]);
|
|
31
31
|
|
|
32
|
+
const ACTIVATION_ONLY_CONTEXT_PATHS = new Set([
|
|
33
|
+
'.aioson/context/project.context.md',
|
|
34
|
+
'.aioson/context/project-pulse.md',
|
|
35
|
+
'.aioson/context/dev-state.md'
|
|
36
|
+
]);
|
|
37
|
+
|
|
32
38
|
const UNIVERSAL_ALWAYS_CONTEXT_BASENAMES = new Set([
|
|
33
39
|
'project.context.md',
|
|
34
40
|
'project-pulse.md'
|
|
@@ -59,6 +65,18 @@ function normalizeFeaturePointer(value) {
|
|
|
59
65
|
return normalized;
|
|
60
66
|
}
|
|
61
67
|
|
|
68
|
+
function isActivationOnlyTask(agent, mode, task) {
|
|
69
|
+
if (agent !== 'deyvin' || mode !== 'planning') return false;
|
|
70
|
+
const normalized = normalizeToken(task);
|
|
71
|
+
if (!normalized) return true;
|
|
72
|
+
return (
|
|
73
|
+
normalized.includes('agent activation') ||
|
|
74
|
+
normalized.includes('activation only') ||
|
|
75
|
+
normalized.includes('without concrete task') ||
|
|
76
|
+
normalized.includes('no concrete task')
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
62
80
|
function parseListValue(value) {
|
|
63
81
|
if (value === undefined || value === null) return [];
|
|
64
82
|
const raw = String(value).trim();
|
|
@@ -254,6 +272,7 @@ function scoreCandidate(candidate, context) {
|
|
|
254
272
|
const base = path.basename(candidate.path);
|
|
255
273
|
|
|
256
274
|
if (!appliesToAgent(candidate.frontmatter, context.agent)) return null;
|
|
275
|
+
if (context.activationOnly && !ACTIVATION_ONLY_CONTEXT_PATHS.has(candidate.path)) return null;
|
|
257
276
|
|
|
258
277
|
if (candidate.modes.length > 0 && !candidate.modes.map(normalizeToken).includes(context.mode)) {
|
|
259
278
|
return null;
|
|
@@ -285,6 +304,9 @@ function scoreCandidate(candidate, context) {
|
|
|
285
304
|
}
|
|
286
305
|
|
|
287
306
|
const activeFeature = context.feature || context.activeFeature || '';
|
|
307
|
+
if (context.activationOnly && candidate.featureSlug && !context.feature) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
288
310
|
if (candidate.featureSlug && activeFeature && candidate.featureSlug === activeFeature) {
|
|
289
311
|
score += 45;
|
|
290
312
|
reasons.push(`feature:${candidate.featureSlug}`);
|
|
@@ -342,6 +364,7 @@ async function selectContext(targetDir, options = {}) {
|
|
|
342
364
|
const task = String(options.task || options.goal || '').trim();
|
|
343
365
|
const paths = splitOptionList(options.paths || options.path).map(normalizeSlashes);
|
|
344
366
|
const feature = normalizeFeaturePointer(options.feature || options.slug || '');
|
|
367
|
+
const activationOnly = isActivationOnlyTask(agent, mode, task);
|
|
345
368
|
|
|
346
369
|
const pulse = await readProjectPulse(targetDir);
|
|
347
370
|
const devState = await readDevState(targetDir);
|
|
@@ -367,7 +390,8 @@ async function selectContext(targetDir, options = {}) {
|
|
|
367
390
|
paths,
|
|
368
391
|
feature,
|
|
369
392
|
activeFeature,
|
|
370
|
-
lookup
|
|
393
|
+
lookup,
|
|
394
|
+
activationOnly
|
|
371
395
|
});
|
|
372
396
|
if (scored) selected.push(scored);
|
|
373
397
|
}
|
|
@@ -382,6 +406,7 @@ async function selectContext(targetDir, options = {}) {
|
|
|
382
406
|
paths,
|
|
383
407
|
feature: feature || null,
|
|
384
408
|
active_feature: activeFeature || null,
|
|
409
|
+
activation_only: activationOnly,
|
|
385
410
|
selected
|
|
386
411
|
};
|
|
387
412
|
}
|
|
@@ -390,5 +415,6 @@ module.exports = {
|
|
|
390
415
|
selectContext,
|
|
391
416
|
collectCandidates,
|
|
392
417
|
parseListValue,
|
|
393
|
-
pathMatchesPattern
|
|
418
|
+
pathMatchesPattern,
|
|
419
|
+
isActivationOnlyTask
|
|
394
420
|
};
|
|
@@ -41,6 +41,20 @@ function findBlockRange(content) {
|
|
|
41
41
|
return { start, end };
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
function isLegacyUnmanagedGateway(content) {
|
|
45
|
+
const trimmed = String(content || '').trim();
|
|
46
|
+
if (!trimmed.startsWith('# AIOSON')) return false;
|
|
47
|
+
const hasBoot = trimmed.includes('## Mandatory first action') || trimmed.includes('## Boot');
|
|
48
|
+
const hasProjectContext = trimmed.includes('.aioson/context/project.context.md');
|
|
49
|
+
const hasAgentPointers = trimmed.includes('.aioson/agents/') || trimmed.includes('## Agent files') || trimmed.includes('## Agents');
|
|
50
|
+
const hasManagedMarkers = trimmed.includes(MARKER_BEGIN) || trimmed.includes(MARKER_END);
|
|
51
|
+
return hasBoot && hasProjectContext && hasAgentPointers && !hasManagedMarkers;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function stripLegacyUnmanagedGateway(content) {
|
|
55
|
+
return isLegacyUnmanagedGateway(content) ? '' : content;
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
async function mergeGatewayPointer({ templatePath, targetPath, backupRoot, targetDir, dryRun = false }) {
|
|
45
59
|
const templateContent = await fs.readFile(templatePath, 'utf8');
|
|
46
60
|
const block = buildBlock(templateContent);
|
|
@@ -56,15 +70,21 @@ async function mergeGatewayPointer({ templatePath, targetPath, backupRoot, targe
|
|
|
56
70
|
let next;
|
|
57
71
|
let action;
|
|
58
72
|
if (range) {
|
|
59
|
-
const before = existing.slice(0, range.start);
|
|
73
|
+
const before = stripLegacyUnmanagedGateway(existing.slice(0, range.start));
|
|
60
74
|
const after = existing.slice(range.end);
|
|
61
75
|
const cleanBefore = before.length === 0 || before.endsWith('\n') ? before : `${before}\n`;
|
|
62
76
|
next = `${cleanBefore}${block}${after}`;
|
|
63
77
|
action = 'block_updated';
|
|
64
78
|
} else {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
const cleanExisting = stripLegacyUnmanagedGateway(existing);
|
|
80
|
+
if (cleanExisting.length === 0) {
|
|
81
|
+
next = block;
|
|
82
|
+
action = 'legacy_replaced';
|
|
83
|
+
} else {
|
|
84
|
+
const separator = cleanExisting.length === 0 ? '' : cleanExisting.endsWith('\n\n') ? '' : cleanExisting.endsWith('\n') ? '\n' : '\n\n';
|
|
85
|
+
next = `${cleanExisting}${separator}${block}`;
|
|
86
|
+
action = 'block_appended';
|
|
87
|
+
}
|
|
68
88
|
}
|
|
69
89
|
|
|
70
90
|
if (next === existing) return { action: 'unchanged' };
|
|
@@ -98,5 +118,6 @@ module.exports = {
|
|
|
98
118
|
isGatewayPointerPath,
|
|
99
119
|
buildBlock,
|
|
100
120
|
findBlockRange,
|
|
121
|
+
isLegacyUnmanagedGateway,
|
|
101
122
|
mergeGatewayPointer
|
|
102
123
|
};
|
|
@@ -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`
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
## When to use
|
|
7
7
|
|
|
8
|
-
Load this skill when:
|
|
9
|
-
- starting spec work for a new feature or project (any agent)
|
|
10
|
-
- deciding phase depth based on classification (MICRO / SMALL / MEDIUM)
|
|
11
|
-
- preparing a clean handoff to the next agent
|
|
12
|
-
- retaking work after a session break (check `last_checkpoint` + `phase_gates` first)
|
|
13
|
-
|
|
14
|
-
Do
|
|
8
|
+
Load this skill when:
|
|
9
|
+
- starting spec work for a new feature or project (any agent)
|
|
10
|
+
- deciding phase depth based on classification (MICRO / SMALL / MEDIUM)
|
|
11
|
+
- preparing a clean handoff to the next agent
|
|
12
|
+
- retaking work after a session break (check `last_checkpoint` + `phase_gates` first)
|
|
13
|
+
|
|
14
|
+
Do not load this skill for `@deyvin` activation-only recovery. A bare `@deyvin` activation is status recovery, not spec work; run Deyvin's fast path and stop before opening this file.
|
|
15
|
+
|
|
16
|
+
Do NOT load the entire `references/` folder. Load only the file matching your current need.
|
|
15
17
|
|
|
16
18
|
## What phases exist
|
|
17
19
|
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
> Router file. Do not duplicate logic from the generic references — load those directly.
|
|
4
4
|
|
|
5
|
-
## Which references to load for continuation and resume flows
|
|
6
|
-
|
|
7
|
-
###
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- `
|
|
15
|
-
|
|
5
|
+
## Which references to load for continuation and resume flows
|
|
6
|
+
|
|
7
|
+
### Activation-only sessions
|
|
8
|
+
|
|
9
|
+
If the user only activates `@deyvin` without a concrete task, stop after the lightweight context summary from `context:select`. Do not load this reference's downstream files.
|
|
10
|
+
|
|
11
|
+
### Load only for concrete continuation
|
|
12
|
+
|
|
13
|
+
- `maintenance-and-state.md` — load when the concrete task requires reading or writing `spec*.md`, `last_checkpoint`, or `pending_review`
|
|
14
|
+
- `approval-gates.md` — load when the next action could cross a phase gate, approve/deny readiness, or continue implementation past Gate C/D
|
|
15
|
+
|
|
16
|
+
### Load when the continuation context is unclear
|
|
17
|
+
|
|
18
|
+
- `artifact-map.md` — use to quickly orient which artifacts exist and which are missing after a concrete continuation task names a feature but the selected artifacts contradict each other
|
|
19
|
+
|
|
16
20
|
### Do not load for @deyvin
|
|
17
21
|
|
|
18
22
|
- `hardening-lane.md` — by the time @deyvin is active, the spec pack should already be hardened
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
|
|
22
26
|
## Behavioral notes
|
|
23
27
|
|
|
24
|
-
- `last_checkpoint` in `spec-{slug}.md` is the first thing @deyvin reads — see `maintenance-and-state.md` for format
|
|
25
|
-
- Do not re-read the full spec pack unless `last_checkpoint` is null or contradictory
|
|
26
|
-
- `phase_gates` from `approval-gates.md` defines what is locked — @deyvin does not re-open locked decisions
|
|
27
|
-
- `pending_review` items must be surfaced to the user before proceeding past them
|
|
28
|
+
- `last_checkpoint` in `spec-{slug}.md` is the first thing @deyvin reads only after a concrete continuation task selects that spec — see `maintenance-and-state.md` for format
|
|
29
|
+
- Do not re-read the full spec pack unless `last_checkpoint` is null or contradictory
|
|
30
|
+
- `phase_gates` from `approval-gates.md` defines what is locked — @deyvin does not re-open locked decisions
|
|
31
|
+
- `pending_review` items must be surfaced to the user before proceeding past them
|
package/template/AGENTS.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
You operate as AIOSON — an AI development squad with specialized agents.
|
|
4
4
|
|
|
5
|
-
## Mandatory first action
|
|
6
|
-
1.
|
|
7
|
-
|
|
8
|
-
- If
|
|
9
|
-
|
|
10
|
-
3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
|
|
5
|
+
## Mandatory first action
|
|
6
|
+
1. Check whether `.aioson/context/project.context.md` exists
|
|
7
|
+
- If missing: activate @setup agent immediately
|
|
8
|
+
- If present: read it before any action
|
|
9
|
+
2. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details.
|
|
10
|
+
3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
|
|
11
11
|
|
|
12
12
|
## Project knowledge
|
|
13
13
|
|
|
@@ -167,8 +167,8 @@ AIOSON uses the `aioson-spec-driven` process skill to enforce specification-firs
|
|
|
167
167
|
|
|
168
168
|
Gates are blocking in MEDIUM, informational in MICRO/SMALL.
|
|
169
169
|
|
|
170
|
-
### How agents load SDD
|
|
171
|
-
|
|
170
|
+
### How agents load SDD
|
|
171
|
+
For concrete spec/workflow work, the active agent checks for `aioson-spec-driven` in `.aioson/installed-skills/` or `.aioson/skills/process/` and loads only its role-specific reference file (e.g., `references/dev.md`, `references/qa.md`). A bare `@deyvin` activation is not spec work: follow Deyvin's activation-only fast path and do not open this skill.
|
|
172
172
|
|
|
173
173
|
### Project pulse convention
|
|
174
174
|
Every agent updates `project-pulse.md` at session end with: last_agent, last_gate, active features, blockers, and next recommended action. This enables crash recovery — any agent can read project-pulse.md and know where to resume.
|
|
@@ -179,9 +179,9 @@ Located at: `.aioson/skills/process/aioson-spec-driven/SKILL.md`
|
|
|
179
179
|
|
|
180
180
|
This is a first-party process skill. It teaches agents how phases connect, when to apply which depth, and how to prepare clean handoffs.
|
|
181
181
|
|
|
182
|
-
Agents that load it: @product, @analyst, @scope-check, @architect, @sheldon, @dev, @deyvin, @qa, @tester, @orchestrator, @pm
|
|
183
|
-
When to load: at the start of
|
|
184
|
-
What to load: `SKILL.md` first, then only the `references/` file relevant to the current phase
|
|
182
|
+
Agents that load it: @product, @analyst, @scope-check, @architect, @sheldon, @dev, @deyvin, @qa, @tester, @orchestrator, @pm
|
|
183
|
+
When to load: at the start of concrete spec work (PRD, requirements, architecture, implementation, testing); not during `@deyvin` activation-only recovery
|
|
184
|
+
What to load: `SKILL.md` first, then only the `references/` file relevant to the current phase
|
|
185
185
|
|
|
186
186
|
## Process skill: design-hybrid-forge
|
|
187
187
|
|
|
@@ -225,8 +225,8 @@ researchs/
|
|
|
225
225
|
Primary recurring writers here: @product, @sheldon, and @squad
|
|
226
226
|
All agents may read from here to avoid redundant searches.
|
|
227
227
|
|
|
228
|
-
## Session protocol
|
|
229
|
-
|
|
228
|
+
## Session protocol
|
|
229
|
+
Do not read `.aioson/context/spec.md` globally at session start. Agents load `spec*.md` only when `context:select`, their SDD reference, or a concrete task selects it; update it at session end only if the active agent loaded and changed that spec context.
|
|
230
230
|
|
|
231
231
|
## Golden rule
|
|
232
232
|
Small project, small solution.
|
package/template/CLAUDE.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
You operate as AIOSON.
|
|
4
4
|
|
|
5
|
-
## Mandatory first action
|
|
6
|
-
1.
|
|
7
|
-
|
|
8
|
-
- If
|
|
9
|
-
|
|
10
|
-
3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
|
|
5
|
+
## Mandatory first action
|
|
6
|
+
1. Check whether `.aioson/context/project.context.md` exists
|
|
7
|
+
- If missing: run `/setup`
|
|
8
|
+
- If present: read it before any action
|
|
9
|
+
2. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details.
|
|
10
|
+
3. If `.aioson/rules/` contains `.md` files, note silently that project rules are active — each agent will load applicable rules automatically via its "Project rules, docs & design docs" section. Do not alarm if the directory is absent or empty.
|
|
11
11
|
|
|
12
12
|
## Project knowledge
|
|
13
13
|
|
|
@@ -83,9 +83,9 @@ Capture is best-effort — do not crash, retry, or surface failures to the user.
|
|
|
83
83
|
|
|
84
84
|
AIOSON follows a Spec-Driven Development (SDD) methodology. Key governance files:
|
|
85
85
|
|
|
86
|
-
- **`.aioson/constitution.md`** — 6 governing principles all agents must respect
|
|
87
|
-
- **`.aioson/context/project-pulse.md`** — global project state; read at session start, update at session end
|
|
88
|
-
- **`.aioson/skills/process/aioson-spec-driven/SKILL.md`** — process methodology; agents load this
|
|
86
|
+
- **`.aioson/constitution.md`** — 6 governing principles all agents must respect
|
|
87
|
+
- **`.aioson/context/project-pulse.md`** — global project state; read at session start, update at session end
|
|
88
|
+
- **`.aioson/skills/process/aioson-spec-driven/SKILL.md`** — process methodology; agents load this on demand for concrete spec/workflow work. `/deyvin` activation-only recovery must not load it.
|
|
89
89
|
|
|
90
90
|
The process depth scales with project classification:
|
|
91
91
|
- **MICRO** (0-1): lightweight — @product → @dev
|
package/template/OPENCODE.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# AIOSON - OpenCode
|
|
2
2
|
|
|
3
3
|
## Boot
|
|
4
|
-
1.
|
|
5
|
-
2.
|
|
4
|
+
1. Check `.aioson/context/project.context.md`
|
|
5
|
+
2. If present, read it before any action
|
|
6
6
|
3. If missing, start with `setup`
|
|
7
|
+
4. Read `.aioson/config.md` only if project context is missing/invalid, setup/routing policy is needed, or the active agent explicitly asks for config details
|
|
7
8
|
|
|
8
9
|
## No agent selected
|
|
9
10
|
|