@jaimevalasek/aioson 1.30.2 → 1.33.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 (49) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +19 -6
  3. package/docs/en/5-reference/cli-reference.md +1 -1
  4. package/docs/pt/5-referencia/comandos-cli.md +1 -1
  5. package/docs/pt/5-referencia/harness-retro.md +2 -1
  6. package/package.json +1 -1
  7. package/src/cli.js +38 -21
  8. package/src/commands/classify.js +389 -327
  9. package/src/commands/harness-retro-promote.js +387 -0
  10. package/src/commands/prototype-check.js +163 -0
  11. package/src/commands/verify-implementation.js +428 -0
  12. package/src/commands/workflow-next.js +222 -9
  13. package/src/constants.js +2 -0
  14. package/src/lib/retro/retro-render.js +10 -1
  15. package/src/lib/retro/retro-sources.js +45 -27
  16. package/src/lib/retro/verification-reports.js +230 -0
  17. package/src/runtime-store.js +13 -9
  18. package/src/verification/evidence-bundle.js +251 -0
  19. package/src/verification/ledger-store.js +221 -0
  20. package/src/verification/path-policy.js +74 -0
  21. package/src/verification/policy-engine.js +95 -0
  22. package/src/verification/prompt-package.js +314 -0
  23. package/src/verification/redaction.js +77 -0
  24. package/src/verification/report-parser.js +132 -0
  25. package/src/verification/report-store.js +97 -0
  26. package/src/verification/result.js +16 -0
  27. package/src/verification/runners/index.js +319 -0
  28. package/src/verification/runtime-telemetry.js +144 -0
  29. package/src/verification/schema.js +276 -0
  30. package/src/verification/source-discovery.js +153 -0
  31. package/template/.aioson/agents/analyst.md +9 -6
  32. package/template/.aioson/agents/briefing-refiner.md +22 -0
  33. package/template/.aioson/agents/briefing.md +69 -12
  34. package/template/.aioson/agents/design-hybrid-forge.md +18 -14
  35. package/template/.aioson/agents/dev.md +23 -10
  36. package/template/.aioson/agents/deyvin.md +3 -2
  37. package/template/.aioson/agents/product.md +15 -11
  38. package/template/.aioson/agents/qa.md +13 -4
  39. package/template/.aioson/agents/scope-check.md +19 -5
  40. package/template/.aioson/agents/sheldon.md +4 -3
  41. package/template/.aioson/agents/ux-ui.md +3 -2
  42. package/template/.aioson/docs/feature-expansion-taxonomy.md +31 -3
  43. package/template/.aioson/docs/prototype-contract.md +81 -0
  44. package/template/.aioson/skills/process/briefing-expansion-scout/SKILL.md +25 -3
  45. package/template/.aioson/skills/process/design-hybrid-forge/SKILL.md +5 -3
  46. package/template/.aioson/skills/process/design-hybrid-forge/references/external-source-ingestion.md +89 -0
  47. package/template/.aioson/skills/process/product-scope-expansion/SKILL.md +29 -2
  48. package/template/.aioson/skills/process/prototype-forge/SKILL.md +92 -0
  49. package/template/.aioson/skills/process/sheldon-expansion-audit/SKILL.md +23 -2
@@ -5,12 +5,12 @@ agents: [briefing, briefing-refiner, product, sheldon]
5
5
  modes: [planning, executing]
6
6
  task_types: [feature-expansion, product-discovery, prd-enrichment, briefing-refinement]
7
7
  load_tier: trigger
8
- triggers: [feature expansion, rich surface, MVP options, product scope, capability map, Trello, generator, dashboard, workflow, editor, collaboration]
8
+ triggers: [feature expansion, rich surface, MVP options, product scope, capability map, operational surface, CRUD surface, management surface, Trello, Kanban, CRM, workspace, board, dashboard, workflow, editor, collaboration]
9
9
  ---
10
10
 
11
11
  # Feature Expansion Taxonomy
12
12
 
13
- Use this shared vocabulary when a feature has a rich surface: workflow tools, collaboration, editors/builders, generators, media outputs, dashboards, CRM/Kanban-style systems, automation, templates, customization, or repeated operational use.
13
+ Use this shared vocabulary when a feature has a rich surface: workflow tools, collaboration, editors/builders, generators, media outputs, dashboards, CRM/Kanban-style systems, automation, templates, customization, workspaces, boards, operational CRUD, or repeated operational use.
14
14
 
15
15
  Expansion is not approval. It reveals options, classifies value and risk, and makes scope easier to choose.
16
16
 
@@ -41,13 +41,41 @@ Check only lenses relevant to the feature:
41
41
  - Integrations and automation: imports, exports, webhooks, scheduled jobs, simple rules.
