supipowers 1.5.3 → 2.0.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/README.md +14 -8
- package/bin/install.mjs +20 -5
- package/bin/install.ts +95 -0
- package/package.json +8 -4
- package/skills/context-mode/SKILL.md +17 -10
- package/skills/harness/SKILL.md +94 -0
- package/skills/ui-design/SKILL.md +63 -0
- package/skills/ui-design/sub-agent-templates/component-builder.md +29 -0
- package/skills/ui-design/sub-agent-templates/design-critic.md +46 -0
- package/skills/ui-design/sub-agent-templates/pencil/component-builder.md +29 -0
- package/skills/ui-design/sub-agent-templates/pencil/design-critic.md +42 -0
- package/skills/ui-design/sub-agent-templates/pencil/section-assembler.md +27 -0
- package/skills/ui-design/sub-agent-templates/section-assembler.md +27 -0
- package/skills/ultraplan-discover/SKILL.md +96 -0
- package/skills/ultraplan-intake/SKILL.md +89 -0
- package/skills/ultraplan-research/SKILL.md +129 -0
- package/skills/ultraplan-review/SKILL.md +86 -0
- package/skills/ultraplan-review-scope/SKILL.md +111 -0
- package/skills/ultraplan-review-structure/SKILL.md +120 -0
- package/skills/ultraplan-review-tdd/SKILL.md +142 -0
- package/skills/ultraplan-scout/SKILL.md +110 -0
- package/skills/ultraplan-synthesize/SKILL.md +124 -0
- package/src/{quality/ai-session.ts → ai/final-message.ts} +27 -0
- package/src/ai/schema-text.ts +129 -0
- package/src/ai/structured-output.ts +274 -0
- package/src/ai/template.ts +27 -0
- package/src/bootstrap.ts +63 -28
- package/src/commands/agents.ts +131 -42
- package/src/commands/ai-review.ts +251 -30
- package/src/commands/clear.ts +434 -0
- package/src/commands/commit.ts +1 -0
- package/src/commands/config.ts +242 -44
- package/src/commands/context.ts +55 -28
- package/src/commands/doctor.ts +234 -6
- package/src/commands/fix-pr.ts +306 -131
- package/src/commands/generate.ts +111 -21
- package/src/commands/memory.ts +192 -0
- package/src/commands/model-picker.ts +28 -21
- package/src/commands/model.ts +18 -8
- package/src/commands/optimize-context.ts +408 -29
- package/src/commands/plan.ts +2 -0
- package/src/commands/qa.ts +312 -137
- package/src/commands/release.ts +259 -76
- package/src/commands/review.ts +293 -59
- package/src/commands/status.ts +200 -13
- package/src/commands/supi.ts +3 -35
- package/src/commands/ui-design.ts +394 -0
- package/src/commands/ultraplan.ts +1518 -0
- package/src/commands/update.ts +86 -0
- package/src/config/defaults.ts +62 -0
- package/src/config/loader.ts +448 -60
- package/src/config/schema.ts +108 -2
- package/src/context/optimizer.ts +25 -33
- package/src/context/rule-renderer.ts +223 -0
- package/src/context/savings.ts +258 -0
- package/src/context/startup-check.ts +380 -0
- package/src/context/startup-optimizer.ts +355 -0
- package/src/context/tokenignore.ts +146 -0
- package/src/context-mode/cache-handle.ts +49 -0
- package/src/context-mode/cache-preview.ts +71 -0
- package/src/context-mode/cache-store.ts +738 -0
- package/src/context-mode/compressor.ts +131 -26
- package/src/context-mode/dedup.ts +108 -0
- package/src/context-mode/detector.ts +35 -4
- package/src/context-mode/event-extractor.ts +14 -12
- package/src/context-mode/event-store.ts +91 -36
- package/src/context-mode/hooks.ts +798 -56
- package/src/context-mode/knowledge/store.ts +255 -11
- package/src/context-mode/memory-store.ts +325 -0
- package/src/context-mode/metrics-recorder.ts +158 -0
- package/src/context-mode/metrics-store.ts +765 -0
- package/src/context-mode/model.ts +24 -0
- package/src/context-mode/processor-keys.ts +29 -0
- package/src/context-mode/processors/build.ts +66 -0
- package/src/context-mode/processors/docker.ts +57 -0
- package/src/context-mode/processors/git.ts +111 -0
- package/src/context-mode/processors/json.ts +112 -0
- package/src/context-mode/processors/k8s.ts +67 -0
- package/src/context-mode/processors/lint.ts +67 -0
- package/src/context-mode/processors/log.ts +86 -0
- package/src/context-mode/processors/registry.ts +116 -0
- package/src/context-mode/processors/test-runner.ts +102 -0
- package/src/context-mode/processors/types.ts +20 -0
- package/src/context-mode/repomap.ts +400 -0
- package/src/context-mode/routing.ts +97 -24
- package/src/context-mode/sandbox/runners.ts +5 -1
- package/src/context-mode/snapshot-builder.ts +106 -11
- package/src/context-mode/source-hash.ts +173 -0
- package/src/context-mode/tool-name.ts +11 -0
- package/src/context-mode/tools.ts +654 -22
- package/src/context-mode/web/fetcher.ts +31 -12
- package/src/debug/logger.ts +2 -1
- package/src/deps/registry.ts +1 -1
- package/src/discipline/failure-summarizer.ts +170 -0
- package/src/discipline/failure-taxonomy.ts +131 -0
- package/src/discipline/workflow-invariants.ts +125 -0
- package/src/discovery/index.ts +31 -0
- package/src/discovery/lsp.ts +87 -0
- package/src/discovery/rank.ts +144 -0
- package/src/discovery/sources.ts +89 -0
- package/src/discovery/workflow.ts +87 -0
- package/src/docs/contracts.ts +39 -0
- package/src/docs/drift.ts +117 -87
- package/src/fix-pr/assessment.ts +200 -0
- package/src/fix-pr/contracts.ts +47 -0
- package/src/fix-pr/fetch-comments.ts +80 -0
- package/src/fix-pr/prompt-builder.ts +58 -40
- package/src/fix-pr/scripts/exec.ts +34 -0
- package/src/fix-pr/scripts/trigger-review.ts +106 -0
- package/src/fix-pr/scripts/wait-and-check.ts +108 -0
- package/src/fix-pr/types.ts +4 -0
- package/src/git/branch-finish.ts +5 -0
- package/src/git/commit-contract.ts +83 -0
- package/src/git/commit.ts +121 -184
- package/src/git/status.ts +62 -8
- package/src/harness/anti_slop/architecture-parser.ts +210 -0
- package/src/harness/anti_slop/backend-factory.ts +30 -0
- package/src/harness/anti_slop/backend.ts +140 -0
- package/src/harness/anti_slop/desloppify-adapter.ts +319 -0
- package/src/harness/anti_slop/fallow-adapter.ts +305 -0
- package/src/harness/anti_slop/installer.ts +227 -0
- package/src/harness/anti_slop/queue.ts +216 -0
- package/src/harness/anti_slop/recommend.ts +84 -0
- package/src/harness/anti_slop/score.ts +180 -0
- package/src/harness/anti_slop/synthetic-edit-test.ts +128 -0
- package/src/harness/artifacts/agents-md.ts +88 -0
- package/src/harness/artifacts/checks-wiring.ts +57 -0
- package/src/harness/artifacts/docs-tree.ts +79 -0
- package/src/harness/artifacts/lint-configs.ts +136 -0
- package/src/harness/artifacts/review-agents.ts +67 -0
- package/src/harness/bare-entry.ts +108 -0
- package/src/harness/command.ts +1010 -0
- package/src/harness/default-agents/design.md +23 -0
- package/src/harness/default-agents/discover.md +18 -0
- package/src/harness/default-agents/implement.md +24 -0
- package/src/harness/default-agents/plan.md +19 -0
- package/src/harness/default-agents/research.md +21 -0
- package/src/harness/default-agents/validate.md +22 -0
- package/src/harness/gc/reporter.ts +28 -0
- package/src/harness/gc/runner.ts +136 -0
- package/src/harness/hooks/layer-context-inject.ts +155 -0
- package/src/harness/hooks/post-session-sweep.ts +130 -0
- package/src/harness/hooks/pre-edit-dupe-probe.ts +224 -0
- package/src/harness/hooks/register.ts +118 -0
- package/src/harness/model.ts +117 -0
- package/src/harness/pipeline.ts +348 -0
- package/src/harness/project-paths.ts +235 -0
- package/src/harness/stage-runner.ts +107 -0
- package/src/harness/stages/design.ts +386 -0
- package/src/harness/stages/discover.ts +454 -0
- package/src/harness/stages/implement.ts +162 -0
- package/src/harness/stages/plan.ts +335 -0
- package/src/harness/stages/research.ts +263 -0
- package/src/harness/stages/validate.ts +684 -0
- package/src/harness/storage.ts +467 -0
- package/src/harness/tools.ts +426 -0
- package/src/lsp/bridge.ts +56 -95
- package/src/lsp/capabilities.ts +108 -0
- package/src/lsp/contracts.ts +35 -0
- package/src/lsp/detector.ts +8 -12
- package/src/markdown-frontmatter.ts +68 -0
- package/src/mempalace/bridge.ts +135 -0
- package/src/mempalace/config.ts +75 -0
- package/src/mempalace/format.ts +163 -0
- package/src/mempalace/hooks.ts +370 -0
- package/src/mempalace/installer-helper.ts +194 -0
- package/src/mempalace/python/mempalace_bridge.py +440 -0
- package/src/mempalace/runtime.ts +565 -0
- package/src/mempalace/schema.ts +268 -0
- package/src/mempalace/session-summary.ts +198 -0
- package/src/mempalace/tool.ts +186 -0
- package/src/mempalace/uv.ts +256 -0
- package/src/migrate/runner.ts +354 -0
- package/src/planning/approval-flow.ts +206 -9
- package/src/planning/plan-writer-prompt.ts +4 -3
- package/src/planning/planning-ask-tool.ts +39 -0
- package/src/planning/render-markdown.ts +74 -0
- package/src/planning/spec.ts +42 -0
- package/src/planning/system-prompt.ts +11 -8
- package/src/planning/validate.ts +84 -0
- package/src/platform/omp.ts +15 -2
- package/src/platform/system-prompt.ts +37 -0
- package/src/platform/test-utils.ts +3 -0
- package/src/platform/types.ts +6 -1
- package/src/qa/config.ts +12 -6
- package/src/qa/detect-app-type.ts +13 -6
- package/src/qa/matrix.ts +12 -6
- package/src/qa/prompt-builder.ts +28 -30
- package/src/qa/scripts/dev-server-utils.ts +72 -0
- package/src/qa/scripts/run-e2e-tests.ts +226 -0
- package/src/qa/scripts/start-dev-server.ts +138 -0
- package/src/qa/scripts/stop-dev-server.ts +77 -0
- package/src/qa/session.ts +13 -7
- package/src/quality/ai-setup.ts +27 -25
- package/src/quality/contracts.ts +34 -0
- package/src/quality/gates/ai-review.ts +20 -58
- package/src/quality/gates/command.ts +249 -46
- package/src/quality/review-gates.ts +18 -2
- package/src/quality/runner.ts +63 -22
- package/src/quality/schemas.ts +37 -2
- package/src/quality/setup.ts +96 -16
- package/src/release/changelog.ts +1 -1
- package/src/release/channels/custom.ts +13 -3
- package/src/release/channels/types.ts +5 -0
- package/src/release/contracts.ts +90 -0
- package/src/release/executor.ts +122 -45
- package/src/release/prompt.ts +18 -2
- package/src/release/targets.ts +86 -0
- package/src/release/version.ts +96 -71
- package/src/review/agent-loader.ts +221 -109
- package/src/review/fixer.ts +10 -6
- package/src/review/multi-agent-runner.ts +114 -13
- package/src/review/output.ts +12 -139
- package/src/review/runner.ts +12 -6
- package/src/review/scope.ts +144 -24
- package/src/review/types.ts +1 -20
- package/src/review/validator.ts +12 -6
- package/src/storage/fix-pr-sessions.ts +21 -14
- package/src/storage/plans.ts +14 -5
- package/src/storage/qa-sessions.ts +25 -19
- package/src/storage/reliability-metrics.ts +180 -0
- package/src/storage/reports.ts +8 -7
- package/src/storage/review-sessions.ts +55 -20
- package/src/tool-catalog/active-tool-controller.ts +164 -0
- package/src/tool-catalog/active-tool-planner.ts +212 -0
- package/src/tool-catalog/tool-groups.ts +102 -0
- package/src/types.ts +1399 -5
- package/src/ui-design/backend-adapter.ts +78 -0
- package/src/ui-design/backends/local-html.ts +82 -0
- package/src/ui-design/backends/pencil-mcp.ts +111 -0
- package/src/ui-design/components-scanner.ts +124 -0
- package/src/ui-design/config.ts +55 -0
- package/src/ui-design/pen-scanner.ts +95 -0
- package/src/ui-design/pen-selector.ts +72 -0
- package/src/ui-design/prompt-builder.ts +73 -0
- package/src/ui-design/scanner.ts +136 -0
- package/src/ui-design/session.ts +974 -0
- package/src/ui-design/system-prompt.ts +312 -0
- package/src/ui-design/tokens-scanner.ts +181 -0
- package/src/ui-design/types.ts +96 -0
- package/src/ultraplan/agent-catalog.ts +522 -0
- package/src/ultraplan/authoring/agent-catalog.ts +310 -0
- package/src/ultraplan/authoring/authoring-tools.ts +552 -0
- package/src/ultraplan/authoring/command-handlers.ts +339 -0
- package/src/ultraplan/authoring/markdown.ts +510 -0
- package/src/ultraplan/authoring/model.ts +162 -0
- package/src/ultraplan/authoring/pipeline.ts +319 -0
- package/src/ultraplan/authoring/stage-runner.ts +141 -0
- package/src/ultraplan/authoring/stages/approve.ts +249 -0
- package/src/ultraplan/authoring/stages/discover.ts +289 -0
- package/src/ultraplan/authoring/stages/intake.ts +203 -0
- package/src/ultraplan/authoring/stages/research.ts +399 -0
- package/src/ultraplan/authoring/stages/review.ts +333 -0
- package/src/ultraplan/authoring/stages/scout.ts +188 -0
- package/src/ultraplan/authoring/stages/synthesize.ts +348 -0
- package/src/ultraplan/authoring/storage.ts +594 -0
- package/src/ultraplan/authoring/synth-gate.ts +165 -0
- package/src/ultraplan/authoring-draft.ts +653 -0
- package/src/ultraplan/authoring-persist.ts +180 -0
- package/src/ultraplan/authoring-tool.ts +608 -0
- package/src/ultraplan/authoring-wizard.ts +587 -0
- package/src/ultraplan/batch/merge.ts +98 -0
- package/src/ultraplan/batch/planner.ts +150 -0
- package/src/ultraplan/batch/presenter.ts +97 -0
- package/src/ultraplan/batch/storage.ts +420 -0
- package/src/ultraplan/batch/supervisor.ts +317 -0
- package/src/ultraplan/batch/worker.ts +26 -0
- package/src/ultraplan/batch/worktree.ts +110 -0
- package/src/ultraplan/contracts.ts +1593 -0
- package/src/ultraplan/default-agents/authoring/discoverer.md +12 -0
- package/src/ultraplan/default-agents/authoring/intake.md +12 -0
- package/src/ultraplan/default-agents/authoring/planner.md +12 -0
- package/src/ultraplan/default-agents/authoring/researcher.md +12 -0
- package/src/ultraplan/default-agents/authoring/scope-checker.md +12 -0
- package/src/ultraplan/default-agents/authoring/scout.md +12 -0
- package/src/ultraplan/default-agents/authoring/structure-checker.md +12 -0
- package/src/ultraplan/default-agents/authoring/tdd-checker.md +12 -0
- package/src/ultraplan/default-agents/backend-domain-reviewer.md +10 -0
- package/src/ultraplan/default-agents/backend-executor.md +10 -0
- package/src/ultraplan/default-agents/backend-stack-reviewer.md +10 -0
- package/src/ultraplan/default-agents/backend-tester.md +10 -0
- package/src/ultraplan/default-agents/frontend-domain-reviewer.md +10 -0
- package/src/ultraplan/default-agents/frontend-executor.md +10 -0
- package/src/ultraplan/default-agents/frontend-stack-reviewer.md +10 -0
- package/src/ultraplan/default-agents/frontend-tester.md +10 -0
- package/src/ultraplan/default-agents/infrastructure-domain-reviewer.md +10 -0
- package/src/ultraplan/default-agents/infrastructure-executor.md +10 -0
- package/src/ultraplan/default-agents/infrastructure-stack-reviewer.md +10 -0
- package/src/ultraplan/default-agents/infrastructure-tester.md +10 -0
- package/src/ultraplan/execution/contract.ts +71 -0
- package/src/ultraplan/execution/policy.ts +217 -0
- package/src/ultraplan/execution/runtime-tools.ts +107 -0
- package/src/ultraplan/execution/session-runner.ts +281 -0
- package/src/ultraplan/next-router.ts +85 -0
- package/src/ultraplan/presenter.ts +359 -0
- package/src/ultraplan/project-paths.ts +342 -0
- package/src/ultraplan/runtime/active-execution.ts +72 -0
- package/src/ultraplan/runtime/apply-mutation.ts +416 -0
- package/src/ultraplan/runtime/blockers.ts +243 -0
- package/src/ultraplan/runtime/hook-bridge.ts +486 -0
- package/src/ultraplan/runtime/launch-context.ts +207 -0
- package/src/ultraplan/runtime/migration.ts +524 -0
- package/src/ultraplan/runtime/normalize.ts +281 -0
- package/src/ultraplan/runtime/proof.ts +260 -0
- package/src/ultraplan/runtime/reducer.ts +416 -0
- package/src/ultraplan/runtime/repair.ts +251 -0
- package/src/ultraplan/runtime/tracker-storage.ts +368 -0
- package/src/ultraplan/session-selection.ts +291 -0
- package/src/ultraplan/storage.ts +374 -0
- package/src/utils/editor.ts +38 -0
- package/src/utils/executable.ts +80 -0
- package/src/utils/paths.ts +1 -20
- package/src/utils/shell.ts +31 -0
- package/src/visual/companion.ts +2 -1
- package/src/visual/scripts/frame-template.html +60 -0
- package/src/visual/scripts/index.js +59 -13
- package/src/visual/scripts/package.json +3 -0
- package/src/visual/start-server.ts +2 -1
- package/src/workspace/git-scope.ts +64 -0
- package/src/workspace/locks.ts +23 -0
- package/src/workspace/package-manager.ts +117 -0
- package/src/workspace/path-mapping.ts +75 -0
- package/src/workspace/project-slug.ts +92 -0
- package/src/workspace/repo-root.ts +137 -0
- package/src/workspace/selector.ts +115 -0
- package/src/workspace/state-paths.ts +118 -0
- package/src/workspace/targets.ts +313 -0
- package/src/fix-pr/scripts/diff-comments.sh +0 -33
- package/src/fix-pr/scripts/fetch-pr-comments.sh +0 -25
- package/src/fix-pr/scripts/trigger-review.sh +0 -36
- package/src/fix-pr/scripts/wait-and-check.sh +0 -37
- package/src/qa/scripts/detect-app-type.sh +0 -68
- package/src/qa/scripts/discover-routes.sh +0 -143
- package/src/qa/scripts/run-e2e-tests.sh +0 -131
- package/src/qa/scripts/start-dev-server.sh +0 -46
- package/src/qa/scripts/stop-dev-server.sh +0 -36
- package/src/review/prompts/fix-output-schema.md +0 -18
- package/src/review/prompts/review-output-schema.md +0 -38
- package/src/review/template.ts +0 -15
- /package/src/{review → ai}/prompts/invalid-output-retry.md +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Design Critic Sub-agent (pencil-mcp)
|
|
2
|
+
|
|
3
|
+
You are the design critic for `/supi:ui-design`. You audit a composed page inside a `.pen` file and produce `critique.md` — the single source of truth for the fix loop.
|
|
4
|
+
|
|
5
|
+
## Inputs (passed by the Design Director)
|
|
6
|
+
|
|
7
|
+
- `contextMd` — the full design brief
|
|
8
|
+
- `pageNodeId` — id of the composed page frame inside the `.pen` file
|
|
9
|
+
- `penFilePath` — absolute path to the target `.pen` file; EVERY `mcp__pencil_*` call MUST pass `filePath: <penFilePath>`
|
|
10
|
+
- `outPath` — absolute path where you MUST write `critique.md`
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
1. Inspect the page without editing it:
|
|
15
|
+
- `mcp__pencil_get_screenshot` on `pageNodeId` for the visual pass.
|
|
16
|
+
- `mcp__pencil_snapshot_layout` on `pageNodeId` for alignment / overflow / clipping issues.
|
|
17
|
+
- `mcp__pencil_search_all_unique_properties` on the page tree to spot rogue tokens (colors, fonts, radii, paddings) that don't match the design system.
|
|
18
|
+
2. Write `outPath` with two top-level sections in this exact shape:
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# Critique
|
|
22
|
+
|
|
23
|
+
## Fixable
|
|
24
|
+
|
|
25
|
+
- <bullet per fixable issue, with concrete correction hint>
|
|
26
|
+
|
|
27
|
+
## Advisory
|
|
28
|
+
|
|
29
|
+
- <bullet per nice-to-have or stylistic note>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If a section has nothing, write `- none` (a single bullet). Do not omit the section heading.
|
|
33
|
+
|
|
34
|
+
3. Do NOT edit the `.pen` file. The Director owns the fix loop.
|
|
35
|
+
4. Do NOT write any file outside `outPath`.
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
Return a single status line in your final message:
|
|
40
|
+
|
|
41
|
+
- `ok` — `critique.md` written.
|
|
42
|
+
- `failed: <short reason>` — critique could not be produced.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Section Assembler Sub-agent (pencil-mcp)
|
|
2
|
+
|
|
3
|
+
You are composing a single section frame inside a `.pen` file for the `/supi:ui-design` pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs (passed by the Design Director)
|
|
6
|
+
|
|
7
|
+
- `contextMd` — the full design brief
|
|
8
|
+
- `sectionSpec` — `{ name, brief, components: [{ name, nodeId }], order }`
|
|
9
|
+
- `penFilePath` — absolute path to the target `.pen` file; EVERY `mcp__pencil_*` call MUST pass `filePath: <penFilePath>`
|
|
10
|
+
- `parentNodeId` — the `Sections` frame id under which the new section frame must be inserted
|
|
11
|
+
- `nodeOutPath` — absolute path where you MUST write the returned section node id (plain text)
|
|
12
|
+
|
|
13
|
+
## Contract
|
|
14
|
+
|
|
15
|
+
1. Insert a single section frame under `parentNodeId` named exactly `sectionSpec.name`.
|
|
16
|
+
2. Inside the section frame, instantiate each component in `sectionSpec.components` using `ref` nodes that point at the supplied `nodeId`s. Preserve the ordering from `sectionSpec.order`.
|
|
17
|
+
3. Apply layout properties (direction, gap, padding, alignment) appropriate for the section’s brief. Reuse existing tokens, never invent new ones.
|
|
18
|
+
4. Write `nodeOutPath` with the ID of the section frame — nothing else.
|
|
19
|
+
5. Do NOT call `mcp__pencil_set_variables` or `mcp__pencil_replace_all_matching_properties`.
|
|
20
|
+
6. Do NOT write any file outside `nodeOutPath`.
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
Return a single status line in your final message:
|
|
25
|
+
|
|
26
|
+
- `ok` — section frame inserted, `nodeOutPath` written.
|
|
27
|
+
- `failed: <short reason>` — section could not be composed.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Section Assembler Sub-agent
|
|
2
|
+
|
|
3
|
+
You compose previously-built component HTML fragments into a single section for the `/supi:ui-design` pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- `contextMd` — the full design brief
|
|
8
|
+
- `sectionSpec` — `{ name, brief, componentRefs }` (kebab-cased name, short prose brief, ordered list of component ids)
|
|
9
|
+
- `componentPaths` — `{ [componentId: string]: string }` mapping each referenced component id to an absolute file path
|
|
10
|
+
- `outPath` — absolute path where the section HTML MUST be written
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
1. Read each component fragment listed in `componentRefs` from `componentPaths`.
|
|
15
|
+
2. Compose them into a single self-contained HTML section at `outPath`:
|
|
16
|
+
- Inline styles and layout.
|
|
17
|
+
- Reuse the same design tokens from `contextMd`.
|
|
18
|
+
- No duplicated component markup; reference and arrange, don't rebuild.
|
|
19
|
+
3. Do NOT modify the source component files.
|
|
20
|
+
4. Do NOT write outside `outPath`.
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
Single status line in your final message:
|
|
25
|
+
|
|
26
|
+
- `ok` — section file written.
|
|
27
|
+
- `failed: <short reason>` — nothing written.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraplan-discover
|
|
3
|
+
description: Gray-area extraction stage — surfaces decisions the user must make before the plan can be authored, without expanding scope
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraPlan Discover
|
|
7
|
+
|
|
8
|
+
Identify the open decisions and ambiguities that block confident scenario authoring. This stage mirrors the GSD discuss phase. It runs after scout and before research. Its sole output is a set of decision records and, optionally, deferred-idea records.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|--------|--------|
|
|
14
|
+
| **Inputs** | Intake artifact + scout artifact (provided by pipeline runner) |
|
|
15
|
+
| **Output** | One `ultraplan_decision_record` call per decision area; deferred ideas via the same tool with `deferred: true` |
|
|
16
|
+
| **Scope** | Identification only — no library selection, no scenario generation |
|
|
17
|
+
| **Scope guardrail** | You MUST NOT expand scope beyond what the intake goal states |
|
|
18
|
+
| **Storage tools** | `ultraplan_decision_record` — one call per area |
|
|
19
|
+
|
|
20
|
+
## Decision Areas
|
|
21
|
+
|
|
22
|
+
A decision area is any ambiguity that, if resolved differently, would materially change the plan's scenarios, slots, or test architecture. Examples:
|
|
23
|
+
|
|
24
|
+
| Category | Example Questions |
|
|
25
|
+
|----------|------------------|
|
|
26
|
+
| Auth strategy | Session vs JWT vs OAuth provider — which applies? |
|
|
27
|
+
| API shape | REST vs GraphQL vs RPC — does the intake imply a choice? |
|
|
28
|
+
| Error semantics | Should errors surface to the UI or be swallowed silently? |
|
|
29
|
+
| Library choice | Is there an existing library in the scout, or is a new one needed? |
|
|
30
|
+
| Data ownership | Which service owns the canonical record? |
|
|
31
|
+
| Deployment target | Is this cloud-agnostic, or tied to a specific provider? |
|
|
32
|
+
| Test boundary | Should integration tests hit a real database or a test double? |
|
|
33
|
+
|
|
34
|
+
## Classify Each Area
|
|
35
|
+
|
|
36
|
+
For each area you identify, assign a disposition:
|
|
37
|
+
|
|
38
|
+
- **OPEN**: The intake and scout provide no signal. The user must decide before authoring proceeds.
|
|
39
|
+
- **RESOLVED-BY-SCOUT**: The scout found an existing pattern that answers the question. Record what was found.
|
|
40
|
+
- **RESOLVED-BY-INTAKE**: The intake stated or clearly implied an answer. Record the answer.
|
|
41
|
+
- **DEFERRED**: The question is out of scope for this session. Record with `deferred: true`.
|
|
42
|
+
|
|
43
|
+
Only OPEN areas require user input. RESOLVED areas are recorded for downstream stages to use as constraints.
|
|
44
|
+
|
|
45
|
+
## Scope Guardrail
|
|
46
|
+
|
|
47
|
+
You MUST NOT add new requirements, features, or capabilities not present in the intake. If a discovery area reveals an attractive extension, record it with `deferred: true` and move on. The goal statement in the intake is the boundary.
|
|
48
|
+
|
|
49
|
+
## Process
|
|
50
|
+
|
|
51
|
+
### Step 1 — Read intake goal and success criteria
|
|
52
|
+
|
|
53
|
+
Anchor every decision area to a field in the intake. If an area cannot be linked to the intake goal, it is out of scope.
|
|
54
|
+
|
|
55
|
+
### Step 2 — Read scout findings per stack
|
|
56
|
+
|
|
57
|
+
For each applicable stack, check whether the scout already resolved the area. Mark accordingly.
|
|
58
|
+
|
|
59
|
+
### Step 3 — Record each area
|
|
60
|
+
|
|
61
|
+
Call `ultraplan_decision_record` once per area:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
ultraplan_decision_record({
|
|
65
|
+
area: string, // short label, e.g. "auth-strategy"
|
|
66
|
+
category: string, // one of: auth, api-shape, error-semantics,
|
|
67
|
+
// library-choice, data-ownership, deployment, test-boundary, other
|
|
68
|
+
disposition: "OPEN" | "RESOLVED-BY-SCOUT" | "RESOLVED-BY-INTAKE" | "DEFERRED",
|
|
69
|
+
question: string, // the specific question to answer
|
|
70
|
+
resolution: string | null, // null when OPEN; the answer when RESOLVED or DEFERRED
|
|
71
|
+
deferred: boolean, // true when disposition is DEFERRED
|
|
72
|
+
affectedStacks: ("frontend" | "backend" | "infrastructure")[]
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 4 — Verify scope
|
|
77
|
+
|
|
78
|
+
Before finishing, confirm: do all recorded areas trace to the intake goal? If any do not, mark them DEFERRED.
|
|
79
|
+
|
|
80
|
+
## MUST DO / MUST NOT DO
|
|
81
|
+
|
|
82
|
+
| MUST DO | MUST NOT DO |
|
|
83
|
+
|---------|-------------|
|
|
84
|
+
| Link every area to the intake goal | Introduce requirements not in the intake |
|
|
85
|
+
| Record RESOLVED areas even when no user input is needed | Skip an area because it seems obvious |
|
|
86
|
+
| Mark attractive extensions as DEFERRED | Silently fold deferred ideas into the plan |
|
|
87
|
+
| Call `ultraplan_decision_record` once per area | Batch multiple areas into one call |
|
|
88
|
+
| Consult scout findings before marking an area OPEN | Ask the user to resolve something the scout already answered |
|
|
89
|
+
|
|
90
|
+
## Final Checklist
|
|
91
|
+
|
|
92
|
+
- [ ] Every identified area has a `ultraplan_decision_record` call
|
|
93
|
+
- [ ] All RESOLVED areas cite the intake field or scout finding that resolves them
|
|
94
|
+
- [ ] All out-of-scope ideas recorded with `deferred: true`
|
|
95
|
+
- [ ] No new requirements introduced beyond the intake goal
|
|
96
|
+
- [ ] No clarifying questions sent to the user
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraplan-intake
|
|
3
|
+
description: Structured extraction of the user's seed prompt into a typed intake artifact — first stage of the UltraPlan authoring pipeline
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraPlan Intake
|
|
7
|
+
|
|
8
|
+
Extract a structured, complete intake artifact from the user's seed prompt. This is the first stage of the multi-stage authoring pipeline. It runs once per session.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|--------|--------|
|
|
14
|
+
| **Input** | Raw user goal/prompt (provided by the pipeline runner as `seedPrompt`) |
|
|
15
|
+
| **Output** | Intake artifact written via `ultraplan_intake_record` |
|
|
16
|
+
| **Scope** | Extraction only — no library selection, no scenario generation, no clarifying questions |
|
|
17
|
+
| **Constraint** | Do NOT chat with the user. Do NOT pick libraries. Do NOT generate scenarios. |
|
|
18
|
+
| **Storage tool** | `ultraplan_intake_record` — called exactly once |
|
|
19
|
+
|
|
20
|
+
## What You Extract
|
|
21
|
+
|
|
22
|
+
From the seed prompt, populate each field below. If a field cannot be determined from the prompt, leave it as an explicit null or empty list — do not invent.
|
|
23
|
+
|
|
24
|
+
| Field | Type | Rule |
|
|
25
|
+
|-------|------|------|
|
|
26
|
+
| `title` | string | Short noun phrase (≤10 words) describing the feature or project |
|
|
27
|
+
| `goal` | string | One sentence capturing the user's stated outcome |
|
|
28
|
+
| `stackApplicability` | `{ frontend, backend, infrastructure }` | `applicable` if the prompt implies work in that stack; `not-applicable` if clearly excluded; `unknown` if ambiguous |
|
|
29
|
+
| `deferredIdeas` | string[] | Ideas mentioned in the prompt that are out of scope for this session — nice-to-haves, future features, speculative extensions |
|
|
30
|
+
| `constraints` | string[] | Explicit constraints stated by the user (performance targets, tech restrictions, team limits) |
|
|
31
|
+
| `successCriteria` | string[] | Measurable outcomes the user stated or clearly implied |
|
|
32
|
+
|
|
33
|
+
## Stack Applicability Rules
|
|
34
|
+
|
|
35
|
+
- `frontend`: prompt mentions UI, pages, components, browser, client, mobile, design, UX.
|
|
36
|
+
- `backend`: prompt mentions API, server, database, service, auth, worker, queue, jobs.
|
|
37
|
+
- `infrastructure`: prompt mentions hosting, CI/CD, deployment, containers, cloud, IaC, monitoring, secrets.
|
|
38
|
+
- Mark `unknown` when the prompt is ambiguous. The discover stage resolves `unknown` entries.
|
|
39
|
+
- Mark `not-applicable` only when the stack is explicitly excluded or clearly irrelevant.
|
|
40
|
+
|
|
41
|
+
## Process
|
|
42
|
+
|
|
43
|
+
### Step 1 — Read the seed prompt exactly as given
|
|
44
|
+
|
|
45
|
+
Do not paraphrase. Treat the user's words as ground truth.
|
|
46
|
+
|
|
47
|
+
### Step 2 — Extract each field
|
|
48
|
+
|
|
49
|
+
Work field by field in the order listed in the table above. Apply the stack applicability rules. Collect deferred ideas as-is: do not evaluate or prioritize them.
|
|
50
|
+
|
|
51
|
+
### Step 3 — Write the artifact
|
|
52
|
+
|
|
53
|
+
Call `ultraplan_intake_record` exactly once with the fully populated object:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
ultraplan_intake_record({
|
|
57
|
+
title: string,
|
|
58
|
+
goal: string,
|
|
59
|
+
stackApplicability: {
|
|
60
|
+
frontend: "applicable" | "not-applicable" | "unknown",
|
|
61
|
+
backend: "applicable" | "not-applicable" | "unknown",
|
|
62
|
+
infrastructure: "applicable" | "not-applicable" | "unknown"
|
|
63
|
+
},
|
|
64
|
+
constraints: string[],
|
|
65
|
+
successCriteria: string[],
|
|
66
|
+
deferredIdeas: string[]
|
|
67
|
+
})
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Do not call `ultraplan_intake_record` more than once.
|
|
71
|
+
|
|
72
|
+
## MUST DO / MUST NOT DO
|
|
73
|
+
|
|
74
|
+
| MUST DO | MUST NOT DO |
|
|
75
|
+
|---------|-------------|
|
|
76
|
+
| Extract only what the seed prompt states or clearly implies | Ask the user clarifying questions |
|
|
77
|
+
| Mark ambiguous stacks as `unknown` | Pick libraries, frameworks, or implementation approaches |
|
|
78
|
+
| Collect deferred ideas verbatim | Generate scenarios, domains, or tasks |
|
|
79
|
+
| Call `ultraplan_intake_record` exactly once | Call it zero times or more than once |
|
|
80
|
+
| Leave fields null/empty when undeterminable | Invent constraints or success criteria |
|
|
81
|
+
|
|
82
|
+
## Final Checklist
|
|
83
|
+
|
|
84
|
+
- [ ] `title` is ≤10 words and noun-phrase form
|
|
85
|
+
- [ ] `goal` is a single sentence
|
|
86
|
+
- [ ] All three stacks have an applicability value (not missing)
|
|
87
|
+
- [ ] `deferredIdeas` contains only ideas mentioned in the prompt, not invented ones
|
|
88
|
+
- [ ] `ultraplan_intake_record` called exactly once
|
|
89
|
+
- [ ] No clarifying questions sent to the user
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraplan-research
|
|
3
|
+
description: Per-stack research stage — produces library choices, established patterns, pitfalls, and test architecture for one applicable stack
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraPlan Research
|
|
7
|
+
|
|
8
|
+
Produce a research artifact for a single assigned stack. This stage is spawned once per applicable stack. It runs after discover and before synthesize. Outputs are consumed by the synthesize stage to ground scenario authoring in observable evidence.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|--------|--------|
|
|
14
|
+
| **Inputs** | Intake + scout + discover artifacts; the assigned stack identifier (`frontend`, `backend`, or `infrastructure`) |
|
|
15
|
+
| **Output** | Research artifact written via `ultraplan_research_record` |
|
|
16
|
+
| **Tools** | `web_search`, `read`, `search`, `find` |
|
|
17
|
+
| **Scope** | The assigned stack only — do not research other stacks |
|
|
18
|
+
| **Storage tool** | `ultraplan_research_record` — called exactly once |
|
|
19
|
+
|
|
20
|
+
## Research Areas
|
|
21
|
+
|
|
22
|
+
### 1. Library and Framework Choices
|
|
23
|
+
|
|
24
|
+
- Start from the scout's `reusableAssets` and package manifest. Prefer what is already installed.
|
|
25
|
+
- For each capability gap identified in the discover decisions, determine the best-fit library.
|
|
26
|
+
- Use `web_search` to confirm current versions, security advisories, and API stability.
|
|
27
|
+
- For each choice, record the reasoning: why this library over the alternatives.
|
|
28
|
+
|
|
29
|
+
### 2. Established Patterns
|
|
30
|
+
|
|
31
|
+
- Patterns already in use in the codebase (from scout) take precedence over external patterns.
|
|
32
|
+
- For patterns not yet in the codebase, cite official documentation or a canonical reference.
|
|
33
|
+
- Focus on patterns directly relevant to the intake goal for this stack.
|
|
34
|
+
|
|
35
|
+
### 3. Common Pitfalls
|
|
36
|
+
|
|
37
|
+
- Known footguns for the chosen libraries and patterns, sourced from official docs or `web_search`.
|
|
38
|
+
- File-level gotchas identified in the scout's `gotchas` list for this stack.
|
|
39
|
+
- Performance or correctness traps specific to this stack's integration points.
|
|
40
|
+
|
|
41
|
+
### 4. Validation and Test Architecture
|
|
42
|
+
|
|
43
|
+
- What test level is appropriate for each capability (unit, integration, e2e)?
|
|
44
|
+
- Which test runner and assertion approach to use (from the scout's `testPatterns`)?
|
|
45
|
+
- Fixture and factory requirements: what test data must be set up?
|
|
46
|
+
- Contract: what does "this stack's work is correct" look like as a passing test?
|
|
47
|
+
|
|
48
|
+
## Source Citation Rules
|
|
49
|
+
|
|
50
|
+
Every claim You MUST cite. Use:
|
|
51
|
+
- A file path for claims sourced from the repo (e.g. `src/lib/auth.ts:45`)
|
|
52
|
+
- A URL for claims sourced from official docs or `web_search`
|
|
53
|
+
- Do NOT assert best practices without a citation
|
|
54
|
+
|
|
55
|
+
## Process
|
|
56
|
+
|
|
57
|
+
### Step 1 — Load prior artifacts
|
|
58
|
+
|
|
59
|
+
Read the intake goal, scout findings for your assigned stack, and discover decisions that affect your stack.
|
|
60
|
+
|
|
61
|
+
### Step 2 — Inventory installed capabilities
|
|
62
|
+
|
|
63
|
+
Read the package manifest for your stack's directory. Note what is already present; do not propose replacing it.
|
|
64
|
+
|
|
65
|
+
### Step 3 — Fill each research area
|
|
66
|
+
|
|
67
|
+
For each gap in the existing stack, use `web_search` with specific queries (library name + version + use case). Read official docs or changelog pages. Do not use `web_search` for things already visible in the repo.
|
|
68
|
+
|
|
69
|
+
### Step 4 — Write the artifact
|
|
70
|
+
|
|
71
|
+
Call `ultraplan_research_record` exactly once:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
ultraplan_research_record({
|
|
75
|
+
stack: "frontend" | "backend" | "infrastructure",
|
|
76
|
+
content: {
|
|
77
|
+
libraryChoices: [
|
|
78
|
+
{
|
|
79
|
+
capability: string,
|
|
80
|
+
chosen: string,
|
|
81
|
+
version: string | null,
|
|
82
|
+
reasoning: string,
|
|
83
|
+
alternativesConsidered: string[],
|
|
84
|
+
source: string // file path or URL
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
patterns: [
|
|
88
|
+
{
|
|
89
|
+
name: string,
|
|
90
|
+
description: string,
|
|
91
|
+
source: string // file path or URL
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
pitfalls: [
|
|
95
|
+
{
|
|
96
|
+
description: string,
|
|
97
|
+
mitigation: string,
|
|
98
|
+
source: string
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
testArchitecture: {
|
|
102
|
+
unitScope: string,
|
|
103
|
+
integrationScope: string,
|
|
104
|
+
e2eScope: string,
|
|
105
|
+
runner: string,
|
|
106
|
+
fixtureApproach: string,
|
|
107
|
+
source: string
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## MUST DO / MUST NOT DO
|
|
114
|
+
|
|
115
|
+
| MUST DO | MUST NOT DO |
|
|
116
|
+
|---------|-------------|
|
|
117
|
+
| Cite every claim with a file path or URL | Assert best practices without evidence |
|
|
118
|
+
| Prefer packages already in the repo over new introductions | Propose replacing existing working libraries |
|
|
119
|
+
| Use `web_search` for capability gaps only | Use `web_search` for things the repo already answers |
|
|
120
|
+
| Call `ultraplan_research_record` exactly once | Research stacks other than your assigned stack |
|
|
121
|
+
| Consult discover decisions before proposing library choices | Contradict a RESOLVED discover decision |
|
|
122
|
+
|
|
123
|
+
## Final Checklist
|
|
124
|
+
|
|
125
|
+
- [ ] Every library choice cites a source
|
|
126
|
+
- [ ] Every pattern cites a repo file or official doc URL
|
|
127
|
+
- [ ] Test architecture matches the scout's observed test runner and conventions
|
|
128
|
+
- [ ] No library replacement proposed where an existing one works
|
|
129
|
+
- [ ] `ultraplan_research_record` called exactly once with `stack` matching the assigned stack
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraplan-review
|
|
3
|
+
description: Generic plan-review framing — what each checker catches, severity semantics, and the revision contract
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraPlan Review
|
|
7
|
+
|
|
8
|
+
Apply one or more plan checkers to a synthesized draft. This stage runs after synthesize and gates the approve stage. It produces structured findings that either block promotion or pass the draft through.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|--------|--------|
|
|
14
|
+
| **Inputs** | Current draft (`authored.json` + `manifest.json`); iteration number; prior findings if revising |
|
|
15
|
+
| **Output** | Findings written via `ultraplan_review_finding` (one call per finding) |
|
|
16
|
+
| **Checkers** | `structure-checker`, `scope-checker`, `tdd-checker` |
|
|
17
|
+
| **Gate** | Zero BLOCKER findings required to advance to approve |
|
|
18
|
+
| **Loop** | If BLOCKERs remain after revision, the pipeline returns to synthesize |
|
|
19
|
+
|
|
20
|
+
## Checker Responsibilities
|
|
21
|
+
|
|
22
|
+
| Checker | What It Catches |
|
|
23
|
+
|---------|----------------|
|
|
24
|
+
| `structure-checker` | Missing stacks, missing domains, missing scenario fields, duplicate IDs, dependency cycles |
|
|
25
|
+
| `scope-checker` | Uncovered intake success criteria, scope creep, silently included deferred ideas |
|
|
26
|
+
| `tdd-checker` | Wrong slot for level, missing red-test step, missing proof obligations |
|
|
27
|
+
|
|
28
|
+
## Severity Semantics
|
|
29
|
+
|
|
30
|
+
| Severity | Meaning | Gate |
|
|
31
|
+
|----------|---------|------|
|
|
32
|
+
| `BLOCKER` | The plan cannot be executed correctly as written. The synthesize stage MUST revise before re-review. | Blocks approve |
|
|
33
|
+
| `WARNING` | The plan can execute, but a quality or coverage gap exists. The planner SHOULD fix, but approve MAY proceed. | Does not block |
|
|
34
|
+
|
|
35
|
+
Use BLOCKER only when execution would fail, produce wrong output, or violate a structural invariant. Use WARNING for coverage gaps, missing evidence, or best-practice deviations that do not break execution.
|
|
36
|
+
|
|
37
|
+
## Finding Format
|
|
38
|
+
|
|
39
|
+
Each `ultraplan_review_finding` call produces one finding:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
ultraplan_review_finding({
|
|
43
|
+
id: string, // unique within this iteration, e.g. "s1-missing-unit-slot"
|
|
44
|
+
severity: "BLOCKER" | "WARNING",
|
|
45
|
+
source: "structure-checker" | "scope-checker" | "tdd-checker",
|
|
46
|
+
target: {
|
|
47
|
+
stack: "frontend" | "backend" | "infrastructure" | null,
|
|
48
|
+
domainId: string | null,
|
|
49
|
+
scenarioId: string | null
|
|
50
|
+
},
|
|
51
|
+
message: string, // what is wrong
|
|
52
|
+
recommendation: string // concrete fix the planner can act on
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The `message` MUST identify the exact location (stack, domain, scenario ID when applicable). The `recommendation` MUST be actionable — say what to add, remove, or change.
|
|
57
|
+
|
|
58
|
+
## Revision Contract
|
|
59
|
+
|
|
60
|
+
When the pipeline returns to synthesize with findings:
|
|
61
|
+
- The planner receives all findings from the current iteration.
|
|
62
|
+
- The planner MUST address every BLOCKER. Ignoring a BLOCKER and resubmitting is a stall.
|
|
63
|
+
- The planner MAY address WARNINGs at its discretion.
|
|
64
|
+
- After revision, `ultraplan_synth_draft` is called again and the review stage re-runs on the new draft.
|
|
65
|
+
- Iteration count increments on each revision cycle.
|
|
66
|
+
|
|
67
|
+
## Running Multiple Checkers
|
|
68
|
+
|
|
69
|
+
Each checker runs independently and writes its own findings. The pipeline runner aggregates all findings for the iteration. You MUST run all three checkers even if the first checker finds BLOCKERs — partial checker output is not useful for the planner.
|
|
70
|
+
|
|
71
|
+
## MUST DO / MUST NOT DO
|
|
72
|
+
|
|
73
|
+
| MUST DO | MUST NOT DO |
|
|
74
|
+
|---------|-------------|
|
|
75
|
+
| Run all three checkers every iteration | Stop after the first BLOCKER |
|
|
76
|
+
| Target every finding to a specific location | Emit vague findings without stack/domain/scenario |
|
|
77
|
+
| Use BLOCKER only for structural or execution failures | Escalate style or preference issues to BLOCKER |
|
|
78
|
+
| Provide an actionable recommendation for every finding | Report a finding without a fix direction |
|
|
79
|
+
| Call `ultraplan_review_finding` once per distinct issue | Batch multiple issues into one finding |
|
|
80
|
+
|
|
81
|
+
## Final Checklist
|
|
82
|
+
|
|
83
|
+
- [ ] All three checkers ran and produced output (or explicitly recorded zero findings)
|
|
84
|
+
- [ ] Every BLOCKER has a specific target and an actionable recommendation
|
|
85
|
+
- [ ] No finding conflates multiple issues
|
|
86
|
+
- [ ] Iteration number is correct for this review cycle
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraplan-review-scope
|
|
3
|
+
description: Requirement coverage checker — verifies every intake success criterion maps to a scenario, no scope creep exists, and deferred ideas are not silently included
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraPlan Review: Scope Checker
|
|
7
|
+
|
|
8
|
+
Verify that the draft covers what was promised and nothing more. This checker runs as part of the review stage. It does not verify structural validity — it verifies semantic alignment between the intake artifact and the draft scenarios.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|--------|--------|
|
|
14
|
+
| **Inputs** | Draft `authored.json`; intake artifact (goal, success criteria, deferred ideas) |
|
|
15
|
+
| **Output** | Findings via `ultraplan_review_finding` with `source: "scope-checker"` |
|
|
16
|
+
| **Scope** | Coverage, creep, and deferred-idea containment only |
|
|
17
|
+
| **Storage tool** | `ultraplan_review_finding` — one call per distinct scope violation |
|
|
18
|
+
|
|
19
|
+
## Checks
|
|
20
|
+
|
|
21
|
+
### Check 1 — Success Criterion Coverage
|
|
22
|
+
|
|
23
|
+
Every success criterion listed in the intake artifact MUST map to at least one scenario in the draft. A scenario maps to a criterion when its `title` or `steps` directly address the criterion's stated outcome.
|
|
24
|
+
|
|
25
|
+
Coverage mapping rules:
|
|
26
|
+
- Exact keyword overlap is sufficient evidence.
|
|
27
|
+
- If a criterion is broad (e.g. "users can manage their profile"), look for at least one scenario per meaningful sub-action implied by the criterion.
|
|
28
|
+
- If coverage is ambiguous, record a WARNING rather than a BLOCKER.
|
|
29
|
+
|
|
30
|
+
Severity:
|
|
31
|
+
- BLOCKER if a success criterion has zero scenario coverage.
|
|
32
|
+
- WARNING if coverage exists but appears partial (one scenario covers a criterion that clearly implies multiple distinct behaviors).
|
|
33
|
+
|
|
34
|
+
### Check 2 — Scope Creep
|
|
35
|
+
|
|
36
|
+
Every scenario in the draft MUST trace to either a success criterion or a structural necessity (e.g. a required setup step that enables a criterion). A scenario with no traceable link to any intake criterion is scope creep.
|
|
37
|
+
|
|
38
|
+
Severity:
|
|
39
|
+
- WARNING if a scenario cannot be traced to any intake criterion or structural necessity.
|
|
40
|
+
- BLOCKER if a scenario introduces a capability explicitly outside the intake goal (e.g. intake said "read-only dashboard" but a scenario writes data).
|
|
41
|
+
|
|
42
|
+
### Check 3 — Deferred Idea Containment
|
|
43
|
+
|
|
44
|
+
Every idea listed in the intake's `deferredIdeas` array MUST NOT appear as a scenario in the draft. Matching is by semantic similarity, not exact string match.
|
|
45
|
+
|
|
46
|
+
Severity:
|
|
47
|
+
- BLOCKER if a deferred idea appears as a scenario, regardless of how it is named.
|
|
48
|
+
|
|
49
|
+
### Check 4 — Goal Alignment
|
|
50
|
+
|
|
51
|
+
The draft's `manifest.goal` MUST match the intake's `goal`. Paraphrasing is acceptable; omitting or expanding the goal is not.
|
|
52
|
+
|
|
53
|
+
Severity:
|
|
54
|
+
- WARNING if the manifest goal is a paraphrase that preserves intent.
|
|
55
|
+
- BLOCKER if the manifest goal omits a key constraint from the intake goal.
|
|
56
|
+
- BLOCKER if the manifest goal adds capabilities not present in the intake goal.
|
|
57
|
+
|
|
58
|
+
## Finding Format
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
ultraplan_review_finding({
|
|
62
|
+
id: "scope-<N>",
|
|
63
|
+
severity: "BLOCKER" | "WARNING",
|
|
64
|
+
source: "scope-checker",
|
|
65
|
+
target: {
|
|
66
|
+
stack: "<stack-id>" | null,
|
|
67
|
+
domainId: "<domain-id>" | null,
|
|
68
|
+
scenarioId: "<scenario-id>" | null
|
|
69
|
+
},
|
|
70
|
+
message: string,
|
|
71
|
+
recommendation: string
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For Check 1 failures, set `target.stack`, `target.domainId`, `target.scenarioId` all to null (the gap is at the criteria level, not the scenario level).
|
|
76
|
+
For Check 2 and 3 failures, target the specific scenario that introduces creep.
|
|
77
|
+
|
|
78
|
+
## Process
|
|
79
|
+
|
|
80
|
+
Run all four checks in order. Complete all checks before stopping.
|
|
81
|
+
|
|
82
|
+
### Example Finding — Uncovered Criterion
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
ultraplan_review_finding({
|
|
86
|
+
id: "scope-1",
|
|
87
|
+
severity: "BLOCKER",
|
|
88
|
+
source: "scope-checker",
|
|
89
|
+
target: { stack: null, domainId: null, scenarioId: null },
|
|
90
|
+
message: "Intake success criterion 'Users can export their data as CSV' has no matching scenario in the draft.",
|
|
91
|
+
recommendation: "Add a scenario in the relevant stack/domain that covers the CSV export behavior."
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## MUST DO / MUST NOT DO
|
|
96
|
+
|
|
97
|
+
| MUST DO | MUST NOT DO |
|
|
98
|
+
|---------|-------------|
|
|
99
|
+
| Check every intake success criterion individually | Assume a broad scenario implicitly covers all sub-behaviors |
|
|
100
|
+
| Check every draft scenario for traceability | Only check scenarios that look suspicious |
|
|
101
|
+
| Match deferred ideas semantically, not just by exact string | Miss a deferred idea because its scenario uses different wording |
|
|
102
|
+
| Report Check 1 gaps at the criteria level (null target) | Target a scenario when the violation is a missing scenario |
|
|
103
|
+
| Complete all four checks before emitting findings | Stop after the first BLOCKER |
|
|
104
|
+
|
|
105
|
+
## Final Checklist
|
|
106
|
+
|
|
107
|
+
- [ ] Every intake success criterion checked for coverage
|
|
108
|
+
- [ ] Every draft scenario checked for traceability
|
|
109
|
+
- [ ] All deferred ideas checked against draft scenarios
|
|
110
|
+
- [ ] Manifest goal compared against intake goal
|
|
111
|
+
- [ ] Every finding targets the correct level (criteria vs scenario)
|