@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.
Files changed (105) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/docs/en/1-understand/ecosystem-map.md +1 -1
  3. package/docs/en/1-understand/glossary.md +1 -1
  4. package/docs/en/2-start/first-project.md +1 -1
  5. package/docs/en/2-start/initial-decisions.md +4 -2
  6. package/docs/en/3-recipes/from-idea-to-prd-via-briefing.md +8 -1
  7. package/docs/en/3-recipes/full-feature-with-sheldon.md +3 -1
  8. package/docs/en/4-agents/README.md +6 -3
  9. package/docs/en/4-agents/briefing-refiner.md +146 -0
  10. package/docs/en/5-reference/README.md +1 -0
  11. package/docs/en/5-reference/autopilot-handoff.md +286 -0
  12. package/docs/en/5-reference/cli-reference.md +6 -0
  13. package/docs/pt/1-entender/glossario.md +1 -1
  14. package/docs/pt/1-entender/mapa-do-ecossistema.md +1 -1
  15. package/docs/pt/2-comecar/decisoes-iniciais.md +4 -2
  16. package/docs/pt/2-comecar/primeiro-projeto.md +1 -1
  17. package/docs/pt/3-receitas/da-ideia-ao-prd-via-briefing.md +8 -1
  18. package/docs/pt/3-receitas/feature-completa-com-sheldon.md +3 -1
  19. package/docs/pt/4-agentes/README.md +13 -11
  20. package/docs/pt/4-agentes/briefing-refiner.md +64 -40
  21. package/docs/pt/4-agentes/briefing.md +6 -1
  22. package/docs/pt/4-agentes/dev.md +19 -1
  23. package/docs/pt/4-agentes/deyvin.md +4 -0
  24. package/docs/pt/4-agentes/discover.md +4 -0
  25. package/docs/pt/4-agentes/neo.md +4 -0
  26. package/docs/pt/4-agentes/orache.md +6 -0
  27. package/docs/pt/4-agentes/orchestrator.md +12 -0
  28. package/docs/pt/4-agentes/pentester.md +6 -0
  29. package/docs/pt/4-agentes/product.md +19 -1
  30. package/docs/pt/4-agentes/qa.md +10 -2
  31. package/docs/pt/4-agentes/setup.md +3 -1
  32. package/docs/pt/4-agentes/sheldon.md +12 -0
  33. package/docs/pt/4-agentes/tester.md +6 -0
  34. package/docs/pt/4-agentes/ux-ui.md +2 -1
  35. package/docs/pt/5-referencia/README.md +1 -1
  36. package/docs/pt/5-referencia/agent-chain-continuity.md +1 -1
  37. package/docs/pt/5-referencia/autopilot-handoff.md +191 -74
  38. package/docs/pt/5-referencia/comandos-cli.md +16 -7
  39. package/docs/pt/5-referencia/skills.md +2 -0
  40. package/docs/pt/agentes.md +3 -1
  41. package/package.json +1 -1
  42. package/src/agent-execution/adapters/base.js +15 -0
  43. package/src/agent-execution/adapters/claude.js +3 -0
  44. package/src/agent-execution/adapters/codex.js +3 -0
  45. package/src/agent-execution/adapters/opencode.js +3 -0
  46. package/src/agent-execution/capabilities.js +9 -0
  47. package/src/agent-execution/dispatcher.js +72 -0
  48. package/src/agent-execution/executable-resolver.js +7 -0
  49. package/src/agent-execution/manifest.js +62 -0
  50. package/src/agent-execution/model-catalog.js +80 -0
  51. package/src/agent-execution/model-resolver.js +132 -0
  52. package/src/agent-execution/reports.js +9 -0
  53. package/src/agent-execution/schema.js +48 -0
  54. package/src/agent-execution/telemetry-bridge.js +15 -0
  55. package/src/agents.js +1 -1
  56. package/src/artifact-kinds.js +2 -1
  57. package/src/autopilot-signal.js +71 -0
  58. package/src/cli.js +31 -5
  59. package/src/commands/agent-execution.js +36 -0
  60. package/src/commands/agents.js +18 -2
  61. package/src/commands/briefing.js +337 -1
  62. package/src/commands/feature-close.js +136 -43
  63. package/src/commands/live.js +47 -11
  64. package/src/commands/op-capture.js +33 -3
  65. package/src/commands/op-reinforce.js +10 -22
  66. package/src/commands/update.js +5 -1
  67. package/src/commands/verification-plan.js +56 -12
  68. package/src/commands/verify-artifact.js +64 -1
  69. package/src/commands/workflow-execute.js +168 -36
  70. package/src/commands/workflow-next.js +60 -16
  71. package/src/doctor.js +4 -2
  72. package/src/harness/criteria-runner.js +4 -1
  73. package/src/i18n/messages/en.js +2 -1
  74. package/src/i18n/messages/es.js +2 -1
  75. package/src/i18n/messages/fr.js +2 -1
  76. package/src/i18n/messages/pt-BR.js +2 -1
  77. package/src/lib/briefing-refiner/apply-feedback.js +18 -4
  78. package/src/lib/briefing-refiner/feedback-schema.js +73 -4
  79. package/src/lib/briefing-refiner/refinement-report.js +11 -0
  80. package/src/lib/briefing-refiner/review-html.js +388 -68
  81. package/src/operator-memory/decision.js +41 -0
  82. package/src/parser.js +6 -0
  83. package/src/runtime-store.js +167 -8
  84. package/template/.aioson/agents/briefing-refiner.md +87 -47
  85. package/template/.aioson/agents/briefing.md +4 -0
  86. package/template/.aioson/agents/dev.md +9 -2
  87. package/template/.aioson/agents/deyvin.md +4 -0
  88. package/template/.aioson/agents/discover.md +4 -0
  89. package/template/.aioson/agents/neo.md +4 -0
  90. package/template/.aioson/agents/orache.md +4 -0
  91. package/template/.aioson/agents/orchestrator.md +16 -0
  92. package/template/.aioson/agents/pentester.md +4 -0
  93. package/template/.aioson/agents/product.md +26 -1
  94. package/template/.aioson/agents/qa.md +5 -1
  95. package/template/.aioson/agents/sheldon.md +9 -1
  96. package/template/.aioson/agents/tester.md +4 -0
  97. package/template/.aioson/agents/ux-ui.md +1 -1
  98. package/template/.aioson/docs/agent-help.md +126 -0
  99. package/template/.aioson/docs/autopilot-handoff.md +32 -16
  100. package/template/.aioson/docs/dev/phase-loop.md +9 -7
  101. package/template/.aioson/docs/play/llm-data-and-bindings.md +70 -7
  102. package/template/.aioson/schemas/agent-execution.schema.json +28 -0
  103. package/template/.aioson/skills/design/interface-design/SKILL.md +17 -0
  104. package/template/AGENTS.md +36 -36
  105. package/template/CLAUDE.md +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [1.37.1] - 2026-07-11