42
42
  - Implementation leverage: framework-native features, low-cost libraries, existing modules.
43
43
 
44
+ ## Operational Surface Map
45
+
46
+ For rich-surface products, expansion is incomplete until the main objects have an operational surface map.
47
+
48
+ Use this table shape:
49
+
50
+ | Object | Parent / owner | Lifecycle states | Required actions | Management surface | Empty / error states | Permissions / roles |
51
+ |---|---|---|---|---|---|---|
52
+ | Workspace | owner / members | active, archived | create, switch, edit, archive, invite | workspace switcher + workspace settings | no workspaces, invite failed | owner, member |
53
+
54
+ Rules:
55
+
56
+ - A named Core object is not real scope until its create, list/view, edit, delete/archive, and restore behavior is either covered or explicitly deferred.
57
+ - Every Core object needs a management surface: page, panel, modal, drawer, inline action, settings screen, or command. If there is no place to manage it, the product is underspecified.
58
+ - Parent/child relationships must be explicit. For Trello-like systems, cards imply lists/columns, boards, workspaces, members, and at least basic role boundaries.
59
+ - A user flow that says "manage cards" is too thin unless it names how the user adds, edits, moves, archives, restores, and sees validation feedback.
60
+ - Empty states and failure states are Core for first-use products, admin surfaces, and repeated-use operational tools.
61
+ - Deferred lifecycle actions must be visible in Out of scope, not silently omitted.
62
+
63
+ Minimum expected surfaces for Trello/Kanban/CRM/workspace-like products:
64
+
65
+ - Workspace or account home: create/select workspace, invite/manage members, edit settings.
66
+ - Board/list/index surface: create/select/search/archive boards or pipelines.
67
+ - Main work surface: view columns/lists/status groups, create/move/edit/archive primary items.
68
+ - Item detail surface: edit content, metadata, assignee/owner, labels/status, comments/notes when in scope.
69
+ - Empty/error surfaces: no workspace, no board, no items, permission denied, validation failure.
70
+
44
71
  ## Required Trace
45
72
 
46
73
  Every expansion artifact should state:
47
74
 
48
75
  - whether prior expansion artifacts were found
49
76
  - which bucket each suggestion belongs to
77
+ - which Core objects were mapped in the operational surface map
78
+ - which management surfaces are required for those Core objects
50
79
  - which ideas need explicit user approval
51
80
  - which ideas are intentionally deferred
52
81
  - how the expansion affects project classification or delivery risk
