@jaimevalasek/aioson 1.33.1 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/docs/en/1-understand/ecosystem-map.md +45 -29
- package/docs/en/1-understand/glossary.md +6 -6
- package/docs/en/1-understand/what-is-aioson.md +5 -5
- package/docs/en/2-start/existing-project.md +7 -7
- package/docs/en/2-start/first-project.md +33 -39
- package/docs/en/2-start/initial-decisions.md +22 -19
- package/docs/en/3-recipes/README.md +2 -2
- package/docs/en/3-recipes/continuity-between-sessions.md +2 -2
- package/docs/en/3-recipes/from-idea-to-prd-via-briefing.md +13 -3
- package/docs/en/3-recipes/full-feature-with-sheldon.md +329 -338
- package/docs/en/4-agents/README.md +33 -16
- package/docs/en/4-agents/briefing-refiner.md +146 -0
- package/docs/en/4-agents/discovery-design-doc.md +20 -8
- package/docs/en/4-agents/forge-run.md +3 -2
- package/docs/en/5-reference/README.md +1 -0
- package/docs/en/5-reference/autopilot-handoff.md +286 -0
- package/docs/en/5-reference/cli-reference.md +57 -48
- package/docs/en/5-reference/executable-verification.md +10 -7
- package/docs/en/5-reference/parallel.md +2 -0
- package/docs/en/5-reference/qa-browser.md +2 -2
- package/docs/en/README.md +3 -3
- package/docs/pt/1-entender/glossario.md +5 -5
- package/docs/pt/1-entender/mapa-do-ecossistema.md +33 -22
- package/docs/pt/2-comecar/decisoes-iniciais.md +20 -18
- package/docs/pt/2-comecar/primeiro-projeto.md +2 -2
- package/docs/pt/3-receitas/README.md +1 -1
- package/docs/pt/3-receitas/app-saas-do-zero.md +35 -122
- package/docs/pt/3-receitas/da-ideia-ao-prd-via-briefing.md +8 -1
- package/docs/pt/3-receitas/feature-completa-com-sheldon.md +291 -338
- package/docs/pt/4-agentes/README.md +13 -11
- package/docs/pt/4-agentes/analyst.md +9 -5
- package/docs/pt/4-agentes/architect.md +9 -5
- package/docs/pt/4-agentes/briefing-refiner.md +64 -40
- package/docs/pt/4-agentes/briefing.md +6 -1
- package/docs/pt/4-agentes/dev.md +38 -8
- package/docs/pt/4-agentes/deyvin.md +4 -0
- package/docs/pt/4-agentes/discover.md +4 -0
- package/docs/pt/4-agentes/discovery-design-doc.md +25 -23
- package/docs/pt/4-agentes/neo.md +4 -0
- package/docs/pt/4-agentes/orache.md +6 -0
- package/docs/pt/4-agentes/orchestrator.md +176 -118
- package/docs/pt/4-agentes/pentester.md +11 -5
- package/docs/pt/4-agentes/pm.md +15 -7
- package/docs/pt/4-agentes/product.md +19 -1
- package/docs/pt/4-agentes/qa.md +10 -2
- package/docs/pt/4-agentes/setup.md +3 -1
- package/docs/pt/4-agentes/sheldon.md +178 -99
- package/docs/pt/4-agentes/tester.md +6 -0
- package/docs/pt/4-agentes/ux-ui.md +9 -5
- package/docs/pt/5-referencia/README.md +1 -1
- package/docs/pt/5-referencia/agent-chain-continuity.md +14 -5
- package/docs/pt/5-referencia/autopilot-handoff.md +191 -74
- package/docs/pt/5-referencia/comandos-cli.md +16 -7
- package/docs/pt/5-referencia/sdd-automation-scripts.md +6 -6
- package/docs/pt/5-referencia/sdd-framework.md +53 -16
- package/docs/pt/5-referencia/sdd-planos-e-estrutura.md +27 -15
- package/docs/pt/5-referencia/skills.md +2 -0
- package/docs/pt/README.md +4 -4
- package/docs/pt/agentes.md +50 -50
- package/package.json +2 -2
- package/src/agents.js +1 -1
- package/src/artifact-kinds.js +111 -0
- package/src/autopilot-signal.js +71 -0
- package/src/cli.js +112 -81
- package/src/commands/agent-epilogue.js +251 -186
- package/src/commands/agents.js +122 -50
- package/src/commands/audit-code.js +344 -0
- package/src/commands/briefing.js +337 -1
- package/src/commands/classify.js +389 -389
- package/src/commands/feature-close.js +122 -4
- package/src/commands/harness-check.js +259 -175
- package/src/commands/live.js +71 -11
- package/src/commands/review-feature.js +189 -0
- package/src/commands/runtime.js +81 -66
- package/src/commands/sync-agents-copy.js +115 -0
- package/src/commands/update.js +5 -1
- package/src/commands/verification-plan.js +143 -0
- package/src/commands/verify-artifact.js +593 -0
- package/src/commands/workflow-execute.js +434 -316
- package/src/commands/workflow-next.js +193 -20
- package/src/commands/workflow-plan.js +5 -5
- package/src/constants.js +2 -0
- package/src/doctor.js +4 -2
- package/src/gateway-pointer-merge.js +7 -1
- package/src/handoff-contract.js +267 -172
- package/src/harness/contract-integrity-gate.js +172 -0
- package/src/harness/contract-integrity.js +111 -0
- package/src/harness/contract-schema.js +377 -332
- package/src/harness/detect-runtime-feature.js +90 -0
- package/src/harness/static-criteria.js +192 -0
- package/src/i18n/messages/en.js +10 -5
- package/src/i18n/messages/es.js +10 -5
- package/src/i18n/messages/fr.js +10 -5
- package/src/i18n/messages/pt-BR.js +10 -5
- package/src/install-wizard.js +8 -8
- package/src/installer.js +13 -6
- package/src/lib/briefing-refiner/apply-feedback.js +18 -4
- package/src/lib/briefing-refiner/feedback-schema.js +73 -4
- package/src/lib/briefing-refiner/refinement-report.js +11 -0
- package/src/lib/briefing-refiner/review-html.js +388 -68
- package/src/parser.js +12 -0
- package/src/preflight-engine.js +12 -12
- package/src/verification/policy-engine.js +95 -95
- package/src/verification-policy.js +398 -0
- package/src/version.js +52 -1
- package/template/.aioson/agents/architect.md +34 -5
- package/template/.aioson/agents/briefing-refiner.md +91 -48
- package/template/.aioson/agents/briefing.md +4 -0
- package/template/.aioson/agents/committer.md +2 -1
- package/template/.aioson/agents/copywriter.md +30 -21
- package/template/.aioson/agents/design-hybrid-forge.md +10 -1
- package/template/.aioson/agents/dev.md +35 -23
- package/template/.aioson/agents/deyvin.md +4 -0
- package/template/.aioson/agents/discover.md +16 -3
- package/template/.aioson/agents/discovery-design-doc.md +7 -2
- package/template/.aioson/agents/genome.md +19 -10
- package/template/.aioson/agents/neo.md +34 -30
- package/template/.aioson/agents/orache.md +24 -11
- package/template/.aioson/agents/orchestrator.md +100 -7
- package/template/.aioson/agents/pentester.md +4 -0
- package/template/.aioson/agents/pm.md +8 -8
- package/template/.aioson/agents/product.md +25 -1
- package/template/.aioson/agents/profiler-enricher.md +20 -11
- package/template/.aioson/agents/profiler-forge.md +20 -11
- package/template/.aioson/agents/profiler-researcher.md +20 -11
- package/template/.aioson/agents/qa.md +96 -31
- package/template/.aioson/agents/setup.md +12 -1
- package/template/.aioson/agents/sheldon.md +103 -13
- package/template/.aioson/agents/site-forge.md +11 -2
- package/template/.aioson/agents/squad.md +20 -5
- package/template/.aioson/agents/tester.md +4 -0
- package/template/.aioson/agents/ux-ui.md +2 -1
- package/template/.aioson/agents/validator.md +33 -1
- package/template/.aioson/config/verification.json +61 -0
- package/template/.aioson/config.md +13 -9
- package/template/.aioson/docs/LAYERS.md +2 -2
- package/template/.aioson/docs/agent-help.md +126 -0
- package/template/.aioson/docs/autopilot-handoff.md +30 -20
- package/template/.aioson/docs/dev/execution-discipline.md +41 -0
- package/template/.aioson/docs/dev/phase-loop.md +50 -0
- package/template/.aioson/docs/play/llm-data-and-bindings.md +70 -7
- package/template/.aioson/docs/presets/workflow.config.full-merged.json +15 -0
- package/template/.aioson/docs/presets/workflow.config.lean.json +15 -0
- package/template/.aioson/docs/product/prd-contract.md +12 -12
- package/template/.aioson/docs/prototype-contract.md +21 -4
- package/template/.aioson/docs/reference-identity.md +94 -0
- package/template/.aioson/docs/sheldon/harness-contract.md +155 -28
- package/template/.aioson/docs/verification-config.md +82 -0
- package/template/.aioson/docs/verify-artifact-gates.md +91 -0
- package/template/.aioson/docs/workflow-lean-lane.md +129 -0
- package/template/.aioson/skills/design/interface-design/SKILL.md +17 -0
- package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +2 -0
- package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +16 -14
- package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +2 -2
- package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +4 -4
- package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +15 -15
- package/template/.aioson/skills/process/prototype-forge/SKILL.md +6 -0
- package/template/.aioson/skills/process/reference-identity-extract/SKILL.md +164 -0
- package/template/.aioson/skills/static/multi-agent-patterns.md +5 -5
- package/template/AGENTS.md +36 -36
- package/template/CLAUDE.md +15 -11
package/src/commands/update.js
CHANGED
|
@@ -5,6 +5,7 @@ const { detectFramework } = require('../detector');
|
|
|
5
5
|
const { updateInstallation } = require('../updater');
|
|
6
6
|
const { validateProjectContextFile, getInteractionLanguage } = require('../context');
|
|
7
7
|
const { applyAgentLocale } = require('../locales');
|
|
8
|
+
const { getCliVersionLabelSync } = require('../version');
|
|
8
9
|
|
|
9
10
|
async function runUpdate({ args, options, logger, t }) {
|
|
10
11
|
const targetDir = path.resolve(process.cwd(), args[0] || '.');
|
|
@@ -36,10 +37,13 @@ async function runUpdate({ args, options, logger, t }) {
|
|
|
36
37
|
(result.savedProfile && result.savedProfile.locale
|
|
37
38
|
? result.savedProfile.locale
|
|
38
39
|
: 'en');
|
|
39
|
-
localeSync = await applyAgentLocale(targetDir, language, { dryRun, selectiveUpdate: selective && !all });
|
|
40
|
+
localeSync = await applyAgentLocale(targetDir, language, { dryRun, selectiveUpdate: selective && !all });
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
logger.log(t('update.done_at', { targetDir }));
|
|
44
|
+
// Surface WHICH template landed — stale-template updates used to be silent
|
|
45
|
+
// (the copy comes from the installed CLI's own bundle, not from npm latest).
|
|
46
|
+
logger.log(t('update.template_version', { version: getCliVersionLabelSync() }));
|
|
43
47
|
logger.log(t('update.files_updated', { count: result.copied.length }));
|
|
44
48
|
logger.log(t('update.backups_created', { count: result.backedUp.length }));
|
|
45
49
|
if (result.migrations && result.migrations.profileRename && result.migrations.profileRename.changed) {
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// `aioson verification:plan` — deterministic bridge between verification.json and
|
|
4
|
+
// the agents. Given a slug + trigger + run context, it resolves WHICH verification
|
|
5
|
+
// sub-agents should run, on WHICH host/model, and the phase-loop settings — so
|
|
6
|
+
// @dev (per-phase) and the post-dev cycle (end-of-feature) follow a computed plan
|
|
7
|
+
// instead of re-interpreting the config in prose. Read-only; never mutates state.
|
|
8
|
+
|
|
9
|
+
const fs = require('node:fs/promises');
|
|
10
|
+
const path = require('node:path');
|
|
11
|
+
const {
|
|
12
|
+
readVerificationConfig,
|
|
13
|
+
resolveHost,
|
|
14
|
+
getAgentDispatch,
|
|
15
|
+
shouldRunForTrigger,
|
|
16
|
+
resolveAgentReportPath,
|
|
17
|
+
getCrossCheck,
|
|
18
|
+
getBudget,
|
|
19
|
+
getPhaseLoop,
|
|
20
|
+
VERIFICATION_AGENTS,
|
|
21
|
+
TRIGGERS
|
|
22
|
+
} = require('../verification-policy');
|
|
23
|
+
|
|
24
|
+
const BAR = '─'.repeat(60);
|
|
25
|
+
const CLASSIFICATIONS = ['MICRO', 'SMALL', 'MEDIUM'];
|
|
26
|
+
|
|
27
|
+
// A loud, deterministic instruction the phase loop echoes back to @dev at every
|
|
28
|
+
// phase boundary. On a per-phase trigger with auto_continue it is the fresh
|
|
29
|
+
// tool-result that stops the agent from ending its turn to "report" after a
|
|
30
|
+
// phase — the exact failure the phase loop exists to prevent. It never tells the
|
|
31
|
+
// agent to /compact: context is shed transparently by the host's auto-compact,
|
|
32
|
+
// without ending the turn.
|
|
33
|
+
function buildContinuationDirective(trigger, phaseLoop) {
|
|
34
|
+
if (trigger === 'end-of-feature') {
|
|
35
|
+
return 'END-OF-FEATURE — last phase: run the full runtime smoke (build + migrate + boot + Core happy-path), then hand off through the post-dev review cycle. Do not close/publish — that is the human gate.';
|
|
36
|
+
}
|
|
37
|
+
if (phaseLoop && phaseLoop.auto_continue) {
|
|
38
|
+
return 'CONTINUE-NOW — a clean report is a checkpoint, not a stop. Go DIRECTLY into the next phase in this same turn: do not stop, do not ask "continue?", do not summarize-and-end, and never self-issue /compact (the host auto-compacts transparently). Halt only on a failing gate/verification after retries or a genuine hard stop.';
|
|
39
|
+
}
|
|
40
|
+
return 'PAUSE — auto_continue is off: after this phase report, stop and wait for confirmation before the next phase.';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function readFileSafe(filePath) {
|
|
44
|
+
try {
|
|
45
|
+
return await fs.readFile(filePath, 'utf8');
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Best-effort classification: prd-{slug}.md frontmatter wins, then project.context.md.
|
|
52
|
+
async function detectClassification(targetDir, slug) {
|
|
53
|
+
const dir = path.join(targetDir, '.aioson', 'context');
|
|
54
|
+
const candidates = [];
|
|
55
|
+
if (slug) candidates.push(path.join(dir, `prd-${slug}.md`));
|
|
56
|
+
candidates.push(path.join(dir, 'project.context.md'));
|
|
57
|
+
for (const file of candidates) {
|
|
58
|
+
const text = await readFileSafe(file);
|
|
59
|
+
if (!text) continue;
|
|
60
|
+
const m = text.match(/^\s*classification:\s*["']?([A-Za-z]+)["']?\s*$/m);
|
|
61
|
+
if (m && CLASSIFICATIONS.includes(m[1].toUpperCase())) return m[1].toUpperCase();
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function runVerificationPlan({ args, options = {}, logger }) {
|
|
67
|
+
const targetDir = path.resolve(process.cwd(), args[0] || '.');
|
|
68
|
+
const slug = (options.feature || options.slug || '').toString().trim() || null;
|
|
69
|
+
|
|
70
|
+
const triggerRaw = (options.trigger || 'per-phase').toString().trim().toLowerCase();
|
|
71
|
+
// An unknown trigger must fail loudly. Silently coercing it to per-phase used
|
|
72
|
+
// to emit an imperative CONTINUE-NOW directive on what was actually a typo'd
|
|
73
|
+
// end-of-feature call — steering @dev into a phase that does not exist.
|
|
74
|
+
if (!TRIGGERS.includes(triggerRaw)) {
|
|
75
|
+
const failure = { ok: false, reason: 'invalid_trigger', trigger: triggerRaw, valid_triggers: [...TRIGGERS] };
|
|
76
|
+
if (options.json) return failure;
|
|
77
|
+
logger.error(`Invalid --trigger=${triggerRaw}. Valid triggers: ${TRIGGERS.join(', ')}.`);
|
|
78
|
+
return failure;
|
|
79
|
+
}
|
|
80
|
+
const trigger = triggerRaw;
|
|
81
|
+
|
|
82
|
+
const config = await readVerificationConfig(targetDir);
|
|
83
|
+
const host = resolveHost(config, options.host);
|
|
84
|
+
|
|
85
|
+
let classification = (options.classification || '').toString().trim().toUpperCase();
|
|
86
|
+
if (!CLASSIFICATIONS.includes(classification)) {
|
|
87
|
+
classification = (await detectClassification(targetDir, slug)) || 'SMALL';
|
|
88
|
+
}
|
|
89
|
+
const sensitiveSurface = Boolean(options.sensitive);
|
|
90
|
+
|
|
91
|
+
const context = { trigger, classification, sensitiveSurface };
|
|
92
|
+
const agents = [];
|
|
93
|
+
for (const agentId of VERIFICATION_AGENTS) {
|
|
94
|
+
const dispatch = getAgentDispatch(config, agentId, host);
|
|
95
|
+
const entry = {
|
|
96
|
+
agent: agentId,
|
|
97
|
+
run: shouldRunForTrigger(config, agentId, context),
|
|
98
|
+
mode: dispatch ? dispatch.mode : 'native',
|
|
99
|
+
model: dispatch ? dispatch.model : 'configured-default',
|
|
100
|
+
report: resolveAgentReportPath(config, agentId, slug || '{slug}')
|
|
101
|
+
};
|
|
102
|
+
if (agentId === 'validator') {
|
|
103
|
+
const cc = getCrossCheck(config, agentId);
|
|
104
|
+
if (cc) entry.cross_check = cc;
|
|
105
|
+
}
|
|
106
|
+
agents.push(entry);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const result = {
|
|
110
|
+
ok: true,
|
|
111
|
+
feature_slug: slug,
|
|
112
|
+
host,
|
|
113
|
+
trigger,
|
|
114
|
+
classification,
|
|
115
|
+
sensitive_surface: sensitiveSurface,
|
|
116
|
+
agents,
|
|
117
|
+
phase_loop: getPhaseLoop(config),
|
|
118
|
+
budget: getBudget(config)
|
|
119
|
+
};
|
|
120
|
+
result.continuation_directive = buildContinuationDirective(trigger, result.phase_loop);
|
|
121
|
+
|
|
122
|
+
if (options.json) return result;
|
|
123
|
+
|
|
124
|
+
logger.log('');
|
|
125
|
+
logger.log(`Verification plan${slug ? ` — ${slug}` : ''}`);
|
|
126
|
+
logger.log(BAR);
|
|
127
|
+
logger.log(`Host: ${host} Trigger: ${trigger} Class: ${classification}${sensitiveSurface ? ' [sensitive]' : ''}`);
|
|
128
|
+
logger.log(BAR);
|
|
129
|
+
for (const a of agents) {
|
|
130
|
+
const mark = a.run ? 'RUN ' : 'skip';
|
|
131
|
+
const cc = a.cross_check && a.cross_check.enabled ? ` + cross_check(${a.cross_check.tool}/${a.cross_check.model})` : '';
|
|
132
|
+
logger.log(` [${mark}] ${a.agent.padEnd(10)} ${a.mode}/${a.model}${a.run ? ` → ${a.report}` : ''}${cc}`);
|
|
133
|
+
}
|
|
134
|
+
logger.log(BAR);
|
|
135
|
+
const pl = result.phase_loop;
|
|
136
|
+
logger.log(`Phase loop: auto_continue=${pl.auto_continue} compact_between_phases=${pl.compact_between_phases} max_fix_retries=${pl.max_fix_retries_per_phase}`);
|
|
137
|
+
logger.log(`▶ ${result.continuation_directive}`);
|
|
138
|
+
logger.log('');
|
|
139
|
+
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module.exports = { runVerificationPlan };
|