8
+
9
+ ### Added
10
+ - Intelligent, bounded resolution of human-readable and approximate Codex model names.
11
+ - Separate reasoning-effort propagation and model-resolution metadata across execution, reports, telemetry, and verification.
12
+
13
+ ### Changed
14
+ - **Operator-memory promotion threshold is now per signal type.** `authorization`, `exclusion`, and `correction` are single explicit standing decisions and promote to a decision on **first** detection; `confirmation` still needs **2×** (it must repeat to distinguish a pattern from a one-off acceptance). Previously all four required 2× (`op-capture.js`), so a firmly-stated one-shot correction/authorization never persisted unless the agent emitted `op:capture` twice. Aligns the storage engine with the signal taxonomy already documented in `agents/_shared/memory-capture-directive.md`. New `promotionThresholdFor(signalType)` helper.
15
+
16
+ ### Fixed
17
+ - **Re-detecting an already-promoted decision no longer duplicates its FTS row or resets `promoted_at`.** `op:capture` now reinforces in place — bumps `reinforcement_count` + refreshes `last_reinforced` (PMD-11) via the new `decision.reinforceDecision` primitive — instead of re-running promotion when a decision for the slug already exists (the stray proposal from re-detection is dropped). This latent double-insert also affected the old uniform-2× flow on the 3rd+ detection of the same signal.
18
+
19
+ ## [1.37.0] - 2026-07-06
20
+
21
+ **Full-feature autopilot + CLI-owned briefing refinement.** Two independent arcs land together. A feature built the normal way (`@product` → `@sheldon`/`@orchestrator` → `@dev`) can now run unattended through `@qa`/`@tester`/`@pentester`/`@validator` to `feature:close` — stopping only at genuine human decisions; `@product` asks the run mode once at kickoff (no hidden flag), settable inline (`--auto`/`--step`) or disarmed per feature. Separately, `@briefing-refiner`'s review surface stops being hand-written every round: the CLI now owns the schema, the render, and the apply, closing an explicit iterate-until-clean loop.
22
+
23
+ ### Added
24
+ - **Full-feature autopilot.** `workflow:execute --seed` seeds the agentic scheme without advancing (idempotent, feature-scoped); `@product`/`@sheldon`/`@orchestrator` seed it and cross the pre-`@dev` gate via the `dev-state.md` cold-start packet; `@dev`/`@qa` honor it through the post-dev review cycle. `@product` asks the run mode on screen at kickoff (Autopilot / Step by step / Always autopilot) — never silent-manual by default. (`e24bfa5`, `9afc993`)
25
+ - **Inline run-mode tokens** `--auto`/`--step` — `/product --auto <task>` / `/product --step <task>` answer the kickoff question inline (highest precedence); `/dev --auto` / `/dev --step` arm or disarm autopilot mid-chain for the current feature. Disarm is record-only (`workflow:execute --seed --step`) and beats a project-wide `auto_handoff: true` for that feature. (`70e826b`)
26
+ - **`--help` activation token** on the 13 most-used agents — localized quick help (what/when/options/artifacts/next agents), zero kernel-byte cost beyond a 3-line trigger to the shared `agent-help.md`. (`bafaa2a`)
27
+ - **`aioson briefing:review`** — parses `briefings.md`, strictly validates the agent's audit findings (`refinement-findings.json`: category/severity/blocking/recommendation per section), and renders the localized `review.html` + canonical `refinement-feedback.json` (schema **v1.1**: `findings[]` + `round`) + `refinement-report.md`. Refuses to clobber user-exported pending feedback (`--force` to override); the round counter survives applies via the per-round archives. (`43661a7`)
28
+ - **`aioson briefing:apply-feedback`** — dry-run validation + summary without `--confirm` (the agent presents it and asks), real apply with it: structured-JSON-only edits, mandatory sections preserved, `approved` → `draft` revert, consumed feedback/findings archived as `*.applied-round{N}.json`. A **pending blocking finding** forces `resolve_blockers` even when `blocking_items` is empty. `--declined` records skipped changes without touching the briefing. (`43661a7`)
29
+ - **`review.html` v2** — audit findings rendered per section with their own decision (`pending`/`accepted`/`rejected`/`deferred`) and working category filters; **localStorage autosave + draft restore** (closing the tab loses nothing); File System Access saves with a persistent handle and **degrades to download on SecurityError** (the sandboxed-preview bug); a **copy-path** affordance next to the save target and a stable save-picker id so the OS dialog reopens in the briefing folder on later rounds; en/pt localized surface. (`43661a7` + polish)
30
+ - **`verify:artifact --kind=review`** + `briefing-refiner` in `AGENT_ARTIFACT_KIND` — the done-gate auto-fires at `agent:done --slug=...` and rejects hand-rolled surfaces (missing marker / fallbacks / external resources / invalid feedback JSON); staleness after an apply is advisory. (`43661a7`)
31
+
32
+ ### Fixed
33
+ - **`@dev` phase-loop no longer self-stops.** The loop told `@dev` to `/compact` between phases — on Claude Code that ends the turn, so a feature ran one phase and waited instead of driving to the end. `@dev` never self-issues `/compact` now; `verification:plan` emits a deterministic `continuation_directive` instead. (`3a0fd34`)
34
+ - **Autopilot chain-integrity audit** — four bugs behind the same reported symptom ("dev finished → manual /qa handoff"): a lean-lane `@sheldon` stage could re-activate backwards after `@dev` completed; tracked sessions didn't consult the seeded scheme as an autopilot signal; `--seed` hard-failed on a stale abandoned-feature guard instead of reseeding; downstream triggers didn't check the seeded scheme's feature slug against the current one. (`a0010cd`)
35
+ - **Boolean-only argv flags** — `--seed` / `--seed-only` / `--confirm` / `--declined` / `--allow-stale` / `--step` could each swallow the path positional (e.g. `--declined .` silently defaulted to cwd). (`8a9999a`, `abc1058`, `70e826b`)
36
+ - **`feature:close` retires per-feature runtime pointers** (`dev-state.md`, `workflow.state.json`, `workflow-execute.json`) when they reference the closed slug, so a future `@dev` cold-start can't "resume" a done feature and the next feature's `--seed` doesn't collide. (`bd34451`)
37
+ - **Declined feedback no longer dead-ends the loop** — `briefing:apply-feedback --declined` archives the consumed feedback (`refinement-feedback.declined-round{N}.json`, findings kept since the briefing did not change) so the next `briefing:review` regenerates without `--force`, the declined round still counts toward the round counter, and declining stale feedback is allowed (decline writes nothing, so the source-hash guard does not apply). `kind=review` external-resource check hardened against false positives from briefing text quoting HTML/CSS. (`abc1058`)
38
+ - **Windows executable resolver** never tests the extensionless candidate on `win32` — npm's extensionless shim is a shell script that `ENOENT`s on spawn despite existing (hit via `codex`/`opencode`); malformed `PATHEXT` empty segments are filtered, and a spawn failure between `spawn()` and the child-wait now fails cleanly instead of surfacing as an unhandled error (or a false exit code 0). (`25dcb60`)
39
+
40
+ ### Changed
41
+ - **`@briefing-refiner`** rewritten around the CLI: explicit refinement-loop contract (generate → collect → dry-run + confirm apply → regenerate while blockers or material text changes remain → exit to `briefing:approve`/`@product` or prototype mode); handoff names the three feedback-return routes (direct save / download+replace / **paste JSON in the chat**) and instructs opening `review.html` in a real browser — editor previews are sandboxed; a non-blocking finding nudges the reference-image identity route for rich surfaces with no `identity.md`; the V1 "no dedicated refinement CLI" constraint is retired. Answers left in finding/section `note` fields are folded into `current_text` by the agent before the CLI writes — notes alone never reach the briefing. (`ad22cda`, `abc1058`)
42
+ - **`identity.md` reaches every consumer of the `interface-design` engine** — the engine's SKILL now resolves it first (briefing scope → project brand → intent-first) so any consumer inherits the step; `@dev` reads it as a feature-mode UI input next to the prototype reference (a lean-lane feature without prototype/ux-ui no longer ships generic visuals over an existing brand); `@ux-ui`'s blank-`design_skill` stop offers the reference-image route alongside presets, mirroring `@setup`. (`35891f9`)
43
+ - **Docs sweep** — `autopilot-handoff.md` rewritten to the current model (tokens, precedence, seeding, stop conditions) with an English counterpart; 14 PT/EN pages updated to the CLI-owned refinement loop and identity routes; agent-count headers and cycle-cap references corrected. (`95b99d5`, `90c77d1`, `16f9172`, `4c6507e`)
44
+
45
+ Suite green (3587 pass / 0 fail / 1 skip).
46
+
5
47
  ## [1.36.0] - 2026-06-30