53
-
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: prototype-contract
3
+ agents: [product, ux-ui, analyst, architect, pm, orchestrator, dev, validator, sheldon]
4
+ modes: [planning, executing]
5
+ task_types: [prd, ui-spec, discovery, requirements, architecture, implementation, validation]
6
+ load_tier: trigger
7
+ triggers: [prototype, prototype.html, prototype reference, app-shell, clickable prototype, casca]
8
+ ---
9
+
10
+ # Prototype Contract
11
+
12
+ When a feature has a clickable prototype from `prototype-forge` (`@briefing-refiner`), that prototype is the
13
+ authoritative reference for the feature's screens, navigation, and interactions. This doc defines how each
14
+ role uses it so the prototype is honored end-to-end, not lost after refinement.
15
+
16
+ ## Where it lives
17
+
18
+ - `.aioson/briefings/{slug}/prototype.html` — the clickable app-shell.
19
+ - `.aioson/briefings/{slug}/prototype-manifest.md` — screen inventory, Core interactions demonstrated,
20
+ `design_skill` used, and lock status.
21
+
22
+ It is **mock-only**: no backend, refresh resets. Reproduce its behavior against the real stack — never copy
23
+ its mock persistence.
24
+
25
+ ## The PRD pointer
26
+
27
+ When a prototype exists, `@product` adds a `## Prototype reference` section to the PRD:
28
+
29
+ ```
30
+ ## Prototype reference
31
+ - prototype: .aioson/briefings/{slug}/prototype.html
32
+ - manifest: .aioson/briefings/{slug}/prototype-manifest.md
33
+ - status: draft | locked-at: {ref}
34
+ - Treat as the authoritative screen/interaction reference for this feature.
35
+ ```
36
+
37
+ The PRD is the carrier: every downstream agent that reads the PRD discovers the prototype through this section.
38
+
39
+ ## Lock (draft → locked)
40
+
41
+ The prototype is `draft` while scope is open. When `@product`/`@sheldon` freeze scope, the prototype is
42
+ re-synced to match the final PRD and marked `locked-at: {ref}`. The locked version is what implementation
43
+ reproduces and what acceptance criteria are derived from. If the PRD and a `draft` prototype diverge at lock,
44
+ the approved PRD wins and the prototype is updated to match.
45
+
46
+ ## Role usage
47
+
48
+ - **@product** — write the `## Prototype reference` section; keep the PRD consistent with the prototype; mark
49
+ it `locked` at scope freeze.
50
+ - **@sheldon** — when enriching a PRD that carries a `## Prototype reference`, keep the enrichment and any
51
+ phased plan consistent with the prototype's screens and Core interactions; do not silently enrich away a
52
+ demonstrated interaction. Co-own the `draft → locked` scope freeze with `@product`; if enrichment must
53
+ change a prototyped behavior, record it as an explicit scope decision in the PRD, not a silent drop.
54
+ - **@ux-ui** — the prototype is the concrete realization of the design direction. Use it as the authoritative
55
+ screen/interaction/visual reference; the `ui-spec` must not contradict it. Refine visual detail on top of
56
+ it, never around it.
57
+ - **@analyst** — turn the prototype's Core screens and interactions into explicit acceptance criteria in
58
+ `requirements-{slug}.md` (e.g. "add card persists and re-renders", "board has a management surface"). This
59
+ is how the prototype reaches `@validator` — as binary criteria, not as a file it reads.
60
+ - **@architect / @pm / @orchestrator** — read the prototype + manifest as the reference for screens, flows,
61
+ entities, and scope when planning; do not plan a Core surface the prototype omits without saying so.
62
+ - **@dev** — the prototype is the development source for UI and interactions. Reproduce its screens and Core
63
+ interactions against the real stack. Never ship a Core action the prototype demonstrates (e.g. "add card",
64
+ "create board", "manage members") while the build lacks it.
65
+ - **@validator** — verifies prototype-derived acceptance criteria as part of the normal binary contract in
66
+ `harness-contract.json`. It does **not** read the prototype directly (its context sandbox forbids
67
+ PRDs/artifacts); the criteria authored by `@analyst` are what it checks.
68
+
69
+ ## Completeness
70
+
71
+ A feature with a prototype is not "ready for done" until every Core screen and interaction the prototype
72
+ demonstrates is either built and verified, or explicitly deferred in the PRD's `## Out of scope`.
73
+
74
+ ## Deterministic guard
75
+
76
+ Run `aioson prototype:check . --feature={slug}` once `@analyst` has written `requirements-{slug}.md`. It is the
77
+ deterministic backstop for this otherwise prose-only contract and fails on: a dangling `## Prototype reference`
78
+ (prototype or manifest file missing), a missing requirements bridge, or Core interactions listed in the manifest
79
+ that no acceptance criterion echoes (`fail` = none covered, `warn` = some uncovered). It matches interaction
80
+ names as folded substrings, so the AC must echo the manifest's interaction name (EN or pt-BR). The check never
81
+ reads the prototype's behavior — only that the contract's structural links exist end to end.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: briefing-expansion-scout
3
- description: "Briefing process skill for early feature expansion scouting. Use in @briefing or @briefing-refiner when an idea may have a rich surface and the user wants to explore whether it is worth pursuing before PRD: tools, workflows, generators, dashboards, editors, collaboration, automation, templates, media outputs, or Trello/CRM/Kanban-like systems."
3
+ description: "Briefing process skill for early feature expansion and operational surface scouting. Use in @briefing or @briefing-refiner when an idea may have a rich surface and the user wants to explore whether it is worth pursuing before PRD: tools, workflows, generators, dashboards, editors, collaboration, automation, templates, media outputs, workspace/board/card systems, operational CRUD, or Trello/CRM/Kanban-like systems."
4
4
  ---
5
5
 
6
6
  # Briefing Expansion Scout
@@ -22,11 +22,25 @@ Also read existing expansion artifacts when present:
22
22
  Run only when one is true:
23
23
 
24
24
  - user asks to explore, expand, evaluate, or pressure-test an idea
25
- - the idea has a rich surface: workflow, collaboration, editor/builder, generator, dashboard, automation, templates, media output, repeated operational use
25
+ - the idea has a rich surface: workflow, collaboration, editor/builder, generator, dashboard, automation, templates, media output, repeated operational use, workspaces, boards, operational CRUD, or admin/management surfaces
26
26
  - briefing-refiner detects that an existing briefing feels too thin for team discussion
27
27
 
28
28
  If the idea is a tiny bugfix or a one-field CRUD addition, skip and say the normal briefing path is enough.
29
29
 
