supipowers 1.5.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +129 -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 +264 -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
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ The installer scans for these and offers to install missing tooling where it can
|
|
|
60
60
|
| ------------------------ | ------------------------------------------------------------- |
|
|
61
61
|
| `/supi` | Interactive menu with commands and project status |
|
|
62
62
|
| `/supi:plan` | Collaborative planning with structured task breakdown |
|
|
63
|
+
| `/supi:ui-design` | Design Director pipeline — gather UI context, decompose target into components, build mockups in browser companion, validate, save to `.omp/supipowers/ui-design/` |
|
|
63
64
|
| `/supi:review` | AI code review with validated findings docs and fix/document/discuss actions |
|
|
64
65
|
| `/supi:checks` | Run deterministic quality gates |
|
|
65
66
|
| `/supi:qa` | E2E testing pipeline with Playwright |
|
|
@@ -83,7 +84,7 @@ Most commands steer the AI session. These are TUI-only — they open native dial
|
|
|
83
84
|
|
|
84
85
|
**Planning.** `/supi:plan` steers the AI through planning phases (scope → decompose → estimate → verify), saves the result to `.omp/supipowers/plans/`, and presents an approval UI. On approval, tasks execute in the same session.
|
|
85
86
|
|
|
86
|
-
**Quality gates.** `/supi:checks` runs deterministic quality gates. Six gates are available: `lsp-diagnostics`, `lint`, `typecheck`, `format`, `test-suite`, and `build`. Each gate can be enabled independently via `/supi:config` or `.omp/supipowers/config.json`. Gates report issues with severity levels.
|
|
87
|
+
**Quality gates.** `/supi:checks` runs deterministic quality gates. Six gates are available: `lsp-diagnostics`, `lint`, `typecheck`, `format`, `test-suite`, and `build`. Each gate can be enabled independently via `/supi:config` or the shared repository config at `.omp/supipowers/config.json`. In monorepos, `/supi:checks` defaults to `All`, which runs the root target plus every workspace target sequentially; use `--target <package>` to narrow the run or `--target all` to request the batch mode explicitly. Gates report issues with severity levels.
|
|
87
88
|
|
|
88
89
|
**AI code review.** `/supi:review` runs a programmatic AI review pipeline with configurable depth (quick, deep, or multi-agent). It uses headless agent sessions with structured JSON validation, always validates findings before user action, writes the current validated findings to a session `findings.md` document, and then presents three next-step choices: `Fix now`, `Document only`, or `Discuss before fixing`.
|
|
89
90
|
|
|
@@ -127,7 +128,7 @@ Use `/supi:agents` to inspect the merged set that will actually run.
|
|
|
127
128
|
|
|
128
129
|
## Quality gates
|
|
129
130
|
|
|
130
|
-
`/supi:checks` runs deterministic quality gates. Each gate is independently configurable in `quality.gates` via `/supi:config` or the config JSON files:
|
|
131
|
+
`/supi:checks` runs deterministic quality gates. Each gate is independently configurable in `quality.gates` via `/supi:config` or the shared config JSON files:
|
|
131
132
|
|
|
132
133
|
| Gate | What it checks | Config type |
|
|
133
134
|
| ------------------ | ------------------------------- | ----------------- |
|
|
@@ -138,7 +139,7 @@ Use `/supi:agents` to inspect the merged set that will actually run.
|
|
|
138
139
|
| `test-suite` | Test runner | enabled + command |
|
|
139
140
|
| `build` | Build verification | enabled + command |
|
|
140
141
|
|
|
141
|
-
Gates default to disabled. Enable them
|
|
142
|
+
Gates default to disabled. Enable them globally in `~/.omp/supipowers/config.json` or per-repository in `.omp/supipowers/config.json`. In monorepos, the repository config is shared by the root target and every workspace, and `/supi:checks` defaults to `All` (root target + every workspace target).
|
|
142
143
|
|
|
143
144
|
## Configuration
|
|
144
145
|
|
|
@@ -148,23 +149,27 @@ Gates default to disabled. Enable them per-project in `.omp/supipowers/config.js
|
|
|
148
149
|
|
|
149
150
|
Opens an interactive settings screen. Toggles flip instantly, selects open a picker, text fields open an input dialog.
|
|
150
151
|
|
|
151
|
-
Configuration
|
|
152
|
+
Configuration uses built-in defaults plus two user-managed override layers:
|
|
152
153
|
|
|
153
154
|
1. Built-in defaults
|
|
154
155
|
2. `~/.omp/supipowers/config.json` — global overrides
|
|
155
|
-
3. `.omp/supipowers/config.json` —
|
|
156
|
+
3. `.omp/supipowers/config.json` — repository overrides
|
|
156
157
|
|
|
158
|
+
`/supi:config` exposes only `Global` and `Repository`. In monorepos, the repository config is shared across every workspace; there are no per-workspace Supipowers config files for general settings.
|
|
157
159
|
|
|
158
160
|
## Release channels
|
|
159
161
|
|
|
160
162
|
Three built-in channels are available: `github` (GitHub Release via `gh` CLI), `gitlab` (GitLab Release via `glab` CLI), and `gitea` (Gitea Release via `tea` CLI). Channels are selected per-project in `release.channels`.
|
|
161
163
|
|
|
162
|
-
|
|
164
|
+
`/supi:release` auto-detects publishable release targets at runtime. In single-package repos it keeps the classic root-package flow. In Bun, npm, pnpm, and Yarn workspaces it discovers publishable packages from workspace metadata, auto-selects the only publishable target when there is one, and otherwise opens a picker that lists all publishable packages with changed packages first. Target choice is runtime-only and is not persisted to config.
|
|
163
165
|
|
|
164
|
-
|
|
166
|
+
Release notes are scoped to the selected target's publishable paths. When that target declares a `files` whitelist in its `package.json`, only commits touching those paths are included. Otherwise the changelog falls back to the target package directory plus its `package.json`. Root releases keep the configured `release.tagFormat`; workspace releases use `<package-name>@<version>` tags to avoid collisions across packages.
|
|
167
|
+
|
|
168
|
+
`/supi:release` accepts three optional flags:
|
|
165
169
|
|
|
166
170
|
| Flag | Effect |
|
|
167
171
|
| ----------- | ------ |
|
|
172
|
+
| `--target <package>` | Skip the target picker and release the named package directly |
|
|
168
173
|
| `--raw` | Skip AI polish of release notes; use raw conventional-commit output |
|
|
169
174
|
| `--dry-run` | Run the full release flow without publishing |
|
|
170
175
|
|
|
@@ -187,7 +192,7 @@ Custom channels can be defined in `release.customChannels`:
|
|
|
187
192
|
| Field | Required | Description |
|
|
188
193
|
| ---------------- | -------- | -------------------------------------------------------------- |
|
|
189
194
|
| `label` | yes | Display name shown in the release picker |
|
|
190
|
-
| `publishCommand` | yes | Shell command run to publish; `$tag`, `$version`, `$changelog` are passed as environment variables |
|
|
195
|
+
| `publishCommand` | yes | Shell command run to publish; `$tag`, `$version`, `$changelog`, `$targetName`, `$targetId`, `$targetPath`, `$manifestPath`, and `$packageManager` are passed as environment variables |
|
|
191
196
|
| `detectCommand` | no | Shell command to detect availability; exit 0 = available. If omitted, the channel is assumed available |
|
|
192
197
|
|
|
193
198
|
## Skills
|
|
@@ -197,6 +202,7 @@ Supipowers ships runtime-loaded prompt skills that are also available to the age
|
|
|
197
202
|
| Skill | Used by |
|
|
198
203
|
| ----------------------- | ----------------------- |
|
|
199
204
|
| `planning` | `/supi:plan` |
|
|
205
|
+
| `ui-design` | `/supi:ui-design` |
|
|
200
206
|
| `code-review` | Manual prompting / reusable review guidance |
|
|
201
207
|
| `qa-strategy` | `/supi:qa` |
|
|
202
208
|
| `fix-pr` | `/supi:fix-pr` |
|
package/bin/install.mjs
CHANGED
|
@@ -5,11 +5,26 @@ import { dirname, join } from "node:path";
|
|
|
5
5
|
|
|
6
6
|
const isWindows = process.platform === "win32";
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
|
|
9
|
+
const userArgs = process.argv.slice(2);
|
|
10
|
+
const subcommand = userArgs[0];
|
|
11
|
+
|
|
12
|
+
let script;
|
|
13
|
+
let scriptArgs;
|
|
14
|
+
|
|
15
|
+
if (subcommand === "migrate") {
|
|
16
|
+
// `bunx supipowers migrate [...]` — execution-state migration.
|
|
17
|
+
script = join(__dirname, "migrate.ts");
|
|
18
|
+
scriptArgs = userArgs.slice(1);
|
|
19
|
+
} else {
|
|
20
|
+
// Default: installer flow. When invoked via bunx/npx, always force a full
|
|
21
|
+
// install to guarantee node_modules/ and a consistent extension directory.
|
|
22
|
+
// The --force flag bypasses the "already up to date" version check.
|
|
23
|
+
script = join(__dirname, "install.ts");
|
|
24
|
+
scriptArgs = ["--force", ...userArgs];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result = spawnSync("bun", [script, ...scriptArgs], {
|
|
13
28
|
stdio: "inherit",
|
|
14
29
|
env: process.env,
|
|
15
30
|
shell: isWindows,
|
package/bin/install.ts
CHANGED
|
@@ -25,6 +25,11 @@ import { resolve, dirname, join } from "node:path";
|
|
|
25
25
|
import { fileURLToPath } from "node:url";
|
|
26
26
|
import { homedir } from "node:os";
|
|
27
27
|
import { scanAll, installDep, formatReport } from "../src/deps/registry.js";
|
|
28
|
+
import {
|
|
29
|
+
runMempalaceSetup,
|
|
30
|
+
snapshotMempalaceInstall,
|
|
31
|
+
} from "../src/mempalace/installer-helper.js";
|
|
32
|
+
import { createPaths } from "../src/platform/types.js";
|
|
28
33
|
import type { ExecResult } from "../src/platform/types.js";
|
|
29
34
|
|
|
30
35
|
const isWindows = process.platform === "win32";
|
|
@@ -128,6 +133,7 @@ async function exec(cmd: string, args: string[]): Promise<ExecResult> {
|
|
|
128
133
|
|
|
129
134
|
const cliArgs = process.argv.slice(2);
|
|
130
135
|
const skipDeps = cliArgs.includes("--skip-deps");
|
|
136
|
+
const skipMempalace = cliArgs.includes("--skip-mempalace");
|
|
131
137
|
const FORCE = cliArgs.includes("--force");
|
|
132
138
|
const DEBUG = cliArgs.includes("--debug");
|
|
133
139
|
|
|
@@ -555,6 +561,14 @@ async function main(): Promise<void> {
|
|
|
555
561
|
}
|
|
556
562
|
}
|
|
557
563
|
|
|
564
|
+
// ── Step 5: MemPalace memory (optional) ─────────────────────
|
|
565
|
+
|
|
566
|
+
if (!skipMempalace) {
|
|
567
|
+
await offerMempalaceSetup();
|
|
568
|
+
} else {
|
|
569
|
+
log("--skip-mempalace flag set, skipping MemPalace prompt");
|
|
570
|
+
}
|
|
571
|
+
|
|
558
572
|
// ── Done ───────────────────────────────────────────────────
|
|
559
573
|
|
|
560
574
|
const targetNames = targets.map((t) => t.name.toLowerCase()).join(" or ");
|
|
@@ -566,6 +580,87 @@ async function main(): Promise<void> {
|
|
|
566
580
|
outro(`supipowers is ready!`);
|
|
567
581
|
}
|
|
568
582
|
|
|
583
|
+
async function offerMempalaceSetup(): Promise<void> {
|
|
584
|
+
const cwd = process.cwd();
|
|
585
|
+
const paths = createPaths(".omp");
|
|
586
|
+
const snap = snapshotMempalaceInstall(paths, cwd);
|
|
587
|
+
|
|
588
|
+
if (!snap.bridgeOk) {
|
|
589
|
+
note(
|
|
590
|
+
`MemPalace bridge missing at ${snap.bridgePath}.\n` +
|
|
591
|
+
"The supipowers package was installed without the bundled Python bridge.\n" +
|
|
592
|
+
"Reinstall supipowers and rerun setup.",
|
|
593
|
+
"MemPalace",
|
|
594
|
+
);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const message = snap.ready
|
|
599
|
+
? `Reinstall MemPalace memory (mempalace==${snap.packageVersion})? Recreates the managed venv.`
|
|
600
|
+
: "Install MemPalace memory now? Downloads uv (~30MB), Python 3.12, and the mempalace package.";
|
|
601
|
+
|
|
602
|
+
const ok = await confirm({
|
|
603
|
+
message,
|
|
604
|
+
initialValue: !snap.ready,
|
|
605
|
+
});
|
|
606
|
+
if (isCancel(ok) || !ok) {
|
|
607
|
+
note(
|
|
608
|
+
"Skipped. Run `/supi:memory setup` from inside OMP, or rerun the installer to revisit this step.",
|
|
609
|
+
"MemPalace",
|
|
610
|
+
);
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
const s = spinner();
|
|
615
|
+
s.start("Installing MemPalace...");
|
|
616
|
+
|
|
617
|
+
const runner = async (
|
|
618
|
+
cmd: string,
|
|
619
|
+
args: string[],
|
|
620
|
+
runnerOpts?: { input?: string; timeoutMs?: number },
|
|
621
|
+
) => {
|
|
622
|
+
const result = run(cmd, args, {
|
|
623
|
+
...(runnerOpts?.input ? { input: runnerOpts.input } : {}),
|
|
624
|
+
...(runnerOpts?.timeoutMs ? { timeout: runnerOpts.timeoutMs } : {}),
|
|
625
|
+
});
|
|
626
|
+
return {
|
|
627
|
+
code: result.status ?? 1,
|
|
628
|
+
stdout: result.stdout ?? "",
|
|
629
|
+
stderr: result.stderr ?? "",
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
const result = await runMempalaceSetup({
|
|
634
|
+
paths,
|
|
635
|
+
cwd,
|
|
636
|
+
runner,
|
|
637
|
+
onProgress: (msg) => s.message(msg),
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
if (!result.ok) {
|
|
641
|
+
s.stop("MemPalace installation failed");
|
|
642
|
+
note(
|
|
643
|
+
`${result.error.message}\n\n${result.error.remediation ?? ""}`.trim(),
|
|
644
|
+
"MemPalace error",
|
|
645
|
+
);
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
s.stop(
|
|
650
|
+
`MemPalace v${result.details.packageVersion} ready (Python ${result.details.managedPython} via uv)`,
|
|
651
|
+
);
|
|
652
|
+
note(
|
|
653
|
+
`palace path: ~/.mempalace/palace\n` +
|
|
654
|
+
`managed venv: ${result.details.venvPath}\n` +
|
|
655
|
+
`uv binary: ${result.details.uvPath} (${result.details.uvVersion})\n\n` +
|
|
656
|
+
"On the first OMP session in this project, ask the agent to run\n" +
|
|
657
|
+
` mempalace(action="init", dir=".", yes=true)\n` +
|
|
658
|
+
` mempalace(action="mine", dir=".", limit=20)\n` +
|
|
659
|
+
"or just say `init mempalace` and the agent will register the project's wing and seed memory.",
|
|
660
|
+
"MemPalace",
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
|
|
569
664
|
main().catch((e) => {
|
|
570
665
|
console.error(e);
|
|
571
666
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supipowers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Workflow extension for OMP coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "bun test tests/",
|
|
7
|
+
"test": "bun test --timeout 20000 tests/",
|
|
8
8
|
"typecheck": "tsc --noEmit",
|
|
9
|
-
"test:watch": "bun test --watch tests/",
|
|
9
|
+
"test:watch": "bun test --timeout 20000 --watch tests/",
|
|
10
|
+
"test:evals": "bun test --timeout 20000 tests/evals/",
|
|
10
11
|
"build": "tsc -p tsconfig.build.json",
|
|
12
|
+
"install:visual-server": "npm --prefix src/visual/scripts ci --ignore-scripts --no-audit --no-fund",
|
|
13
|
+
"postinstall": "bun run install:visual-server",
|
|
11
14
|
"prepare": "git config core.hooksPath hooks || true"
|
|
12
15
|
},
|
|
13
16
|
"engines": {
|
|
@@ -61,7 +64,8 @@
|
|
|
61
64
|
},
|
|
62
65
|
"dependencies": {
|
|
63
66
|
"@clack/prompts": "^0.10.0",
|
|
64
|
-
"handlebars": "^4.7.8"
|
|
67
|
+
"handlebars": "^4.7.8",
|
|
68
|
+
"yaml": "^2.8.3"
|
|
65
69
|
},
|
|
66
70
|
"peerDependencies": {
|
|
67
71
|
"@oh-my-pi/pi-coding-agent": "*",
|
|
@@ -4,9 +4,9 @@ Route high-output tool calls through sandboxed execution to protect the context
|
|
|
4
4
|
|
|
5
5
|
| Scope | Tool routing rules for supi-context-mode |
|
|
6
6
|
|-------|-----------------------------------------------------|
|
|
7
|
-
| Trigger |
|
|
7
|
+
| Trigger | Active-aware; only currently active `ctx_*` tools can be used or named as enforced replacements |
|
|
8
8
|
| Goal | Prevent context flooding — a single unrouted command can dump 56 KB into context |
|
|
9
|
-
| Key rule | Blocked tools
|
|
9
|
+
| Key rule | Blocked native tools are blocked only when an active `ctx_*` replacement exists |
|
|
10
10
|
|
|
11
11
|
## Tool Selection Hierarchy
|
|
12
12
|
|
|
@@ -16,27 +16,28 @@ Pick the highest-priority tool that fits the task:
|
|
|
16
16
|
|----------|------|---------|
|
|
17
17
|
| 1 — GATHER | `ctx_batch_execute(commands, queries)` | Primary tool. Runs all commands, auto-indexes, returns search results. ONE call replaces 30+ individual calls. |
|
|
18
18
|
| 2 — FOLLOW-UP | `ctx_search(queries: ["q1", "q2", ...])` | Query already-indexed content. Pass ALL questions as array in ONE call. |
|
|
19
|
+
| 2.5 — CACHE | `ctx_open_cached(handle, offset?, limit?)` | Open `cache://<sha>` handles when this tool is active. Returns bounded slices only. |
|
|
19
20
|
| 3 — PROCESSING | `ctx_execute(language, code)` / `ctx_execute_file(path, language, code)` | Sandbox execution. Only stdout enters context. |
|
|
20
21
|
| 4 — WEB | `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` | Fetch, chunk, index, query. Raw HTML never enters context. |
|
|
21
22
|
| 5 — INDEX | `ctx_index(content, source)` | Store content in FTS5 knowledge base for later search. |
|
|
22
23
|
|
|
23
24
|
## Blocked Commands
|
|
24
25
|
|
|
25
|
-
Blocked commands are intercepted
|
|
26
|
+
Blocked commands are intercepted only when their replacement `ctx_*` tool is active for the turn. Do NOT retry via Bash when a block reason names an active replacement.
|
|
26
27
|
|
|
27
28
|
| Blocked tool | Replacement |
|
|
28
29
|
|---|---|
|
|
29
30
|
| `curl` / `wget` in Bash | `ctx_fetch_and_index(url, source)` or `ctx_execute` with `fetch()` |
|
|
30
31
|
| Inline HTTP (`fetch('http`, `requests.get(`, etc.) in Bash | `ctx_execute(language, code)` — only stdout enters context |
|
|
31
32
|
| WebFetch / Fetch tool | `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` |
|
|
32
|
-
|
|
|
33
|
+
| Search tool | `ctx_search(queries)`, `ctx_batch_execute(commands, queries)`, or `ctx_execute(language: "shell", code: "grep ...")` |
|
|
33
34
|
| Find / Glob tool | `ctx_execute(language: "shell", code: "find ...")` or `ctx_batch_execute(commands, queries)` |
|
|
34
35
|
|
|
35
|
-
### Example: routing a
|
|
36
|
+
### Example: routing a search call
|
|
36
37
|
|
|
37
38
|
```
|
|
38
39
|
// WRONG — blocked, returns error
|
|
39
|
-
|
|
40
|
+
search(pattern: "TODO", paths: ["src/"])
|
|
40
41
|
|
|
41
42
|
// CORRECT — runs in sandbox, only printed summary enters context
|
|
42
43
|
ctx_execute(language: "shell", code: "grep -rn TODO src/")
|
|
@@ -58,15 +59,21 @@ For everything else:
|
|
|
58
59
|
- `ctx_batch_execute(commands, queries)` — multiple commands + search in ONE call
|
|
59
60
|
- `ctx_execute(language: "shell", code: "...")` — sandbox, only stdout enters context
|
|
60
61
|
|
|
62
|
+
When OMP's `shellMinimizer` is active, large bash output ends with a `[raw output: artifact://<id>]` footer. The footer is OMP's pointer to the full bytes — supipowers leaves it untouched. Recover the original with `read artifact://<id>`.
|
|
63
|
+
|
|
61
64
|
### Read
|
|
62
65
|
|
|
63
|
-
Reads are never blocked — OMP's native read tool preserves hashline anchors (`
|
|
66
|
+
Reads are never blocked — OMP's native open/read tool preserves hashline anchors (e.g., `120th|content` after 14.4.1) for the edit contract. Large reads (>110 lines) are auto-compressed to head (80) + tail (30) with a `sel` hint.
|
|
64
67
|
|
|
65
68
|
For analysis-only reads where anchors are not needed, prefer `ctx_execute_file(path, language, code)` — only your printed summary enters context.
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
### Cache handles
|
|
71
|
+
|
|
72
|
+
When a prompt or prior output contains a `cache://<sha>` handle, open it with `ctx_open_cached(handle, offset?, limit?)` only if `ctx_open_cached` is active in the current tool catalog. Use bounded offsets/limits for follow-up reads; do not assume cached handles can be opened when the tool is inactive.
|
|
73
|
+
|
|
74
|
+
## Runtime Routing Guidance
|
|
68
75
|
|
|
69
|
-
The
|
|
76
|
+
The injected prompt is a compact, active-aware summary generated from the current active tool list. This static file is reference documentation; it is not injected wholesale.
|
|
70
77
|
|
|
71
78
|
## Output Constraints
|
|
72
79
|
|
|
@@ -82,7 +89,7 @@ The routing block is automatically injected into subagent prompts. Bash-type sub
|
|
|
82
89
|
|
|
83
90
|
## Checklist
|
|
84
91
|
|
|
85
|
-
- [ ] Used tool hierarchy (batch_execute > search > execute > fetch) — not raw Bash/
|
|
92
|
+
- [ ] Used tool hierarchy (batch_execute > search > execute > fetch) — not raw Bash/Search/Find
|
|
86
93
|
- [ ] No blocked tool calls attempted
|
|
87
94
|
- [ ] Artifacts written to files, not returned inline
|
|
88
95
|
- [ ] Source labels are descriptive for later search
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness
|
|
3
|
+
description: Guides the harness-engineering pipeline — turn a codebase into one that resists agentic slop with agent-neutral docs, mechanically enforced architecture, and three runtime guardrails
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Harness Skill
|
|
7
|
+
|
|
8
|
+
Loaded by `/supi:harness`. Drives a six-phase pipeline that turns an arbitrary codebase into a *harness-friendly* one and installs a persistent **anti-slop** layer that catches the failure modes LLMs reliably fall into.
|
|
9
|
+
|
|
10
|
+
## What it produces
|
|
11
|
+
|
|
12
|
+
- **Tier 1 — agent-neutral**: `AGENTS.md`, `docs/architecture.md`, `docs/golden-principles.md`, native lint/structural-test/eval configs at the repo root. Usable by any harness (Codex, Claude Code, Cursor, supipowers, …).
|
|
13
|
+
- **Tier 2 — supipowers-aware**: `.omp/supipowers/config.json` gate wiring + `.omp/supipowers/review-agents/harness-architecture.md`.
|
|
14
|
+
- **Tier 3 — anti-slop**: persistent slop queue, layer-aware context injection on every agent turn, pre-edit duplication probe, post-session dead-code sweep, lenient + strict scorecard, and architecture-aware LLM reviewer.
|
|
15
|
+
|
|
16
|
+
## Phases
|
|
17
|
+
|
|
18
|
+
|#|Phase|Artifact|Validator|Gate|
|
|
19
|
+
|---|---|---|---|---|
|
|
20
|
+
|1|Discover|`<session>/discover.json`|TypeBox schema + cross-check vs deps registry|user review|
|
|
21
|
+
|2|Research|`<session>/research/<topic>.md`|≥2 primary sources + `## Options` / `## Recommendation`|none|
|
|
22
|
+
|3|Design|`<session>/design-spec.md` + `<session>/decisions.jsonl`|Spec-reviewer sub-agent|user approval|
|
|
23
|
+
|4|Plan|`~/.omp/supipowers/projects/<slug>/plans/<plan>.md`|Reuses `validatePlanMarkdown`|OMP plan-mode UI|
|
|
24
|
+
|5|Implement|repo writes (Tier 1+2+3)|`bun typecheck` + `bun test` + anti-slop hooks loadable|none|
|
|
25
|
+
|6|Validate|`<session>/validate-report.json`|Re-runs every artifact + anti-slop scan + synthetic-edit test|user accept|
|
|
26
|
+
|—|GC|drift report + targeted fix sub-agents|reuses Validate|none|
|
|
27
|
+
|
|
28
|
+
Each stage runs as a fresh `platform.createAgentSession` with a per-stage prompt. Stage runners are idempotent: if the canonical artifact exists and validates, the stage is skipped.
|
|
29
|
+
|
|
30
|
+
## Gate modes
|
|
31
|
+
|
|
32
|
+
- `default`: gate at Discover review, Design approval, Plan-approval, Validate-accept.
|
|
33
|
+
- `auto`: end-to-end without user gates.
|
|
34
|
+
- `manual`: gate every stage.
|
|
35
|
+
|
|
36
|
+
## Anti-slop guardrails
|
|
37
|
+
|
|
38
|
+
Three project-scoped runtime hooks, all individually toggle-able in `.omp/supipowers/config.json`:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"harness": {
|
|
43
|
+
"anti_slop": {
|
|
44
|
+
"pre_edit_dupe_probe": { "enabled": true, "threshold": 0.85, "min_token_count": 30 },
|
|
45
|
+
"post_session_sweep": { "enabled": true, "block_on_new_dead_code": false },
|
|
46
|
+
"layer_context_inject": { "enabled": true, "addendum_max_chars": 800 },
|
|
47
|
+
"score_floor": { "strict": 75, "lenient": 90, "release_blocking": false }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Hooks register only when `.omp/supipowers/harness/marker.json` exists at session start. Other repos see no behavior change.
|
|
54
|
+
|
|
55
|
+
## Backend selection
|
|
56
|
+
|
|
57
|
+
Discover recommends a backend based on repo languages; Design lets the user override:
|
|
58
|
+
|
|
59
|
+
|Repo profile|Recommended backend|Why|
|
|
60
|
+
|---|---|---|
|
|
61
|
+
|TypeScript / JavaScript only|`fallow` + supi-native|No Python dep, deepest supipowers integration|
|
|
62
|
+
|3+ languages, or Python/Rust/Go|`desloppify`|29-language coverage, battle-tested LLM review|
|
|
63
|
+
|TS-dominant + non-TS subtrees|`hybrid`|fallow on TS, desloppify on the rest|
|
|
64
|
+
|Niche / no external CLIs allowed|`supi-native`|Manual lint/dupe per stack|
|
|
65
|
+
|
|
66
|
+
## Score model
|
|
67
|
+
|
|
68
|
+
Scorecard has lenient + strict scores (0–100). Strict counts `wontfix` items as cost so it cannot be gamed. Score floor in config gates `/supi:checks` and CI when `release_blocking: true`.
|
|
69
|
+
|
|
70
|
+
## Subcommands
|
|
71
|
+
|
|
72
|
+
- `/supi:harness` — bare entry. New repos start the pipeline; harness-installed repos prompt **harden / rebuild / cancel**.
|
|
73
|
+
- `/supi:harness discover|research|design|plan-draft|implement|validate` — run/advance one stage.
|
|
74
|
+
- `/supi:harness resume` — resume an in-flight session.
|
|
75
|
+
- `/supi:harness status` — display stage + score badge.
|
|
76
|
+
- `/supi:harness gc` — drain the slop queue, classify mechanical vs judgmental, and dispatch fix sub-agents.
|
|
77
|
+
- `/supi:harness next` — pop the next unresolved queue entry.
|
|
78
|
+
- `/supi:harness resolve <id>` — mark an entry resolved.
|
|
79
|
+
- `/supi:harness backlog` — list every open entry.
|
|
80
|
+
- `/supi:harness score` — recompute and display the score.
|
|
81
|
+
|
|
82
|
+
## Conventions you MUST follow
|
|
83
|
+
|
|
84
|
+
- Every phase persists a typed artifact before claiming done. Validate owns the completion claim.
|
|
85
|
+
- Re-running a phase is idempotent: unchanged inputs produce identical outputs.
|
|
86
|
+
- The slop queue is content-addressed; duplicate violations from different backends collapse to the same id.
|
|
87
|
+
- Hooks must complete in ≤500 ms p95. On timeout, emit a one-line warning and skip — never block on perf.
|
|
88
|
+
- Agent-neutral artifacts (Tier 1) MUST NOT depend on supipowers being installed.
|
|
89
|
+
|
|
90
|
+
## When to run
|
|
91
|
+
|
|
92
|
+
- New repo: install the harness on day 0 so the anti-slop hooks observe every change.
|
|
93
|
+
- Existing repo: install after a major refactor so duplicates and dead code don't compound.
|
|
94
|
+
- Recurring: run `/supi:harness gc` weekly (or pin to CI) to drain the queue.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-design
|
|
3
|
+
description: Design Director state machine for `/supi:ui-design`. Drives 9 model-owned phases from scope selection through user review, producing a validated HTML mockup artifact.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design Director
|
|
7
|
+
|
|
8
|
+
Guide the Design Director through 9 model-owned phases to produce a validated design artifact under `<sessionDir>`. Loaded by `/supi:ui-design` via system-prompt override.
|
|
9
|
+
|
|
10
|
+
You **MUST NOT** generate production code, write outside the session directory, or skip phases. You **MUST NOT** call `exit_plan_mode`. Use `planning_ask` for every user question — never the raw `ask` tool.
|
|
11
|
+
|
|
12
|
+
## Director state machine
|
|
13
|
+
|
|
14
|
+
Before advancing to the next phase, you MUST verify the precondition output is on disk. `manifest.json` is the single source of truth for "what phase are we in". If state is unclear, re-read it and resume the first phase whose precondition output is missing.
|
|
15
|
+
|
|
16
|
+
| # | Phase | Precondition (file on disk) | Output (file to produce) | Manifest status on completion |
|
|
17
|
+
|---|---|---|---|---|
|
|
18
|
+
| 1 | Scope selection | `manifest.json` with `status: "in-progress"` | `planning_ask` result → update `manifest.scope`; write to `manifest.json` | `in-progress` |
|
|
19
|
+
| 2 | Context review | `manifest.scope` populated | `<session>/context.md` (rendered ContextScan + gap-interview answers) | `in-progress` |
|
|
20
|
+
| 3 | Decomposition | `<session>/context.md` exists | `<session>/screen-decomposition.html` (companion) + `<session>/decomposition.json` (kebab-case names, uniqueness asserted via `new Set(names).size === names.length`) | `in-progress` |
|
|
21
|
+
| 4 | Parallel components | `<session>/decomposition.json` exists | `<session>/components/<name>.html` + `<session>/components/<name>.tokens.json` per non-reused component | `in-progress` |
|
|
22
|
+
| 5 | Section assembly | all non-reused components present | `<session>/sections/<name>.html` per section | `in-progress` |
|
|
23
|
+
| 6 | Page composition | all sections present | `<session>/page.html`; update manifest | `critiquing` |
|
|
24
|
+
| 7 | Design-critic pass | `<session>/page.html` exists | `<session>/critique.md` with `## Fixable` and `## Advisory` headers | `awaiting-review` |
|
|
25
|
+
| 8 | Fix loop (≤ 2 iterations) | `<session>/critique.md` exists | Fixes applied in-place; critic re-run; leftover fixable items become advisory when budget exhausted | `awaiting-review` |
|
|
26
|
+
| 9 | User review gate + finalize | critic fix loop terminated | `<session>/screen-review.html`; `planning_ask` → approve / request-changes / discard; set `manifest.status = "complete"` + `approvedAt` on approve; revert to Phase 8 on request-changes; set `manifest.status = "discarded"` on discard | `complete` or `discarded` |
|
|
27
|
+
|
|
28
|
+
## Parallelism rules
|
|
29
|
+
|
|
30
|
+
- Phase 4: parallel fan-out via a single `task` call carrying one sub-task per component. Pass each sub-agent its kebab-cased component name, a short brief, and the exact target path.
|
|
31
|
+
- Phase 5: serial. Later sections may reference earlier sections; avoid races on shared assets.
|
|
32
|
+
- Phase 7: single sub-agent. Cheap, focused pass.
|
|
33
|
+
|
|
34
|
+
## Filename collision prevention
|
|
35
|
+
|
|
36
|
+
During Phase 3, before writing `decomposition.json`:
|
|
37
|
+
|
|
38
|
+
1. Kebab-case every component name.
|
|
39
|
+
2. Assert `new Set(names).size === names.length`.
|
|
40
|
+
3. On collision, disambiguate with a numeric or semantic suffix (e.g., `hero-primary`, `hero-secondary`) and re-check.
|
|
41
|
+
|
|
42
|
+
Do **NOT** invoke `task` if the collision check fails — sub-agents will race on the same output path.
|
|
43
|
+
|
|
44
|
+
## Sub-agent invocation guide
|
|
45
|
+
|
|
46
|
+
Use `task` for sub-agents; never `createAgentSession`. Three templates live under `skills/ui-design/sub-agent-templates/`:
|
|
47
|
+
|
|
48
|
+
- `component-builder.md` — Phase 4
|
|
49
|
+
- `section-assembler.md` — Phase 5
|
|
50
|
+
- `design-critic.md` — Phase 7
|
|
51
|
+
|
|
52
|
+
Every sub-agent MUST be passed the full `context.md` so component authors share the same design brief.
|
|
53
|
+
|
|
54
|
+
## HARD-GATE
|
|
55
|
+
|
|
56
|
+
You MUST NOT:
|
|
57
|
+
- Write outside `<sessionDir>`.
|
|
58
|
+
- Generate production code (`.ts`, `.tsx`, `.vue`, `.svelte`, `.py`, etc.) intended for the user's codebase.
|
|
59
|
+
- Call `exit_plan_mode` or `ExitPlanMode` — the `/supi:ui-design` completion flow runs through the `agent_end` approval hook.
|
|
60
|
+
- Use the `ask` tool — use `planning_ask` for every user prompt.
|
|
61
|
+
- Skip a phase or declare "done" without updating `manifest.json`.
|
|
62
|
+
- Invoke `task` without a completed filename-collision check (Phase 3).
|
|
63
|
+
- Claim a phase is complete before the file named in its "Output" column exists on disk.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Component Builder Sub-agent
|
|
2
|
+
|
|
3
|
+
You are building a single self-contained HTML fragment for the `/supi:ui-design` pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs (passed by the Design Director)
|
|
6
|
+
|
|
7
|
+
- `contextMd` — the full design brief (tokens, existing components, design.md, package info)
|
|
8
|
+
- `componentSpec` — `{ name, brief, reusedFrom? }` (kebab-cased name, short prose brief)
|
|
9
|
+
- `outPath` — absolute path where the HTML fragment MUST be written
|
|
10
|
+
- `tokensOutPath` — absolute path where a `tokens-used.json` summary MUST be written
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
1. Read `contextMd` and internalize the design tokens and existing components.
|
|
15
|
+
2. Produce a single-file HTML fragment at `outPath`:
|
|
16
|
+
- Self-contained: inline `<style>` or `<script>` only.
|
|
17
|
+
- No external dependencies, no remote URLs, no CDN imports.
|
|
18
|
+
- Must render standalone in a browser.
|
|
19
|
+
3. Write `tokensOutPath` as JSON: `{ "colors": ["primary", "..."], "fonts": ["sans"], "spacing": ["8px", "16px"] }` listing the token identifiers actually used.
|
|
20
|
+
4. Do NOT write outside `outPath` and `tokensOutPath`.
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
Return a single status line in your final message:
|
|
25
|
+
|
|
26
|
+
- `ok` — both files written.
|
|
27
|
+
- `failed: <short reason>` — nothing was written or the spec was unbuildable.
|
|
28
|
+
|
|
29
|
+
Never return HTML in your message body; the directory listing is the product.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Design Critic Sub-agent
|
|
2
|
+
|
|
3
|
+
You critique a composed page for consistency with the design brief in the `/supi:ui-design` pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- `contextMd` — the full design brief
|
|
8
|
+
- `pageHtml` — absolute path to the composed `page.html`
|
|
9
|
+
- `allTokensUsedJson` — absolute path to a file aggregating every component's `tokens-used.json`
|
|
10
|
+
- `outPath` — absolute path where `critique.md` MUST be written
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
1. Read the page HTML and the aggregated tokens summary.
|
|
15
|
+
2. Compare against `contextMd` for:
|
|
16
|
+
- Token consistency — are colors, fonts, and spacing drawn from the declared design system?
|
|
17
|
+
- Component reuse — are shared components used where they should be?
|
|
18
|
+
- Spacing and rhythm — are vertical/horizontal gaps consistent?
|
|
19
|
+
- Accessibility essentials — alt text, contrast, heading hierarchy.
|
|
20
|
+
3. Write `outPath` as markdown with exactly two top-level headings:
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
# Critique
|
|
24
|
+
|
|
25
|
+
## Fixable
|
|
26
|
+
|
|
27
|
+
- <finding-1>
|
|
28
|
+
- <finding-2>
|
|
29
|
+
|
|
30
|
+
## Advisory
|
|
31
|
+
|
|
32
|
+
- <finding-1>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `Fixable`: issues the director can resolve by editing existing files in the session dir.
|
|
36
|
+
- `Advisory`: issues that require design-system or scope changes — not fixable in this session.
|
|
37
|
+
|
|
38
|
+
4. Do NOT modify the page or component files.
|
|
39
|
+
5. Do NOT write outside `outPath`.
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
Single status line in your final message:
|
|
44
|
+
|
|
45
|
+
- `ok` — critique written.
|
|
46
|
+
- `failed: <short reason>` — nothing written.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Component Builder Sub-agent (pencil-mcp)
|
|
2
|
+
|
|
3
|
+
You are building a single reusable 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 (tokens, existing components, design.md, package info)
|
|
8
|
+
- `componentSpec` — `{ name, brief, reusedFrom? }` (kebab-cased name, short prose brief)
|
|
9
|
+
- `penFilePath` — absolute path to the target `.pen` file; EVERY `mcp__pencil_*` call MUST pass `filePath: <penFilePath>`
|
|
10
|
+
- `parentNodeId` — the `Components` frame id under which the new reusable frame must be inserted
|
|
11
|
+
- `nodeOutPath` — absolute path where you MUST write the returned node id (plain text, just the id) so the Director can record it in `node-manifest.json.componentNodeIds`
|
|
12
|
+
|
|
13
|
+
## Contract
|
|
14
|
+
|
|
15
|
+
1. Read `contextMd` and internalize the design tokens and existing components. Do NOT invent tokens.
|
|
16
|
+
2. Use `mcp__pencil_batch_design` to insert a single reusable frame under `parentNodeId` named exactly `componentSpec.name`. The frame MUST set `reusable: true` so the Director can instantiate it later via a `ref`.
|
|
17
|
+
3. Compose the internal structure with nested `batch_design` operations on the returned id. Prefer existing reusable components inside the `.pen` file when the user's design system already covers the shape.
|
|
18
|
+
4. Write `nodeOutPath` with the ID of the top-level reusable frame you created — nothing else, no JSON, no prose.
|
|
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` — reusable frame inserted, `nodeOutPath` written.
|
|
27
|
+
- `failed: <short reason>` — nothing inserted or the spec was unbuildable.
|
|
28
|
+
|
|
29
|
+
Never dump node JSON in your message body; the `.pen` file and `nodeOutPath` are the product.
|