6
48
 
7
49
  **Reference-image-driven visual identity.** A project's UI no longer has to inherit a fixed design preset's identical look (the generic, "made-by-AI" sameness). The user provides reference images — a brand/identity set and an optional component/structure set — which are extracted **once** into a text `identity.md` that the `interface-design` engine applies. The build reads the text, never the images, so it ports to a vision-less harness, is user-editable, and is gateable. Purely **additive** — the fixed presets stay as raw material for `@design-hybrid-forge` / `@site-forge`; the new path is the recommended default alongside them.
@@ -93,7 +93,7 @@ The default lane depends on the classification:
93
93
  | **`@pm`** | Backlog, user stories, implementation plan (Gate C). **Opt-in detour / fan-out sub-agent** (MEDIUM) | `tasks.md`, user stories |
94
94
  | **`@orchestrator`** | **MEDIUM maestro / single spec authority** — fans out `@analyst`/`@architect`/`@pm` (+ `@ux-ui` for UI-heavy) as sub-agents, consolidates the gated spec package. Secondary: coordinate parallel `@dev` lanes post-spec. | `parallel/`, execution plan, consolidated spec package |
95
95
  | **`@dev`** | Implements the feature — runs phases as a **loop**: auto-continues between phases, compacts context between phases, per-phase verification (light sub-agent). Full Runtime smoke runs once at end-of-feature. | Code + `dev-state.md` |