30
+ ## Operational Surface Scout
31
+
32
+ Before writing the artifact, build the Operational Surface Map from `.aioson/docs/feature-expansion-taxonomy.md`.
33
+
34
+ Treat this as discovery pressure, not committed PRD scope:
35
+
36
+ - Name the likely Core objects and their parent/owner relationships.
37
+ - For each Core object, identify the minimum management surface that must exist if the product ships.
38
+ - Flag missing create/edit/delete/archive/restore paths as gaps, not optional polish.
39
+ - For Trello/Kanban/CRM-style ideas, assume workspace/account home, board/list index, main work surface, item detail, empty states, and permission boundaries are relevant unless evidence says otherwise.
40
+ - Keep speculative objects in Recommended MVP / Optional / V2 buckets until the user approves them.
41
+
42
+ If the plan says "Trello-like", "board", "card", "workspace", "pipeline", "CRM", "dashboard", "admin", or "manage X", the scout must explicitly answer: where does the user create/manage each object, and what happens when there are none?
43
+
30
44
  ## Output
31
45
 
32
46
  Write `.aioson/briefings/{slug}/expansion-scout.md`.
@@ -44,6 +58,13 @@ Use this structure:
44
58
  | Lens | Useful possibilities | Why it matters | Risk |
45
59
  |---|---|---|---|
46
60
 
61
+ ## Operational Surface Map
62
+ | Object | Parent / owner | Lifecycle states | Required actions | Management surface | Empty / error states | Bucket |
63
+ |---|---|---|---|---|---|---|
64
+
65
+ ## Missing Management Surfaces
66
+ - ...
67
+
47
68
  ## Likely MVP Shape
48
69
  - Core:
49
70
  - Recommended MVP:
@@ -67,6 +88,7 @@ Proceed to product definition? yes / no / only after questions.
67
88
  - Mark assumptions explicitly.
68
89
  - Separate attractive ideas from useful ideas.
69
90
  - Prefer 3-7 high-signal possibilities over exhaustive lists.
91
+ - Do not let "simple MVP" mean "core object exists but cannot be managed."
92
+ - A Core object without add/edit/list/archive behavior is a blocking gap in the briefing, not a V2 suggestion.
70
93
  - Do not approve V2 ideas; park them.
71
94
  - Do not modify the PRD.
72
-
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: design-hybrid-forge
3
- description: Process skill that creates project-local hybrid design skills by fusing exactly two primary AIOSON design skills, with optional limited modifiers. When activated, guides you through pair selection, identity synthesis, crossover spec, skill generation, preview creation, metadata, and optional promotion.
3
+ description: Process skill that creates project-local hybrid design skills by fusing exactly two primary design parents — each a local AIOSON design skill or an external DESIGN.md source (refero.design md-example or similar) — with optional limited modifiers. When activated, guides you through pair selection, identity synthesis, crossover spec, skill generation, preview creation, metadata, and optional promotion.
4
4
  activation: |
5
5
  You are now running the design-hybrid-forge process. Begin by asking the user for the names of the two primary AIOSON design skills they want to combine, then ask whether they want optional modifiers. Use up to two modifiers by default, or up to three only when the active variation preset or the user explicitly enables advanced mode. Follow the phases described in this skill.
6
6
  ---
@@ -88,8 +88,8 @@ Each phase must complete before the next begins. Do not skip phase 2 and 3 — t
88
88
  ## Input contract
89
89
 
