@uniqbit/mate-core 1.0.0-canary.5 → 1.0.0-canary.7
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/plugin.json +1 -1
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +1 -1
- package/claude-plugin/hooks/hooks.json +41 -1
- package/claude-plugin/hooks/rtk-worktree-git.mjs +58 -0
- package/claude-plugin/hooks/workflow-turn.mjs +68 -0
- package/opencode-plugin/src/companion.ts +6 -0
- package/opencode-plugin/src/server.ts +33 -2
- package/package.json +5 -2
- package/src/cli/commands/artifact/apply-context.ts +1 -0
- package/src/cli/commands/artifact/artifact.ts +16 -0
- package/src/cli/commands/artifact/delivery/archive.ts +37 -112
- package/src/cli/commands/artifact/delivery/branch-flags.ts +19 -1
- package/src/cli/commands/artifact/delivery/environment.ts +32 -72
- package/src/cli/commands/artifact/delivery/link.ts +53 -34
- package/src/cli/commands/artifact/delivery/output.ts +25 -4
- package/src/cli/commands/artifact/delivery/resolve.ts +101 -0
- package/src/cli/commands/artifact/delivery/submit.ts +164 -0
- package/src/cli/commands/artifact/delivery/take.ts +45 -0
- package/src/cli/commands/artifact/extract-repo-name.ts +1 -1
- package/src/cli/commands/artifact/finish/command.ts +455 -43
- package/src/cli/commands/artifact/finish/engine.ts +79 -61
- package/src/cli/commands/artifact/finish/finisher.ts +5 -12
- package/src/cli/commands/artifact/finish/git.ts +9 -10
- package/src/cli/commands/artifact/finish/openspec.ts +21 -174
- package/src/cli/commands/artifact/finish/secret-scan.ts +5 -43
- package/src/cli/commands/artifact/finish/worktree-cleanup.ts +57 -7
- package/src/cli/commands/artifact/pending/command.ts +119 -6
- package/src/cli/commands/artifact/pending/discovery.ts +7 -11
- package/src/cli/commands/artifact/project/command.ts +60 -0
- package/src/cli/commands/companion/list.ts +70 -14
- package/src/cli/commands/companion/sync.ts +18 -0
- package/src/cli/commands/companion/update.ts +4 -19
- package/src/cli/commands/doctor.ts +51 -0
- package/src/cli/commands/friction.ts +558 -0
- package/src/cli/commands/install.ts +48 -36
- package/src/cli/commands/launch/claude.ts +2 -0
- package/src/cli/commands/launch/shared.ts +33 -6
- package/src/cli/commands/plugin/install.ts +27 -11
- package/src/cli/commands/report/index.ts +180 -184
- package/src/cli/commands/report/markdown.ts +67 -72
- package/src/cli/commands/shared/companion-selection.ts +3 -1
- package/src/cli/commands/studio/access.ts +6 -14
- package/src/cli/commands/studio/areas.ts +112 -33
- package/src/cli/commands/studio/companion-add.ts +72 -0
- package/src/cli/commands/studio/companion-removal.ts +15 -8
- package/src/cli/commands/studio/connection.ts +53 -0
- package/src/cli/commands/studio/graph-model.ts +61 -0
- package/src/cli/commands/studio/graph.ts +336 -0
- package/src/cli/commands/studio/index.ts +4 -4
- package/src/{lib/factory/outcomes/sessions.ts → cli/commands/studio/live-sessions.ts} +26 -2
- package/src/cli/commands/studio/payload.ts +214 -32
- package/src/cli/commands/studio/reports.ts +19 -18
- package/src/cli/commands/studio/routes.ts +8 -18
- package/src/cli/commands/studio/selection.ts +21 -5
- package/src/cli/commands/studio/server.ts +322 -191
- package/src/cli/commands/studio/service-host.ts +266 -0
- package/src/cli/commands/studio/services.ts +59 -16
- package/src/cli/commands/studio/studio-app.ts +1 -0
- package/src/cli/commands/studio/terminal.ts +45 -3
- package/src/cli/commands/studio/vault.ts +41 -40
- package/src/cli/commands/studio/views/model.ts +1 -9
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +90 -8
- package/src/cli/commands/triage.ts +151 -0
- package/src/cli/commands/unwrap.ts +3 -0
- package/src/cli/commands/update.ts +2 -0
- package/src/cli/commands/vscode/release-vsix.json +4 -0
- package/src/cli/commands/vscode/setup.ts +71 -13
- package/src/cli/commands/vscode/vsix.ts +48 -7
- package/src/cli/commands/workflow/workflow.ts +516 -0
- package/src/cli/commands/working/cleanup.ts +40 -8
- package/src/cli/commands/working/worktree.ts +176 -35
- package/src/cli/main.ts +61 -10
- package/src/cli/plugin-commands.ts +6 -1
- package/src/cli/repo-list-table.tsx +73 -37
- package/src/cli/usage.ts +29 -8
- package/src/create-mate.ts +11 -5
- package/src/distribution.ts +2 -0
- package/src/factory-host.ts +69 -0
- package/src/hooks/companion-instructions.ts +19 -8
- package/src/hooks/hook-io.ts +3 -1
- package/src/hooks/rtk-worktree-git.ts +48 -0
- package/src/hooks/session-banner.ts +25 -0
- package/src/hooks/validate-artifact-path.ts +108 -26
- package/src/hooks/workflow-turn.ts +219 -0
- package/src/lib/apply-context/fingerprint.ts +2 -1
- package/src/lib/apply-context/protocol.ts +2 -2
- package/src/lib/artifact-trailer.ts +27 -0
- package/src/lib/change-layout.ts +83 -38
- package/src/lib/delivery/branch-template.ts +114 -0
- package/src/lib/delivery/branches.ts +21 -16
- package/src/lib/delivery/checkout.ts +103 -0
- package/src/lib/delivery/environment.ts +131 -7
- package/src/lib/delivery/merge-git.ts +282 -26
- package/src/lib/delivery/overlap.ts +68 -16
- package/src/lib/delivery/record-delivery.ts +178 -37
- package/src/lib/delivery/record.ts +201 -27
- package/src/lib/delivery/refresh.ts +212 -151
- package/src/lib/delivery/remote.ts +66 -0
- package/src/lib/delivery/repository-access.ts +19 -60
- package/src/lib/delivery/resolve-branch.ts +157 -110
- package/src/lib/delivery/stages.ts +83 -50
- package/src/lib/delivery/staging/apply-chain.ts +164 -0
- package/src/lib/delivery/staging/artifact-type.ts +101 -0
- package/src/lib/delivery/staging/declared-type.ts +277 -0
- package/src/lib/delivery/staging/naming.ts +64 -0
- package/src/lib/delivery/staging/openspec-type.ts +135 -0
- package/src/lib/delivery/staging/pending-edit.ts +291 -0
- package/src/lib/delivery/staging/pending.ts +780 -0
- package/src/lib/delivery/staging/project.ts +373 -0
- package/src/lib/delivery/staging/publish.ts +1024 -0
- package/src/lib/delivery/staging/refs.ts +258 -0
- package/src/lib/delivery/staging/registry.ts +73 -0
- package/src/lib/delivery/staging/replay.ts +308 -0
- package/src/lib/delivery/staging/requirement-blocks.ts +10 -0
- package/src/lib/delivery/staging/resolve.ts +264 -0
- package/src/lib/delivery/staging/settle-linked.ts +290 -0
- package/src/lib/delivery/staging/submit.ts +929 -0
- package/src/lib/delivery/staging/worktree.ts +130 -0
- package/src/lib/delivery/submit-change.ts +443 -0
- package/src/lib/friction/describe.ts +42 -0
- package/src/lib/friction/fields.ts +60 -0
- package/src/lib/friction/mark.ts +156 -0
- package/src/lib/friction/view/model.ts +67 -0
- package/src/lib/friction/view/read.ts +136 -0
- package/src/lib/friction/view/select.ts +54 -0
- package/src/lib/git-key.ts +15 -0
- package/src/lib/install.ts +2 -0
- package/src/lib/openspec-canonical-frontmatter.ts +159 -0
- package/src/lib/orchestrator/adapters/base.ts +31 -20
- package/src/lib/orchestrator/adapters/claude.ts +21 -7
- package/src/lib/orchestrator/adapters/opencode.ts +4 -0
- package/src/lib/orchestrator/companion-git-sync.ts +152 -16
- package/src/lib/orchestrator/companion-hub.ts +6 -1
- package/src/lib/orchestrator/engine-floor.ts +48 -0
- package/src/lib/orchestrator/framework-context.ts +15 -1
- package/src/lib/orchestrator/launcher.ts +34 -1
- package/src/lib/orchestrator/projection-claude-commands.ts +2 -2
- package/src/lib/orchestrator/projection-claude-entry.ts +42 -21
- package/src/lib/orchestrator/projection-claude-links.ts +33 -8
- package/src/lib/orchestrator/projection-claude-skills.ts +2 -2
- package/src/lib/orchestrator/projection-entries.ts +22 -18
- package/src/lib/orchestrator/projection-opencode-copies.ts +65 -21
- package/src/lib/orchestrator/projection-runtime-documents.ts +66 -43
- package/src/lib/orchestrator/projection-types.ts +28 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +4 -1
- package/src/lib/orchestrator/root-context.ts +23 -6
- package/src/lib/orchestrator/session-prepare.ts +17 -2
- package/src/lib/orchestrator/setup-compatibilities.ts +1 -1
- package/src/lib/orchestrator/types.ts +4 -0
- package/src/lib/orchestrator/umbrella-checkouts.ts +102 -0
- package/src/lib/orchestrator/working-repo-projection.ts +24 -4
- package/src/lib/orchestrator/wrap-pass.ts +1 -0
- package/src/lib/package-paths.ts +23 -15
- package/src/lib/prebuilt-workspace-prepare.ts +2 -1
- package/src/lib/prebuilt-workspace.ts +1 -0
- package/src/lib/public-npm.ts +95 -50
- package/src/lib/session-attribution.ts +3 -7
- package/src/lib/session-state.ts +74 -3
- package/src/lib/triage/context.ts +186 -0
- package/src/lib/triage/launch.ts +52 -0
- package/src/lib/triage/prepare.ts +97 -0
- package/src/lib/triage/session.ts +126 -0
- package/src/lib/update-checker.ts +7 -1
- package/src/lib/usage/aggregate.ts +202 -0
- package/src/lib/usage/cache.ts +87 -0
- package/src/lib/usage/claude-pricing.ts +71 -0
- package/src/lib/usage/claude.ts +189 -0
- package/src/lib/usage/collect.ts +56 -0
- package/src/lib/usage/opencode.ts +188 -0
- package/src/lib/usage/records.ts +80 -0
- package/src/lib/usage/rtk-database.ts +72 -0
- package/src/lib/usage/savings.ts +209 -0
- package/src/lib/usage/scope.ts +182 -0
- package/src/lib/usage/source.ts +102 -0
- package/src/lib/usage/types.ts +143 -0
- package/src/lib/usage/window.ts +37 -0
- package/src/lib/workflow/declaration.ts +6 -0
- package/src/lib/workflow/handoff.ts +90 -0
- package/src/lib/workflow/hook-trust.ts +108 -0
- package/src/lib/workflow/position.ts +524 -0
- package/src/lib/workflow/report.ts +79 -0
- package/src/lib/workflow/work.ts +106 -0
- package/src/lib/workset/factory-local.ts +157 -0
- package/src/lib/workset/record.ts +25 -11
- package/src/lib/workset/repositories.ts +118 -25
- package/src/lib/workset/stage.ts +4 -2
- package/src/lib/workset/stages.ts +64 -4
- package/src/lib/workset/worktree-include.ts +161 -0
- package/src/lib/workset/worktree-index.ts +6 -2
- package/src/lib/workset/worktree.ts +622 -114
- package/src/opencode/companion-hooks.ts +105 -18
- package/src/opencode/companion-policy.ts +18 -5
- package/src/opencode/enter-worktree.ts +254 -6
- package/src/opencode/projected-guidance.ts +7 -2
- package/src/opencode/session-register.ts +2 -2
- package/src/opencode/turn-hook.ts +241 -0
- package/src/playbooks/companion-guidance.ts +7 -4
- package/src/plugin-api.ts +47 -0
- package/src/runtime/artifact-trailers.ts +63 -0
- package/src/runtime/claude-bg-isolation.ts +138 -0
- package/src/runtime/claude-hook-group.ts +2 -0
- package/src/runtime/command-friction.ts +97 -0
- package/src/runtime/companion-git-state.ts +155 -10
- package/src/runtime/companion-git.ts +96 -13
- package/src/runtime/companion-guidance.ts +136 -20
- package/src/runtime/companion-instructions.ts +1 -1
- package/src/runtime/companion-sync.ts +109 -21
- package/src/runtime/current-branch.ts +16 -2
- package/src/runtime/entered-worktree.ts +24 -0
- package/src/runtime/env-names.ts +2 -2
- package/src/runtime/env.ts +7 -6
- package/src/runtime/forge-remote.ts +48 -0
- package/src/runtime/friction-fingerprint.ts +35 -0
- package/src/runtime/friction-log.ts +352 -0
- package/src/runtime/friction-recorder.ts +199 -0
- package/src/runtime/friction-retention.ts +1 -0
- package/src/runtime/friction-state.ts +110 -0
- package/src/runtime/friction-switch.ts +26 -0
- package/src/runtime/friction-vocabulary.ts +42 -0
- package/src/runtime/git-layout.ts +21 -7
- package/src/runtime/git-tracked.ts +60 -0
- package/src/runtime/json-fields.ts +8 -0
- package/src/runtime/pending-records.ts +533 -0
- package/src/runtime/projected-guidance.ts +8 -3
- package/src/runtime/publication-secret-scan.ts +45 -0
- package/src/runtime/repo-destination.ts +72 -0
- package/src/runtime/repo-local.ts +25 -3
- package/src/runtime/rtk-git-guard.ts +66 -0
- package/src/runtime/runtime-document-manifest.ts +229 -19
- package/src/runtime/runtime-document-manifest.typecheck.ts +10 -0
- package/src/runtime/secret-guard.ts +9 -2
- package/src/runtime/secret-patterns.ts +3 -2
- package/src/runtime/secret-policy-weakening.ts +122 -0
- package/src/runtime/secret-values.ts +16 -0
- package/src/runtime/serving-claude-wrap.ts +15 -2
- package/src/runtime/session-id.ts +24 -0
- package/src/runtime/session-prepare-runner.ts +3 -0
- package/src/runtime/skill-prefix.ts +75 -0
- package/src/runtime/submitted-arrivals.ts +547 -0
- package/src/runtime/turn-state.d.mts +14 -0
- package/src/runtime/turn-state.mjs +93 -0
- package/src/runtime/umbrella-children.ts +52 -0
- package/src/runtime/umbrella-folder.ts +84 -0
- package/src/runtime/workflow/change-folders.ts +66 -0
- package/src/runtime/workflow/declaration.ts +720 -0
- package/src/runtime/workflow/globs.ts +85 -0
- package/src/runtime/workflow/next-handoff-process.ts +99 -0
- package/src/runtime/workflow/turn.ts +309 -0
- package/src/runtime/workflow/workflow.ts +262 -0
- package/src/runtime/wrap-state.ts +5 -13
- package/src/studio.ts +112 -19
- package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/schema.yaml +3 -3
- package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/design.md +1 -1
- package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/proposal.md +1 -1
- package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/tasks.md +1 -1
- package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +3 -3
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +103 -30
- package/src/templates/mate-skills/agents/mate-apply-change/references/openspec-apply-change.md +1 -1
- package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +7 -70
- package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +13 -7
- package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +10 -0
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +46 -14
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +50 -31
- package/src/templates/mate-skills/agents/mate-propose-change/references/mate-revise.md +13 -7
- package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-update-change.md +1 -1
- package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +114 -86
- package/src/templates/mate-skills/agents/mate-publish-artifact/references/openspec.md +111 -100
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +11 -5
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +16 -6
- package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +114 -0
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +103 -30
- package/src/templates/mate-skills/claude/mate-apply-change/references/openspec-apply-change.md +1 -1
- package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +7 -70
- package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +13 -7
- package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +10 -0
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +46 -14
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +50 -31
- package/src/templates/mate-skills/claude/mate-propose-change/references/mate-revise.md +13 -7
- package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-update-change.md +1 -1
- package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +114 -86
- package/src/templates/mate-skills/claude/mate-publish-artifact/references/openspec.md +111 -100
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +11 -5
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +16 -6
- package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +114 -0
- package/src/templates/mate-skills/openspec-references.ts +3 -2
- package/src/templates/triage/PLAYBOOK.md +112 -0
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +912 -139
- package/src/tools/setup/capabilities/openspec.ts +54 -15
- package/src/tools/setup/capabilities/rtk.ts +113 -9
- package/src/tools/setup/capabilities/tokensave.ts +3 -2
- package/src/tools/setup/dynamic-plugins/api.ts +38 -0
- package/src/tools/setup/dynamic-plugins/audiences.ts +65 -21
- package/src/tools/setup/dynamic-plugins/frozen.ts +32 -13
- package/src/tools/setup/dynamic-plugins/host.ts +2 -32
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -4
- package/src/tools/setup/dynamic-plugins/install.ts +24 -22
- package/src/tools/setup/dynamic-plugins/loader.ts +11 -7
- package/src/tools/setup/dynamic-plugins/paths.ts +30 -10
- package/src/tools/setup/dynamic-plugins/verify.ts +10 -7
- package/src/tools/setup/dynamic-plugins/workspaces.ts +153 -0
- package/src/tools/setup/engine.ts +20 -1
- package/src/tools/setup/mate.ts +5 -3
- package/src/tools/setup/package-managers/bun.ts +8 -8
- package/src/tools/setup/plugin.ts +14 -1
- package/src/tools/setup/plugins/gitignore.ts +15 -9
- package/src/tools/setup/plugins/guidance.ts +4 -2
- package/src/tools/setup/providers/claude-plugin-hooks.ts +30 -0
- package/src/tools/setup/providers/claude.ts +43 -6
- package/src/tools/setup/service-registry.ts +69 -0
- package/src/tools/setup/service.ts +237 -0
- package/src/tools/setup/utils.ts +28 -5
- package/src/tools/setup/working-repo-cleanup.ts +2 -2
- package/src/tools/setup/working-repo-local-state.ts +2 -0
- package/src/tools/setup.ts +41 -16
- package/studio-dist/client/assets/app-aIwDxf48.css +2 -0
- package/studio-dist/client/assets/button-CX0sWAJl.js +1 -0
- package/studio-dist/client/assets/combobox-BmA8RjOc.js +1 -0
- package/studio-dist/client/assets/companion-view-DINdPF-b.js +1 -0
- package/studio-dist/client/assets/fields-BobQ7zRF.js +1 -0
- package/studio-dist/client/assets/friction-YdYd3zaz.js +1 -0
- package/studio-dist/client/assets/getting-started-CY7NEtTw.js +1 -0
- package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-DVB8e5R9.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DQvLHEr1.js +1 -0
- package/studio-dist/client/assets/graph-DbNnR884.js +2 -0
- package/studio-dist/client/assets/graph-canvas-DIcAqwtK.js +3242 -0
- package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
- package/studio-dist/client/assets/index-CysBCSxM.js +40 -0
- package/studio-dist/client/assets/jsx-runtime-MZURdZre.js +1 -0
- package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
- package/studio-dist/client/assets/panel-Csr49lBo.js +1 -0
- package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +1 -0
- package/studio-dist/client/assets/{prepaint-CwSrpdFA.js → prepaint-CKsXyJOR.js} +3 -3
- package/studio-dist/client/assets/queries-Dfp5deWj.js +1 -0
- package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
- package/studio-dist/client/assets/reports-CLdgxxkg.js +1 -0
- package/studio-dist/client/assets/routes-DGilWbDE.js +1 -0
- package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
- package/studio-dist/client/assets/select-DdebbX7K.js +1 -0
- package/studio-dist/client/assets/skills-C3zNkU8g.js +1 -0
- package/studio-dist/client/assets/specs-Dl8HfGlU.js +1 -0
- package/studio-dist/client/assets/specs-view-B_n0Pekv.js +1 -0
- package/studio-dist/client/assets/steps-CKUno4lh.js +1 -0
- package/studio-dist/client/assets/store-DyXbi6o9.js +1 -0
- package/studio-dist/client/assets/studio-0ueISxwP.js +100 -0
- package/studio-dist/client/assets/studio-queries-BflKt9va.js +2 -0
- package/studio-dist/client/assets/usage-Blcl8kA_.js +55 -0
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-BBXJpX5L.js +1 -0
- package/studio-dist/client/assets/useBaseQuery-C2cjmeH2.js +1 -0
- package/studio-dist/client/assets/useMutation-DI6LbvVa.js +1 -0
- package/studio-dist/client/assets/useSelector-AYcH7lB0.js +2 -0
- package/studio-dist/client/assets/vault-Cb9DmM1i.js +1 -0
- package/studio-dist/client/assets/warnings-B-rvoW8q.js +1 -0
- package/studio-dist/client/assets/workflow-DN5T19jd.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-JoHQ5ihx.js +122 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +100 -39
- package/studio-dist/server/assets/{button-CIJqAhni.js → button-B7e1fRyW.js} +63 -3574
- package/studio-dist/server/assets/combobox--S_OmUfh.js +483 -0
- package/studio-dist/server/assets/{companion-view-DISASvdJ.js → companion-view-D-vGM55e.js} +3 -3
- package/studio-dist/server/assets/companions-Dr6IpNAb.js +31 -0
- package/studio-dist/server/assets/{createServerRpc-tK2lE9R2.js → createServerRpc-bFKFpGFG.js} +1 -1
- package/studio-dist/server/assets/fields-B4qM2ZwC.js +1190 -0
- package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
- package/studio-dist/server/assets/friction-sLxaWY-H.js +903 -0
- package/studio-dist/server/assets/getting-started-B136TP57.js +4 -0
- package/studio-dist/server/assets/getting-started-Cq5Pcnsr.js +67 -0
- package/studio-dist/server/assets/getting-started._topic-CmWdl3u3.js +13 -0
- package/studio-dist/server/assets/getting-started.index-AB8xpTFY.js +13 -0
- package/studio-dist/server/assets/graph-B11ITte0.js +16 -0
- package/studio-dist/server/assets/graph-C_Hn-Wf_.js +800 -0
- package/studio-dist/server/assets/graph-canvas-BthrSmPS.js +21066 -0
- package/studio-dist/server/assets/graph-wire-BdSUx0G5.js +58 -0
- package/studio-dist/server/assets/guides-B8HdeK_C.js +13 -0
- package/studio-dist/server/assets/guides-BVQ4pt5B.js +5 -0
- package/studio-dist/server/assets/guides.server-DqFQAStf.js +66 -0
- package/studio-dist/server/assets/jsx-runtime-Bt0s0YKS.js +451 -0
- package/studio-dist/server/assets/{markdown-view-Bn7xPdks.js → markdown-view-rwiiVcPC.js} +28 -9
- package/studio-dist/server/assets/{panel-3Jmn4awF.js → panel-CUxRIpYL.js} +5 -5
- package/studio-dist/server/assets/plugins._service._view-BSvGnlhU.js +94 -0
- package/studio-dist/server/assets/{prepaint-DJfTQ_VH.js → prepaint-B28ClcPN.js} +1 -1
- package/studio-dist/server/assets/queries-S_Pl90IG.js +32 -0
- package/studio-dist/server/assets/{react-Ce6dj15C.js → react-CiBZPDs8.js} +3 -4
- package/studio-dist/server/assets/redirect-BaZ_QyqF.js +39 -0
- package/studio-dist/server/assets/{reports-C06RXVE2.js → reports-B9k98oE6.js} +3 -3
- package/studio-dist/server/assets/{reports-D6YMqhnO.js → reports-CJpAItPk.js} +14 -10
- package/studio-dist/server/assets/{router-C8MGqlAY.js → router-DF0etoNa.js} +1322 -3127
- package/studio-dist/server/assets/{routes-BcFgvqf7.js → routes-6ylCLkyg.js} +221 -76
- package/studio-dist/server/assets/search-b-yQesv3.js +78 -0
- package/studio-dist/server/assets/select-CjuKScan.js +1609 -0
- package/studio-dist/server/assets/{shell-DS3wUexh.js → shell-DLkP7wG9.js} +15 -6
- package/studio-dist/server/assets/{skills-CtrBAtX3.js → skills-DGg0mWDM.js} +3 -3
- package/studio-dist/server/assets/{skills-BEnOxiDl.js → skills-zeU80A9S.js} +8 -8
- package/studio-dist/server/assets/specs-DDBNT_v1.js +51 -0
- package/studio-dist/server/assets/specs-view-exvmWdg0.js +425 -0
- package/studio-dist/server/assets/{steps-Dq_CwY_s.js → steps-D1tYAyWZ.js} +88 -45
- package/studio-dist/server/assets/store-kS7zk0Hr.js +93 -0
- package/studio-dist/server/assets/studio-qRvQjRpz.js +10482 -0
- package/studio-dist/server/assets/studio-queries-qOXOYoPt.js +1393 -0
- package/studio-dist/server/assets/usage-C2um7YiV.js +25553 -0
- package/studio-dist/server/assets/usage-Cwle9-xY.js +24 -0
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-kQBB3y_b.js +756 -0
- package/studio-dist/server/assets/useBaseQuery--iH3rd-T.js +2051 -0
- package/studio-dist/server/assets/useMutation-C-WO6hCM.js +690 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-M2GBs8s3.js → useSelector-DUmCUXAs.js} +4 -668
- package/studio-dist/server/assets/{vault-Fvxt2Tzl.js → vault-B8vgVIH9.js} +10 -7
- package/studio-dist/server/assets/{vault-BmWnryh3.js → vault-CEBBRLMb.js} +3 -3
- package/studio-dist/server/assets/{views-BgYa-za2.js → views-UgO0Qz_g.js} +9 -6
- package/studio-dist/server/assets/{warnings-DzR6fyZh.js → warnings-BxK4VfV5.js} +2 -2
- package/studio-dist/server/assets/{delivery-path-C29fBynY.js → workflow-BrTK632u.js} +152 -120
- package/studio-dist/server/server.js +582 -8
- package/src/cli/commands/factory/factory.ts +0 -301
- package/src/cli/commands/report/collector.ts +0 -288
- package/src/cli/commands/studio/factory-credential.ts +0 -49
- package/src/cli/commands/studio/workset-session.ts +0 -131
- package/src/lib/delivery/archive-change.ts +0 -165
- package/src/lib/delivery/forge.ts +0 -279
- package/src/lib/delivery/token.ts +0 -24
- package/src/lib/factory/attach-client.ts +0 -113
- package/src/lib/factory/attach.ts +0 -178
- package/src/lib/factory/broker.ts +0 -190
- package/src/lib/factory/bun-commands.ts +0 -39
- package/src/lib/factory/client.ts +0 -92
- package/src/lib/factory/command.ts +0 -61
- package/src/lib/factory/credential-store.ts +0 -153
- package/src/lib/factory/frames.ts +0 -77
- package/src/lib/factory/ids.ts +0 -58
- package/src/lib/factory/outcomes/actions.ts +0 -114
- package/src/lib/factory/outcomes/index.ts +0 -391
- package/src/lib/factory/outcomes/lifecycle.ts +0 -205
- package/src/lib/factory/outcomes/runs.ts +0 -81
- package/src/lib/factory/prepare.ts +0 -49
- package/src/lib/factory/pty.ts +0 -103
- package/src/lib/factory/runner/companion-context.ts +0 -178
- package/src/lib/factory/runner/control.ts +0 -92
- package/src/lib/factory/runner/harness-agent.ts +0 -250
- package/src/lib/factory/runner/live.ts +0 -159
- package/src/lib/factory/runner/questions.ts +0 -22
- package/src/lib/factory/runner/rank.ts +0 -26
- package/src/lib/factory/runner/run-policy.ts +0 -12
- package/src/lib/factory/runner/run.ts +0 -199
- package/src/lib/factory/runner/scheduler.ts +0 -416
- package/src/lib/factory/runner/state.ts +0 -233
- package/src/lib/factory/runner/workflow.ts +0 -542
- package/src/lib/factory/runtime.ts +0 -981
- package/src/lib/factory/sandbox.ts +0 -292
- package/src/lib/factory/worktree-branch.ts +0 -17
- package/src/templates/capabilities/openspec-cap/mate-v1/templates/explore-brief.md +0 -25
- package/studio-dist/client/assets/app-CdPiFv59.css +0 -2
- package/studio-dist/client/assets/button-BIIHE0EQ.js +0 -3
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +0 -1
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +0 -1
- package/studio-dist/client/assets/factory-BZy0E8ty.js +0 -4
- package/studio-dist/client/assets/index-B3wkMzjA.js +0 -40
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +0 -1
- package/studio-dist/client/assets/panel-CbajlC3p.js +0 -1
- package/studio-dist/client/assets/react-CN2GSx7x.js +0 -1
- package/studio-dist/client/assets/reports-DllhYQ5_.js +0 -1
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +0 -1
- package/studio-dist/client/assets/routes-COm-G3mK.js +0 -1
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +0 -1
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +0 -1
- package/studio-dist/client/assets/steps-DFsH3Neu.js +0 -1
- package/studio-dist/client/assets/vault-B2q1nBY5.js +0 -1
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +0 -1
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +0 -1
- package/studio-dist/server/assets/actions-Bvgj9eb8.js +0 -54
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +0 -15
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +0 -459
- package/studio-dist/server/assets/factory-DGPmNGbo.js +0 -69
- package/studio-dist/server/assets/factory-DUTa0eDs.js +0 -2172
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +0 -34
- package/studio-dist/server/assets/search-JAKurDNh.js +0 -36
- package/studio-dist/server/assets/specs-C8rv34-5.js +0 -211
- package/studio-dist/server/assets/studio-BeltxxKt.js +0 -216
- package/studio-dist/server/assets/workflow-liRYecHk.js +0 -73
- /package/src/lib/{factory/keyed-serial.ts → keyed-serial.ts} +0 -0
- /package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/spec.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Implement a change on a recorded delivery branch, offering the Workset's Delivery Branch (default 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
4
|
allowed-tools: Bash(mate:*), Bash(openspec:*), Bash(git:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires the mate CLI and the openspec capability enabled.
|
|
@@ -12,9 +12,15 @@ metadata:
|
|
|
12
12
|
# Mate Apply Change
|
|
13
13
|
|
|
14
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
|
|
15
|
+
Working Repository branch the change is delivered through, so submit and publication
|
|
16
16
|
later know which merge to wait for. Then it runs the OpenSpec apply workflow.
|
|
17
17
|
|
|
18
|
+
**Selecting the change.** `openspec list` also names changes awaiting
|
|
19
|
+
publication. A change whose `openspec/changes/<name>/delivery.yaml` says
|
|
20
|
+
`state: submitted` is finished: when the user named no change, leave it out of
|
|
21
|
+
auto-selection and of the choices you offer, and never pick it because it is the only
|
|
22
|
+
one. Check only that `state` line. Apply one only when the user names it.
|
|
23
|
+
|
|
18
24
|
## Step 1: Read the branch and the record
|
|
19
25
|
|
|
20
26
|
In the Working Repository, read local Git state only:
|
|
@@ -25,7 +31,7 @@ git symbolic-ref --quiet --short refs/remotes/origin/HEAD # repository's defau
|
|
|
25
31
|
```
|
|
26
32
|
|
|
27
33
|
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>`).
|
|
34
|
+
`defaultBranch`, which is the change's resolved delivery branch (e.g. `workset/<id>` under the default branch template).
|
|
29
35
|
|
|
30
36
|
Read the change's existing record without changing it:
|
|
31
37
|
|
|
@@ -33,6 +39,28 @@ Read the change's existing record without changing it:
|
|
|
33
39
|
mate artifact link "<change-name>" --json
|
|
34
40
|
```
|
|
35
41
|
|
|
42
|
+
**Umbrella Repository.** When the Working Repository has no `.git` of its own and its
|
|
43
|
+
direct child folders are Git checkouts, it is an Umbrella Repository: settle the branch
|
|
44
|
+
per scoped child, then continue at Step 3. A scoped child is a child whose
|
|
45
|
+
`git -C <child> config --get remote.origin.url` names one of the change's scoped
|
|
46
|
+
repositories. Read each scoped child's branch with
|
|
47
|
+
`git -C <child> symbolic-ref --quiet --short HEAD`, and its record with
|
|
48
|
+
`mate artifact link "<change-name>" --repository "<org/repo>" --json`, whose recorded
|
|
49
|
+
branch and `defaultBranch` are that child's.
|
|
50
|
+
|
|
51
|
+
- **Every scoped child is on the recorded branch or `defaultBranch`** → ask nothing;
|
|
52
|
+
record it per child:
|
|
53
|
+
`mate artifact link "<change-name>" --repository "<org/repo>" --branch "<branch>" --json`.
|
|
54
|
+
- **Otherwise** → name each child's branch and its unpushed commits, then offer one menu
|
|
55
|
+
for all of them, with the same protected-branch and ticket rules as Step 2:
|
|
56
|
+
1. **Create a worktree** (recommended): run
|
|
57
|
+
`mate working worktree --change "<change-name>" --enter --json`. It records every
|
|
58
|
+
child's branch and returns `enter.action` `handoff` with the mirrored worktree in
|
|
59
|
+
`enter.path`. Report `enter.reason`, write no code, and stop; `## Next steps`: open a
|
|
60
|
+
new session in `enter.path` and run `/mate-apply-change <change-name>` there.
|
|
61
|
+
2. **Switch each child to `defaultBranch`** with `git -C <child>`, as Step 2's option 1
|
|
62
|
+
does, recording each with `--repository "<org/repo>"`.
|
|
63
|
+
|
|
36
64
|
## Step 2: Settle the delivery branch
|
|
37
65
|
|
|
38
66
|
Read `defaultBranch`, `inheritedFrom`, `diagnostics`, `ticketFormat`, and
|
|
@@ -46,12 +74,44 @@ a mismatch is informational, and relinking requires explicit user confirmation.
|
|
|
46
74
|
|
|
47
75
|
A branch is **protected** when it is the repository's default branch or matches a configured
|
|
48
76
|
protected pattern; `mate artifact link` refuses a
|
|
49
|
-
protected branch unless it is recorded as a direct delivery. Mate never asks the
|
|
50
|
-
so a branch only the
|
|
77
|
+
protected branch unless it is recorded as a direct delivery. Mate never asks the Git host,
|
|
78
|
+
so a branch only the host protects looks unprotected; hence the menu below.
|
|
79
|
+
|
|
80
|
+
**Isolated session.** When the link result's `session.isolated` is `true` (a Claude
|
|
81
|
+
Code background session outside a linked worktree), Claude Code refuses writes here, so
|
|
82
|
+
this block overrides the rules below. Write nothing here; never switch branch in place
|
|
83
|
+
or offer a direct delivery. An Umbrella Repository keeps its Step 1 handoff.
|
|
84
|
+
|
|
85
|
+
- Where a rule below continues here without asking (the recorded branch is current, on
|
|
86
|
+
`defaultBranch`, a fresh ticket branch), record that branch when it is not recorded
|
|
87
|
+
yet, then run `mate working worktree --change "<change-name>" --take-branch --enter --json`.
|
|
88
|
+
A protected branch recorded as a direct delivery cannot move to a worktree: write
|
|
89
|
+
nothing, and ask the developer to continue the change in an interactive session (or
|
|
90
|
+
one the VS Code extension starts) in this checkout.
|
|
91
|
+
- Otherwise name every local commit not on the remote
|
|
92
|
+
(`git log --oneline HEAD --not --remotes`), say uncommitted edits stay in this
|
|
93
|
+
checkout, and offer only these worktree options; option 1 is recommended, except
|
|
94
|
+
option 2 when the current branch is not protected and `ticketCandidate` is set:
|
|
95
|
+
1. **Create a worktree on `defaultBranch`**: option 2 below, with its ticket rule. When
|
|
96
|
+
`defaultBranch` is null and nothing is recorded, ask for a branch name and use
|
|
97
|
+
option 3 with it.
|
|
98
|
+
2. **Use the current branch in a worktree** (only when it is not protected): record it
|
|
99
|
+
with `mate artifact link "<change-name>" --branch "<current>" --json`, then run
|
|
100
|
+
`mate working worktree --change "<change-name>" --take-branch --enter --json`.
|
|
101
|
+
3. **Use another branch in a worktree**: the user names it, as in option 4 below.
|
|
102
|
+
Record it with `mate artifact link "<change-name>" --branch "<name>" --json` without
|
|
103
|
+
switching, then run `mate working worktree --change "<change-name>" --enter --json`.
|
|
104
|
+
- Follow `enter` as option 2 below says. When `mate working worktree` refuses because
|
|
105
|
+
this checkout has uncommitted changes to tracked files, report the paths it names,
|
|
106
|
+
write no code, and ask the developer to commit or stash them before answering again.
|
|
51
107
|
|
|
52
108
|
- **A branch is already recorded** and it is the current branch → continue. When the
|
|
53
|
-
current branch differs
|
|
54
|
-
|
|
109
|
+
current branch differs and `git worktree list --porcelain` shows the recorded branch
|
|
110
|
+
checked out in a linked worktree, run
|
|
111
|
+
`mate working worktree --change "<change-name>" --enter --json`, which reuses it, and
|
|
112
|
+
follow `enter` as in option 2 below. Otherwise, when the current branch differs, warn,
|
|
113
|
+
name both branches, and ask before implementing whether to switch to the recorded
|
|
114
|
+
branch or record the current one.
|
|
55
115
|
- **On `defaultBranch`** → record it without asking:
|
|
56
116
|
`mate artifact link "<change-name>" --branch "<defaultBranch>" --json`.
|
|
57
117
|
- **Detached HEAD** → ask for the branch name, then record it.
|
|
@@ -63,7 +123,7 @@ so a branch only the forge protects looks unprotected; hence the menu below.
|
|
|
63
123
|
- **On any other branch**, protected or not → do not implement there yet. First name
|
|
64
124
|
every local commit that is not on the remote (`git log --oneline HEAD --not --remotes`)
|
|
65
125
|
and leave them where they are; never move, reset, or rebase them. On another
|
|
66
|
-
Workset's
|
|
126
|
+
Workset's Delivery Branch, name that Workset. Then offer one menu; option 1 is
|
|
67
127
|
recommended, except option 3 when the current branch is not protected and
|
|
68
128
|
`ticketCandidate` is set:
|
|
69
129
|
1. **Create or switch to `defaultBranch`**: check local and `origin`
|
|
@@ -80,7 +140,8 @@ so a branch only the forge protects looks unprotected; hence the menu below.
|
|
|
80
140
|
adding `--ticket "<KEY>"` when a ticket was given (below);
|
|
81
141
|
it records the branch. When `enter.action` is `tool`, say an approval prompt may
|
|
82
142
|
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
|
|
143
|
+
`enter.path` is now the Working Repository and continue at Step 3 there, following
|
|
144
|
+
`enter.reason` when it is set (it says how to run git there). On `handoff`
|
|
84
145
|
or a declined move, report `enter.reason` and any warnings, write no code, and
|
|
85
146
|
stop. `## Next steps`: name each `repositories[].path`, open a new session in this
|
|
86
147
|
repository's worktree, run `/mate-apply-change <change-name>` there. On failure,
|
|
@@ -114,7 +175,16 @@ its message and ask; never work around it.
|
|
|
114
175
|
When its result lists `warnings`, a `dependsOn` change is not implemented yet, so this
|
|
115
176
|
change would be built without the code it builds on. Report each warning and ask
|
|
116
177
|
whether to apply the dependency first or continue here. A dependency that is
|
|
117
|
-
implemented but
|
|
178
|
+
implemented but unsubmitted is no such warning; it only affects submit order. A
|
|
179
|
+
submitted or locally active dependency counts as satisfied. For a change with
|
|
180
|
+
`dependsOn`, read the specs it builds on with `mate artifact project "<change-name>" --json`:
|
|
181
|
+
its requirements are not in the canonical specs until the chain is published.
|
|
182
|
+
|
|
183
|
+
**Earlier steps.** Run `mate workflow next "<change-name>"`. A step of an earlier
|
|
184
|
+
stage it names, as an action or counted, that the request or the user says ran: record
|
|
185
|
+
it with `mate workflow done <skill> "<change-name>"`; otherwise name it above the hand-off.
|
|
186
|
+
Being asked to apply settles what comes before it: a review or earlier step the command
|
|
187
|
+
names never stops this skill and is never recorded to get past it; continue at Step 3.
|
|
118
188
|
|
|
119
189
|
## Step 3: Apply
|
|
120
190
|
|
|
@@ -124,12 +194,24 @@ Retrieve its instructions the ordinary way. Only when the user explicitly asks f
|
|
|
124
194
|
apply, also read [references/mate-compact-apply.md](references/mate-compact-apply.md) and
|
|
125
195
|
use its transport.
|
|
126
196
|
|
|
127
|
-
## Step 4:
|
|
197
|
+
## Step 4: Close the stage
|
|
198
|
+
|
|
199
|
+
At the end of every run of this skill, also with tasks still open or after a blocker,
|
|
200
|
+
run:
|
|
128
201
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
202
|
+
```bash
|
|
203
|
+
mate workflow done mate-apply-change "<change-name>"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
It prints the next actions for the change. End the response with a final `## Next steps`
|
|
207
|
+
section: numbered required actions in execution order, with exact commands and known
|
|
208
|
+
change names, prerequisites first: required work of this run that is still open, then
|
|
209
|
+
the actions the command printed, in its order. Summaries, evidence, warnings, optional
|
|
210
|
+
work, and deferred context go above it; nothing follows it. Listing an action never
|
|
211
|
+
invokes it. Never offer the user an optional command, in or above the section; optional
|
|
212
|
+
work appears above it only as a skill invocation labelled optional, as the command's
|
|
213
|
+
`optional:` line names it. If the command fails, report its problems and end without a
|
|
214
|
+
`Next steps` section.
|
|
133
215
|
|
|
134
216
|
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
135
217
|
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
@@ -138,25 +220,16 @@ user's statement or the harness's own identity sets the runtime, never a skill's
|
|
|
138
220
|
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
139
221
|
never invokes.
|
|
140
222
|
|
|
141
|
-
|
|
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.
|
|
223
|
+
Add only this skill's own required actions to the section:
|
|
149
224
|
|
|
150
|
-
|
|
151
|
-
|
|
225
|
+
- Required work still open (a failing check, an unanswered question) comes first.
|
|
226
|
+
- Several changes on one branch: run the command for each, list their actions in
|
|
227
|
+
dependency order, and say above the section that this order avoids an advisory submit
|
|
228
|
+
warning; it is not a gate.
|
|
152
229
|
|
|
153
|
-
|
|
154
|
-
1. /mate-archive-change acme-queue
|
|
155
|
-
```
|
|
230
|
+
Omit the reference's completion sentence.
|
|
156
231
|
|
|
157
232
|
## Guardrails
|
|
158
233
|
|
|
159
234
|
- Never push, open a PR, or merge on the user's behalf.
|
|
160
235
|
- 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`.
|
package/src/templates/mate-skills/claude/mate-apply-change/references/openspec-apply-change.md
CHANGED
|
@@ -151,7 +151,7 @@ Working on task 4/7: <task description>
|
|
|
151
151
|
...
|
|
152
152
|
|
|
153
153
|
All tracked tasks are complete. Review or verify the change as appropriate
|
|
154
|
-
before archiving. You can archive this change with `/mate-
|
|
154
|
+
before archiving. You can archive this change with `/mate-submit-change`.
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
**Output On Pause (Issue Encountered)**
|
|
@@ -1,81 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mate-archive-change
|
|
3
|
-
description:
|
|
3
|
+
description: Deprecated alias that forwards to mate-submit-change, since changes are now submitted before the merge and archived at publication. Use when the user asks to archive a change.
|
|
4
4
|
allowed-tools: Bash(mate:*), Bash(git:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires the mate CLI and the openspec capability enabled.
|
|
7
7
|
metadata:
|
|
8
8
|
author: mate
|
|
9
|
-
version: "
|
|
9
|
+
version: "2.0"
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Mate Archive Change
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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`.
|
|
14
|
+
Deprecated: archiving before the merge is replaced by the Submit change stage, and
|
|
15
|
+
publication archives. Say so in one line, then follow
|
|
16
|
+
[../mate-submit-change/SKILL.md](../mate-submit-change/SKILL.md) for the same change, from
|
|
17
|
+
its first step. `mate artifact archive` is a deprecated alias that only checks and
|
|
18
|
+
submits nothing; never run it.
|
|
@@ -85,16 +85,22 @@ Assumptions: <points explore should verify, or "none">
|
|
|
85
85
|
Next: /mate-explore-change
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
execution order, with exact commands and known change names, prerequisites first.
|
|
90
|
-
Summaries, evidence, warnings, optional work, and deferred context go above it; nothing
|
|
91
|
-
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. For **skip**, the block is followed by:
|
|
88
|
+
After the block, at the end of every run of this skill, run:
|
|
92
89
|
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
1. /mate-explore-change
|
|
90
|
+
```bash
|
|
91
|
+
mate workflow done mate-clarify-intent
|
|
96
92
|
```
|
|
97
93
|
|
|
94
|
+
It prints the next actions for the change. End the response with a final `## Next steps`
|
|
95
|
+
section: numbered required actions in execution order, with exact commands and known
|
|
96
|
+
change names, prerequisites first: required work of this run that is still open, then
|
|
97
|
+
the actions the command printed, in its order. Summaries, evidence, warnings, optional
|
|
98
|
+
work, and deferred context go above it; nothing follows it. Listing an action never
|
|
99
|
+
invokes it. Never offer the user an optional command, in or above the section; optional
|
|
100
|
+
work appears above it only as a skill invocation labelled optional, as the command's
|
|
101
|
+
`optional:` line names it. If the command fails, report its problems and end without a
|
|
102
|
+
`Next steps` section.
|
|
103
|
+
|
|
98
104
|
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
99
105
|
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
100
106
|
the prefix: `@name` in OpenCode, `$name` in Codex, `/skill:name` in Pi. Only the
|
|
@@ -24,6 +24,16 @@ or decision.
|
|
|
24
24
|
2. Resolve the primary Working Repository from its canonical Git remote or the
|
|
25
25
|
explicit Mate repository attachment. Do not use a checkout basename as its
|
|
26
26
|
identity.
|
|
27
|
+
|
|
28
|
+
**Umbrella Repository.** When the Working Repository has no `.git` of its own
|
|
29
|
+
and its direct child folders are Git checkouts, it is an Umbrella Repository:
|
|
30
|
+
each child is a Working Repository of its own. Take the children from the
|
|
31
|
+
session's `umbrella-children` block; without a list there, read each child's
|
|
32
|
+
identity with `git -C <child> config --get remote.origin.url`. Resolve the
|
|
33
|
+
child the topic concerns first, then continue with that child's identity and
|
|
34
|
+
load no context of the other children. When it is unclear which child the
|
|
35
|
+
topic concerns, ask the user before loading any context.
|
|
36
|
+
|
|
27
37
|
3. Convert the canonical external repository ID to its filesystem key only for
|
|
28
38
|
path lookup. For example, `acme/repo` maps to `acme_repo`. Keep the canonical
|
|
29
39
|
ID authoritative, and use the same normalized key everywhere; do not guess
|
|
@@ -21,7 +21,14 @@ large for one change is suggested as several.
|
|
|
21
21
|
[references/openspec-explore.md](references/openspec-explore.md) and follow it for the
|
|
22
22
|
exploration itself. When a `PRE-EXPLORE HANDOFF` block is in this conversation, treat
|
|
23
23
|
its Confirmed points as settled and start from its Unresolved questions and
|
|
24
|
-
Assumptions.
|
|
24
|
+
Assumptions. `openspec list` also names changes awaiting publication: a change whose `openspec/changes/<name>/delivery.yaml` says
|
|
25
|
+
`state: submitted` is not what the user is working on and never the current
|
|
26
|
+
behaviour. Run `mate artifact pending --json` once: each submitted change lists its
|
|
27
|
+
`author` and `touches` (the capability and requirement it rewrites or removes). When
|
|
28
|
+
one touches what this exploration is about, name the change and its author to the
|
|
29
|
+
user and read only that change's delta for that capability, from the companion with
|
|
30
|
+
`git show <ref>:<path>/specs/<capability>/spec.md` (`submitted.ref` and the change's
|
|
31
|
+
`path`); read any other submitted change only when the user names it.
|
|
25
32
|
|
|
26
33
|
2. **Resolve scope from the context map.** Before reading code, identify the canonical
|
|
27
34
|
Working Repository (`org/repository` from its Git remote) and the repository-relative
|
|
@@ -31,23 +38,48 @@ large for one change is suggested as several.
|
|
|
31
38
|
exploration. When the map has no entry for the Area, say so instead of borrowing
|
|
32
39
|
another Area's context.
|
|
33
40
|
|
|
41
|
+
**Umbrella Repository.** When the Working Repository has no `.git` of its own and its
|
|
42
|
+
direct child folders are Git checkouts, it is an Umbrella Repository: each child is a
|
|
43
|
+
Working Repository of its own. Take the children from the session's
|
|
44
|
+
`umbrella-children` block; without a list there, read each child's identity with
|
|
45
|
+
`git -C <child> config --get remote.origin.url`. Before reading code, resolve the
|
|
46
|
+
children the work concerns, read the repository-scoped map of each of them only, and
|
|
47
|
+
name one scope per concerned child and Area. When it is unclear which child the work
|
|
48
|
+
concerns, ask the user before loading any context.
|
|
49
|
+
|
|
34
50
|
3. **Suggest slicing when the feature is large.** Slicing test: a feature needs
|
|
35
|
-
slicing when it holds
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
change with a scope per Area.
|
|
51
|
+
slicing only when it holds more work than one review can hold (roughly more
|
|
52
|
+
than 20 tasks or 800 changed lines) and that work splits into behaviours that
|
|
53
|
+
can each ship and be reviewed on their own. Several Areas alone are no reason
|
|
54
|
+
to slice: they stay one change with a scope per Area. Cut as few slices as the
|
|
55
|
+
work allows, each close to one review's size; merge a slice of fewer than about
|
|
56
|
+
10 tasks into its neighbour. When each slice needs the one before it to be
|
|
57
|
+
useful, cut only where a reviewer needs a break, not at every behaviour.
|
|
58
|
+
Suggest slices only when the test clearly passes; a
|
|
39
59
|
borderline case stays one change. When the explored direction clearly passes the
|
|
40
60
|
test, propose slices: one change per slice,
|
|
41
|
-
each reviewable and
|
|
61
|
+
each reviewable and shippable on its own, in dependency order. Name the
|
|
42
62
|
dependencies between slices; they become `dependsOn` entries when the changes are
|
|
43
63
|
proposed. Several slices may share one delivery branch. Slicing is a suggestion;
|
|
44
64
|
the user decides.
|
|
45
65
|
|
|
46
|
-
4. **
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
4. **Close the stage.** At the end of every run of this skill, run the first command
|
|
67
|
+
while no change folder exists, else the second:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
mate workflow done mate-explore-change
|
|
71
|
+
mate workflow done mate-explore-change "<change-name>"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
It prints the next actions for the change. End the response with a final `## Next
|
|
75
|
+
steps` section: numbered required actions in execution order, with exact commands and
|
|
76
|
+
known change names, prerequisites first: required work of this run that is still
|
|
77
|
+
open, then the actions the command printed, in its order. Summaries, evidence,
|
|
78
|
+
warnings, optional work, and deferred context go above it; nothing follows it.
|
|
79
|
+
Listing an action never invokes it. Never offer the user an optional command, in or
|
|
80
|
+
above the section; optional work appears above it only as a skill invocation labelled
|
|
81
|
+
optional, as the command's `optional:` line names it. If the command fails, report its
|
|
82
|
+
problems and end without a `Next steps` section.
|
|
51
83
|
|
|
52
84
|
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
53
85
|
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
@@ -56,9 +88,9 @@ large for one change is suggested as several.
|
|
|
56
88
|
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
57
89
|
never invokes.
|
|
58
90
|
|
|
59
|
-
|
|
60
|
-
agreed slice in dependency order. A slice deferred for later is
|
|
61
|
-
section, not an action in it.
|
|
91
|
+
Add only what this skill knows: the agreed change name on the printed action, or
|
|
92
|
+
that action once per agreed slice in dependency order. A slice deferred for later is
|
|
93
|
+
context above the section, not an action in it.
|
|
62
94
|
|
|
63
95
|
## Boundary
|
|
64
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mate-propose-change
|
|
3
|
-
description: Propose a change with its schema chosen by the minimal eligibility test (mate-minimal or mate-
|
|
3
|
+
description: Propose a change with its schema chosen by the minimal eligibility test (mate-minimal or mate-full) and one change per agreed slice. Builds on the OpenSpec propose workflow. Use when the user wants to turn an explored direction into a change proposal, or revise an existing change's plan.
|
|
4
4
|
allowed-tools: Bash(mate:*), Bash(openspec:*), Bash(git:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires the mate CLI and the openspec capability enabled.
|
|
@@ -24,7 +24,7 @@ propose steps below.
|
|
|
24
24
|
## Steps
|
|
25
25
|
|
|
26
26
|
1. **Choose the schema.** Use `mate-minimal` (specs and tasks only) when every
|
|
27
|
-
statement holds; otherwise use `mate-
|
|
27
|
+
statement holds; otherwise use `mate-full` (proposal, specs, design, tasks):
|
|
28
28
|
|
|
29
29
|
- Intent and scope are clear, with nothing left to explore.
|
|
30
30
|
- The change stays within one Area.
|
|
@@ -37,11 +37,15 @@ propose steps below.
|
|
|
37
37
|
State the result and the failing statement, if any, in one line. The user may
|
|
38
38
|
override it.
|
|
39
39
|
|
|
40
|
-
2. **One change per slice.** Slicing test: a feature needs slicing when it
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Several Areas alone are no reason to slice: they stay
|
|
44
|
-
Area.
|
|
40
|
+
2. **One change per slice.** Slicing test: a feature needs slicing only when it
|
|
41
|
+
holds more work than one review can hold (roughly more than 20 tasks or 800
|
|
42
|
+
changed lines) and that work splits into behaviours that can each ship and be
|
|
43
|
+
reviewed on their own. Several Areas alone are no reason to slice: they stay
|
|
44
|
+
one change with a scope per Area. Cut as few slices as the work allows, each
|
|
45
|
+
close to one review's size; merge a slice of fewer than about 10 tasks into its
|
|
46
|
+
neighbour. When each slice needs the one before it to be useful, cut only where
|
|
47
|
+
a reviewer needs a break, not at every behaviour. When exploration agreed on
|
|
48
|
+
several slices, propose one change per slice,
|
|
45
49
|
each with its own name. When no slices were agreed and no decision to keep one
|
|
46
50
|
change was made (in exploration or a PRE-EXPLORE HANDOFF), apply the slicing test
|
|
47
51
|
before writing anything. Only when it clearly passes, suggest slices in dependency
|
|
@@ -50,19 +54,45 @@ propose steps below.
|
|
|
50
54
|
state in one line why, and continue. If the test clearly passes but the slice
|
|
51
55
|
boundaries are unclear, suggest `/mate-explore-change` instead of guessing slices.
|
|
52
56
|
Record a slice's dependency on an earlier change as a `dependsOn` list in the
|
|
53
|
-
frontmatter of its first artifact, for example `dependsOn: [add-graph-model]`;
|
|
54
|
-
later warns while a dependency is
|
|
57
|
+
frontmatter of its first artifact, for example `dependsOn: [add-graph-model]`; submit
|
|
58
|
+
later warns while a dependency is neither submitted nor published.
|
|
55
59
|
|
|
56
60
|
3. **Follow the OpenSpec workflow.** Read
|
|
57
61
|
[references/openspec-propose.md](references/openspec-propose.md) and follow it with the
|
|
58
62
|
chosen schema (pass `--schema <schema>` when creating the change). Never ask for a
|
|
59
|
-
ticket; apply asks when it creates the branch.
|
|
63
|
+
ticket; apply asks when it creates the branch. Once the change's delta specs are written,
|
|
64
|
+
record the companion commit they were written against with
|
|
65
|
+
`mate artifact link "<change-name>" --spec-base --json`, so a requirement someone changes
|
|
66
|
+
meanwhile conflicts at publication instead of being overwritten. Then compare the
|
|
67
|
+
requirements the delta specs modify or remove with `touches` of each change in
|
|
68
|
+
`mate artifact pending --json`: for a match, tell the user the change and its
|
|
69
|
+
`author`, since the one published second is refused as a conflict until resolved.
|
|
70
|
+
|
|
71
|
+
**Dependent changes.** A `dependsOn` change that is submitted or active in this
|
|
72
|
+
checkout counts as satisfied: its requirements are not in the canonical specs until
|
|
73
|
+
it is published. Before writing the delta specs of a change with `dependsOn`, read
|
|
74
|
+
the specs as they will be once that chain is published with
|
|
75
|
+
`mate artifact project "<change-name>" --json`, and write `MODIFIED` requirements
|
|
76
|
+
against that text, not against the canonical specs. A failing projection reports
|
|
77
|
+
publication's reason; relay it.
|
|
78
|
+
|
|
79
|
+
4. **Close the stage.** Reviews are done by people, not by a skill, and validation is
|
|
80
|
+
never approval. At the end of every run of this skill, for each change it proposed,
|
|
81
|
+
run:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mate workflow done mate-propose-change "<change-name>"
|
|
85
|
+
```
|
|
60
86
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
87
|
+
It prints the next actions for the change. End the response with a final `## Next
|
|
88
|
+
steps` section: numbered required actions in execution order, with exact commands and
|
|
89
|
+
known change names, prerequisites first: required work of this run that is still
|
|
90
|
+
open, then the actions the command printed, in its order. Summaries, evidence,
|
|
91
|
+
warnings, optional work, and deferred context go above it; nothing follows it.
|
|
92
|
+
Listing an action never invokes it. Never offer the user an optional command, in or
|
|
93
|
+
above the section; optional work appears above it only as a skill invocation labelled
|
|
94
|
+
optional, as the command's `optional:` line names it. If the command fails, report its
|
|
95
|
+
problems and end without a `Next steps` section.
|
|
66
96
|
|
|
67
97
|
**Skill invocation.** Skill invocations here use `/name`, the syntax of Claude Code
|
|
68
98
|
and Cursor and the fallback. When the current runtime uses another syntax, swap only
|
|
@@ -71,27 +101,16 @@ propose steps below.
|
|
|
71
101
|
folder or an older example. Arguments, commands, paths, and order stay, and naming
|
|
72
102
|
never invokes.
|
|
73
103
|
|
|
74
|
-
|
|
75
|
-
design, Review tasks for `mate-v1`; Review specs and Review tasks for
|
|
76
|
-
`mate-minimal`), then `/mate-apply-change <change-name>` after that review. Never
|
|
77
|
-
describe validation as approval.
|
|
104
|
+
Add only this skill's own required actions to the section:
|
|
78
105
|
|
|
79
106
|
- **Remaining slices:** when recommending them next, list
|
|
80
107
|
`/mate-propose-change <slice>` per slice in dependency order; otherwise name them
|
|
81
108
|
above the section as deferred.
|
|
82
109
|
- **Dependencies:** a `dependsOn` change with unfinished work (open tasks or an
|
|
83
|
-
outstanding check) gets its named action listed before
|
|
84
|
-
dependency that is implemented but
|
|
85
|
-
the section that
|
|
86
|
-
|
|
87
|
-
```text
|
|
88
|
-
Validation passed; validation is not approval.
|
|
89
|
-
|
|
90
|
-
## Next steps
|
|
91
|
-
1. Review specs: openspec/changes/acme-queue/specs/
|
|
92
|
-
2. Review tasks: openspec/changes/acme-queue/tasks.md
|
|
93
|
-
3. After your review: /mate-apply-change acme-queue
|
|
94
|
-
```
|
|
110
|
+
outstanding check) gets its named action listed before the printed ones. A
|
|
111
|
+
dependency that is implemented but unsubmitted does not block apply: say above
|
|
112
|
+
the section that submitting it first, with `/mate-submit-change`, avoids a submit
|
|
113
|
+
warning.
|
|
95
114
|
|
|
96
115
|
## Revise mode
|
|
97
116
|
|
|
@@ -4,7 +4,13 @@ Revises the planning artifacts a change already has, for example after a person
|
|
|
4
4
|
them, and keeps them consistent with each other. Not a Delivery Path stage.
|
|
5
5
|
|
|
6
6
|
1. **Name the change.** Use the change the user names; otherwise infer it from the
|
|
7
|
-
conversation, or list the active changes and ask.
|
|
7
|
+
conversation, or list the active changes and ask. `openspec list` also names changes
|
|
8
|
+
awaiting publication: leave a change whose
|
|
9
|
+
`openspec/changes/<name>/delivery.yaml` says `state: submitted` out of the inference
|
|
10
|
+
and the list, checking only that `state` line, and revise one only when the user names
|
|
11
|
+
it. A named submitted change that is not in this checkout, a teammate's or the user's
|
|
12
|
+
own from another machine, is taken into it first with `mate artifact take "<name>"`;
|
|
13
|
+
after the revision it is submitted again with `mate-submit-change`.
|
|
8
14
|
|
|
9
15
|
2. **Follow the OpenSpec workflow.** Read
|
|
10
16
|
[openspec-update-change.md](openspec-update-change.md) and follow it. Propose the requested edit together with the matching edits to the other
|
|
@@ -12,21 +18,21 @@ them, and keeps them consistent with each other. Not a Delivery Path stage.
|
|
|
12
18
|
|
|
13
19
|
3. **Upgrade a minimal change when it outgrows the gate.** When a revision makes a
|
|
14
20
|
`mate-minimal` change fail a statement of the minimal gate (Step 1 of `SKILL.md`), or
|
|
15
|
-
the user asks, name the failing statement and offer the upgrade to `mate-
|
|
21
|
+
the user asks, name the failing statement and offer the upgrade to `mate-full` once. Declined: continue
|
|
16
22
|
the revision unchanged. Confirmed:
|
|
17
23
|
|
|
18
|
-
1. Set `schema: mate-
|
|
19
|
-
instructions` returns the `mate-
|
|
24
|
+
1. Set `schema: mate-full` in the change's `.openspec.yaml`, first, so `openspec
|
|
25
|
+
instructions` returns the `mate-full` text.
|
|
20
26
|
2. Write the proposal from the existing specs and tasks, then the design, each from
|
|
21
27
|
`openspec instructions <artifact-id> --change "<name>" --json` and each confirmed
|
|
22
28
|
before writing.
|
|
23
|
-
3. Align `tasks.md`: frontmatter `schema: mate-
|
|
29
|
+
3. Align `tasks.md`: frontmatter `schema: mate-full`, the `← [[proposal]] | [[design]]`
|
|
24
30
|
line after the title, one heading per Area. Keep task numbers and check marks.
|
|
25
31
|
4. Run `openspec validate "<name>" --strict` and `openspec status --change "<name>"`,
|
|
26
32
|
and report any artifact still missing.
|
|
27
33
|
|
|
28
34
|
This upgrade is the only case in which revise mode creates a missing artifact. Never
|
|
29
|
-
downgrade a `mate-v1` change; suggest a new change instead.
|
|
35
|
+
downgrade a `mate-full` or `mate-v1` change; suggest a new change instead.
|
|
30
36
|
|
|
31
37
|
4. **Hand off.**
|
|
32
38
|
End the response with a final `## Next steps` section: numbered required actions in
|
|
@@ -36,7 +42,7 @@ them, and keeps them consistent with each other. Not a Delivery Path stage.
|
|
|
36
42
|
Swap skill prefixes per **Skill invocation** in `SKILL.md`.
|
|
37
43
|
Start with reviewing the revised artifacts. When the change already has checked
|
|
38
44
|
tasks, then list `/mate-apply-change <change-name>` to carry the revision into code;
|
|
39
|
-
when every task is checked, `/mate-
|
|
45
|
+
when every task is checked, `/mate-submit-change <change-name>`.
|
|
40
46
|
|
|
41
47
|
Guardrails:
|
|
42
48
|
|
package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-update-change.md
CHANGED
|
@@ -84,7 +84,7 @@ This workflow revises artifacts that already exist; it never creates missing one
|
|
|
84
84
|
6. **Point to the next step (guidance only - NEVER act on it)**
|
|
85
85
|
- Artifacts with empty `existingOutputPaths` and status `ready` or `blocked` -> run `openspec status --change "<name>" --json` for the next artifact and point the user to `openspec instructions "<artifact-id>" --change "<name>" --json` for how to create it.
|
|
86
86
|
- Change already implemented (tasks checked off / already applied) -> the code may no longer match the revised plan; suggest `/mate-apply-change` to carry the delta into code.
|
|
87
|
-
- Everything done and implemented -> suggest `/mate-
|
|
87
|
+
- Everything done and implemented -> suggest `/mate-submit-change`.
|
|
88
88
|
|
|
89
89
|
**Output**
|
|
90
90
|
|