96
- | **`@qa`** | Writes tests, validates ACs, autonomous fix cycle (cap 2). Owns Gate D: **Runtime smoke gate** (build + migrations on real DB + boot + Core happy-path on REAL stack). | `test-plan.md`, `qa-report-*.md` |
96
+ | **`@qa`** | Writes tests, validates ACs, autonomous fix cycle (cap 3), hub of the post-dev autopilot review cycle. Owns Gate D: **Runtime smoke gate** (build + migrations on real DB + boot + Core happy-path on REAL stack). | `test-plan.md`, `qa-report-*.md` |
97
97
  | **`@validator`** | Technically validates against `harness-contract.json` in a **fresh isolated context** (detour when a harness contract exists) | `.aioson/plans/{slug}/last-validator-output.json` |
98
98
  | **`@tester`** | Systematic test engineering (legacy/brownfield) — triggered by `@qa` when conditions fire | `test-inventory.md`, coverage tier |
99
99
  | **`@pentester`** | Adversarial security review (OWASP, LLM Top 10). Inline in MEDIUM; opt-in in SMALL. | `security-findings-*.json` |
@@ -129,7 +129,7 @@ Terms in alphabetical order. Each entry has a **short definition** + **concrete
129
129
 
130
130
  **Ready-made examples:** Clean SaaS UI, Aurora Command UI, Cognitive Core UI, Bold Editorial UI, Warm Craft UI, Glassmorphism UI, Neo Brutalist UI.
131
131
 
132
- **Where to choose:** during `aioson init`, in the wizard.
132
+ **Where to choose:** during `aioson init`, in the wizard, or later with `@setup`/`@ux-ui`. The recommended route is the `interface-design` engine driven by your own **reference images**, extracted once into an `identity.md` the engine applies; the presets remain an explicit alternative.
133
133
 
134
134
  ---
135
135
 
@@ -218,7 +218,7 @@ You > @qa
218
218
  @qa > test-plan.md and qa-report.md saved. Feature ready.