90
90
  ```
91
- primary_a: {skill-name} # e.g. "cognitive-core-ui"
92
- primary_b: {skill-name} # e.g. "glassmorphism-ui"
91
+ primary_a: {skill-name} # local AIOSON skill (e.g. "cognitive-core-ui") OR external:{DESIGN.md} (e.g. "external:linear")
92
+ primary_b: {skill-name} # local AIOSON skill (e.g. "glassmorphism-ui") OR an external DESIGN.md source (refero.design md-example / similar)
93
93
  modifiers: {optional 0..2} # e.g. ["bold-editorial-ui"] or ["threejs-spatial"]
94
94
  # threejs-spatial is a special modifier: it layers WebGL/Three.js
95
95
  # on any primary pair, adding particle/3D scene as visual substrate
@@ -130,6 +130,7 @@ The hybrid must satisfy ALL of the following:
130
130
  | `references/output-contract.md` | Running phases 4 and 5 (file generation) |
131
131
  | `references/naming-registry.md` | Naming the hybrid and checking for conflicts |
132
132
  | `references/quality-gates.md` | Validating the hybrid before shipping (distribution / promotion gates) |
133
+ | `references/external-source-ingestion.md` | Ingesting an external DESIGN.md (refero.design md-example or similar) as a parent or modifier |
133
134
 
134
135
  ## Non-negotiable rules
135
136
 
@@ -145,3 +146,4 @@ The hybrid must satisfy ALL of the following:
145
146
  10. Project-local generation goes to `.aioson/installed-skills/` by default. Promotion to core is a separate, explicit step.
146
147
  11. `design-hybrid:options` creates a temporary preset in `.aioson/context/design-variation-preset.md`; after successful generation, archive or remove the active preset and preserve the history snapshot.
147
148
  12. **`threejs-spatial` modifier rules:** It is NOT a primary parent. It layers WebGL/Three.js as a visual enhancement on the chosen primary pair. It does not own substrate (CSS gradient is still the base), does not own structure (HTML layout is CSS), and does not own tokens. Accent colors from primary parents MUST flow through Three.js parameters. Three.js CDN (no npm install) is the only supported delivery mode.
149
+ 13. **External DESIGN.md sources:** A primary parent or modifier may be an external DESIGN.md (refero.design md-example or similar). Normalize it to parent DNA via `references/external-source-ingestion.md`, record its provenance under `sources[]` in `.skill-meta.json`, and keep the anti-clone rule — the hybrid is a new identity: never reproduce the source's brand, logo, trademark, or exact palette 1:1, and never name the hybrid after the source.
@@ -0,0 +1,89 @@
1
+ # External Source Ingestion
2
+
3
+ > Load this reference when a primary parent or a modifier is an **external DESIGN.md source**
4
+ > (a refero.design md-example, or a similar portable design spec extracted from a real site)
5
+ > instead of a local AIOSON design skill.
6
+
7
+ The hybrid model is unchanged: **exactly 2 primary parents**, optional modifiers. This reference only
8
+ widens where a parent can come from — a parent may now be local (an AIOSON design skill) or external
9
+ (a DESIGN.md source). Everything downstream (crossover protocol, output contract, quality gates) runs the
10
+ same, operating on the normalized DNA produced here.
11
+
12
+ ## What an external DESIGN.md is
13
+
14
+ A DESIGN.md is a portable, prose+token description of a real product's visual system — e.g. refero.design
15
+ publishes curated examples (Apple, Linear, Stripe, Mercury, Superhuman, Raycast, …). It typically carries:
16
+
17
+ - color palette
18
+ - typography
19
+ - spacing / layout rhythm
20
+ - component patterns
21
+ - overall visual tone / feel
22
+
23
+ It is the "system behind the screenshot", meant to be **pasted as context**, not copied pixel for pixel.
24
+
25
+ ## Accepted forms
26
+
27
+ Take the source in whichever form the user has:
28
+
29
+ 1. **Pasted content** — the user pastes the DESIGN.md text into the conversation.
30
+ 2. **Local file** — the user saved it at `.aioson/context/design-sources/{source}.design.md`.
31
+ 3. **URL** — the user gives a link (refero.design or similar). Fetch it; if the page is JS-heavy or the
32
+ fetch returns little, ask the user to paste the DESIGN.md text instead. Never block on a flaky fetch.
33
+
34
+ ## Normalize to parent DNA
35
+
36
+ Map the source onto the same DNA dimensions the crossover protocol expects from a local parent:
37
+
38
+ | Dimension | Pull from the source |
39
+ |---|---|
40
+ | Substrate / background model | base background, surface model, depth/elevation approach |
41
+ | Structure / layout | layout rhythm, density, grid/spacing scale |
42
+ | Tokens | color palette, typography, spacing, radius, shadow/depth |
43
+ | Components | the component patterns described (buttons, cards, nav, inputs, …) |
44
+ | Motion / feel | transitions, easing, the stated tone/feel |
45
+ | Signature | the one or two moves that make it recognizable |
46
+
47
+ If a dimension is missing in the source, mark it `not provided` — the **other** (local) parent or the
48
+ modifiers fill it. Do not invent brand-specific detail the source did not state.
49
+
50
+ ## Eligibility: primary parent vs modifier
51
+
52
+ - **Primary parent** requires at least: a clear substrate/background model **and** a token system
53
+ (color + typography) **and** a handful of components.
54
+ - A source that only yields accent, motion, or typographic flavor is a **modifier**, not a primary parent
55
+ (modifiers never own substrate or structure — same rule as local modifiers).
56
+
57
+ ## Provenance (mandatory)
58
+
59
+ Record every external source in `.skill-meta.json` under `sources[]`:
60
+
61
+ ```json
62
+ "sources": [
63
+ { "type": "local", "name": "cognitive-core-ui" },
64
+ { "type": "external", "name": "linear", "url": "https://styles.refero.design/...",
65
+ "retrieved_at": "{ISO-date}", "license": "unspecified — reference only",
66
+ "note": "refero.design md-example; used as reference, not copied" }
67
+ ]
68
+ ```
69
+
70
+ refero.design and similar sites publish these as **references, not templates**, with no explicit license.
71
+ Treat them accordingly: use the system, attribute the source in metadata, do not redistribute the source
72
+ file as your own.
73
+
74
+ ## Anti-clone (hard)
75
+
76
+ An external source contributes DNA exactly like a local parent — the crossover still synthesizes a
77
+ distinct third identity. Therefore:
78
+
79
+ - Never reproduce the source's brand name, logo, wordmark, or trademarked assets.
80
+ - Never copy the source's exact palette or type ramp 1:1 — the hybrid accent must be a genuine fusion
81
+ (the existing accent rule), not the source's accent.
82
+ - Never name the hybrid after the source brand (no `linear-hybrid`, no `stripe-core`).
83
+ - The hybrid's `## Hybrid DNA` section names the source as a parent and states what it contributed and
84
+ what is new — same explicitness required of local parents.
85
+
86
+ ## Hand-off
87
+
88
+ Once normalized and validated, treat the external source as an ordinary parent/modifier and continue with
89
+ `references/crossover-protocol.md` (identity synthesis + crossover spec) exactly as for local parents.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: product-scope-expansion
3
- description: "Product process skill for controlled scope expansion before writing or updating a PRD. Use in @product when a feature has a rich surface, when a briefing expansion scout exists, or when the user asks for a more complete MVP without turning the feature into an oversized V2."
3
+ description: "Product process skill for controlled scope expansion and operational completeness before writing or updating a PRD. Use in @product when a feature has a rich surface, when a briefing expansion scout exists, when the user asks for a more complete MVP, or when the product implies workspaces, boards, cards, pipelines, operational CRUD, admin/management surfaces, or Trello/CRM/Kanban-like behavior without turning the feature into an oversized V2."
4
4
  ---
