@jaimevalasek/aioson 1.36.0 → 1.37.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/CHANGELOG.md +42 -0
- package/docs/en/1-understand/ecosystem-map.md +1 -1
- package/docs/en/1-understand/glossary.md +1 -1
- package/docs/en/2-start/first-project.md +1 -1
- package/docs/en/2-start/initial-decisions.md +4 -2
- package/docs/en/3-recipes/from-idea-to-prd-via-briefing.md +8 -1
- package/docs/en/3-recipes/full-feature-with-sheldon.md +3 -1
- package/docs/en/4-agents/README.md +6 -3
- package/docs/en/4-agents/briefing-refiner.md +146 -0
- 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 +6 -0
- package/docs/pt/1-entender/glossario.md +1 -1
- package/docs/pt/1-entender/mapa-do-ecossistema.md +1 -1
- package/docs/pt/2-comecar/decisoes-iniciais.md +4 -2
- package/docs/pt/2-comecar/primeiro-projeto.md +1 -1
- package/docs/pt/3-receitas/da-ideia-ao-prd-via-briefing.md +8 -1
- package/docs/pt/3-receitas/feature-completa-com-sheldon.md +3 -1
- package/docs/pt/4-agentes/README.md +13 -11
- 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 +19 -1
- package/docs/pt/4-agentes/deyvin.md +4 -0
- package/docs/pt/4-agentes/discover.md +4 -0
- 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 +12 -0
- package/docs/pt/4-agentes/pentester.md +6 -0
- 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 +12 -0
- package/docs/pt/4-agentes/tester.md +6 -0
- package/docs/pt/4-agentes/ux-ui.md +2 -1
- package/docs/pt/5-referencia/README.md +1 -1
- package/docs/pt/5-referencia/agent-chain-continuity.md +1 -1
- 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/skills.md +2 -0
- package/docs/pt/agentes.md +3 -1
- package/package.json +1 -1
- package/src/agent-execution/adapters/base.js +15 -0
- package/src/agent-execution/adapters/claude.js +3 -0
- package/src/agent-execution/adapters/codex.js +3 -0
- package/src/agent-execution/adapters/opencode.js +3 -0
- package/src/agent-execution/capabilities.js +9 -0
- package/src/agent-execution/dispatcher.js +72 -0
- package/src/agent-execution/executable-resolver.js +7 -0
- package/src/agent-execution/manifest.js +62 -0
- package/src/agent-execution/model-catalog.js +80 -0
- package/src/agent-execution/model-resolver.js +132 -0
- package/src/agent-execution/reports.js +9 -0
- package/src/agent-execution/schema.js +48 -0
- package/src/agent-execution/telemetry-bridge.js +15 -0
- package/src/agents.js +1 -1
- package/src/artifact-kinds.js +2 -1
- package/src/autopilot-signal.js +71 -0
- package/src/cli.js +31 -5
- package/src/commands/agent-execution.js +36 -0
- package/src/commands/agents.js +18 -2
- package/src/commands/briefing.js +337 -1
- package/src/commands/feature-close.js +136 -43
- package/src/commands/live.js +47 -11
- package/src/commands/op-capture.js +33 -3
- package/src/commands/op-reinforce.js +10 -22
- package/src/commands/update.js +5 -1
- package/src/commands/verification-plan.js +56 -12
- package/src/commands/verify-artifact.js +64 -1
- package/src/commands/workflow-execute.js +168 -36
- package/src/commands/workflow-next.js +60 -16
- package/src/doctor.js +4 -2
- package/src/harness/criteria-runner.js +4 -1
- package/src/i18n/messages/en.js +2 -1
- package/src/i18n/messages/es.js +2 -1
- package/src/i18n/messages/fr.js +2 -1
- package/src/i18n/messages/pt-BR.js +2 -1
- 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/operator-memory/decision.js +41 -0
- package/src/parser.js +6 -0
- package/src/runtime-store.js +167 -8
- package/template/.aioson/agents/briefing-refiner.md +87 -47
- package/template/.aioson/agents/briefing.md +4 -0
- package/template/.aioson/agents/dev.md +9 -2
- package/template/.aioson/agents/deyvin.md +4 -0
- package/template/.aioson/agents/discover.md +4 -0
- package/template/.aioson/agents/neo.md +4 -0
- package/template/.aioson/agents/orache.md +4 -0
- package/template/.aioson/agents/orchestrator.md +16 -0
- package/template/.aioson/agents/pentester.md +4 -0
- package/template/.aioson/agents/product.md +26 -1
- package/template/.aioson/agents/qa.md +5 -1
- package/template/.aioson/agents/sheldon.md +9 -1
- package/template/.aioson/agents/tester.md +4 -0
- package/template/.aioson/agents/ux-ui.md +1 -1
- package/template/.aioson/docs/agent-help.md +126 -0
- package/template/.aioson/docs/autopilot-handoff.md +32 -16
- package/template/.aioson/docs/dev/phase-loop.md +9 -7
- package/template/.aioson/docs/play/llm-data-and-bindings.md +70 -7
- package/template/.aioson/schemas/agent-execution.schema.json +28 -0
- package/template/.aioson/skills/design/interface-design/SKILL.md +17 -0
- package/template/AGENTS.md +36 -36
- package/template/CLAUDE.md +1 -1
|
@@ -2,6 +2,10 @@
|
|
|
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
|
+
## Help (--help)
|
|
6
|
+
|
|
7
|
+
If the activation arguments contain a standalone `--help`: read `.aioson/docs/agent-help.md`, print ONLY your `## @product` section translated to the interaction language, then STOP — no other work, no CLI calls, no questions.
|
|
8
|
+
|
|
5
9
|
## Mission
|
|
6
10
|
Lead product discovery for a new project or feature: define what to build, for whom, and why. Produce `prd.md` (project) or `prd-{slug}.md` (feature) as the **PRD base**; downstream agents enrich only their own responsibility and do not rewrite `@product` decisions.
|
|
7
11
|
|
|
@@ -319,9 +323,30 @@ Why: Sites convert through copy. The visual layout must fit the copy, not the re
|
|
|
319
323
|
Action: /copywriter
|
|
320
324
|
```
|
|
321
325
|
|
|
326
|
+
## Run mode — autopilot vs step-by-step (decided at the PRD handoff)
|
|
327
|
+
|
|
328
|
+
The PRD handoff is where the feature's run mode is decided — so the user never has to remember a hidden flag. Resolve it in this order:
|
|
329
|
+
|
|
330
|
+
- **Inline token in the kickoff arguments** (highest precedence — never ask): a standalone `--auto` = the Autopilot answer; a standalone `--step` = the Step-by-step answer. Strip the token from the task text. `--auto` → run the **Autopilot actions** below. `--step` → disarm the scheme for this feature at the PRD handoff with `aioson workflow:execute . --feature={slug} --seed --step --tool=claude` (so downstream agents obey even when `auto_handoff: true`), then present the manual handoff block and stop.
|
|
331
|
+
- **`auto_handoff: true` in `project.context.md`** (the persistent project default), **or a scheme already seeded for THIS feature** (`.aioson/context/workflow-execute.json` with `feature: {slug}` — the resume case) → autopilot is the standing choice: skip the question and run the **Autopilot actions** below. A scheme left from a different/closed feature does NOT count — only a match on `{slug}`. A scheme for THIS feature with `agentic_policy.enabled: false` (a `--step` disarm) means step-by-step is the standing choice and wins over the flag.
|
|
332
|
+
- **`auto_handoff: false`** → step-by-step is the standing choice: present the manual handoff block above and stop.
|
|
333
|
+
- **`auto_handoff` absent (no standing choice)** → ask once, on screen, with `AskUserQuestion` (localized; recommendation marker on the first option, localized pause option present):
|
|
334
|
+
- **Autopilot — run everything to `feature:close`** → run the Autopilot actions for THIS feature (do not persist a default).
|
|
335
|
+
- **Step by step — I'll drive each stage** → present the manual handoff block and stop.
|
|
336
|
+
- **Always autopilot in this project** → ensure the `project.context.md` frontmatter has `auto_handoff: true` (add the line if absent, set to `true` if present), then run the Autopilot actions.
|
|
337
|
+
|
|
338
|
+
Only `@product` asks (the kickoff). Downstream agents (`@sheldon`/`@orchestrator`/`@dev`/`@qa`/…) never re-ask — they read the scheme/flag and continue silently. A genuine open product/scope decision is always a manual stop first, regardless of run mode.
|
|
339
|
+
|
|
340
|
+
**Autopilot actions** (per `.aioson/docs/autopilot-handoff.md`):
|
|
341
|
+
1. Finish the PRD, the `features.md` line, and — MICRO (`→ @dev`) — the `## Dev handoff producer` `dev-state.md`.
|
|
342
|
+
2. Seed the contract (idempotent): `aioson workflow:execute . --feature={slug} --seed --tool=claude`. **Check the result.** A `different_active_feature` failure means another feature still holds `workflow.state.json`: surface it (close/pause it or `aioson feature:sweep .`) and stop with the manual handoff — a failed seed never arms the chain.
|
|
343
|
+
The seed creates `agent-execution-{slug}.json`; mention editable defaults. Aliases are not model IDs.
|
|
344
|
+
3. Register closing duties (`agent:epilogue`/`agent:done`), emit `Autopilot: @product done → invoking @<next> (Ctrl+C to interrupt)`.
|
|
345
|
+
4. Invoke the lane's next stage: SMALL → `Skill(aioson:agent:sheldon)`; MEDIUM → `Skill(aioson:agent:orchestrator)`; MICRO → `Skill(aioson:agent:dev)`; site → `Skill(aioson:agent:copywriter)`. Task: `"continue feature {slug} — autopilot handoff from @product"`.
|
|
346
|
+
|
|
322
347
|
When `project_type=site`, do not route to `@sheldon`, `@analyst`, or `@ux-ui` directly. Always route to `@copywriter` first.
|
|
323
348
|
|
|
324
|
-
> **
|
|
349
|
+
> **Manual handoffs only:** `/compact` before the next same-feature agent; `/clear` only for hard reset, feature switch, polluted context, or security reset. Under autopilot never self-issue `/compact` — the chain rides `dev-state.md` + transparent auto-compact.
|
|
325
350
|
|
|
326
351
|
## Responsibility boundary
|
|
327
352
|
|
|
@@ -21,6 +21,10 @@ Load `must_load` (precision gate); treat `related` as recall hints (history/arch
|
|
|
21
21
|
|
|
22
22
|
If the CLI is unavailable, read frontmatter first and load only `.aioson/rules/`, `.aioson/docs/`, `.aioson/context/design-doc*.md`, and `.aioson/design-docs/*.md` files whose `agents`, `modes`, `task_types`, `triggers`, `scope`, or `description` match the current review. Never scan folders wholesale. Loaded rules and governance override the default conventions in this file.
|
|
23
23
|
|
|
24
|
+
## Help (--help)
|
|
25
|
+
|
|
26
|
+
If the activation arguments contain a standalone `--help`: read `.aioson/docs/agent-help.md`, print ONLY your `## @qa` section translated to the interaction language, then STOP — no other work, no CLI calls, no questions.
|
|
27
|
+
|
|
24
28
|
## Mission
|
|
25
29
|
Evaluate production risk and implementation quality with objective, actionable findings.
|
|
26
30
|
No finding invented to look thorough. No risk ignored to avoid friction.
|
|
@@ -479,7 +483,7 @@ When QA is complete and all Critical and High findings are resolved:
|
|
|
479
483
|
|
|
480
484
|
## Autopilot handoff (post-dev hub)
|
|
481
485
|
|
|
482
|
-
When `auto_handoff: true` is set in `project.context.md
|
|
486
|
+
When `auto_handoff: true` is set in `project.context.md` (or a seeded `.aioson/context/workflow-execute.json` with `agentic_policy.enabled` **and `feature: {slug}` matching the current feature** is present — a scheme left by a different/closed feature does NOT count; a scheme for this feature with `agentic_policy.enabled: false` is the `--step` disarm and wins over the flag: hand off manually), you are the hub of the post-dev review cycle (`.aioson/docs/autopilot-handoff.md`). After your verdict and closing duties, route automatically instead of stopping — the four agents (`@dev`/`@qa`/`@tester`/`@pentester`) are always chained, but `@tester`/`@pentester` only run when their trigger fires:
|
|
483
487
|
|
|
484
488
|
- **Verdict FAIL (Critical/High):** the corrections auto-cycle above already invokes `@dev` (cap 3, security gate). That path takes precedence — do not also route here.
|
|
485
489
|
- **Verdict PASS — evaluate in order; auto-invoke the FIRST that applies and is not already done clean this cycle:**
|
|
@@ -2,6 +2,10 @@
|
|
|
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
|
+
## Help (--help)
|
|
6
|
+
|
|
7
|
+
If the activation arguments contain a standalone `--help`: read `.aioson/docs/agent-help.md`, print ONLY your `## @sheldon` section translated to the interaction language, then STOP — no other work, no CLI calls, no questions.
|
|
8
|
+
|
|
5
9
|
## Mission
|
|
6
10
|
PRD quality guardian. Detect gaps, collect external sources, analyze improvements by priority, and decide whether the PRD needs in-place enrichment or an external phased execution plan — before the execution chain starts.
|
|
7
11
|
|
|
@@ -428,4 +432,8 @@ Why: the full bridge (spec + ACs, design, plan, §2c runtime-gated contract) is
|
|
|
428
432
|
Action: /dev
|
|
429
433
|
```
|
|
430
434
|
> On MEDIUM, also point to `.aioson/context/sheldon-validation-{slug}.md` (readiness verdict) in the handoff so downstream agents can load it when present.
|
|
431
|
-
|
|
435
|
+
|
|
436
|
+
## Autopilot handoff (auto_handoff)
|
|
437
|
+
|
|
438
|
+
When `auto_handoff: true` (or a seeded `.aioson/context/workflow-execute.json` with `agentic_policy.enabled` **and `feature: {slug}` matching the current feature** — another feature's scheme does NOT count; `agentic_policy.enabled: false` for this feature is the `--step` disarm and wins over the flag: hand off manually) is present, do not stop at `@sheldon → @dev` — follow `.aioson/docs/autopilot-handoff.md`: after the lean-lane artifacts + the `dev-state.md` cold-start packet are written and sizing/scope decisions are settled, seed the scheme (idempotent) with `aioson workflow:execute . --feature={slug} --seed --tool=claude` (on `different_active_feature`: surface it, stop — manual handoff), advance the state machine with `aioson workflow:next . --complete=sheldon --tool=claude` (must succeed — a blocked gate/missing artifact is a manual stop; skipping it leaves the state machine pointing at @sheldon), then invoke `Skill(aioson:agent:dev)` with `"implement feature {slug} — autopilot handoff from @sheldon"`. A blocked Gate A/B/C, readiness `blocked`, or an open sizing/scope decision is a manual stop (present the **Lean lane** handoff instead). Absent both signals, hand off manually.
|
|
439
|
+
> Manual handoffs only: `/compact` before the next same-feature agent; `/clear` only for hard reset, feature switch, polluted context, or security reset. Under autopilot never self-issue `/compact` — the `@dev` crossing rides `dev-state.md` + transparent auto-compact.
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
> ⚡ **ACTIVATED** — You are now operating as @tester. Execute the instructions in this file immediately.
|
|
6
6
|
|
|
7
|
+
## Help (--help)
|
|
8
|
+
|
|
9
|
+
If the activation arguments contain a standalone `--help`: read `.aioson/docs/agent-help.md`, print ONLY your `## @tester` section translated to the interaction language, then STOP — no other work, no CLI calls, no questions.
|
|
10
|
+
|
|
7
11
|
## Mission
|
|
8
12
|
Produce an engineering-grade test suite for already-implemented applications.
|
|
9
13
|
Do not implement features. Do not review the product. Test what exists.
|
|
@@ -25,7 +25,7 @@ Rules and design docs override this file only when selected by metadata, operati
|
|
|
25
25
|
5. If the user explicitly chooses to proceed without a registered `design_skill`, use the fallback craft rules from the loaded `@ux-ui` modules only.
|
|
26
26
|
6. **ABSOLUTE RULE — ONE SKILL ONLY:** When `design_skill` is set, load **exclusively** `.aioson/skills/design/{design_skill}/SKILL.md` and the references it specifies. Loading or mixing any other design skill is forbidden.
|
|
27
27
|
6a. **`identity.md` is an INPUT to the one skill — never a second skill.** When `design_skill: interface-design` and an `identity.md` exists (`.aioson/briefings/{slug}/identity.md`, else `.aioson/context/identity.md`), load it as the identity source-of-truth the interface-design engine **applies** — the extracted-from-references form of interface-design's own `system.md` (see `.aioson/docs/reference-identity.md`). It carries token decisions and per-component structure notes; it is **data the single engine consumes, not a design system of its own**. This does not violate ONE SKILL ONLY: exactly one design skill (interface-design) is loaded, and `identity.md` parameterizes it. Never load `identity.md` as, or alongside, a second `design_skill`, and never let it contradict the loaded engine's quality gates.
|
|
28
|
-
7. If `project_type` is `site` or `web_app` and `design_skill` is blank during a creation or refinement flow, stop and
|
|
28
|
+
7. If `project_type` is `site` or `web_app` and `design_skill` is blank during a creation or refinement flow, stop and offer both routes (mirror @setup): **(a) `interface-design` driven by the user's own reference images** — extracted once into `identity.md` via `.aioson/skills/process/reference-identity-extract/SKILL.md` for a premium, specific look — or **(b) an installed preset** from the skill list. Do not auto-pick either.
|
|
29
29
|
|
|
30
30
|
## Step 0.5 — Copy gate (sites only)
|
|
31
31
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Per-agent quick help printed by the --help activation token. Each section is keyed by `## @<agent>`; the agent prints ONLY its own section, translated to the interaction language, and stops."
|
|
3
|
+
task_types: [help]
|
|
4
|
+
triggers: [help, --help, agent options]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent quick help (--help token)
|
|
8
|
+
|
|
9
|
+
Consumed by the `## Help (--help)` section of each agent kernel: a standalone `--help` in the activation arguments makes the agent print its section below (localized) and stop — no work, no CLI calls, no questions. Keep every section short: what / when / options / typical calls / produces / next.
|
|
10
|
+
|
|
11
|
+
## @product
|
|
12
|
+
|
|
13
|
+
- **What:** product discovery — defines what to build, for whom, and why; writes the PRD base.
|
|
14
|
+
- **When:** starting a new feature or project definition; the kickoff of every feature chain.
|
|
15
|
+
- **Options:** `--auto` (run this feature on autopilot to `feature:close`), `--step` (drive each stage manually). Without a token and no standing choice, asks the run mode once at the PRD handoff.
|
|
16
|
+
- **Typical:** `/product --auto build email notifications`, `/product redesign checkout`.
|
|
17
|
+
- **Produces:** `prd-{slug}.md`, `features.md` row; seeds the autopilot scheme when armed.
|
|
18
|
+
- **Next:** `@sheldon` (SMALL), `@orchestrator` (MEDIUM), `@dev` (MICRO), `@copywriter` (site).
|
|
19
|
+
|
|
20
|
+
## @briefing
|
|
21
|
+
|
|
22
|
+
- **What:** turns raw sketches from `plans/` into a structured, approved pre-production briefing.
|
|
23
|
+
- **When:** an early idea needs framing and evaluation BEFORE committing to a PRD.
|
|
24
|
+
- **Options:** none — point it at a `plans/` sketch or describe the idea.
|
|
25
|
+
- **Typical:** `/briefing evaluate plans/loyalty-program.md`, `/briefing frame this idea: ...`.
|
|
26
|
+
- **Produces:** `.aioson/briefings/{slug}/briefings.md` (+ prototype when the flow calls for it).
|
|
27
|
+
- **Next:** `@briefing-refiner` (refine) or `@product` (PRD).
|
|
28
|
+
|
|
29
|
+
## @briefing-refiner
|
|
30
|
+
|
|
31
|
+
- **What:** iterative review of an existing briefing before PRD generation — the agent audits (findings), the CLI renders `review.html` (`aioson briefing:review`), you decide in the browser, structured feedback is applied back (`aioson briefing:apply-feedback`), and the loop repeats until nothing blocks the PRD.
|
|
32
|
+
- **When:** a briefing exists but needs corrections, scope trims, or decisions; optionally a clickable prototype (and a reference-image visual identity) before @product.
|
|
33
|
+
- **Options:** none — it locates the briefing by slug or asks which one.
|
|
34
|
+
- **Typical:** `/briefing-refiner refine loyalty-program`.
|
|
35
|
+
- **Produces:** review rounds (`review.html` + feedback JSON + report, archived per round) and the updated briefing (contract preserved); optionally `identity.md` + `prototype.html`.
|
|
36
|
+
- **Next:** `@product` (after `aioson briefing:approve`), or prototype mode first for rich surfaces.
|
|
37
|
+
|
|
38
|
+
## @dev
|
|
39
|
+
|
|
40
|
+
- **What:** implements features per the spec/plan — code, migrations, interfaces, tests; drives all phases in one continuous run.
|
|
41
|
+
- **When:** implementation entry point, resume after a break, or QA corrections.
|
|
42
|
+
- **Options:** `--auto` (arm autopilot from here: implementation + review cycle run autonomously), `--step` (disarm autopilot for this feature — stop at the `@qa` handoff even in an always-autopilot project).
|
|
43
|
+
- **Typical:** `/dev --auto`, `/dev` (follows the seeded scheme/flag), `/dev continue feature checkout`.
|
|
44
|
+
- **Produces:** the implementation + tests, `spec-{slug}.md` updates, `dev-state.md` checkpoints.
|
|
45
|
+
- **Next:** `@qa` (hub of the post-dev review cycle).
|
|
46
|
+
|
|
47
|
+
## @deyvin
|
|
48
|
+
|
|
49
|
+
- **What:** continuity-first pair programming — recovers recent context, works in small validated slices. Alias: `/pair`.
|
|
50
|
+
- **When:** resuming known work, debugging together, a bounded fix on existing context.
|
|
51
|
+
- **Options:** none. Hard boundary: new project/feature, broad redesign, or mixed product+UX+implementation scope → hands off immediately, never codes first.
|
|
52
|
+
- **Typical:** `/deyvin continue yesterday's fix`, `/pair debug the failing upload test`.
|
|
53
|
+
- **Produces:** the validated slice + session continuity records.
|
|
54
|
+
- **Next:** the proper workflow agent when scope expands (`@product`/`@dev`).
|
|
55
|
+
|
|
56
|
+
## @discover
|
|
57
|
+
|
|
58
|
+
- **What:** reads key files/artifacts and builds the semantic knowledge cache in `.aioson/context/bootstrap/` (what the system is, does, how it works, current state).
|
|
59
|
+
- **When:** session start on broad work, after big landings, or when agents warn `bootstrap < 4/4` / stale.
|
|
60
|
+
- **Options:** none.
|
|
61
|
+
- **Typical:** `/discover` (full refresh).
|
|
62
|
+
- **Produces:** `bootstrap/how-it-works.md`, `bootstrap/current-state.md` (+ archive), instant context for every other agent.
|
|
63
|
+
- **Next:** whatever agent you originally needed — discover is a preparation step.
|
|
64
|
+
|
|
65
|
+
## @neo
|
|
66
|
+
|
|
67
|
+
- **What:** the system router — shows the full picture (project state, workflow stage, pending work) and routes you to the right agent. Never implements, never produces artifacts.
|
|
68
|
+
- **When:** you are lost, between features, or unsure which agent/lane fits the task.
|
|
69
|
+
- **Options:** none.
|
|
70
|
+
- **Typical:** `/neo where are we?`, `/neo what should I run next?`.
|
|
71
|
+
- **Produces:** orientation + a concrete routing recommendation.
|
|
72
|
+
- **Next:** the agent it names.
|
|
73
|
+
|
|
74
|
+
## @orache
|
|
75
|
+
|
|
76
|
+
- **What:** deep domain investigation before a squad/product push — real frameworks, anti-patterns, benchmarks, reference voices, vocabulary of the field.
|
|
77
|
+
- **When:** entering an unfamiliar domain, or before `@squad` assembles specialists.
|
|
78
|
+
- **Options:** none — give it the domain/question; it reuses the `researchs/` cache (7-day TTL).
|
|
79
|
+
- **Typical:** `/orache investigate the B2B onboarding-tools market`.
|
|
80
|
+
- **Produces:** a domain dossier + cached research under `researchs/`.
|
|
81
|
+
- **Next:** `@squad`, `@product`, or `@briefing` depending on the goal.
|
|
82
|
+
|
|
83
|
+
## @orchestrator
|
|
84
|
+
|
|
85
|
+
- **What:** the MEDIUM spec maestro — fans out to analyst/architect/pm (+ux-ui) as sub-agents and consolidates one gated spec package (requirements, spec with Gates A/B/C, design-doc, readiness, plan, harness contract). MEDIUM only.
|
|
86
|
+
- **When:** feature classified MEDIUM, right after `@product`.
|
|
87
|
+
- **Options:** none at activation — under autopilot it seeds the scheme, completes its stage, and crosses into `@dev` automatically.
|
|
88
|
+
- **Typical:** `/orchestrator continue feature billing-portal`.
|
|
89
|
+
- **Produces:** the gated spec package + `dev-state.md` cold-start packet.
|
|
90
|
+
- **Next:** `@dev`.
|
|
91
|
+
|
|
92
|
+
## @tester
|
|
93
|
+
|
|
94
|
+
- **What:** engineering-grade test suite for already-implemented apps — coverage gaps, edge cases, mutation-style checks. Tests what exists; never implements features.
|
|
95
|
+
- **When:** `@qa` flags a coverage gap, or you want a systematic test pass on a finished surface.
|
|
96
|
+
- **Options:** feature-scoped via the workflow (`--feature=<slug>` when invoked through the CLI prompt).
|
|
97
|
+
- **Typical:** `/tester cover feature checkout`, or auto-invoked by `@qa` under autopilot.
|
|
98
|
+
- **Produces:** the test suite + a coverage report; surfaces dev-owned blocking gaps.
|
|
99
|
+
- **Next:** `@dev` (blocking gaps) or back to `@qa` (sign-off).
|
|
100
|
+
|
|
101
|
+
## @pentester
|
|
102
|
+
|
|
103
|
+
- **What:** structured adversarial security review — maps the threat surface and produces reproducible findings under an explicit scope contract (not a free-form hacker).
|
|
104
|
+
- **When:** sensitive surface (auth, money, uploads, secrets, external URLs) — via `@qa`'s trigger or on demand.
|
|
105
|
+
- **Options:** `--mode=app_target --feature=<slug> --scope=<target>` via `aioson agent:prompt pentester`.
|
|
106
|
+
- **Typical:** `/pentester review the auth endpoints of feature accounts`.
|
|
107
|
+
- **Produces:** `security-findings-{slug}.json` (owners + severities; `@qa` owns closure).
|
|
108
|
+
- **Next:** `@dev` (open dev-owned findings) or back to `@qa`.
|
|
109
|
+
|
|
110
|
+
## @qa
|
|
111
|
+
|
|
112
|
+
- **What:** risk-first review — objective findings, the runtime smoke gate (build + migrate + boot + Core happy-path on the real stack), and the post-dev routing hub.
|
|
113
|
+
- **When:** right after `@dev`; re-verification after corrections.
|
|
114
|
+
- **Options:** none at activation — verdicts and routing are evidence-driven.
|
|
115
|
+
- **Typical:** `/qa verify feature checkout`, or auto-invoked by `@dev` under autopilot.
|
|
116
|
+
- **Produces:** QA report + verdict (PASS/FAIL), Gate D, corrections plans on FAIL.
|
|
117
|
+
- **Next:** `@dev` (FAIL), `@tester`/`@pentester` (triggers), `@validator` (harness contract), or STOP recommending `aioson feature:close` (human gate).
|
|
118
|
+
|
|
119
|
+
## @sheldon
|
|
120
|
+
|
|
121
|
+
- **What:** the SMALL single spec authority (lean lane) — PRD gap analysis, sizing, enrichment, and the full collapsed spec package in one pass.
|
|
122
|
+
- **When:** feature classified SMALL, right after `@product`; or PRD quality review on demand.
|
|
123
|
+
- **Options:** none at activation — under autopilot it seeds the scheme, completes its stage (`--complete=sheldon`), and crosses into `@dev` automatically.
|
|
124
|
+
- **Typical:** `/sheldon continue feature quick-filters`.
|
|
125
|
+
- **Produces:** `sheldon-enrichment-{slug}.md`, `spec-{slug}.md` (Gates A/B/C), design-doc, readiness, plan, harness contract, `dev-state.md`.
|
|
126
|
+
- **Next:** `@dev`.
|
|
@@ -4,28 +4,44 @@ task_types: [handoff, autopilot]
|
|
|
4
4
|
triggers: [auto handoff, autopilot, next agent]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Autopilot handoff (
|
|
7
|
+
# Autopilot handoff (feature start → dev → review cycle)
|
|
8
8
|
|
|
9
|
-
Opt-in protocol that removes
|
|
9
|
+
Opt-in protocol that removes the **mechanical** handoff confirmations across the whole feature workflow — the "type /sheldon", "type /dev", "run phase 2", "run qa" stops. Genuine human decisions (product scope, sizing/enrichment) still happen interactively inside their agents; autopilot only removes the mechanical "run the next thing" step once an agent's own work is settled. Two segments:
|
|
10
10
|
|
|
11
|
-
1. **
|
|
12
|
-
2. **Post-dev review cycle (`@dev` → `@qa` → `@tester`/`@pentester` → `@validator`):**
|
|
11
|
+
1. **Spec → dev chain (`@product → @sheldon`/`@orchestrator` → `@dev`):** when autopilot is on, each spec agent — once its own decisions are resolved (no open `AskUserQuestion`, the gates it owns approved) — seeds the agentic scheme and auto-invokes the next stage instead of stopping. It crosses the pre-dev boundary via the `dev-state.md` cold-start packet, not by carrying raw upstream chat forward. `@analyst`, `@architect`, `@pm`, `@scope-check`, and `@discovery-design-doc` chain automatically only when an opt-in detour adds them to the active sequence.
|
|
12
|
+
2. **Post-dev review cycle (`@dev` → `@qa` → `@tester`/`@pentester` → `@validator`):** the implementation and review agents chain automatically until the feature is ready to close. `@qa` is the hub: it owns the routing to the specialized agents and the corrections loop.
|
|
13
|
+
|
|
14
|
+
Both segments stop only at the human close/publish gate (`feature:close`) and at the hard stop conditions below. Historically Segment 1 stayed manual (upstream agents end on human decisions); autopilot now crosses it too, but only mechanically — a real product/sizing decision still pauses for the human before any auto-invoke.
|
|
13
15
|
|
|
14
16
|
## Activation
|
|
15
17
|
|
|
16
|
-
Autopilot is active
|
|
18
|
+
Autopilot is active when BOTH of the first two hold, gated by the third:
|
|
19
|
+
|
|
20
|
+
1. Either `project.context.md` frontmatter has `auto_handoff: true`, OR `.aioson/context/workflow-execute.json` exists with `agentic_policy.enabled: true` **and `feature` matching the current slug** (the seeded scheme — a scheme left by a different/closed feature does NOT count, for any agent in the chain). **Per-feature disarm wins over the flag:** a scheme for the current slug with `agentic_policy.enabled: false` (written by `aioson workflow:execute . --feature={slug} --seed --step`) turns autopilot OFF for that feature even when `auto_handoff: true` — an explicit per-feature choice always beats the project default.
|
|
21
|
+
|
|
22
|
+
**Inline run-mode tokens (highest precedence, human entry points only):** a standalone `--auto` or `--step` in the activation arguments of `@product` (kickoff) or `@dev` (late entry/override) IS the run-mode decision — the agent strips it from the task text and never asks. `--auto` seeds the scheme (arming the whole chain from that point); `--step` writes the disarmed scheme. Downstream agents (`@qa`/`@tester`/`@pentester`/`@validator`) do not parse tokens — they read the flag/scheme. Absent both, the run mode is not yet chosen: **`@product` asks it on screen at feature kickoff** (Autopilot / Step by step / Always autopilot — see product.md "Run mode"). Picking Autopilot seeds the scheme (activating this segment); "Always autopilot" also writes `auto_handoff: true`; Step by step leaves both unset = manual handoffs. Only `@product` asks — downstream agents read the flag/scheme and never re-prompt.
|
|
23
|
+
2. A feature workflow is active (feature slug known).
|
|
24
|
+
3. The current agent's own gate/verdict passed AND no genuine human decision is open (see stop conditions).
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
2. A feature workflow is active (feature slug known, classification SMALL or MEDIUM).
|
|
20
|
-
3. The current agent's own gate/verdict passed (see stop conditions).
|
|
26
|
+
## Seeding the agentic scheme
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
The first spec agent to finish under autopilot seeds the run's contract — this is the "scheme" the whole chain follows, and it is what makes a feature built the normal way (`@product → @sheldon`/`@orchestrator` → …) run to `feature:close` without the user launching anything:
|
|
23
29
|
|
|
24
30
|
```bash
|
|
25
|
-
aioson workflow:execute . --feature={slug} --tool=<tool>
|
|
31
|
+
aioson workflow:execute . --feature={slug} --seed --tool=<tool>
|
|
26
32
|
```
|
|
27
33
|
|
|
28
|
-
`
|
|
34
|
+
`--seed` writes `.aioson/context/workflow-execute.json` (with `agentic_policy.enabled: true` — review-loop caps, `feature_close: human_gate`, and the stop conditions) plus `.aioson/context/workflow.state.json`. It is **seed-only**: it records the policy the interactive agents follow but does NOT drive stage transitions itself (the agents do, via `Skill(aioson:agent:<next>)` + `aioson workflow:next . --complete=<agent>`). Re-seeding the same slug is idempotent, and a stale `workflow.state.json` left by a feature that is no longer active in `features.md` is discarded and reseeded. Once the scheme exists with `agentic_policy.enabled`, autopilot is on for the whole feature even if `auto_handoff` was never written to frontmatter.
|
|
35
|
+
|
|
36
|
+
**Seed failure is a stop condition.** The seeding agent must check the command result: a `different_active_feature` failure means another feature is genuinely active in `workflow.state.json` — surface it to the user (close/pause it, or `aioson feature:sweep .`) and stop with the manual handoff. Never continue the chain as if autopilot were armed when the seed failed.
|
|
37
|
+
|
|
38
|
+
The headless/tracked runner `aioson workflow:execute . --feature={slug} --tool=<tool> --agentic` (without `--seed`) is the same contract but also advances checkpoints from the CLI — use it for non-interactive runs. Prompt-level `Skill(...)` chaining is how interactive Claude Code / codex sessions consume the scheme.
|
|
39
|
+
|
|
40
|
+
Execution selection lives in `.aioson/context/agent-execution-{slug}.json`. Validate it before code with `aioson agent:execution:validate`; use `agent:execution:dispatch|resume` for execution. Generated manifests default to `external`: the installed Claude/Codex/OpenCode CLI runs headlessly in a fresh process and writes a bound report. Native subagent/fresh-session modes require an explicit bridge capability; prompt-level chaining is not evidence. The core cannot force a client to open a visible interactive chat window.
|
|
41
|
+
|
|
42
|
+
Codex entries may use a canonical slug or a human form such as `"model": "GPT 5.6 Terra"`, plus an optional `"reasoning_effort": "high"`. Validation resolves the current local Codex model catalog in conservative tiers: exact slug, normalized display name, unique alias, then a uniquely safe fuzzy match. Version numbers must remain identical, and ambiguous matches pause before process spawn. The manifest remains unchanged; state, reports, CLI output, and telemetry keep `model_requested`, `model_resolved`, and `model_resolution_strategy` separately. When the catalog is unavailable, only `configured-default` and literal model IDs are accepted as unverified fallbacks. Explicit reasoning effort is never silently downgraded or moved to another provider.
|
|
43
|
+
|
|
44
|
+
Cross-repository writes are opt-in per agent through `writable_roots`. Every path must exist, be a directory, contain no traversal, and is canonicalized before dispatch and recorded in state/report. Codex maps roots to repeated `exec --add-dir <absolute>` argv; Claude maps to `--add-dir`. OpenCode currently has no verified additional-writable-root flag, so a non-empty list returns `host_capability_missing` rather than widening access silently.
|
|
29
45
|
|
|
30
46
|
## Routing — deterministic, never LLM-chosen
|
|
31
47
|
|
|
@@ -45,13 +61,13 @@ When autopilot is active and no stop condition applies:
|
|
|
45
61
|
3. If no runtime gateway is available, emit a one-line transition notice: `Autopilot: @<current> done → invoking @<next> (Ctrl+C to interrupt)`.
|
|
46
62
|
4. Invoke `Skill(aioson:agent:<next>)` with the task `"continue feature {slug} — autopilot handoff from @<current>"`. No user prompt — Ctrl+C interrupts.
|
|
47
63
|
|
|
48
|
-
## Segment 1 —
|
|
64
|
+
## Segment 1 — spec → dev chain
|
|
49
65
|
|
|
50
|
-
SMALL feature (lean default): `@product` → `@sheldon` → `@dev
|
|
66
|
+
SMALL feature (lean default): `@product` → `@sheldon` → `@dev`. Under autopilot: `@product`, once the PRD is settled, seeds the scheme and invokes `@sheldon`; `@sheldon`, once sizing/enrichment is confirmed and its lean-lane artifacts + `dev-state.md` are written, completes its own stage (`aioson workflow:next . --complete=sheldon`) and invokes `@dev`. The full-merged SMALL detour auto-chains `@analyst` → `@architect` → `@dev` when opted in (with `@scope-check`/`@discovery-design-doc` only if the sequence adds them).
|
|
51
67
|
|
|
52
|
-
MEDIUM feature (maestro default): `@product` → `@orchestrator` → `@dev
|
|
68
|
+
MEDIUM feature (maestro default): `@product` → `@orchestrator` → `@dev`. Under autopilot: `@product` seeds + invokes `@orchestrator`; `@orchestrator`, once its gated spec package (Gates A/B/C approved, readiness ready) + `dev-state.md` are written, invokes `@dev`. The maestro fans out to `@analyst`/`@architect`/`@pm` as sub-agents, not as workflow stages; those chain as stages only under an opt-in full-chain detour.
|
|
53
69
|
|
|
54
|
-
|
|
70
|
+
Crossing into `@dev` goes through the `dev-state.md` cold-start packet the spec agent writes — `@dev`'s session-start protocol loads only that minimal package, so `@dev` does not inherit the heavy upstream chat; transparent auto-compact trims the rest. That is why the crossing is safe without a manual `/compact`. The spec agent still stops with the normal manual `/dev` recommendation if it has an open product/scope/sizing decision or a gate it owns is not approved. Recommend `/clear` only when the user needs a hard reset, a feature switch, polluted context, or a security-sensitive reset.
|
|
55
71
|
|
|
56
72
|
## Segment 2 — post-dev review cycle (hub = `@qa`)
|
|
57
73
|
|
|
@@ -84,7 +100,7 @@ Routing table (each row is followed only when autopilot is active and no stop co
|
|
|
84
100
|
## Stop conditions — break the chain and emit the normal manual handoff
|
|
85
101
|
|
|
86
102
|
1. **`feature:close` / publish** — ALWAYS the human gate. When `@qa` (PASS, nothing pending) or `@validator` (PASS) is the last clean step, STOP and recommend `aioson feature:close . --feature={slug}`. Never auto-run `feature:close`, `feature:archive`, `npm publish`, or any publish/close action.
|
|
87
|
-
2. **
|
|
103
|
+
2. **Genuine human decision open** — a spec agent with an unresolved product/scope/sizing question (an open `AskUserQuestion`, or a gate it owns not yet approved) finishes that decision with the human before any auto-invoke, and stops with the normal manual handoff. Autopilot removes mechanical stops, never real decisions. (This replaces the old "always stop before the first `@dev`" rule: the crossing is now automatic once the spec agent's own decisions are settled and `dev-state.md` is written.)
|
|
88
104
|
3. **Corrections cap reached** — review cycles are bounded by `agentic_policy.review_cycle` (default 3); when `review-cycle:advance` returns `stop_cycle_limit`, stop and escalate to the human.
|
|
89
105
|
4. **Critical security finding** — the `@qa` corrections security gate (auth/secret/credential/session/password/token/PII/encryption keywords) blocks the auto-loop; stop and require human intervention.
|
|
90
106
|
5. **Verdict not clean / gate or readiness blocked** — the `@orchestrator` maestro spec package not gate-approved (Gates A/B/C) or its readiness `blocked`, `@validator` FAIL with no safe corrections path (and, when present as detours, `@architect` Gate B / merged-mode readiness `blocked`, `@pm` Gate C blocked, `@scope-check` not `approved`/`patched`, or `@discovery-design-doc` readiness `blocked`): stop and route to the owner manually.
|
|
@@ -11,7 +11,7 @@ On-demand detail for @dev's `## Phase loop` kernel section. Applies when a phase
|
|
|
11
11
|
|
|
12
12
|
## The loop
|
|
13
13
|
|
|
14
|
-
**Auto-continue is the default —
|
|
14
|
+
**Auto-continue is the default and it is imperative — a phased plan runs to the END OF THE FEATURE in one continuous drive, not one phase per turn** (`phase_loop.auto_continue` in `.aioson/config/verification.json`). After a phase's gate is clean you will feel the pull to stop and report "Phase N done — continue?"; that pull is the exact bug this loop exists to defeat. Do NOT stop, do NOT ask, do NOT summarize-and-end between phases — proceed straight into the next phase. The per-phase verification report is the checkpoint that replaces the human "continue?": a clean report advances automatically; a failing one (after in-phase fix retries) is the only thing that halts the loop mid-feature. The run otherwise halts only at the end-of-feature gate or at a genuine hard stop (real ambiguity, a blocked gate, or a context ceiling on a host without transparent auto-compact). Set `auto_continue: false` only if you deliberately want to pause for confirmation between phases.
|
|
15
15
|
|
|
16
16
|
After finishing each phase:
|
|
17
17
|
|
|
@@ -21,15 +21,17 @@ After finishing each phase:
|
|
|
21
21
|
```bash
|
|
22
22
|
aioson verification:plan . --feature={slug} --trigger=per-phase --json
|
|
23
23
|
```
|
|
24
|
-
For every agent with `run: true`, dispatch
|
|
25
|
-
- `mode:
|
|
26
|
-
- `mode: external` → only the explicitly configured cross-vendor auditor (`cross_check`); never spawn one otherwise.
|
|
24
|
+
For every agent with `run: true`, use `aioson agent:execution:dispatch . --feature={slug} --agent={agent} --json`. The resolved manifest is authoritative for host/model/mode. Validate model aliases before dispatch and preserve the distinct requested/resolved model, resolution strategy, and optional reasoning effort in state and reports; ambiguity or an unsupported effort is a real pause before spawn. A `unsupported_capability` or `manifest_invalid` result is also a real pause: never imitate a sub-agent or fresh session in prose. Only `external` execution backed by an installed CLI, or a native capability explicitly exposed by the current harness, may run.
|
|
25
|
+
- `mode: external` → the portable default: an installed host CLI runs headlessly in a fresh process, waits for exit, and must write the bound JSON report. This creates an isolated headless context, not a new interactive chat window.
|
|
27
26
|
Read the report: **PASS** → continue. **Bugs** → fix them within this phase, re-run `harness:check`, and re-dispatch — up to `phase_loop.max_fix_retries_per_phase` times, then stop and surface the failure instead of advancing.
|
|
28
|
-
4. **
|
|
27
|
+
4. **Checkpoint, then keep going — do NOT end the turn.** Write the cold-start packet as a crash/interrupt safety net:
|
|
29
28
|
```bash
|
|
30
29
|
aioson dev:state:write # slug, completed phase, next phase, manifest path, required context, decisions
|
|
31
30
|
```
|
|
32
|
-
|
|
31
|
+
Then continue **immediately** into the next phase in the SAME turn. Context management is the host's job, never a reason to stop:
|
|
32
|
+
- **Claude Code (and any host with transparent auto-compact):** never self-issue `/compact` and never end your turn between phases. Auto-compact shrinks context in place when it fills — you just keep implementing. With `compact_between_phases: true`, "compact" means *write the checkpoint above*, NOT *stop for a manual compaction*.
|
|
33
|
+
- **codex / opencode (no transparent auto-compact):** the host wrapper re-enters on a fresh context and reloads via `aioson dev:resume-data .`. Only these hosts break the turn, and only their wrapper — never a bare prompt — restarts the loop.
|
|
34
|
+
The checkpoint exists so an interrupted run resumes cheaply, not so you pause. A phase boundary with a clean gate is a checkpoint, never a stopping point.
|
|
33
35
|
5. **End-of-feature gate (after the last phase only).** Hand off to `@qa`, which runs the full runtime smoke (build + migrate + boot + Core happy-path) plus `@tester`/`@pentester`/`@validator` per:
|
|
34
36
|
```bash
|
|
35
37
|
aioson verification:plan . --feature={slug} --trigger=end-of-feature
|
|
@@ -40,7 +42,7 @@ After finishing each phase:
|
|
|
40
42
|
- The per-phase check is **light**: one cheap-tier sub-agent, changed-files scope, capped by `budget.max_subagents_per_phase`.
|
|
41
43
|
- It is **suppressed on MICRO** (`budget.skip_on_micro`) — MICRO phases just auto-continue with no sub-agent.
|
|
42
44
|
- The **expensive full runtime smoke runs once**, at end-of-feature only (`budget.full_smoke = end-of-feature-only`) — never per phase.
|
|
43
|
-
-
|
|
45
|
+
- Context stays small without stopping: on Claude Code transparent auto-compact shrinks it in place as it fills, and the between-phase `dev:state:write` checkpoint lets any compaction (auto or a host-driven fresh context) resume the next phase cheaply. You get the small-context savings without ever ending the turn.
|
|
44
46
|
|
|
45
47
|
## Configuration
|
|
46
48
|
|
|
@@ -29,14 +29,56 @@ Play manages global LLM connections in Settings:
|
|
|
29
29
|
|
|
30
30
|
Apps should not store Play LLM secrets in repository files or frontend code.
|
|
31
31
|
|
|
32
|
+
Env vars Play injects at spawn (one per configured connection, since 2026-07-02):
|
|
33
|
+
|
|
34
|
+
| Play LLM connection | Injected env var |
|
|
35
|
+
|---|---|
|
|
36
|
+
| OpenAI | `OPENAI_API_KEY` |
|
|
37
|
+
| Claude (Anthropic) | `ANTHROPIC_API_KEY` |
|
|
38
|
+
| OpenRouter | `OPENROUTER_API_KEY` |
|
|
39
|
+
| Google Gemini | `GEMINI_API_KEY` |
|
|
40
|
+
| DeepSeek | `DEEPSEEK_API_KEY` |
|
|
41
|
+
| xAI | `XAI_API_KEY` |
|
|
42
|
+
|
|
43
|
+
Alongside the keys, Play injects **`AIOSON_LLM_CHAIN`** (since 2026-07-02): a
|
|
44
|
+
JSON string WITHOUT keys carrying the validated model per operation and the
|
|
45
|
+
fallback order the user arranged in Play Settings:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"exportedAt": "2026-07-02T18:00:00.000Z",
|
|
50
|
+
"appScope": null,
|
|
51
|
+
"configs": [
|
|
52
|
+
{
|
|
53
|
+
"provider": "openrouter",
|
|
54
|
+
"operation": "text_generation",
|
|
55
|
+
"model": "deepseek/deepseek-chat",
|
|
56
|
+
"baseUrl": "https://openrouter.ai/api/v1",
|
|
57
|
+
"priority": 1
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
32
63
|
Expected app behavior:
|
|
33
64
|
|
|
34
65
|
- Prefer app-local explicit config only when the app intentionally lets the user override provider settings.
|
|
35
|
-
- Otherwise read provider API keys injected by Play during spawn
|
|
66
|
+
- Otherwise read the provider API keys injected by Play during spawn (table above).
|
|
67
|
+
- **Do not hardcode models.** For each operation the app needs (`text_generation`, `image_understanding`, `speech_to_text`, ...), pick the first `configs[]` entry for that operation (sorted by `priority`) whose provider has its `*_API_KEY` present, and use that entry's `model` and `baseUrl`. Fall back to app defaults only when `AIOSON_LLM_CHAIN` is absent or has no entry for the operation.
|
|
68
|
+
- Gemini, DeepSeek and xAI are OpenAI-compatible — reuse an OpenAI-compatible client pointed at the entry's `baseUrl`.
|
|
36
69
|
- Lazy-initialize LLM clients. Do not instantiate SDK clients at module load, because missing keys can crash the backend before the app can render a degraded state.
|
|
37
|
-
- Treat `
|
|
70
|
+
- Treat `AIOSON_LLM_CHAIN` as metadata/order only. It never contains API keys.
|
|
38
71
|
- Treat `aioson-models.json` or `llm-chain.json` in the app cwd as optional/legacy for installed apps, not the primary credential contract.
|
|
39
72
|
|
|
73
|
+
Injection lifecycle — env vars only exist at spawn time:
|
|
74
|
+
|
|
75
|
+
- Play injects on UI-driven spawn of an installed app AND on draft preview (`spawn_draft`), so an app under development tests with the same contract it will have once installed.
|
|
76
|
+
- Supervisor auto-respawn preserves the keys from the original spawn.
|
|
77
|
+
- A process that is already running does NOT pick up a key configured afterwards. After adding or changing a Play LLM connection, stop and reopen the app (or the draft preview).
|
|
78
|
+
- A backend started by hand outside Play (`npm run dev` in a terminal or agent session) receives nothing — set the key in that shell env or use app-local config for that scenario.
|
|
79
|
+
|
|
80
|
+
Troubleshooting "provider not configured" in the app UI while the Play connection exists: (1) the app process started before the key was configured — close and reopen the app; (2) the backend is running outside Play; (3) the app expects a provider the user did not configure — Play injects only the keys that exist, one env var per provider.
|
|
81
|
+
|
|
40
82
|
Recommended lazy pattern:
|
|
41
83
|
|
|
42
84
|
```ts
|
|
@@ -178,7 +220,9 @@ await fetch(`${PLAY_BASE}/api/bindings/${APP_SLUG}`, {
|
|
|
178
220
|
|
|
179
221
|
## Executing connectors
|
|
180
222
|
|
|
181
|
-
After binding, execute through ProductBridge by alias
|
|
223
|
+
After binding, execute through ProductBridge by alias. The SAME endpoint runs
|
|
224
|
+
all three connector types (`mcpi`, `api`, `mcp`) — Play routes by the
|
|
225
|
+
connector's type (since 2026-07-02):
|
|
182
226
|
|
|
183
227
|
```http
|
|
184
228
|
POST http://localhost:5180/api/mcp/execute
|
|
@@ -188,14 +232,33 @@ Content-Type: application/json
|
|
|
188
232
|
"alias": "busca-produtos",
|
|
189
233
|
"params": {
|
|
190
234
|
"search": "dipirona"
|
|
191
|
-
}
|
|
235
|
+
},
|
|
236
|
+
"tool": "tool-name"
|
|
192
237
|
}
|
|
193
238
|
```
|
|
194
239
|
|
|
195
|
-
|
|
240
|
+
`tool` is optional and only used for `mcp` connectors that expose more than
|
|
241
|
+
one tool (a server with exactly one tool needs no `tool` field).
|
|
242
|
+
|
|
243
|
+
Response shape is the same for all types:
|
|
244
|
+
`{ "data": <json>, "error": null | "message", "duration_ms": <n> }`.
|
|
245
|
+
|
|
246
|
+
What each type does:
|
|
247
|
+
|
|
248
|
+
- `mcpi` — runs the query template on the TARGET database of the Play
|
|
249
|
+
Database Connection (credentials from Play's keyring), `{{param}}` becomes a
|
|
250
|
+
prepared-statement bind. Drivers: postgresql, mysql, sqlite.
|
|
251
|
+
- `api` — HTTP request to the connector URL: `{{param}}` interpolated into the
|
|
252
|
+
URL (percent-encoded); leftover params become query string (GET/DELETE) or a
|
|
253
|
+
JSON body (POST/PUT); auth headers from Play's keyring are applied.
|
|
254
|
+
- `mcp` — LOCAL stdio MCP server: Play spawns the connector command, performs
|
|
255
|
+
the JSON-RPC handshake (initialize → tools/list → tools/call) and returns
|
|
256
|
+
the tool result. Spawn per call, 60s timeout.
|
|
196
257
|
|
|
197
|
-
|
|
198
|
-
|
|
258
|
+
MCP scope today: local stdio servers only (auth via the command's own
|
|
259
|
+
env/args — no OAuth involved). REMOTE MCP servers over HTTP, which use OAuth
|
|
260
|
+
2.1 per the MCP spec, are NOT supported yet — do not fake them with manual
|
|
261
|
+
headers; treat that binding as unavailable and degrade.
|
|
199
262
|
|
|
200
263
|
## Degraded state
|
|
201
264
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aioson.dev/schemas/agent-execution-v1.json",
|
|
4
|
+
"title": "AIOSON Agent Execution Manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "feature", "host", "agents", "capacity_policy", "cycle_limits", "reporting"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": { "const": 1 },
|
|
9
|
+
"feature": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
10
|
+
"host": { "enum": ["claude", "codex", "opencode"] },
|
|
11
|
+
"agents": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["dev", "qa", "tester", "pentester", "validator"],
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {
|
|
16
|
+
"dev": { "$ref": "#/$defs/agent" }, "qa": { "$ref": "#/$defs/agent" }, "tester": { "$ref": "#/$defs/agent" }, "pentester": { "$ref": "#/$defs/agent" }, "validator": { "$ref": "#/$defs/agent" }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"$defs": {
|
|
21
|
+
"agent": {
|
|
22
|
+
"type": "object", "additionalProperties": false,
|
|
23
|
+
"required": ["enabled", "host", "mode", "model", "writable_roots", "fallbacks", "report"],
|
|
24
|
+
"properties": { "enabled": {"type":"boolean"}, "host":{"enum":["claude","codex","opencode"]}, "mode":{"enum":["fresh-session","subagent","external","current-session"]}, "model":{"type":"string","minLength":1,"maxLength":200}, "reasoning_effort":{"enum":["low","medium","high","xhigh","max","ultra"]}, "writable_roots":{"type":"array","items":{"type":"string","minLength":1}}, "fallbacks":{"type":"array"}, "report":{"type":"string"} }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -28,6 +28,23 @@ It helps the agent make strong decisions when the user wants a deliberate, high-
|
|
|
28
28
|
- Do not combine it with any other design skill.
|
|
29
29
|
- Use it when the user wants strong design craft but has not asked for a very specific visual system.
|
|
30
30
|
|
|
31
|
+
## Identity resolution (run FIRST, before any visual decision)
|
|
32
|
+
|
|
33
|
+
Resolve an `identity.md` in this order: `.aioson/briefings/{slug}/identity.md` (feature scope) →
|
|
34
|
+
`.aioson/context/identity.md` (project brand) → none.
|
|
35
|
+
|
|
36
|
+
- **If one exists, it is the identity source of truth this engine APPLIES**: take palette,
|
|
37
|
+
typography, spacing/layout, radius & depth, motion, design pillars, and signature moves from it as
|
|
38
|
+
the token layer, and feed its `## Component structure notes` into component/screen decisions. It is
|
|
39
|
+
extracted **data** (from the user's reference images via `reference-identity-extract`) that
|
|
40
|
+
parameterizes this one engine — never a second design skill, and never a license to skip the
|
|
41
|
+
quality gates below.
|
|
42
|
+
- **If none exists**, run intent-first: choose the surface type, domain palette, and signature move
|
|
43
|
+
yourself per the references. Do not fabricate an `identity.md`.
|
|
44
|
+
|
|
45
|
+
Every consumer of this package (ux-ui, prototype-forge, dev builds) inherits this step by loading
|
|
46
|
+
this SKILL — see `.aioson/docs/reference-identity.md`.
|
|
47
|
+
|
|
31
48
|
## Loading guide
|
|
32
49
|
|
|
33
50
|
| Task | Load |
|