219
219
  ```
220
220
 
221
- > **What's new:** the *autonomous QA→Dev cycle* (cap 2) lets `@qa` request small fixes without you having to manually reactivate it. Added in May/2026.
221
+ > **What's new:** the *autonomous QA→Dev cycle* (cap 3, `agentic_policy.review_cycle`) lets `@qa` request small fixes without you having to manually reactivate it. Under autopilot, this same cycle can chain all the way to `@tester`/`@pentester`/`@validator` and the `feature:close` recommendation without stopping — see [Autopilot handoff](../5-reference/autopilot-handoff.md).
222
222
 
223
223
  ---
224
224
 
@@ -134,7 +134,9 @@ npx @jaimevalasek/aioson squad:scaffold . --slug=compliance --name="Compliance"
134
134
 
135
135
  ## Choosing a Design System
136
136
 
137
- Available in the wizard:
137
+ > **Recommended route: `interface-design` + your own reference images.** Instead of inheriting a fixed preset's identical look, you provide reference images (identity/brand and, optionally, component structure); the `reference-identity-extract` skill converts them **once** into a text `identity.md` that the `interface-design` engine applies to everything downstream (prototype and build). `@setup` offers this route first — always with explicit confirmation, never auto-selected. The presets below remain available as an alternative.
138
+
139
+ Presets available in the wizard:
138
140
 
139
141
  | Skill | Style | Use cases |
140
142
  |---|---|---|
@@ -147,7 +149,7 @@ Available in the wizard:
147
149
  | **Neo Brutalist UI** | Black outlines, strong colors, no shadow | Bold brands |
148
150
 
149
151
  **Skipping** is a valid option. You can:
150
- - Choose later with `@ux-ui`
152
+ - Choose later with `@ux-ui` — it offers the same two routes (reference images or preset)
151
153
  - Clone a real site's design with `@site-forge`
152
154
  - Create a hybrid with `@design-hybrid-forge` (e.g., clean-saas + neo-brutalist)
153
155
 
@@ -23,6 +23,8 @@ vague idea / notes
23
23
 
24
24
  @briefing → .aioson/briefings/{slug}/briefings.md
25
25
 
26
+ (optional) @briefing-refiner → refinement loop: audit + review.html + apply-feedback
27
+
26
28
  aioson briefing:approve
27
29
 
28
30
  @product → prd.md (or prd-{slug}.md)
@@ -90,7 +92,11 @@ You > All.
90
92
 
91
93
  ### Step 3 — Review and approve
92
94
 
93
- Read `.aioson/briefings/push-notifications/briefings.md`. If it looks good:
95
+ Read `.aioson/briefings/push-notifications/briefings.md`.
96
+
97
+ > **Want a structured review before approving?** Activate [`@briefing-refiner`](../4-agents/briefing-refiner.md): it audits the briefing into structured findings (category, severity, blocking), the CLI renders the `review.html` surface (`aioson briefing:review . --slug=push-notifications`) where you decide each finding and edit each section **in a real browser**, and confirmed feedback is applied with `aioson briefing:apply-feedback . --slug=push-notifications --confirm` — in rounds, until nothing blocks the PRD.
98
+
99
+ If it looks good:
94
100
 
95
101
  ```bash
96
102
  aioson briefing:approve
@@ -235,4 +241,5 @@ plans/ ← your drafts (untouched)
235
241
  - [External plans for @product](./external-plans-for-product.md) — how to use ChatGPT/Claude.ai output as source for `plans/`
236
242
  - [Full feature with @sheldon](./full-feature-with-sheldon.md) — when the PRD is ready and the trail is SMALL/MEDIUM
237
243
  - [@briefing — agent sheet](../4-agents/briefing.md) — technical reference for the agent
244
+ - [@briefing-refiner — agent sheet](../4-agents/briefing-refiner.md) — briefing review/refinement loop before the PRD
238
245
  - [@product — agent sheet](../4-agents/product.md) — technical reference for the agent
@@ -19,6 +19,8 @@
19
19
 
20
20
  **Why order matters:** each agent reads the artifacts left by the previous one. Skipping the spec authority means `@dev` improvises — improvisation on big decisions becomes rework.
21
21
 
22
+ > **Step by step or autopilot?** This recipe walks the **manual** path — you invoke each agent yourself. But building the feature the normal way (`@product` → `@sheldon`/`@orchestrator` → `@dev` → `@qa`) can also run **on its own** up to the `feature:close` recommendation: `@product` asks the run mode once at the PRD handoff (or you decide up front with `/product --auto`/`/product --step`), and each agent auto-invokes the next. See [Autopilot handoff](../5-reference/autopilot-handoff.md) for the full chain, the inline tokens, and the stop conditions. The steps below still describe what each agent does under the hood, autopilot on or off.
23
+
22
24
  ---
23
25
 
24
26
  ## Scenario
@@ -305,7 +307,7 @@ Six months from now, anyone (or any AI) reads these files and understands **ever
305
307
  |---|---|
306
308
  | `@sheldon` complains the PRD is vague | Go back to `@product` and refine. `@sheldon` does not invent what is not clear. |
307
309
  | `@dev` phase loop stalls mid-phase | `@deyvin` picks up via `dev-state.md`. See [Continuity between sessions](./continuity-between-sessions.md). |
308
- | `@qa ↔ @dev` loop hit cap 2 | There is a design defect. Return to `@sheldon` or `@product` before writing more code. |
310
+ | `@qa ↔ @dev` loop hit cap 3 | There is a design defect. Return to `@sheldon` or `@product` before writing more code. |
309
311
  | `@pentester` HIGH finding won't clear | Don't force it. Document as accepted risk or defer the feature. |
310
312
  | `@orchestrator` creates only 1 lane | Your feature is probably SMALL in disguise. Use the `@sheldon` trail instead. |
311
313
  | Session dropped mid-`@dev` | `@deyvin` picks up. See [Continuity between sessions](./continuity-between-sessions.md). |
@@ -1,6 +1,6 @@
1
1
  # Agent cards — AIOSON (EN)