5
5
 
6
6
  # Product Scope Expansion
@@ -27,6 +27,23 @@ When the feature is not obviously rich, ask a short choice:
27
27
 
28
28
  When a scout artifact exists or the user explicitly asks for richer product thinking, run the skill without re-asking unless expansion would materially change classification or timeline.
29
29
 
30
+ ## Operational Completeness Gate
31
+
32
+ Before writing or updating the PRD, build the Operational Surface Map from `.aioson/docs/feature-expansion-taxonomy.md`.
33
+
34
+ This is not optional for rich-surface products. A Core object is incomplete until the PRD accounts for:
35
+
36
+ - parent/owner relationship
37
+ - lifecycle states
38
+ - create, list/view, edit, delete/archive, and restore behavior, or an explicit deferral
39
+ - the page, panel, modal, drawer, inline action, settings screen, or command where the user manages it
40
+ - first-use empty state and validation/error state
41
+ - basic role/permission boundary when ownership or collaboration exists
42
+
43
+ If any Core object lacks a management surface or add/edit path, do not finalize the PRD as-is. Either ask one owner-level decision, choose the smallest defensible default, or put the missing behavior in `## Open questions` and keep it out of "ready for dev" handoff.
44
+
45
+ For Trello/Kanban/CRM/workspace-like products, treat workspace/account home, board/pipeline index, main work surface, item detail, and empty/error surfaces as expected Core surfaces unless explicitly excluded.
46
+
30
47
  ## Output
31
48
 
32
49
  Write `.aioson/context/features/{slug}/scope-expansion.md`.
@@ -51,6 +68,15 @@ Use this structure:
51
68
  | V2 / Later | ... | ... | yes, future |
52
69
  | Cut List | ... | ... | no |
53
70
 
71
+ ## Operational Surface Map
72
+ | Object | Parent / owner | Lifecycle states | Required actions | Management surface | Empty / error states | PRD destination |
73
+ |---|---|---|---|---|---|---|
74
+
75
+ ## Core Capability Closure
76
+ - Complete:
77
+ - Missing / needs decision:
78
+ - Explicitly deferred:
79
+
54
80
  ## Recommended Product Shape
55
81
  - Include in PRD:
56
82
  - Keep as optional:
@@ -71,4 +97,5 @@ Use this structure:
71
97
  - Do not silently include Optional V1, Delight, or V2 items.
72
98
  - If expansion raises classification, surface that before finalizing.
73
99
  - Preserve "small project, small solution": a rich feature can still have a small first release.
