@uniqbit/mate-core 0.18.5 → 0.20.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/claude-capability-plugins/companion-mentions/.claude-plugin/marketplace.json +14 -0
- package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +8 -0
- package/claude-capability-plugins/companion-mentions/hooks/companion.ts +457 -0
- package/claude-capability-plugins/companion-mentions/hooks/hooks.json +1 -0
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +403 -0
- package/claude-plugin/hooks/companion-instructions.mjs +9 -0
- package/claude-plugin/hooks/hooks.json +41 -2
- package/claude-plugin/hooks/session-attention.mjs +10 -0
- package/claude-plugin/hooks/session-end.mjs +9 -0
- package/claude-plugin/hooks/session-guidance.mjs +1 -1
- package/claude-plugin/hooks/tokensave-route.mjs +52 -0
- package/opencode-plugin/src/server.ts +17 -2
- package/opencode-plugin/src/tui.tsx +3 -1
- package/opencode-plugin/tui.tsx +4 -1
- package/package.json +52 -15
- package/src/brand/art.generated.ts +69 -0
- package/src/brand/index.ts +12 -0
- package/src/brand/palette.ts +19 -0
- package/src/brand/svg.generated.ts +8 -0
- package/src/brand/terminal.ts +88 -0
- package/src/brand/types.ts +33 -0
- package/src/cli/commands/artifact/apply-context.ts +275 -0
- package/src/cli/commands/artifact/artifact.ts +12 -0
- package/src/cli/commands/artifact/delivery/archive.ts +125 -0
- package/src/cli/commands/artifact/delivery/branch-flags.ts +55 -0
- package/src/cli/commands/artifact/delivery/environment.ts +127 -0
- package/src/cli/commands/artifact/delivery/link.ts +191 -0
- package/src/cli/commands/artifact/delivery/output.ts +97 -0
- package/src/cli/commands/artifact/finish/command.ts +83 -8
- package/src/cli/commands/artifact/finish/engine.ts +91 -14
- package/src/cli/commands/artifact/finish/finisher.ts +10 -0
- package/src/cli/commands/artifact/finish/git.ts +132 -19
- package/src/cli/commands/artifact/finish/openspec.ts +180 -138
- package/src/cli/commands/artifact/finish/secret-scan.ts +43 -0
- package/src/cli/commands/artifact/finish/worktree-cleanup.ts +92 -0
- package/src/cli/commands/artifact/pending/command.ts +31 -3
- package/src/cli/commands/artifact/pending/discovery.ts +21 -57
- package/src/cli/commands/cap/graphify.ts +52 -3
- package/src/cli/commands/cap/index-cmd.ts +71 -15
- package/src/cli/commands/cap/openspec.ts +13 -25
- package/src/cli/commands/cap/tokensave.ts +7 -5
- package/src/cli/commands/companion/companion.ts +1 -1
- package/src/cli/commands/companion/link.ts +50 -5
- package/src/cli/commands/companion/open.ts +101 -51
- package/src/cli/commands/companion/sync.ts +10 -0
- package/src/cli/commands/companion/tui.ts +17 -7
- package/src/cli/commands/companion/update.ts +143 -48
- package/src/cli/commands/doctor.ts +317 -7
- package/src/cli/commands/factory/factory.ts +301 -0
- package/src/cli/commands/install.ts +133 -9
- package/src/cli/commands/launch/shared.ts +16 -11
- package/src/cli/commands/plugin/install.ts +9 -4
- package/src/cli/commands/plugin/plugin.ts +3 -2
- package/src/cli/commands/report/adapter.ts +11 -2
- package/src/cli/commands/report/contract.ts +21 -0
- package/src/cli/commands/report/highlight.ts +34 -4
- package/src/cli/commands/report/index.ts +20 -1
- package/src/cli/commands/report/markdown.ts +110 -0
- package/src/cli/commands/report/palette.ts +118 -0
- package/src/cli/commands/report/renderer.ts +456 -153
- package/src/cli/commands/report/types.ts +16 -0
- package/src/cli/commands/session/context.ts +102 -0
- package/src/cli/commands/session/prepare.ts +32 -4
- package/src/cli/commands/session/registry.ts +90 -0
- package/src/cli/commands/setup.ts +50 -24
- package/src/cli/commands/studio/companion-removal.ts +79 -0
- package/src/cli/commands/studio/factory-credential.ts +49 -0
- package/src/cli/commands/studio/index.ts +29 -2
- package/src/cli/commands/studio/mate-inventory.ts +1 -1
- package/src/cli/commands/studio/openspec-cli.ts +10 -58
- package/src/cli/commands/studio/payload.ts +260 -15
- package/src/cli/commands/studio/routes.ts +41 -6
- package/src/cli/commands/studio/selection.ts +161 -17
- package/src/cli/commands/studio/server.ts +429 -326
- package/src/cli/commands/studio/services.ts +80 -0
- package/src/cli/commands/studio/skill-files.ts +133 -0
- package/src/cli/commands/studio/studio-app.ts +67 -0
- package/src/cli/commands/studio/terminal-assets.ts +21 -33
- package/src/cli/commands/studio/terminal.ts +85 -15
- package/src/cli/commands/studio/vault.ts +218 -44
- package/src/cli/commands/studio/views/model.ts +13 -0
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +518 -0
- package/src/cli/commands/studio/views/vault/view.ts +185 -0
- package/src/cli/commands/studio/workset-session.ts +131 -0
- package/src/cli/commands/unwrap.ts +16 -0
- package/src/cli/commands/update.ts +53 -9
- package/src/cli/commands/vscode/setup.ts +155 -0
- package/src/cli/commands/vscode/vsix.ts +73 -0
- package/src/cli/commands/working/cleanup.ts +44 -11
- package/src/cli/commands/working/link.ts +76 -0
- package/src/cli/commands/working/working.ts +10 -0
- package/src/cli/commands/working/worktree.ts +406 -0
- package/src/cli/commands/wrap.ts +38 -20
- package/src/cli/companion-link-wizard.tsx +2 -0
- package/src/cli/companion-selector.tsx +2 -0
- package/src/cli/confirm.ts +2 -0
- package/src/cli/install-plan.tsx +127 -160
- package/src/cli/launch-selector.tsx +2 -0
- package/src/cli/main.ts +31 -3
- package/src/cli/parse-flags.ts +32 -6
- package/src/cli/repo-list-table.tsx +2 -0
- package/src/cli/setup-selector.tsx +86 -151
- package/src/cli/usage.ts +20 -1
- package/src/create-mate.ts +5 -4
- package/src/hooks/companion-instructions.ts +198 -0
- package/src/hooks/hook-io.ts +78 -0
- package/src/hooks/session-banner.ts +24 -30
- package/src/hooks/session-end.ts +10 -0
- package/src/hooks/session-guidance.ts +18 -22
- package/src/hooks/session-prepare.ts +137 -34
- package/src/hooks/session-register.ts +199 -0
- package/src/hooks/tokensave-route.ts +30 -0
- package/src/hooks/validate-artifact-path.ts +90 -25
- package/src/index.ts +4 -0
- package/src/lib/apply-context/fingerprint.ts +174 -0
- package/src/lib/apply-context/protocol.ts +193 -0
- package/src/lib/change-layout.ts +154 -0
- package/src/lib/components/confirm-prompt.tsx +21 -9
- package/src/lib/components/select-menu.tsx +10 -3
- package/src/lib/components/spinner.tsx +4 -2
- package/src/lib/components/startup-progress.tsx +227 -41
- package/src/lib/components/text-input-display.tsx +2 -0
- package/src/lib/components/wizard-footer.tsx +2 -0
- package/src/lib/components/wizard-header.tsx +16 -12
- package/src/lib/context-mode-package.ts +24 -11
- package/src/lib/delivery/archive-change.ts +165 -0
- package/src/lib/delivery/branches.ts +147 -0
- package/src/lib/delivery/environment.ts +35 -0
- package/src/lib/delivery/forge.ts +279 -0
- package/src/lib/delivery/merge-git.ts +261 -0
- package/src/lib/delivery/overlap.ts +209 -0
- package/src/lib/delivery/record-delivery.ts +338 -0
- package/src/lib/delivery/record.ts +405 -0
- package/src/lib/delivery/refresh.ts +288 -0
- package/src/lib/delivery/repository-access.ts +141 -0
- package/src/lib/delivery/resolve-branch.ts +383 -0
- package/src/lib/delivery/stages.ts +111 -0
- package/src/lib/delivery/token.ts +24 -0
- package/src/lib/factory/attach-client.ts +113 -0
- package/src/lib/factory/attach.ts +178 -0
- package/src/lib/factory/broker.ts +190 -0
- package/src/lib/factory/bun-commands.ts +39 -0
- package/src/lib/factory/client.ts +92 -0
- package/src/lib/factory/command.ts +61 -0
- package/src/lib/factory/credential-store.ts +153 -0
- package/src/lib/factory/frames.ts +77 -0
- package/src/lib/factory/ids.ts +58 -0
- package/src/lib/factory/keyed-serial.ts +27 -0
- package/src/lib/factory/outcomes/actions.ts +114 -0
- package/src/lib/factory/outcomes/index.ts +391 -0
- package/src/lib/factory/outcomes/lifecycle.ts +205 -0
- package/src/lib/factory/outcomes/runs.ts +81 -0
- package/src/lib/factory/outcomes/sessions.ts +38 -0
- package/src/lib/factory/prepare.ts +49 -0
- package/src/lib/factory/pty.ts +103 -0
- package/src/lib/factory/runner/companion-context.ts +178 -0
- package/src/lib/factory/runner/control.ts +92 -0
- package/src/lib/factory/runner/harness-agent.ts +250 -0
- package/src/lib/factory/runner/live.ts +159 -0
- package/src/lib/factory/runner/questions.ts +22 -0
- package/src/lib/factory/runner/rank.ts +26 -0
- package/src/lib/factory/runner/run-policy.ts +12 -0
- package/src/lib/factory/runner/run.ts +199 -0
- package/src/lib/factory/runner/scheduler.ts +416 -0
- package/src/lib/factory/runner/state.ts +233 -0
- package/src/lib/factory/runner/workflow.ts +542 -0
- package/src/lib/factory/runtime.ts +981 -0
- package/src/lib/factory/sandbox.ts +292 -0
- package/src/lib/factory/worktree-branch.ts +17 -0
- package/src/lib/frontmatter.ts +18 -0
- package/src/lib/install.ts +66 -14
- package/src/lib/live-progress.ts +36 -0
- package/src/lib/member-choices.ts +67 -0
- package/src/lib/opencode-plugin-package.ts +5 -5
- package/src/lib/opencode-server.ts +238 -0
- package/src/lib/openspec-cli.ts +116 -0
- package/src/lib/openspec-scopes.ts +86 -0
- package/src/lib/orchestrator/adapters/base.ts +55 -22
- package/src/lib/orchestrator/adapters/claude-args.ts +50 -0
- package/src/lib/orchestrator/adapters/claude.ts +201 -43
- package/src/lib/orchestrator/adapters/opencode.ts +55 -2
- package/src/lib/orchestrator/checkout-adoption.ts +125 -0
- package/src/lib/orchestrator/companion-registry-store.ts +6 -2
- package/src/lib/orchestrator/config-store.ts +3 -2
- package/src/lib/orchestrator/editor.ts +32 -26
- package/src/lib/orchestrator/framework-context.ts +26 -14
- package/src/lib/orchestrator/global-config-store.ts +11 -0
- package/src/lib/orchestrator/launcher.ts +15 -2
- package/src/lib/orchestrator/openspec-store.ts +14 -54
- package/src/lib/orchestrator/projection-claude-commands.ts +36 -0
- package/src/lib/orchestrator/projection-claude-links.ts +206 -0
- package/src/lib/orchestrator/projection-claude-skills.ts +37 -129
- package/src/lib/orchestrator/projection-companion-link.ts +12 -1
- package/src/lib/orchestrator/projection-entries.ts +100 -34
- package/src/lib/orchestrator/projection-opencode-copies.ts +32 -15
- package/src/lib/orchestrator/projection-openspec-store.ts +54 -9
- package/src/lib/orchestrator/projection-runtime-documents.ts +15 -6
- package/src/lib/orchestrator/projection-types.ts +36 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +87 -0
- package/src/lib/orchestrator/registry-checkouts.ts +177 -0
- package/src/lib/orchestrator/repository-link.ts +216 -57
- package/src/lib/orchestrator/serving-claude-wrap.ts +43 -0
- package/src/lib/orchestrator/session-context-link.ts +73 -0
- package/src/lib/orchestrator/session-prepare.ts +81 -11
- package/src/lib/orchestrator/setup-compatibilities.ts +56 -70
- package/src/lib/orchestrator/types.ts +12 -2
- package/src/lib/orchestrator/working-repo-projection.ts +50 -7
- package/src/lib/orchestrator/workspace-document.ts +105 -0
- package/src/lib/orchestrator/workspace-inventory.ts +5 -1
- package/src/lib/orchestrator/wrap-pass.ts +22 -1
- package/src/lib/package-paths.ts +37 -0
- package/src/lib/public-npm.ts +17 -0
- package/src/lib/runtime-directory-refresh.ts +17 -1
- package/src/lib/session-attribution.ts +52 -0
- package/src/lib/session-state.ts +285 -0
- package/src/lib/session-stop.ts +64 -0
- package/src/lib/workset/record.ts +533 -0
- package/src/lib/workset/repositories.ts +55 -0
- package/src/lib/workset/stage.ts +148 -0
- package/src/lib/workset/stages.ts +113 -0
- package/src/lib/workset/worktree-index.ts +116 -0
- package/src/lib/workset/worktree.ts +898 -0
- package/src/opencode/background-server.ts +145 -0
- package/src/opencode/companion-hooks.ts +111 -7
- package/src/opencode/companion-policy.ts +39 -20
- package/src/opencode/enter-worktree.ts +72 -0
- package/src/opencode/projected-guidance.ts +6 -2
- package/src/opencode/session-prepare.ts +2 -1
- package/src/opencode/session-register.ts +176 -0
- package/src/opencode/tui.tsx +24 -27
- package/src/plugins.ts +1 -0
- package/src/runtime/artifact-refusal.ts +63 -0
- package/src/runtime/claude-delivery-plan.ts +121 -11
- package/src/runtime/commit-attribution-guard.ts +181 -0
- package/src/runtime/companion-git.ts +52 -10
- package/src/runtime/companion-guidance.ts +20 -8
- package/src/runtime/companion-instructions.ts +340 -0
- package/src/runtime/companion-lock.ts +30 -7
- package/src/runtime/current-branch.ts +10 -0
- package/src/runtime/env.ts +59 -8
- package/src/runtime/error-message.ts +4 -0
- package/src/runtime/git-layout.ts +366 -0
- package/src/runtime/index.ts +29 -0
- package/src/runtime/launch-env-guard.ts +65 -0
- package/src/runtime/managed-block.ts +117 -0
- package/src/runtime/markdown-scan.ts +266 -0
- package/src/runtime/opencode-server-record.ts +136 -0
- package/src/runtime/physical-path.ts +111 -0
- package/src/runtime/policy.ts +50 -2
- package/src/runtime/projected-flag.ts +7 -0
- package/src/runtime/projected-guidance.ts +1 -0
- package/src/runtime/projection.ts +40 -6
- package/src/runtime/repo-local.ts +6 -1
- package/src/runtime/runtime-directory.ts +5 -0
- package/src/runtime/runtime-document-manifest.ts +62 -11
- package/src/runtime/secret-guard.ts +162 -0
- package/src/runtime/secret-patterns.ts +397 -0
- package/src/runtime/secret-scan.ts +90 -0
- package/src/runtime/serving-claude-wrap.ts +28 -0
- package/src/runtime/session-context.ts +99 -0
- package/src/runtime/session-kind.ts +13 -0
- package/src/runtime/session-registry.ts +434 -0
- package/src/runtime/shell-heredoc.ts +81 -0
- package/src/runtime/tokensave-route.ts +157 -0
- package/src/runtime/wrap-state.ts +75 -2
- package/src/runtime/write-atomic.ts +64 -0
- package/src/studio.ts +126 -0
- package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +14 -10
- package/src/templates/capabilities/openspec-cap/mate-minimal/templates/spec.md +3 -5
- package/src/templates/capabilities/openspec-cap/mate-v1/schema.yaml +18 -102
- package/src/templates/capabilities/openspec-cap/mate-v1/templates/spec.md +3 -5
- package/src/templates/capabilities/openspec-cap/openspec-conventions.yaml +20 -14
- package/src/templates/mate-skills/THIRD-PARTY-NOTICES.md +40 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +162 -0
- package/src/templates/mate-skills/agents/mate-apply-change/references/mate-compact-apply.md +47 -0
- package/src/templates/mate-skills/agents/mate-apply-change/references/openspec-apply-change.md +200 -0
- package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +81 -0
- package/src/templates/mate-skills/{claude/mate-openspec-backfill → agents/mate-backfill-spec}/SKILL.md +11 -4
- package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +110 -0
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +66 -0
- package/src/templates/mate-skills/agents/mate-explore-change/references/openspec-explore.md +350 -0
- package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +11 -4
- package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +2 -2
- package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +12 -5
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +102 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/mate-revise.md +45 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-propose.md +169 -0
- package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-update-change.md +103 -0
- package/src/templates/mate-skills/agents/{mate-artifact-publish → mate-publish-artifact}/SKILL.md +109 -24
- package/src/templates/mate-skills/{claude/mate-artifact-publish → agents/mate-publish-artifact}/references/openspec.md +8 -5
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +95 -16
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +87 -68
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +162 -0
- package/src/templates/mate-skills/claude/mate-apply-change/references/mate-compact-apply.md +47 -0
- package/src/templates/mate-skills/claude/mate-apply-change/references/openspec-apply-change.md +200 -0
- package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +81 -0
- package/src/templates/mate-skills/{agents/mate-openspec-backfill → claude/mate-backfill-spec}/SKILL.md +11 -4
- package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +110 -0
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +66 -0
- package/src/templates/mate-skills/claude/mate-explore-change/references/openspec-explore.md +350 -0
- package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +11 -4
- package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +2 -2
- package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +12 -5
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +102 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/mate-revise.md +45 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-propose.md +169 -0
- package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-update-change.md +103 -0
- package/src/templates/mate-skills/claude/{mate-artifact-publish → mate-publish-artifact}/SKILL.md +109 -24
- package/src/templates/mate-skills/{agents/mate-artifact-publish → claude/mate-publish-artifact}/references/openspec.md +8 -5
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +95 -16
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +87 -68
- package/src/templates/mate-skills/openspec-references.ts +142 -0
- package/src/templates/root/TEMPLATE_AGENTS.md +2 -2
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +4340 -419
- package/src/tools/setup/capabilities/companion-mentions.ts +27 -0
- package/src/tools/setup/capabilities/context-mode.ts +56 -7
- package/src/tools/setup/capabilities/graphify-gate.ts +31 -0
- package/src/tools/setup/capabilities/graphify-secrets.ts +243 -0
- package/src/tools/setup/capabilities/graphify.ts +46 -7
- package/src/tools/setup/capabilities/openspec.ts +163 -272
- package/src/tools/setup/capabilities/react-doctor.ts +8 -1
- package/src/tools/setup/capabilities/rtk.ts +4 -0
- package/src/tools/setup/capabilities/tokensave.ts +113 -71
- package/src/tools/setup/context-services.ts +9 -17
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -3
- package/src/tools/setup/dynamic-plugins/install.ts +24 -28
- package/src/tools/setup/engine.ts +100 -23
- package/src/tools/setup/install-contract.ts +8 -0
- package/src/tools/setup/managed-output.ts +51 -0
- package/src/tools/setup/mate-skill-copies.ts +51 -0
- package/src/tools/setup/mate.ts +86 -11
- package/src/tools/setup/package-managers/uv.ts +73 -11
- package/src/tools/setup/plugin.ts +40 -0
- package/src/tools/setup/plugins/guidance.ts +7 -4
- package/src/tools/setup/providers/agent-file-sections.ts +4 -2
- package/src/tools/setup/providers/claude-attribution.ts +65 -0
- package/src/tools/setup/providers/claude-plugin-folders.ts +625 -0
- package/src/tools/setup/providers/claude-plugin-hooks.ts +77 -19
- package/src/tools/setup/providers/claude-worktree-plugins.ts +122 -0
- package/src/tools/setup/providers/claude.ts +310 -8
- package/src/tools/setup/providers/opencode.ts +180 -1
- package/src/tools/setup/utils.ts +18 -4
- package/src/tools/setup/working-repo-cleanup.ts +29 -1
- package/src/tools/setup/working-repo-local-state.ts +252 -75
- package/src/tools/setup.ts +183 -26
- package/studio-dist/client/assets/app-CdPiFv59.css +2 -0
- package/studio-dist/client/assets/button-BIIHE0EQ.js +3 -0
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +1 -0
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +1 -0
- package/studio-dist/client/assets/dist-Dm7MtyHc.js +5 -0
- package/studio-dist/client/assets/factory-BZy0E8ty.js +4 -0
- package/studio-dist/client/assets/index-B3wkMzjA.js +40 -0
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +1 -0
- package/studio-dist/client/assets/panel-CbajlC3p.js +1 -0
- package/studio-dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
- package/studio-dist/client/assets/prepaint-CwSrpdFA.js +27 -0
- package/studio-dist/client/assets/react-CN2GSx7x.js +1 -0
- package/studio-dist/client/assets/reports-DllhYQ5_.js +1 -0
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +1 -0
- package/studio-dist/client/assets/routes-COm-G3mK.js +1 -0
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +1 -0
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +1 -0
- package/studio-dist/client/assets/steps-DFsH3Neu.js +1 -0
- package/studio-dist/client/assets/terminal-eU5fzQzv.css +1 -0
- package/studio-dist/client/assets/vault-B2q1nBY5.js +1 -0
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +1 -0
- package/studio-dist/client/assets/wasm-inline-C2en61B5.js +1 -0
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-M2GBs8s3.js +4051 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +95 -0
- package/studio-dist/server/assets/actions-Bvgj9eb8.js +54 -0
- package/studio-dist/server/assets/actions-D8erOphH.js +44 -0
- package/studio-dist/server/assets/button-CIJqAhni.js +11929 -0
- package/studio-dist/server/assets/companion-view-DISASvdJ.js +39 -0
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +15 -0
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +459 -0
- package/studio-dist/server/assets/createServerRpc-tK2lE9R2.js +11 -0
- package/studio-dist/server/assets/delivery-path-C29fBynY.js +654 -0
- package/studio-dist/server/assets/dist-DpJWKyCm.js +5582 -0
- package/studio-dist/server/assets/empty-plugin-adapters-Cipd4ZH4.js +4 -0
- package/studio-dist/server/assets/factory-DGPmNGbo.js +69 -0
- package/studio-dist/server/assets/factory-DUTa0eDs.js +2172 -0
- package/studio-dist/server/assets/markdown-view-Bn7xPdks.js +86 -0
- package/studio-dist/server/assets/model-PyPALjii.js +18 -0
- package/studio-dist/server/assets/panel-3Jmn4awF.js +169 -0
- package/studio-dist/server/assets/prepaint-DJfTQ_VH.js +45 -0
- package/studio-dist/server/assets/react-Ce6dj15C.js +46 -0
- package/studio-dist/server/assets/reports-C06RXVE2.js +18 -0
- package/studio-dist/server/assets/reports-D6YMqhnO.js +142 -0
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +34 -0
- package/studio-dist/server/assets/router-C8MGqlAY.js +13713 -0
- package/studio-dist/server/assets/routes-BcFgvqf7.js +622 -0
- package/studio-dist/server/assets/search-JAKurDNh.js +36 -0
- package/studio-dist/server/assets/shell-DS3wUexh.js +52 -0
- package/studio-dist/server/assets/skills-BEnOxiDl.js +266 -0
- package/studio-dist/server/assets/skills-CtrBAtX3.js +28 -0
- package/studio-dist/server/assets/specs-C8rv34-5.js +211 -0
- package/studio-dist/server/assets/start-h3ICWwd2.js +36 -0
- package/studio-dist/server/assets/steps-Dq_CwY_s.js +181 -0
- package/studio-dist/server/assets/studio-BeltxxKt.js +216 -0
- package/studio-dist/server/assets/utils-C9CX1kcy.js +221 -0
- package/studio-dist/server/assets/vault-BmWnryh3.js +85 -0
- package/studio-dist/server/assets/vault-Fvxt2Tzl.js +1032 -0
- package/studio-dist/server/assets/views-BgYa-za2.js +80 -0
- package/studio-dist/server/assets/warnings-DzR6fyZh.js +23 -0
- package/studio-dist/server/assets/wasm-inline-CNeBKGwC.js +3 -0
- package/studio-dist/server/assets/workflow-liRYecHk.js +73 -0
- package/studio-dist/server/server.js +16066 -0
- package/wrappers/bin/graphify +52 -4
- package/wrappers/bin/openspec +33 -9
- package/wrappers/lib/graphify-gate.mjs +8 -0
- package/src/cli/commands/studio/views/client.ts +0 -654
- package/src/cli/commands/studio/views/companion-picker.tsx +0 -95
- package/src/cli/commands/studio/views/companion-selector.tsx +0 -94
- package/src/cli/commands/studio/views/dashboard/changes.tsx +0 -107
- package/src/cli/commands/studio/views/dashboard/index.tsx +0 -19
- package/src/cli/commands/studio/views/document.tsx +0 -842
- package/src/cli/commands/studio/views/error.tsx +0 -20
- package/src/cli/commands/studio/views/reports/index.tsx +0 -49
- package/src/cli/commands/studio/views/selection-fields.tsx +0 -14
- package/src/cli/commands/studio/views/skills/index.tsx +0 -87
- package/src/cli/commands/studio/views/specs/index.tsx +0 -157
- package/src/cli/commands/studio/views/styles.ts +0 -519
- package/src/cli/commands/studio/views/terminal.tsx +0 -484
- package/src/cli/commands/studio/views/vault/state.ts +0 -43
- package/src/cli/commands/studio/views/warnings.tsx +0 -21
- package/src/cli/commands/studio/views/workflow/index.tsx +0 -21
- package/src/cli/commands/studio/views/workflow/steps.ts +0 -337
- package/src/cli/commands/studio/views/workflow/transcript.tsx +0 -190
- package/src/lib/components/theme.ts +0 -2
- package/src/tools/setup/git-utils.ts +0 -30
- package/src/tools/setup/runtime-documents.ts +0 -291
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
name: mate-openspec-conventions
|
|
2
|
-
version:
|
|
2
|
+
version: 2
|
|
3
3
|
description: Shared scope, frontmatter, delta, and canonical-spec rules for Mate schemas.
|
|
4
|
+
# Each top-level key is one section; a stage reads the sections its instruction names.
|
|
4
5
|
rules: |
|
|
5
|
-
- Every change artifact MUST name at least one paired repository and area in its
|
|
6
|
-
- Repository identity comes from the Git remote. Normalize SSH and HTTPS forms such as git@github.com:org/repository.git and https://github.com/org/repository.git to org/repository.
|
|
6
|
+
- Every change artifact MUST name at least one paired repository and area in its scopes list: a delta spec in its mate:delta comment, every other change artifact in its frontmatter.
|
|
7
|
+
- Repository identity comes from the Git remote: its full path on the host, without host, credentials, or .git. Normalize SSH and HTTPS forms such as git@github.com:org/repository.git and https://github.com/org/repository.git to org/repository; keep every nested group, so git@gitlab.example.com:group/subgroup/repository.git becomes group/subgroup/repository.
|
|
7
8
|
- In a monorepo, an Area is the owning workspace or package root: the directory containing the nearest package manifest (package.json, Cargo.toml, go.mod, and similar). A non-monorepo may use the exact affected path and uses . only when the repository root is affected.
|
|
8
9
|
- Do not use a local checkout basename, internal repository ID, synthetic Area, or N/A as durable metadata.
|
|
9
10
|
- Preserve each repository/Area pair. Never use separate repositories and areas arrays.
|
|
10
11
|
- Default a new capability to one owning package root. Use one capability per repository when a change crosses repositories. A capability spec names exactly one repository, although a change may name several.
|
|
11
|
-
- Area identity comes only from frontmatter. Capability and change folder names are descriptive and have no scope authority.
|
|
12
|
-
|
|
13
|
-
- A
|
|
12
|
+
- Area identity comes only from frontmatter or a delta's mate:delta comment. Capability and change folder names are descriptive and have no scope authority.
|
|
13
|
+
spec_rules: |
|
|
14
|
+
- A delta lives at openspec/changes/<name>/specs/<capability>/spec.md. It starts with a mate:delta comment, never YAML frontmatter, and holds nothing but blank lines and at most one # title line between that comment and its first ## section; openspec validate --strict reports any other text there.
|
|
14
15
|
- OpenSpec parses only ## ADDED Requirements, ## MODIFIED Requirements, ## REMOVED Requirements, and ## RENAMED Requirements. Every parsed requirement starts with ### Requirement:. Do not substitute User Stories in these headers.
|
|
15
|
-
- Every requirement MUST carry an Area marker whose values appear in the delta
|
|
16
|
+
- Every requirement MUST carry an Area marker whose values appear in the delta's mate:delta comment. This survives archive, which copies requirement blocks but discards the mate:delta comment.
|
|
17
|
+
canonical_rules: |
|
|
18
|
+
- A canonical spec lives at openspec/specs/<capability>/spec.md. The archive command merges delta requirement blocks into this durable file.
|
|
16
19
|
- A canonical spec uses flat frontmatter: type: spec, capability, scalar repository, areas list, and tags: [openspec/spec]. It MUST NOT retain a nested scopes list or delta-only change and delta tags.
|
|
17
20
|
- To project a delta, all its scope entries MUST name the same repository. Emit that repository as the canonical scalar and distinct Areas as areas in their original order. If repositories differ, split the capability before archive.
|
|
18
21
|
verification: |
|
|
@@ -20,16 +23,19 @@ verification: |
|
|
|
20
23
|
- mate-react-doctor: when writing tasks, end the task list of every Area whose tasks change React code (components, hooks, or other .tsx/.jsx modules) with one verification task, numbered like its neighbours, for example `- [ ] N.M Verify React changes with React Doctor [skill:mate-react-doctor]`. Areas whose tasks do not change React code get no verification task.
|
|
21
24
|
- During apply, a tagged verification task is worked like any other task by invoking its skill.
|
|
22
25
|
- Before reporting a change complete, check every Area that changed React code: if its tagged verification task is already checked, do nothing more; otherwise invoke the skill once for that Area.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
skill_tagging: |
|
|
27
|
+
A task's `[skill:<name>]` tag names only a skill installed in the Companion Repository, so every session runs the task the same way.
|
|
28
|
+
- Before tagging, check that the Companion Repository has `<name>/SKILL.md` under `.claude/skills/` or `.agents/skills/`.
|
|
29
|
+
- Never tag user-global, plugin (`<plugin>:<skill>`), or built-in skills, even when the current session offers them.
|
|
30
|
+
- When no companion skill applies, leave the task untagged.
|
|
31
|
+
example_delta_metadata: |
|
|
32
|
+
<!-- mate:delta
|
|
26
33
|
change: <change-name>
|
|
27
34
|
capability: <capability>
|
|
28
|
-
tags: [openspec/change, openspec/spec, openspec/delta]
|
|
29
35
|
scopes:
|
|
30
36
|
- repository: org/repository
|
|
31
37
|
area: .
|
|
32
|
-
|
|
38
|
+
-->
|
|
33
39
|
notes:
|
|
34
|
-
- "Change frontmatter
|
|
35
|
-
- "Do not add a ## Scopes body section; frontmatter
|
|
40
|
+
- "Change frontmatter and the delta mate:delta comment use paired scopes. Canonical frontmatter uses flat repository and areas scalars instead."
|
|
41
|
+
- "Do not add a ## Scopes body section; frontmatter and the mate:delta comment are the only sources of scope identity."
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
The following files contain workflow text from OpenSpec 1.15.0
|
|
4
|
+
(https://github.com/Fission-AI/OpenSpec), with command references rewritten to
|
|
5
|
+
the matching Mate skills:
|
|
6
|
+
|
|
7
|
+
- `claude/mate-explore-change/references/openspec-explore.md`
|
|
8
|
+
- `claude/mate-propose-change/references/openspec-propose.md`
|
|
9
|
+
- `claude/mate-apply-change/references/openspec-apply-change.md`
|
|
10
|
+
- `claude/mate-propose-change/references/openspec-update-change.md`
|
|
11
|
+
- `agents/mate-explore-change/references/openspec-explore.md`
|
|
12
|
+
- `agents/mate-propose-change/references/openspec-propose.md`
|
|
13
|
+
- `agents/mate-apply-change/references/openspec-apply-change.md`
|
|
14
|
+
- `agents/mate-propose-change/references/openspec-update-change.md`
|
|
15
|
+
|
|
16
|
+
OpenSpec is distributed under this license:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
MIT License
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2024 OpenSpec Contributors
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in all
|
|
31
|
+
copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
|
+
SOFTWARE.
|
|
40
|
+
```
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mate-apply-change
|
|
3
|
+
description: Implement a change on a recorded delivery branch, offering workset/<workset-id> instead of a protected branch. Builds on the OpenSpec apply workflow. Use when the user wants to implement, apply, or continue implementing a reviewed change.
|
|
4
|
+
allowed-tools: Bash(mate:*), Bash(openspec:*), Bash(git:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires the mate CLI and the openspec capability enabled.
|
|
7
|
+
metadata:
|
|
8
|
+
author: mate
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Mate Apply Change
|
|
13
|
+
|
|
14
|
+
The Apply change stage of the Delivery Path. Before any code changes, it records the
|
|
15
|
+
Working Repository branch the change is delivered through, so archive and publication
|
|
16
|
+
later know which merge to wait for. Then it runs the OpenSpec apply workflow.
|
|
17
|
+
|
|
18
|
+
## Step 1: Read the branch and the record
|
|
19
|
+
|
|
20
|
+
In the Working Repository, read local Git state only:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git symbolic-ref --quiet --short HEAD # current branch; fails when detached
|
|
24
|
+
git symbolic-ref --quiet --short refs/remotes/origin/HEAD # repository's default branch
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The repository's default branch (`origin/HEAD`, e.g. `main`) is not the link result's
|
|
28
|
+
`defaultBranch`, which is the change's resolved delivery branch (e.g. `workset/<id>`).
|
|
29
|
+
|
|
30
|
+
Read the change's existing record without changing it:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
mate artifact link "<change-name>" --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Step 2: Settle the delivery branch
|
|
37
|
+
|
|
38
|
+
Read `defaultBranch`, `inheritedFrom`, `diagnostics`, `ticketFormat`, and
|
|
39
|
+
`ticketCandidate` from the link result. `defaultBranch` is the change's resolved
|
|
40
|
+
delivery branch, never the repository's default branch. Report every diagnostic;
|
|
41
|
+
never derive a default from a change or Workset name. `defaultBranch: null` means ask
|
|
42
|
+
for a branch name, not infer one. When `inheritedFrom` is not empty, `defaultBranch` is
|
|
43
|
+
the open branch of those `dependsOn` changes: say this change continues on it.
|
|
44
|
+
Preserve recorded branches after membership changes;
|
|
45
|
+
a mismatch is informational, and relinking requires explicit user confirmation.
|
|
46
|
+
|
|
47
|
+
A branch is **protected** when it is the repository's default branch or matches a configured
|
|
48
|
+
protected pattern; `mate artifact link` refuses a
|
|
49
|
+
protected branch unless it is recorded as a direct delivery. Mate never asks the forge,
|
|
50
|
+
so a branch only the forge protects looks unprotected; hence the menu below.
|
|
51
|
+
|
|
52
|
+
- **A branch is already recorded** and it is the current branch → continue. When the
|
|
53
|
+
current branch differs, warn, name both branches, and ask before implementing
|
|
54
|
+
whether to switch to the recorded branch or record the current one.
|
|
55
|
+
- **On `defaultBranch`** → record it without asking:
|
|
56
|
+
`mate artifact link "<change-name>" --branch "<defaultBranch>" --json`.
|
|
57
|
+
- **Detached HEAD** → ask for the branch name, then record it.
|
|
58
|
+
- **On a fresh ticket branch** (only with `ticketFormat` `jira`): nothing is recorded,
|
|
59
|
+
the current branch is not protected, `ticketCandidate` is set, and
|
|
60
|
+
`git rev-list --count origin/HEAD..HEAD` is `0` → record it without asking
|
|
61
|
+
(`mate artifact link "<change-name>" --branch "<current>" --json`) and say in one line
|
|
62
|
+
that the change uses it with ticket `<ticketCandidate>`.
|
|
63
|
+
- **On any other branch**, protected or not → do not implement there yet. First name
|
|
64
|
+
every local commit that is not on the remote (`git log --oneline HEAD --not --remotes`)
|
|
65
|
+
and leave them where they are; never move, reset, or rebase them. On another
|
|
66
|
+
Workset's `workset/<id>` branch, name that Workset. Then offer one menu; option 1 is
|
|
67
|
+
recommended, except option 3 when the current branch is not protected and
|
|
68
|
+
`ticketCandidate` is set:
|
|
69
|
+
1. **Create or switch to `defaultBranch`**: check local and `origin`
|
|
70
|
+
refs; `git switch "<defaultBranch>"` when local,
|
|
71
|
+
`git switch --track -c "<defaultBranch>" "origin/<defaultBranch>"` when remote-only.
|
|
72
|
+
Otherwise the branch is new: record it first with
|
|
73
|
+
`mate artifact link "<change-name>" --ticket "<KEY>" --json` when a ticket was given
|
|
74
|
+
(below), else with `--branch "<defaultBranch>"`, then `git switch -c` the branch its
|
|
75
|
+
record now names. Uncommitted edits carry over. Record an existing branch after
|
|
76
|
+
switching. When `defaultBranch` is null, ask for a name instead; do not offer an
|
|
77
|
+
inferred branch.
|
|
78
|
+
2. **Create a worktree** (only when `defaultBranch` is set): say uncommitted edits stay
|
|
79
|
+
in this checkout, run `mate working worktree --change "<change-name>" --enter --json`,
|
|
80
|
+
adding `--ticket "<KEY>"` when a ticket was given (below);
|
|
81
|
+
it records the branch. When `enter.action` is `tool`, say an approval prompt may
|
|
82
|
+
follow (Claude Code asks), call the tool `enter.tool` with `enter.path`, then say
|
|
83
|
+
`enter.path` is now the Working Repository and continue at Step 3 there. On `handoff`
|
|
84
|
+
or a declined move, report `enter.reason` and any warnings, write no code, and
|
|
85
|
+
stop. `## Next steps`: name each `repositories[].path`, open a new session in this
|
|
86
|
+
repository's worktree, run `/mate-apply-change <change-name>` there. On failure,
|
|
87
|
+
report its diagnostics and offer the other options again.
|
|
88
|
+
3. **Use the current branch** (only when it is not protected): record it.
|
|
89
|
+
4. **Use or create another branch**: the user names it. Record it first with
|
|
90
|
+
`mate artifact link "<change-name>" --branch "<name>" --json`; only after that
|
|
91
|
+
succeeds, check local and `origin` refs: `git switch "<name>"` when local,
|
|
92
|
+
`git switch --track -c "<name>" "origin/<name>"` when remote-only, otherwise
|
|
93
|
+
`git switch -c "<name>"` from the current `HEAD`, so a refused name leaves no branch.
|
|
94
|
+
Uncommitted edits carry over. With `jira`, the menu hints to put the key in the name
|
|
95
|
+
(`feature/ABC-123-acme-retry`); a named branch carries its ticket only in its name,
|
|
96
|
+
so never pass `--ticket` for it. When the name holds no Jira key, say in one line
|
|
97
|
+
that no ticket is tracked, and continue.
|
|
98
|
+
5. **Work directly here** (protected branch only) — only when the user explicitly chooses it.
|
|
99
|
+
Record it as a direct delivery:
|
|
100
|
+
`mate artifact link "<change-name>" --branch "<branch>" --direct --json`.
|
|
101
|
+
|
|
102
|
+
**Tickets** exist only when `ticketFormat` is `jira`; otherwise never ask for, offer, or
|
|
103
|
+
mention one. A ticket only names a new branch; it is stored nowhere else. With `jira`,
|
|
104
|
+
when nothing is recorded or inherited and `defaultBranch` exists neither locally nor on
|
|
105
|
+
`origin`, options 1 and 2 accept an optional Jira key in the same answer: say so in the
|
|
106
|
+
menu (`1 ABC-123` names the new branch after the ticket; `1` alone creates it without
|
|
107
|
+
one). Option 4 takes no key in the answer; its name carries it. Never ask a separate
|
|
108
|
+
ticket question. An agent without a person to ask passes no
|
|
109
|
+
ticket. On a refused key, name the expected format and ask once more.
|
|
110
|
+
|
|
111
|
+
Record the branch before writing any code. When `mate artifact link` refuses, report
|
|
112
|
+
its message and ask; never work around it.
|
|
113
|
+
|
|
114
|
+
When its result lists `warnings`, a `dependsOn` change is not implemented yet, so this
|
|
115
|
+
change would be built without the code it builds on. Report each warning and ask
|
|
116
|
+
whether to apply the dependency first or continue here. A dependency that is
|
|
117
|
+
implemented but unarchived is no such warning; it only affects archive order.
|
|
118
|
+
|
|
119
|
+
## Step 3: Apply
|
|
120
|
+
|
|
121
|
+
Read [references/openspec-apply-change.md](references/openspec-apply-change.md) and
|
|
122
|
+
follow it for the implementation. The PR need not exist yet; the branch is the delivery.
|
|
123
|
+
Retrieve its instructions the ordinary way. Only when the user explicitly asks for compact
|
|
124
|
+
apply, also read [references/mate-compact-apply.md](references/mate-compact-apply.md) and
|
|
125
|
+
use its transport.
|
|
126
|
+
|
|
127
|
+
## Step 4: Hand off
|
|
128
|
+
|
|
129
|
+
End the response with a final `## Next steps` section: numbered required actions in
|
|
130
|
+
execution order, with exact commands and known change names, prerequisites first.
|
|
131
|
+
Summaries, evidence, warnings, optional work, and deferred context go above it; nothing
|
|
132
|
+
follows it. Listing an action never invokes it. Never offer the user an optional command, in or above the section; optional work appears above it only as a skill invocation labelled optional.
|
|
133
|
+
|
|
134
|
+
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
135
|
+
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
136
|
+
the prefix: `@name` in OpenCode, `$name` in Codex, `/skill:name` in Pi. Only the
|
|
137
|
+
user's statement or the harness's own identity sets the runtime, never a skill's
|
|
138
|
+
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
139
|
+
never invokes.
|
|
140
|
+
|
|
141
|
+
- Above the section, label `/mate-show-me` and `/mate-simplify-code` as optional, in
|
|
142
|
+
any order; they are not prerequisites for archive.
|
|
143
|
+
- In the section, list `/mate-archive-change <change-name>`, after any required work
|
|
144
|
+
still open (a failing check, an unanswered question). Name the archive action only
|
|
145
|
+
there: omit the reference's completion sentence that also points to
|
|
146
|
+
`/mate-archive-change`.
|
|
147
|
+
- Several changes on one branch: list their archives in dependency order, and say above
|
|
148
|
+
the section that this order avoids an advisory archive warning; it is not a gate.
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
Optional, any order: /mate-show-me acme-queue, /mate-simplify-code.
|
|
152
|
+
|
|
153
|
+
## Next steps
|
|
154
|
+
1. /mate-archive-change acme-queue
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Guardrails
|
|
158
|
+
|
|
159
|
+
- Never push, open a PR, or merge on the user's behalf.
|
|
160
|
+
- Never record a protected branch except as an explicit direct delivery.
|
|
161
|
+
- The forge token, when one is used by `mate artifact link`, is never printed or
|
|
162
|
+
written; do not read or echo `MATE_GIT_TOKEN`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mate Compact Apply Transport
|
|
2
|
+
|
|
3
|
+
Use this only when the user explicitly asks for compact apply. It replaces one thing in
|
|
4
|
+
the apply workflow: how its instructions are retrieved. Every other step, check, and
|
|
5
|
+
stop of [openspec-apply-change.md](openspec-apply-change.md) still applies. This is a
|
|
6
|
+
Mate transport, not native OpenSpec delta support.
|
|
7
|
+
|
|
8
|
+
## Retrieval
|
|
9
|
+
|
|
10
|
+
Wherever the workflow runs `openspec instructions apply --change "<name>" --json`, run
|
|
11
|
+
instead:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
mate artifact apply-context "<name>" --json [--since <digest>]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Each call fetches fresh upstream instructions. It returns one of two version 1
|
|
18
|
+
envelopes:
|
|
19
|
+
|
|
20
|
+
- `{"version": 1, "mode": "full", "digest", "payload"}`: `payload` is the complete
|
|
21
|
+
upstream apply object. Treat it exactly as the apply instructions output, read every
|
|
22
|
+
`contextFiles` path again, and make it your baseline, replacing any earlier one. A
|
|
23
|
+
`null` digest (with a `limitation`) means compaction is unavailable: keep calling
|
|
24
|
+
without `--since`.
|
|
25
|
+
- `{"version": 1, "mode": "compact", "digest", "state", "progress", "taskStates"}`:
|
|
26
|
+
nothing static changed since the baseline. The current object is the baseline with
|
|
27
|
+
`state` and `progress` replaced and each task's `done` taken from `taskStates`, which
|
|
28
|
+
lists every task in order.
|
|
29
|
+
|
|
30
|
+
A failing command is a failure, never a cached success: report it and stop, or fall back
|
|
31
|
+
to the ordinary command.
|
|
32
|
+
|
|
33
|
+
## When to pass `--since`
|
|
34
|
+
|
|
35
|
+
Pass `--since <digest>` only when the complete full envelope with that digest is in this
|
|
36
|
+
conversation. Omit it, and reread the required context before any edit, on session
|
|
37
|
+
start, after resume or context compaction, or whenever you are unsure the baseline is
|
|
38
|
+
complete. A digest in a summary is not a baseline.
|
|
39
|
+
|
|
40
|
+
## Unchanged obligations
|
|
41
|
+
|
|
42
|
+
- After each task, check its box at its current `sourcePath` and `line`, then fetch
|
|
43
|
+
again and confirm the task is done and progress changed.
|
|
44
|
+
- `state: "blocked"` in either envelope stops implementation; follow the blocked-state
|
|
45
|
+
steps.
|
|
46
|
+
- A full envelope after a compact one means context changed: reread it before continuing.
|
|
47
|
+
- When you cannot meet any of these, switch back to the ordinary command.
|
package/src/templates/mate-skills/agents/mate-apply-change/references/openspec-apply-change.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<!-- Vendored from OpenSpec 1.15.0: the `openspec-apply-change` workflow its `agents` tool generates.
|
|
2
|
+
Copyright (c) OpenSpec Contributors, MIT License (see THIRD-PARTY-NOTICES.md in Mate).
|
|
3
|
+
Regenerated by `bun run vendor:openspec`; do not edit. -->
|
|
4
|
+
|
|
5
|
+
> **Skill invocation:** `/mate-*` invocations below use the fallback `/name` syntax. For another established runtime, swap only the prefix per **Skill invocation** in this skill's `SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Implement tasks from an OpenSpec change.
|
|
8
|
+
|
|
9
|
+
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
10
|
+
|
|
11
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
12
|
+
|
|
13
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
14
|
+
|
|
15
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
16
|
+
|
|
17
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
18
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
19
|
+
|
|
20
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
21
|
+
|
|
22
|
+
**Input**: Optionally specify a change name (e.g., `/mate-apply-change add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
23
|
+
|
|
24
|
+
**Steps**
|
|
25
|
+
|
|
26
|
+
1. **Select the change**
|
|
27
|
+
|
|
28
|
+
If a name is provided, use it. Otherwise:
|
|
29
|
+
- Infer from conversation context if the user mentioned a change
|
|
30
|
+
- Auto-select if only one active change exists
|
|
31
|
+
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
|
|
32
|
+
|
|
33
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/mate-apply-change <other>`).
|
|
34
|
+
|
|
35
|
+
2. **Check status to understand the schema**
|
|
36
|
+
```bash
|
|
37
|
+
openspec status --change "<name>" --json
|
|
38
|
+
```
|
|
39
|
+
Parse the JSON to understand:
|
|
40
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
41
|
+
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
|
42
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
43
|
+
|
|
44
|
+
3. **Get apply instructions**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
openspec instructions apply --change "<name>" --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This returns:
|
|
51
|
+
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
52
|
+
- Progress (total, complete, remaining)
|
|
53
|
+
- Task list with status, source path, and source line
|
|
54
|
+
- Dynamic instruction based on current state
|
|
55
|
+
- Optional `context`: current required project instruction input from the selected root
|
|
56
|
+
- Optional `operationGuidance`: current advisory guidance for apply
|
|
57
|
+
- `missingArtifacts` (when present): required artifact ids with no output
|
|
58
|
+
|
|
59
|
+
**Handle states:**
|
|
60
|
+
- If `state: "blocked"`: show the message and pause implementation.
|
|
61
|
+
- If `missingArtifacts` is non-empty: suggest completing the missing artifacts. Run `openspec status --change "<name>" --json`, select the next `ready` artifact (not `skipped` or `blocked`), and use `openspec instructions "<artifact-id>" --change "<name>" --json` for its rules and template. Keep the selected `--store <id>` on both commands.
|
|
62
|
+
- Otherwise, follow the CLI instruction to create or repair the schema-configured tracking file from existing planning artifacts. Do not assume another artifact is ready or start implementation while blocked.
|
|
63
|
+
- If `state: "all_done"`: report that all tracked tasks are complete and suggest review or verification as appropriate before archiving
|
|
64
|
+
- Otherwise: proceed to implementation
|
|
65
|
+
|
|
66
|
+
Treat `context` as a required prompt-level input. Read and consider it, and
|
|
67
|
+
apply relevant project facts, conventions, and constraints while implementing.
|
|
68
|
+
Treat `operationGuidance` as optional additive advice. Read and consider every
|
|
69
|
+
entry, and follow entries that are applicable and compatible with the built-in
|
|
70
|
+
workflow.
|
|
71
|
+
|
|
72
|
+
Keep both fields separate from CLI-returned state, missing artifacts, tasks,
|
|
73
|
+
progress, `contextFiles`, and the built-in `instruction`. They are not
|
|
74
|
+
evidence of task completion, do not replace the built-in instruction, and do
|
|
75
|
+
not permit bypassing a blocked state. If context conflicts with the built-in
|
|
76
|
+
instruction, an explicit user choice, or a CLI-controlled value, report the
|
|
77
|
+
conflict and preserve the controlling value. If guidance is inapplicable or
|
|
78
|
+
conflicts with those controlling inputs, do not follow it and explain why.
|
|
79
|
+
These are prompt-level behavior contracts, not enforceable checks.
|
|
80
|
+
|
|
81
|
+
4. **Read context files**
|
|
82
|
+
|
|
83
|
+
Read every file path listed under `contextFiles` from the apply instructions output.
|
|
84
|
+
The files depend on the schema being used:
|
|
85
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
86
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
87
|
+
|
|
88
|
+
Do not copy `context` or `operationGuidance` verbatim into implementation
|
|
89
|
+
files or planning artifacts unless the user separately asks for that content.
|
|
90
|
+
|
|
91
|
+
5. **Show current progress**
|
|
92
|
+
|
|
93
|
+
Display:
|
|
94
|
+
- Schema being used
|
|
95
|
+
- Progress: "N/M tasks complete"
|
|
96
|
+
- Remaining tasks overview
|
|
97
|
+
- Dynamic instruction from CLI
|
|
98
|
+
|
|
99
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
100
|
+
|
|
101
|
+
For each pending task:
|
|
102
|
+
- Show which task is being worked on
|
|
103
|
+
- Make the code changes required
|
|
104
|
+
- Keep changes minimal and focused
|
|
105
|
+
- Before editing, confirm the checkbox at the returned `sourcePath` and `line` still matches the task description; if it does not, rerun the apply instructions and use the refreshed location
|
|
106
|
+
- Mark the task complete at its returned `sourcePath` and `line`: `- [ ]` → `- [x]`
|
|
107
|
+
- Rerun the apply instructions and confirm that task is now done and progress changed
|
|
108
|
+
- Continue to next task
|
|
109
|
+
|
|
110
|
+
**Pause if:**
|
|
111
|
+
- Task is unclear → ask for clarification
|
|
112
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
113
|
+
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
|
|
114
|
+
- Error or blocker encountered → report and wait for guidance
|
|
115
|
+
- User interrupts
|
|
116
|
+
|
|
117
|
+
7. **On completion or pause, show status**
|
|
118
|
+
|
|
119
|
+
Display:
|
|
120
|
+
- Tasks completed this session
|
|
121
|
+
- Overall progress: "N/M tasks complete"
|
|
122
|
+
- If all done: report that tracked tasks are complete and suggest review or verification as appropriate before archiving
|
|
123
|
+
- If paused: explain why and wait for guidance
|
|
124
|
+
|
|
125
|
+
**Output During Implementation**
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
129
|
+
|
|
130
|
+
Working on task 3/7: <task description>
|
|
131
|
+
[...implementation happening...]
|
|
132
|
+
✓ Task complete
|
|
133
|
+
|
|
134
|
+
Working on task 4/7: <task description>
|
|
135
|
+
[...implementation happening...]
|
|
136
|
+
✓ Task complete
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Output On Completion**
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
## Implementation Complete
|
|
143
|
+
|
|
144
|
+
**Change:** <change-name>
|
|
145
|
+
**Schema:** <schema-name>
|
|
146
|
+
**Progress:** 7/7 tasks complete ✓
|
|
147
|
+
|
|
148
|
+
### Completed This Session
|
|
149
|
+
- [x] Task 1
|
|
150
|
+
- [x] Task 2
|
|
151
|
+
...
|
|
152
|
+
|
|
153
|
+
All tracked tasks are complete. Review or verify the change as appropriate
|
|
154
|
+
before archiving. You can archive this change with `/mate-archive-change`.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Output On Pause (Issue Encountered)**
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
## Implementation Paused
|
|
161
|
+
|
|
162
|
+
**Change:** <change-name>
|
|
163
|
+
**Schema:** <schema-name>
|
|
164
|
+
**Progress:** 4/7 tasks complete
|
|
165
|
+
|
|
166
|
+
### Issue Encountered
|
|
167
|
+
<description of the issue>
|
|
168
|
+
|
|
169
|
+
**Options:**
|
|
170
|
+
1. <option 1>
|
|
171
|
+
2. <option 2>
|
|
172
|
+
3. Other approach
|
|
173
|
+
|
|
174
|
+
What would you like to do?
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Guardrails**
|
|
178
|
+
- Keep going through tasks until done or blocked
|
|
179
|
+
- Always read context files before starting (from the apply instructions output)
|
|
180
|
+
- If task is ambiguous, pause and ask before implementing
|
|
181
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
182
|
+
- Keep code changes minimal and scoped to each task
|
|
183
|
+
- Update task checkbox immediately after completing each task
|
|
184
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
185
|
+
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
|
|
186
|
+
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
|
|
187
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
188
|
+
- Use each task's sourcePath and line to update its exact checkbox
|
|
189
|
+
- Do not use context or operation guidance as proof that a task is complete
|
|
190
|
+
- Apply relevant project context; report conflicts with controlling workflow inputs
|
|
191
|
+
- Consider every guidance entry; explain any inapplicable or conflicting advice
|
|
192
|
+
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
|
|
193
|
+
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
|
|
194
|
+
|
|
195
|
+
**Fluid Workflow Integration**
|
|
196
|
+
|
|
197
|
+
This skill supports the "actions on a change" model:
|
|
198
|
+
|
|
199
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
200
|
+
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mate-archive-change
|
|
3
|
+
description: Archive a change through mate artifact archive, which records its delivery, reports merge state and its warnings, and runs the OpenSpec archive, also before the merge. Use when the user wants to archive, finalize, or close out an implemented change.
|
|
4
|
+
allowed-tools: Bash(mate:*), Bash(git:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires the mate CLI and the openspec capability enabled.
|
|
7
|
+
metadata:
|
|
8
|
+
author: mate
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Mate Archive Change
|
|
13
|
+
|
|
14
|
+
The Archive change stage of the Delivery Path. Archiving applies the change's delta
|
|
15
|
+
specs to the local canonical specs, so a feature's later changes build on it. It is
|
|
16
|
+
allowed **before** the delivery branch merges: publication, not archive, waits for the
|
|
17
|
+
merge. Archiving is local and uncommitted; it publishes nothing.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. **Archive.**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mate artifact archive "<change-name>" --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Run it from the companion or the linked Working Repository. It shows warnings,
|
|
28
|
+
refreshes merge state from the forge when a token is available, writes the change's
|
|
29
|
+
`delivery.yaml`, and runs `openspec archive` itself. Do not run `openspec archive`
|
|
30
|
+
separately.
|
|
31
|
+
|
|
32
|
+
2. **Answer a missing branch.** When the result's `status` is `needs-branch`, nothing
|
|
33
|
+
was archived. Ask the user which branch delivers the change, suggesting
|
|
34
|
+
`suggestedBranch` when it is set, and re-run with exactly one of:
|
|
35
|
+
|
|
36
|
+
- `--branch "<branch>"` — a protected branch only with `--direct`, after the user
|
|
37
|
+
explicitly confirms a direct delivery;
|
|
38
|
+
- `--not-applicable "<reason>"` — for a specification-only change;
|
|
39
|
+
- `--skip-branch` — when the user skips the question; publication will ask again.
|
|
40
|
+
|
|
41
|
+
3. **Report.** Relay every entry of `warnings` first: another active change that
|
|
42
|
+
modifies the same requirement, a declared dependency that is not archived yet, or
|
|
43
|
+
planning artifacts its schema requires that are missing (`incomplete-planning`).
|
|
44
|
+
Warnings never block. Then report the archive `path` and the delivery: each branch
|
|
45
|
+
with its merge result and source (`forge`, `git`, or `user`) and PR link, or the
|
|
46
|
+
not-applicable reason. An open or unknown merge is information, not a failure and not an
|
|
47
|
+
action: never offer to record it (`mate artifact link … --confirm-*`); publication asks
|
|
48
|
+
the merge question; a `likely-merged` outcome is only a suggestion that publication
|
|
49
|
+
confirms with the user.
|
|
50
|
+
|
|
51
|
+
4. **Hand off.**
|
|
52
|
+
End the response with a final `## Next steps` section: numbered required actions in
|
|
53
|
+
execution order, with exact commands and known change names, prerequisites first.
|
|
54
|
+
Summaries, evidence, warnings, optional work, and deferred context go above it; nothing
|
|
55
|
+
follows it. Listing an action never invokes it. Never offer the user an optional command, in or above the section; optional work appears above it only as a skill invocation labelled optional.
|
|
56
|
+
|
|
57
|
+
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
58
|
+
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
59
|
+
the prefix: `@name` in OpenCode, `$name` in Codex, `/skill:name` in Pi. Only the
|
|
60
|
+
user's statement or the harness's own identity sets the runtime, never a skill's
|
|
61
|
+
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
62
|
+
never invokes.
|
|
63
|
+
|
|
64
|
+
When the delivery branch is not merged yet, list merging it before
|
|
65
|
+
`/mate-publish-artifact`, and say above the section that publication, not archive,
|
|
66
|
+
waits for the merge. Never commit, push, open a PR, or merge for the user.
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
## Next steps
|
|
70
|
+
1. Merge workset/acme-queue
|
|
71
|
+
2. /mate-publish-artifact
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
When `status` is `failed`, report the message (typically incomplete tasks or a
|
|
75
|
+
validation error) and stop.
|
|
76
|
+
|
|
77
|
+
## Guardrails
|
|
78
|
+
|
|
79
|
+
- Never commit, tag, or push; publication is `mate-publish-artifact`.
|
|
80
|
+
- A merger account is provenance, never an artifact review.
|
|
81
|
+
- Do not read or echo `MATE_GIT_TOKEN`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: mate-
|
|
2
|
+
name: mate-backfill-spec
|
|
3
3
|
description: Reverse-engineer an OpenSpec spec for one existing feature and write it directly to the canonical spec, ready to publish. Use when the user wants to backfill, document, or spec existing or legacy behavior that has no spec yet.
|
|
4
4
|
allowed-tools: Bash(openspec:*), Bash(mate:*), Bash(git remote:*), Bash(git diff:*)
|
|
5
5
|
license: MIT
|
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
# Mate OpenSpec Backfill
|
|
13
13
|
|
|
14
|
-
Specify one feature that already exists in the working repository. A backfill records behavior that already shipped, so the run writes the canonical spec `openspec/specs/<capability>/spec.md` directly and leaves it uncommitted. It never creates a change and never publishes; publication happens afterwards through `mate-artifact
|
|
14
|
+
Specify one feature that already exists in the working repository. A backfill records behavior that already shipped, so the run writes the canonical spec `openspec/specs/<capability>/spec.md` directly and leaves it uncommitted. It never creates a change and never publishes; publication happens afterwards through `mate-publish-artifact`.
|
|
15
15
|
|
|
16
16
|
## Scope rules
|
|
17
17
|
|
|
@@ -70,12 +70,19 @@ Specify one feature that already exists in the working repository. A backfill re
|
|
|
70
70
|
|
|
71
71
|
Fix every reported error and re-validate until it passes. Do not hand off a spec that fails validation.
|
|
72
72
|
|
|
73
|
-
8. **Hand off.** Report the written path and show the uncommitted diff (`git diff -- openspec/specs/<capability>/`, or the file itself when it is new). Point the user to
|
|
73
|
+
8. **Hand off.** Report the written path and show the uncommitted diff (`git diff -- openspec/specs/<capability>/`, or the file itself when it is new). Point the user to `/mate-publish-artifact`: the spec appears there under **Drifted specs** and can be published on its own or with the rest.
|
|
74
|
+
|
|
75
|
+
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
76
|
+
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
77
|
+
the prefix: `@name` in OpenCode, `$name` in Codex, `/skill:name` in Pi. Only the
|
|
78
|
+
user's statement or the harness's own identity sets the runtime, never a skill's
|
|
79
|
+
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
80
|
+
never invokes.
|
|
74
81
|
|
|
75
82
|
## Guardrails
|
|
76
83
|
|
|
77
84
|
- Never create an OpenSpec change, change artifacts, or verification tasks, and never archive.
|
|
78
|
-
- Never commit, tag, push, or publish — never run `mate artifact publish`. Publication belongs to `mate-artifact
|
|
85
|
+
- Never commit, tag, push, or publish — never run `mate artifact publish`. Publication belongs to `mate-publish-artifact`.
|
|
79
86
|
- Never write any file before the user approves the review table.
|
|
80
87
|
- Never write a requirement without a citation in the review table, and never spec a suspected bug without the user's ruling.
|
|
81
88
|
- Never write citations or evidence tags into the canonical spec.
|