2
2
 
3
- This layer will hold one card per AIOSON agent (29 total), translated from [`docs/pt/4-agentes/`](../../pt/4-agentes/README.md).
3
+ This layer will hold one card per AIOSON agent (31 total), translated from [`docs/pt/4-agentes/`](../../pt/4-agentes/README.md).
4
4
 
5
5
  Cards are being translated progressively. Until a card is available here, the PT version is the canonical reference — it follows the same format and covers the same agents.
6
6
 
@@ -16,9 +16,11 @@ Cards are being translated progressively. Until a card is available here, the PT
16
16
 
17
17
  `@sheldon` (SMALL) and `@orchestrator` (MEDIUM) are the **single spec authorities** for their respective sizes. Agents like `@analyst`, `@architect`, `@pm`, `@ux-ui`, `@scope-check`, and `@discovery-design-doc` are **opt-in detours** or **fan-out sub-agents** — none deleted, none in the default hop sequence.
18
18
 
19
+ Building a feature the normal way through this lane can now run the whole chain automatically, up to the `feature:close` recommendation — `feature:close`/publish is always a human gate. See [Autopilot handoff](../5-reference/autopilot-handoff.md) for the run-mode decision (`--auto`/`--step` tokens, the `@product` kickoff question), the post-dev review cycle hub (`@qa` → `@tester`/`@pentester`/`@validator`), and the `--help` quick-help token available on the 13 most-used agents.
20
+
19
21
  ---
20
22
 
21
- ## The 29 agents (plus @pair alias)
23
+ ## The 31 agents (plus @pair alias)
22
24
 
23
25
  ### Workflow core
24
26
 
@@ -26,6 +28,7 @@ Cards are being translated progressively. Until a card is available here, the PT
26
28
  |---|---|
27
29
  | `@setup` | Project onboarding — detect stack, classify MICRO/SMALL/MEDIUM, write `project.context.md` |
28
30
  | `@briefing` | Pre-PRD framing — turn `plans/` sketches into structured briefings with gap analysis |
31
+ | [`@briefing-refiner`](./briefing-refiner.md) | Briefing refinement loop — audits the briefing into structured findings, the CLI renders the localized `review.html` surface (`briefing:review`), confirmed feedback is applied via `briefing:apply-feedback`, rounds repeat until nothing blocks the PRD |
29
32
  | `@product` | PRD — vision, problem, users, scope, acceptance criteria |
30
33
  | `@sheldon` | **SMALL single spec authority** (RF-LEAN): one pass produces requirements + spec (Gates A/B/C) + design-doc + readiness + implementation-plan + harness-contract. Also a PRD-hardening / enrichment capability usable in any lane. |
31
34
  | `@analyst` | Domain discovery — entities, flows, brownfield mapping. **Opt-in detour / fan-out sub-agent** (invoked by `@orchestrator` in MEDIUM) |
@@ -35,7 +38,7 @@ Cards are being translated progressively. Until a card is available here, the PT
35
38
  | `@pm` | Backlog, user stories, implementation plan (Gate C). **Opt-in detour / fan-out sub-agent** (MEDIUM) |
36
39
  | `@orchestrator` | **MEDIUM maestro / single spec authority** — fans out `@analyst`/`@architect`/`@pm` (+ `@ux-ui` for UI-heavy) as sub-agents, consolidates the gated spec package. Secondary: coordinate parallel `@dev` lanes post-spec. |
37
40
  | `@dev` | Feature implementation — any stack. Runs the plan as a **phase loop**: auto-continues between phases, per-phase verification (light sub-agent), context compaction between phases. Full Runtime smoke runs once at end-of-feature. |
38
- | `@qa` | Risk-first review, test generation, autonomous fix/test loop (cap 2). Owns Gate D: **Runtime smoke gate** (build + migrations on real DB + boot + Core happy-path on REAL stack). |
41
+ | `@qa` | Risk-first review, test generation, autonomous fix/test loop (cap 3), hub of the post-dev autopilot review cycle (routes to `@tester`/`@pentester`/`@validator`). Owns Gate D: **Runtime smoke gate** (build + migrations on real DB + boot + Core happy-path on REAL stack). |
39
42
  | `@validator` | Binary contract verification against `harness-contract.json` in a **fresh isolated context** (detour when a harness contract exists) |
40
43
  | [`@forge-run`](./forge-run.md) | Lane B (opt-in) — compile a MEDIUM feature's specs into an executable workflow and run it (`forge:compile`) |
41
44
  | `@tester` | Systematic test engineering — legacy and coverage gaps. Triggered by `@qa` when conditions fire. |