74
-
100
+ - Core operational surfaces must appear in `## MVP scope`, `## User flows`, `## Out of scope`, or `## Open questions`; never leave them only in `scope-expansion.md`.
101
+ - Do not route to implementation while a Core object's create/manage flow is undefined.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: prototype-forge
3
+ description: "Process skill for generating a clickable, self-contained HTML app-shell prototype from an operational surface map. Use in @briefing-refiner (optional visual refinement) when a rich-surface product — workspaces, boards, cards, pipelines, CRM/Kanban, dashboards, editors/builders, admin/management surfaces, repeated-use CRUD — needs its screens, navigation, and CRUD interactions validated before the PRD. Delegates all visual language to the selected design_skill; owns structure, behavior, and state."
4
+ ---
5
+
6
+ # Prototype Forge
7
+
8
+ Generate a clickable, self-contained HTML **app-shell prototype** that materializes a product's
9
+ operational surface map — every screen, navigation path, and CRUD interaction — so completeness and
10
+ interaction are validated *visually* before the PRD, not discovered later as gaps in a broken first build.
11
+
12
+ This is an **app** prototype skill. It is not the landing-page guide
13
+ (`.aioson/skills/static/static-html-patterns.md`, which `skip_if: app dashboard, admin panel`).
14
+
15
+ ## When to run
16
+
17
+ Optional and user-invoked, inside `@briefing-refiner`. Run when a rich-surface product would benefit
18
+ from seeing its screens and interactions before committing scope: workspaces, boards, cards, pipelines,
19
+ CRM/Kanban, dashboards, editors/builders, admin/management surfaces, repeated-use CRUD.
20
+
21
+ Skip for tiny single-screen features, one-field CRUD, or pure content/marketing pages.
22
+
23
+ ## Division of labor (do not blur)
24
+
25
+ - **prototype-forge owns** structure + behavior + state: which screens exist, navigation/routing,
26
+ seeded mock data, client-side CRUD, and the empty/loading/error/permission state matrix.
27
+ - **The selected `design_skill` owns visuals**: tokens, component anatomy, page composition, motion.
28
+ Read `design_skill` from `.aioson/context/project.context.md` and compose from that skill's
29
+ components. Never invent a second visual system. (e.g. `cognitive-core-ui` already ships `modal`,
30
+ `table`, `list-detail`, `settings`, and a `CRM` dashboard preset — compose from those.)
31
+
32
+ The "add card doesn't work" and "no board-management screen" failures live in **this** skill's layer,
33
+ not in the design skill's.
34
+
35
+ ## Inputs (read in this order)
36
+
37
+ 1. The operational surface map: `.aioson/briefings/{slug}/solution-options.md` (the chosen shape) or
38
+ `.aioson/briefings/{slug}/expansion-scout.md`, falling back to the Operational Surface Map in
39
+ `.aioson/docs/feature-expansion-taxonomy.md`.
40
+ 2. `.aioson/briefings/{slug}/briefings.md` for problem, users, and the chosen direction.
41
+ 3. `design_skill` from `.aioson/context/project.context.md`; load that skill before any layout.
42
+
43
+ If no operational surface map exists, build one first — it is the screen inventory, and without it the
44
+ prototype cannot be complete.
45
+
46
+ ## Build contract (enforceable)
47
+
48
+ 1. **Single self-contained file** — one `prototype.html`, inline CSS + JS, no build, no external
49
+ services, opens in a browser. (Mirrors `review.html`.)
50
+ 2. **Seeded realistic mock state** — plausible data for every Core object (e.g. 2-3 workspaces, a few
51
+ boards, several cards), never lorem ipsum. Enough to look real *and* to toggle the empty state. When
52
+ the product is authenticated, seed the logged-in app chrome too: a working account/user menu
53
+ (profile, settings, switch account, sign out) and any always-present chrome (search, notifications)
54
+ the product implies — a bare avatar with no menu is incomplete.
55
+ 3. **Navigational completeness** — every Core object in the surface map gets a reachable screen via
56
+ in-file routing (hash routes/tabs): a list/index surface, a detail surface, and its management
57
+ surface (page, panel, modal, drawer, or settings screen). A surface-map object with no reachable
58
+ screen is a **blocking gap**, not a backlog item.
59
+ 4. **Real client-side CRUD** — create/edit/delete/archive/restore mutate in-memory state and re-render.
60
+ "Add card"-class actions must actually add and persist for the session. Use modals/drawers/toasts
61
+ for feedback. A button that does nothing is a failure. Never use native `alert()`/`confirm()`/
62
+ `prompt()` — every create/edit/delete and every confirmation is an in-system modal, drawer, or
63
+ inline form styled by the `design_skill` (a destructive confirm is a styled dialog, not `confirm()`).
64
+ Native browser dialogs break visual fidelity and leave @dev with no spec for that surface.
65
+ 5. **State matrix** — empty, loading, error, populated, and permission-denied are each renderable and
66
+ toggleable, not only the happy path.
67
+ 6. **Visual fidelity** — all look-and-feel comes from the `design_skill`; honor its quality and
68
+ stability gates (tokens first, no nested cards, responsive grid constraints, prefers-reduced-motion).
69
+ 7. **Prototype as reference** — it is the downstream development reference. Record its lock status in
70
+ the manifest (`draft` until @product/@sheldon freeze scope, then re-synced and locked).
71
+
72
+ ## Output
73
+
74
+ Write to `.aioson/briefings/{slug}/`:
75
+
76
+ - `prototype.html` — the clickable app-shell.
77
+ - `prototype-manifest.md` — the screen inventory (one row per Core object: screens + management
78
+ surface); a `## Core interactions` section listing every demonstrated interaction as a backtick token,
79
+ one per line (e.g. `` - `add card` — adds a card to a list ``), so `aioson prototype:check` can verify each
80
+ one is later echoed by an acceptance criterion; the `design_skill` used, an explicit
81
+ "mock only — refresh resets, no backend" note, and lock status (`draft` / `locked-at: {ref}`).
82
+
83
+ ## Completeness gate (before handing back)
84
+
85
+ - Every Core object is reachable **and** manageable (create/list/edit/archive/restore, or an explicit defer).
86
+ - Every Core action named in the surface map works against mock state and re-renders.
87
+ - Empty and error states are visible, not implied.
88
+ - No action falls back to a native browser dialog; every create/edit/delete/confirm is an in-system surface.
89
+ - When the product is authenticated, the account/user menu is present and functional, not a dead avatar.
90
+ - The visual is faithful to the `design_skill`, not generic.
91
+ - If any Core object cannot be managed in the prototype, report it as a blocking gap — never hand back a
92
+ prototype that looks complete but cannot manage its own objects.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sheldon-expansion-audit
3
- description: "Sheldon process skill for auditing a PRD against prior feature expansion artifacts and expected product richness. Use in @sheldon when expansion-scout.md or scope-expansion.md exists, or when a PRD for a rich-surface feature looks too thin, too inflated, or lacks acceptance criteria for enriched capabilities."
3
+ description: "Sheldon process skill for auditing a PRD against prior feature expansion artifacts, expected product richness, and operational surface completeness. Use in @sheldon when expansion-scout.md or scope-expansion.md exists, or when a PRD for a rich-surface feature looks too thin, too inflated, lacks acceptance criteria for enriched capabilities, or implies workspaces, boards, cards, pipelines, operational CRUD, admin/management surfaces, or Trello/CRM/Kanban-like behavior."
4
4
  ---