@@ -0,0 +1,146 @@
1
+ # @briefing-refiner — Review and refine a briefing before the PRD
2
+
3
+ > **Who this is for:** anyone who already has a briefing generated by `@briefing` and wants to review, annotate, and refine it before committing to a PRD.
4
+ > **Reading time:** 5 min.
5
+ > **What you'll know after:**
6
+ > - What `@briefing-refiner` does and where it fits in the flow.
7
+ > - How the round-based refinement loop works (audit → browser review → apply).
8
+ > - How the `review.html` surface actually saves (local autosave + 3 routes to return the JSON).
9
+
10
+ ## What it is for
11
+
12
+ Between the generated briefing and the PRD there is a step that usually gets skipped: **reviewing the briefing with a critical eye**. Ambiguities, redundancies, missing decisions, vague risks, and implementation-impact gaps go straight to `@product` and become debt in the PRD.
13
+
14
+ `@briefing-refiner` fills that step as a **loop of rounds**: it audits the briefing and records **structured findings** (category, severity, and whether they block the PRD); the CLI renders the deterministic review surface (`aioson briefing:review`); you decide each finding and edit each section in the browser; the structured feedback comes back and is applied (`aioson briefing:apply-feedback`) — and the cycle repeats until nothing blocks the PRD.
15
+
16
+ It is the complement of [`@briefing`](../../pt/4-agentes/briefing.md): one generates, the other refines.
17
+
18
+ ## When to invoke
19
+
20
+ - You already have a briefing in `.aioson/briefings/{slug}/briefings.md` and want to review it before the PRD.
21
+ - The briefing is `draft`, or `approved` but still **without a generated PRD** (`prd_generated: null`).
22
+ - You want to record comments, decide findings, request per-section changes, or flag blockers before moving on to `@product`.
23
+ - You want to **see the solution** before the PRD (prototype mode) and, optionally, define the visual identity from your reference images.
24
+
25
+ ## When NOT to invoke
26
+
27
+ - No briefing exists yet — go to [`@briefing`](../../pt/4-agentes/briefing.md) first.
28
+ - The briefing already produced a PRD (`prd_generated` filled) — refining would require a new PRD/enrichment route, outside this agent.
29
+ - The idea changed so much that regenerating from scratch is better — go back to `@briefing`.
30
+
31
+ ## The refinement loop
32
+
33
+ ```
34
+ audit (agent) → review.html (CLI) → you decide in the browser
35
+ ↑ ↓
36
+ regenerate the review ← apply confirmed feedback (CLI)
37
+ (while blockers or text changes remain)
38
+ ```
39
+
40
+ Each round is numbered (`round`) and archives the consumed feedback (`refinement-feedback.applied-round{N}.json`), so "`refinement-feedback.json` exists" = "there is pending feedback" — a deterministic signal.
41
+
42
+ ### 1. Generate the review
43
+
44
+ The agent audits the briefing and writes the findings to `refinement-findings.json`; the CLI validates and renders:
45
+
46
+ ```
47
+ You > @briefing-refiner
48
+
49
+ @briefing-refiner > Refinable briefing found: marketplace-v1 (draft).
50
+
51
+ Auditing... 10 findings (3 ambiguities, 2 gaps,
52
+ 1 blocking: commission model undefined).
53
+
54
+ aioson briefing:review . --slug=marketplace-v1 ✓ (round 1)
55
+
56
+ Open .aioson/briefings/marketplace-v1/review.html
57
+ in a REAL BROWSER (double-click) — editor previews
58
+ are sandboxed and block saving/downloading.
59
+ ```
60
+
61
+ ### 2. Apply pending feedback
62
+
63
+ The CLI validates (schema, slug, source hash) and does a **dry-run** with the summary; the agent asks for explicit confirmation before touching the briefing:
64
+
65
+ ```
66
+ @briefing-refiner > Pending feedback on marketplace-v1 (round 1):
67
+ - 4 sections changed, 1 blocked
68
+ - findings: 6 accepted, 2 rejected, 1 deferred, 1 pending (blocking)
69
+
70
+ Apply the confirmed changes? The pending blocking
71
+ finding keeps the PRD blocked.
72
+ You > Yes.
73
+
74
+ @briefing-refiner > aioson briefing:apply-feedback --confirm ✓
75
+ Applied; briefing reverted from approved to draft.
76
+ Blocker remains → regenerating the review (round 2)...
77
+ ```
78
+
79
+ If you decline, `briefings.md` stays intact and the skipped changes are recorded in the report. When no blocker remains: `aioson briefing:approve . --slug={slug}` → `@product`.
80
+
81
+ ## The review surface (review.html)
82
+
83
+ Rendered by the CLI (`aioson briefing:review`) — static, local, self-contained, and in your language:
84
+
85
+ - plain-text editable sections + per-section status (`unchanged`, `accepted`, `change_requested`, `remove_requested`, `blocked`) and notes;
86
+ - **audit findings rendered per section**, each with its own decision (`pending`/`accepted`/`rejected`/`deferred`) and note — with working category filters;
87
+ - a panel showing what changed, what blocks the PRD, and how many findings are still pending;
88
+ - **local autosave**: every edit is saved in the browser (localStorage) and restored on reopen — closing the tab loses nothing;
89
+ - **3 routes to return the JSON**: *Save to file* (File System Access, with an automatic fallback to download when the context is sandboxed), *Download JSON* (and move it over `refinement-feedback.json`), or *Copy JSON and paste it in the chat* — the lowest-friction route.
90
+
91
+ > **Why JSON and not the edited HTML?** The agent never treats the edited DOM/HTML as canonical feedback — only the structured `refinement-feedback.json` (schema v1.1, validated by source hash). That prevents applying inferred changes and keeps the process auditable.
92
+
93
+ > **Important:** open `review.html` in a real browser (double-click). Embedded editor previews run in a sandbox and block the file picker and downloads.
94
+
95
+ ## Prototype mode and visual identity (optional)
96
+
97
+ For rich-surface briefings (workspaces, boards, CRM/Kanban, dashboards, repeated-use CRUD), the agent recommends — without blocking — generating a clickable prototype before the PRD. This is the moment (or already during the review, via a non-blocking finding) where the **visual identity** comes in:
98
+
99
+ - you drop reference images into `references/identity/` (brand: color, typography, mood) and `references/structure/` (a board, a table, a screen);
100
+ - the `reference-identity-extract` skill reads the images **once** and writes `identity.md` (tokens + per-component structure notes);
101
+ - the `interface-design` engine **applies** `identity.md` to everything downstream (prototype and build) — with no images, it runs intent-first.
102
+
103
+ The prototype is mock-only and never becomes canonical feedback.
104
+
105
+ ## Outputs on disk
106
+
107
+ | File | What it contains |
108
+ |---|---|
109
+ | `.aioson/briefings/{slug}/refinement-findings.json` | The agent's audit findings (CLI input) |
110
+ | `.aioson/briefings/{slug}/review.html` | Review surface rendered by the CLI |
111
+ | `.aioson/briefings/{slug}/refinement-feedback.json` | Structured v1.1 feedback (the only source that gets applied) |
112
+ | `.aioson/briefings/{slug}/refinement-report.md` | Round report: applied, skipped, blocked, findings |
113
+ | `.aioson/briefings/{slug}/refinement-*.applied-round{N}.json` | Per-round archive (consumed feedback and findings) |
114
+ | `.aioson/briefings/{slug}/briefings.md` | Updated **only** after confirmation |
115
+ | `.aioson/briefings/config.md` | Updated briefing index/registry |
116
+
117
+ ## How it reads your project
118
+
119
+ 1. `.aioson/config.md`
120
+ 2. `.aioson/context/project.context.md`
121
+ 3. `.aioson/briefings/config.md` — resolves the refinable slug (if absent, routes to `@briefing`).
122
+ 4. `.aioson/briefings/{slug}/briefings.md` — read before writing any review artifact.
123
+
124
+ ## Hard constraints
125
+
126
+ - Never creates or edits `prd*.md`.
127
+ - Never approves a briefing automatically.
128
+ - Never routes to `@product` while blocking items remain (including a pending blocking finding).
129
+ - Never treats edited HTML/DOM as canonical feedback — only the structured JSON.
130
+ - Never hand-writes `review.html` or applies feedback manually while the CLI commands exist — the done-gate (`verify:artifact --kind=review`) rejects hand-rolled surfaces.
131
+ - Never discards mandatory briefing sections.
132
+
133
+ ## `--help` option
134
+
135
+ An activation with `--help` (`/briefing-refiner --help`) prints a quick summary — what it does, when to use it, typical call, what it produces, next agent — localized in your language, and stops without executing anything. Source: `.aioson/docs/agent-help.md`.
136
+
137
+ ## Typical handoff
138
+
139
+ - **Comes from:** [`@briefing`](../../pt/4-agentes/briefing.md) (briefing generated) or you, resuming a review.
140
+ - **Goes to:** after applying the changes with no blockers → `aioson briefing:approve . --slug={slug}` → [`@product`](../../pt/4-agentes/product.md); for rich surfaces, prototype mode first. If a blocker remains, the next round of the loop resolves it — never manual editing.
141
+
142
+ ## Next step
143
+
144
+ - Generate the briefing before refining → [@briefing (PT card)](../../pt/4-agentes/briefing.md)
145
+ - Full flow up to the PRD → [From idea to PRD via briefing](../3-recipes/from-idea-to-prd-via-briefing.md)
146
+ - Terms like "gap" and "PRD" → [Glossary](../1-understand/glossary.md)
@@ -15,6 +15,7 @@ This layer currently holds the original EN feature guides. Additional reference
15
15
  | [cli-reference.md](./cli-reference.md) | Full reference for every CLI command |
16
16
  | [json-schemas.md](./json-schemas.md) | `--json` output contracts for all commands |
17
17
  | [executable-verification.md](./executable-verification.md) | The executable-verification theme: `verification` + `harness:check`, fresh-context validator, `spec:analyze`, Wave markers, Lane B (`forge:compile` + `@forge-run`) |
18
+ | [autopilot-handoff.md](./autopilot-handoff.md) | Full-feature autopilot: `@product` → `@sheldon`/`@orchestrator` → `@dev` → `@qa` (hub) → `@tester`/`@pentester`/`@validator` up to the `feature:close` recommendation; inline `--auto`/`--step` tokens, `--help` on the 13 most-used agents |
18
19
 
19
20
  ---
20
21