5
5
 
6
6
  # Sheldon Expansion Audit
@@ -20,6 +20,22 @@ Read available inputs:
20
20
 
21
21
  If no prior expansion artifact exists, perform only a lightweight inferred expansion and label it clearly.
22
22
 
23
+ ## Operational Surface Audit
24
+
25
+ Before recommending enrichment, audit the PRD against the Operational Surface Map in `.aioson/docs/feature-expansion-taxonomy.md`.
26
+
27
+ Flag as **critical** when a Core object exists in scope but lacks:
28
+
29
+ - parent/owner relationship
30
+ - create, list/view, edit, delete/archive, or restore handling
31
+ - a management surface where the user performs those actions
32
+ - empty state and validation/error behavior
33
+ - role/permission boundary for owner/member/admin scenarios
34
+
35
+ For Trello/Kanban/CRM/workspace-like PRDs, missing workspace management, board/pipeline CRUD, primary item creation/editing, or the main work surface is a blocking product gap, not optional enrichment.
36
+
37
+ Do not allow generic phrases like "manage cards", "manage boards", or "workspace support" to pass unless the PRD names the surfaces and flows that make those capabilities usable.
38
+
23
39
  ## Output
24
40
 
25
41
  Write `.aioson/context/features/{slug}/expansion-audit.md`.
@@ -43,6 +59,10 @@ Use this structure:
43
59
  - Missing user states/actions:
44
60
  - Missing acceptance criteria:
45
61
 
62
+ ## Operational Surface Audit
63
+ | Object | Expected surface | Missing action/state | Severity | Required PRD patch |
64
+ |---|---|---|---|---|
65
+
46
66
  ## Too Large Check
47
67
  - V2 items pulled into MVP:
48
68
  - Optional items without approval:
@@ -61,7 +81,8 @@ Proceed / enrich PRD first / return to product for decision.
61
81
 
62
82
  - Prefer evidence from prior expansion artifacts over inventing new ideas.
63
83
  - Flag when a rich-surface PRD has only generic fields or thin CRUD.
84
+ - Treat missing Core management surfaces and create/edit flows as critical gaps.
85
+ - For Trello-like products, workspace/board management and card creation/editing are Core unless explicitly excluded in the PRD.
64
86
  - Flag when V2 ideas entered MVP without explicit rationale.
65
87
  - Convert accepted expansion items into acceptance-criteria gaps.
66
88
  - Do not rewrite Product-owned Vision, Problem, or Users.
67
-