@workerstack/repo 0.0.0-stage → 0.1.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/CHANGELOG.md +45 -0
- package/LICENSE +21 -0
- package/README.md +0 -3
- package/agents/global-settings/antigravity.json +3 -0
- package/agents/global-settings/claude.json +6 -0
- package/agents/global-settings/codex.toml +2 -0
- package/agents/global-settings/cursor.json +3 -0
- package/agents/global-settings/grok.toml +36 -0
- package/agents/global-settings/manifest.json +36 -0
- package/agents/grok/hooks/orchestrate-parent.json +60 -0
- package/agents/grok/hooks/rtk.json +16 -0
- package/agents/grok/hooks/rulesync.json +3 -0
- package/agents/grok/roles/scout.toml +5 -0
- package/agents/hooks.jsonc +67 -0
- package/agents/mcp-policy.jsonc +16 -0
- package/agents/rules/overview.md +21 -0
- package/agents/settings/claude.json +5 -0
- package/agents/skills/ask/SKILL.md +13 -0
- package/agents/skills/auto/SKILL.md +13 -0
- package/agents/skills/away/SKILL.md +19 -0
- package/agents/skills/blast-radius/SKILL.md +54 -0
- package/agents/skills/bro/SKILL.md +9 -0
- package/agents/skills/browser/SKILL.md +16 -0
- package/agents/skills/clasp/SKILL.md +11 -0
- package/agents/skills/commit/SKILL.md +35 -0
- package/agents/skills/commit-and-push/SKILL.md +9 -0
- package/agents/skills/commit-push/SKILL.md +59 -0
- package/agents/skills/commit-push-deploy/SKILL.md +74 -0
- package/agents/skills/commit-push-release/SKILL.md +75 -0
- package/agents/skills/correct/SKILL.md +39 -0
- package/agents/skills/do/SKILL.md +21 -0
- package/agents/skills/explain/SKILL.md +13 -0
- package/agents/skills/google-workspace/SKILL.md +12 -0
- package/agents/skills/handoff/SKILL.md +81 -0
- package/agents/skills/implement-plan/SKILL.md +29 -0
- package/agents/skills/implement-roadmap/SKILL.md +27 -0
- package/agents/skills/jev/SKILL.md +17 -0
- package/agents/skills/listen/SKILL.md +15 -0
- package/agents/skills/pickup/SKILL.md +58 -0
- package/agents/skills/principle-attack-the-premise/SKILL.md +24 -0
- package/agents/skills/principle-boundary-discipline/SKILL.md +38 -0
- package/agents/skills/principle-build-the-lever/SKILL.md +28 -0
- package/agents/skills/principle-encode-lessons-in-structure/SKILL.md +15 -0
- package/agents/skills/principle-exhaust-the-design-space/SKILL.md +12 -0
- package/agents/skills/principle-experience-first/SKILL.md +22 -0
- package/agents/skills/principle-explain-the-number/SKILL.md +21 -0
- package/agents/skills/principle-fix-root-causes/SKILL.md +24 -0
- package/agents/skills/principle-foundational-thinking/SKILL.md +25 -0
- package/agents/skills/principle-guard-the-context-window/SKILL.md +16 -0
- package/agents/skills/principle-laziness-protocol/SKILL.md +13 -0
- package/agents/skills/principle-make-operations-idempotent/SKILL.md +25 -0
- package/agents/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +18 -0
- package/agents/skills/principle-minimize-reader-load/SKILL.md +22 -0
- package/agents/skills/principle-model-the-domain/SKILL.md +26 -0
- package/agents/skills/principle-never-block-on-the-human/SKILL.md +17 -0
- package/agents/skills/principle-outcome-oriented-execution/SKILL.md +25 -0
- package/agents/skills/principle-prove-it-works/SKILL.md +25 -0
- package/agents/skills/principle-redesign-from-first-principles/SKILL.md +18 -0
- package/agents/skills/principle-separate-before-serializing-shared-state/SKILL.md +20 -0
- package/agents/skills/principle-sequence-verifiable-units/SKILL.md +22 -0
- package/agents/skills/principle-subtract-before-you-add/SKILL.md +21 -0
- package/agents/skills/principle-test-behavior-not-implementation/SKILL.md +24 -0
- package/agents/skills/principle-type-system-discipline/SKILL.md +17 -0
- package/agents/skills/review-plan/SKILL.md +28 -0
- package/agents/skills/review-roadmap/SKILL.md +28 -0
- package/agents/skills/show-me/SKILL.md +21 -0
- package/agents/skills/speak/SKILL.md +15 -0
- package/agents/skills/su/SKILL.md +11 -0
- package/agents/skills/teach/SKILL.md +25 -0
- package/agents/skills/tmp/SKILL.md +54 -0
- package/agents/skills/typescript-best-practices/SKILL.md +32 -0
- package/agents/skills/typescript-best-practices/references/patterns.md +328 -0
- package/agents/skills/unslop/SKILL.md +62 -0
- package/agents/skills/write-plan/SKILL.md +33 -0
- package/agents/skills/write-roadmap/SKILL.md +66 -0
- package/agents/subagents/implementer-deep.md +57 -0
- package/agents/subagents/implementer-fast.md +57 -0
- package/agents/subagents/orchestrator.md +43 -0
- package/agents/subagents/researcher.md +47 -0
- package/agents/subagents/scout.md +44 -0
- package/bin/repo.ts +4 -0
- package/cli/actionlint-default.test.ts +38 -0
- package/cli/actionlint-download.test.ts +162 -0
- package/cli/actionlint-real.test.ts +33 -0
- package/cli/actionlint.constants.ts +43 -0
- package/cli/actionlint.test.ts +108 -0
- package/cli/actionlint.ts +178 -0
- package/cli/bin.test.ts +54 -0
- package/cli/bin.ts +40 -0
- package/cli/check-changelog.test.ts +40 -0
- package/cli/check-changelog.ts +12 -0
- package/cli/check-comments.test.ts +157 -0
- package/cli/check-comments.ts +123 -0
- package/cli/check-env-modules.test.ts +85 -0
- package/cli/check-env-modules.ts +56 -0
- package/cli/check-magic.test.ts +139 -0
- package/cli/check-magic.ts +120 -0
- package/cli/check-manifests.constants.ts +4 -0
- package/cli/check-manifests.test.ts +210 -0
- package/cli/check-manifests.ts +71 -0
- package/cli/check-nightly.test.ts +103 -0
- package/cli/check-nightly.ts +37 -0
- package/cli/check-ratchets-missing.test.ts +46 -0
- package/cli/check-ratchets-mutation.test.ts +49 -0
- package/cli/check-ratchets.constants.ts +20 -0
- package/cli/check-ratchets.test.ts +190 -0
- package/cli/check-ratchets.ts +193 -0
- package/cli/check-rejections.test.ts +220 -0
- package/cli/check-rejections.ts +153 -0
- package/cli/check-reports.ts +37 -0
- package/cli/check-tsconfig.test.ts +507 -0
- package/cli/check-tsconfig.ts +205 -0
- package/cli/commands.test.ts +114 -0
- package/cli/commands.ts +218 -0
- package/cli/commit-changelog.ts +27 -0
- package/cli/commit-msg-changelog.test.ts +93 -0
- package/cli/commit-msg-range.test.ts +126 -0
- package/cli/commit-msg-red-proof.test.ts +147 -0
- package/cli/commit-msg-repo.test.ts +153 -0
- package/cli/commit-msg.test.ts +101 -0
- package/cli/commit-msg.ts +194 -0
- package/cli/commit-range.constants.ts +17 -0
- package/cli/commit-range.ts +57 -0
- package/cli/config-knip.test.ts +70 -0
- package/cli/config-nightly.test.ts +84 -0
- package/cli/config-tdd.test.ts +46 -0
- package/cli/config.test.ts +576 -0
- package/cli/config.ts +261 -0
- package/cli/conventional.ts +9 -0
- package/cli/coverage-config.ts +62 -0
- package/cli/coverage.constants.ts +6 -0
- package/cli/coverage.test.ts +199 -0
- package/cli/coverage.ts +127 -0
- package/cli/env.constants.ts +10 -0
- package/cli/env.test.ts +56 -0
- package/cli/env.ts +72 -0
- package/cli/fixtures/base-config.ts +13 -0
- package/cli/fixtures/gate-world.ts +48 -0
- package/cli/fixtures/knip-run.ts +38 -0
- package/cli/fixtures/mutate-fakes.ts +137 -0
- package/cli/fixtures/planted-repo.ts +50 -0
- package/cli/fixtures/publish-world.ts +71 -0
- package/cli/fixtures/red-proof-repo.ts +72 -0
- package/cli/fixtures/release-context.ts +15 -0
- package/cli/fixtures/release-world.ts +111 -0
- package/cli/fixtures/stub-bin.ts +40 -0
- package/cli/guard-diagnostics.test.ts +157 -0
- package/cli/guard-diagnostics.ts +195 -0
- package/cli/init.test.ts +487 -0
- package/cli/init.ts +275 -0
- package/cli/knip-check-ignores.test.ts +106 -0
- package/cli/knip-check-real.test.ts +65 -0
- package/cli/knip-check.constants.ts +46 -0
- package/cli/knip-check.test.ts +114 -0
- package/cli/knip-check.ts +169 -0
- package/cli/knip-schema.ts +67 -0
- package/cli/known-failures.constants.ts +22 -0
- package/cli/known-failures.test.ts +138 -0
- package/cli/known-failures.ts +131 -0
- package/cli/lint/as-needs-reason.ts +41 -0
- package/cli/lint/boundaries.ts +73 -0
- package/cli/lint/class-file.ts +39 -0
- package/cli/lint/config-file.ts +32 -0
- package/cli/lint/entry-file.ts +54 -0
- package/cli/lint/env-in-config.ts +66 -0
- package/cli/lint/filename-matches-export.ts +63 -0
- package/cli/lint/index-file.ts +22 -0
- package/cli/lint/index.ts +47 -0
- package/cli/lint/is-reason.ts +6 -0
- package/cli/lint/manifest.ts +46 -0
- package/cli/lint/names.ts +59 -0
- package/cli/lint/no-commented-out-code.ts +105 -0
- package/cli/lint/no-mock-of-subject.ts +64 -0
- package/cli/lint/no-module-side-effects.ts +94 -0
- package/cli/lint/no-module-state.ts +58 -0
- package/cli/lint/no-side-effect-import.ts +17 -0
- package/cli/lint/no-v8-ignore.ts +18 -0
- package/cli/lint/script-rules.ts +9 -0
- package/cli/lint/skip-on-platform.constants.ts +8 -0
- package/cli/lint/skip-on-platform.ts +118 -0
- package/cli/lint/todo-needs-id.ts +63 -0
- package/cli/lint/types-file.ts +28 -0
- package/cli/lint-schema.ts +32 -0
- package/cli/magic/fixtures/magic-repo.ts +64 -0
- package/cli/magic/magic-hit.ts +2 -0
- package/cli/magic/magic-nodes.ts +44 -0
- package/cli/magic/magic-numbers.test.ts +99 -0
- package/cli/magic/magic-numbers.ts +117 -0
- package/cli/magic/magic-strings.test.ts +38 -0
- package/cli/magic/magic-strings.ts +81 -0
- package/cli/main.test.ts +853 -0
- package/cli/main.ts +292 -0
- package/cli/mutate-args.ts +79 -0
- package/cli/mutate-check.test.ts +147 -0
- package/cli/mutate-deps.ts +42 -0
- package/cli/mutate-edges.test.ts +150 -0
- package/cli/mutate-files.test.ts +100 -0
- package/cli/mutate-files.ts +31 -0
- package/cli/mutate-floors.test.ts +91 -0
- package/cli/mutate-floors.ts +104 -0
- package/cli/mutate-real-deps.ts +57 -0
- package/cli/mutate-real.test.ts +96 -0
- package/cli/mutate-report.ts +96 -0
- package/cli/mutate-run.ts +128 -0
- package/cli/mutate-shards.ts +64 -0
- package/cli/mutate.constants.ts +67 -0
- package/cli/mutate.test.ts +182 -0
- package/cli/mutate.ts +64 -0
- package/cli/nested-vitest-flags.ts +8 -0
- package/cli/nightly-config.constants.ts +14 -0
- package/cli/nightly-config.ts +62 -0
- package/cli/prompt.test.ts +202 -0
- package/cli/prompt.ts +1 -0
- package/cli/red-proof-edges.test.ts +78 -0
- package/cli/red-proof-failures.test.ts +82 -0
- package/cli/red-proof-tree.test.ts +157 -0
- package/cli/red-proof-verdict.test.ts +44 -0
- package/cli/red-proof.constants.ts +14 -0
- package/cli/red-proof.ts +202 -0
- package/cli/release/changelog-parse.ts +83 -0
- package/cli/release/changelog.test.ts +141 -0
- package/cli/release/changelog.ts +106 -0
- package/cli/release/gate-refusals.test.ts +85 -0
- package/cli/release/gate.test.ts +63 -0
- package/cli/release/gate.ts +70 -0
- package/cli/release/git.ts +66 -0
- package/cli/release/github.test.ts +128 -0
- package/cli/release/github.ts +46 -0
- package/cli/release/list-dir.test.ts +11 -0
- package/cli/release/list-dir.ts +6 -0
- package/cli/release/main.test.ts +48 -0
- package/cli/release/main.ts +51 -0
- package/cli/release/manifest.test.ts +24 -0
- package/cli/release/manifest.ts +34 -0
- package/cli/release/pack.test.ts +107 -0
- package/cli/release/pack.ts +76 -0
- package/cli/release/plan.ts +127 -0
- package/cli/release/publish-run.test.ts +98 -0
- package/cli/release/publish.test.ts +127 -0
- package/cli/release/publish.ts +125 -0
- package/cli/release/refuse.ts +5 -0
- package/cli/release/release-messages.constants.ts +96 -0
- package/cli/release/release-refusals.test.ts +149 -0
- package/cli/release/release.constants.ts +128 -0
- package/cli/release/release.test.ts +199 -0
- package/cli/release/release.ts +145 -0
- package/cli/release/version.test.ts +118 -0
- package/cli/release/version.ts +69 -0
- package/cli/release/wait.test.ts +101 -0
- package/cli/release/wait.ts +95 -0
- package/cli/script-diagnostics.test.ts +76 -0
- package/cli/script-diagnostics.ts +62 -0
- package/cli/scripts/board.ts +519 -0
- package/cli/scripts/browser.ts +994 -0
- package/cli/scripts/change-set.ts +105 -0
- package/cli/scripts/check-globals.ts +199 -0
- package/cli/scripts/ci-skips.constants.ts +17 -0
- package/cli/scripts/ci-skips.ts +118 -0
- package/cli/scripts/ci-wait-run.ts +28 -0
- package/cli/scripts/ci-wait.constants.ts +44 -0
- package/cli/scripts/ci-wait.ts +175 -0
- package/cli/scripts/ci.constants.ts +15 -0
- package/cli/scripts/ci.ts +208 -0
- package/cli/scripts/clean.ts +363 -0
- package/cli/scripts/comments-step.ts +15 -0
- package/cli/scripts/doctor.ts +828 -0
- package/cli/scripts/emit-agent-shell-tools.ts +91 -0
- package/cli/scripts/emit-mcp-policy.ts +402 -0
- package/cli/scripts/folder-map.ts +353 -0
- package/cli/scripts/gate-fat-tools.ts +1095 -0
- package/cli/scripts/gitignore-guard.ts +338 -0
- package/cli/scripts/google-workspace.ts +779 -0
- package/cli/scripts/hook-command.ts +72 -0
- package/cli/scripts/hook-input.ts +178 -0
- package/cli/scripts/hook-io.constants.ts +5 -0
- package/cli/scripts/hook-io.ts +46 -0
- package/cli/scripts/hooks-union.ts +469 -0
- package/cli/scripts/interactive.ts +30 -0
- package/cli/scripts/jev.ts +420 -0
- package/cli/scripts/job.ts +934 -0
- package/cli/scripts/jsonc.ts +9 -0
- package/cli/scripts/lessons.ts +564 -0
- package/cli/scripts/lint-baseline.ts +233 -0
- package/cli/scripts/lint-main.ts +24 -0
- package/cli/scripts/lint-skips.ts +139 -0
- package/cli/scripts/lint.constants.ts +6 -0
- package/cli/scripts/lint.ts +142 -0
- package/cli/scripts/listen.ts +962 -0
- package/cli/scripts/managed-text.ts +47 -0
- package/cli/scripts/orchestrate-parent.ts +1155 -0
- package/cli/scripts/parse-need.ts +81 -0
- package/cli/scripts/persist-handoff.ts +228 -0
- package/cli/scripts/persist-implementation.ts +276 -0
- package/cli/scripts/persist-plan.ts +888 -0
- package/cli/scripts/persist-roadmap.ts +478 -0
- package/cli/scripts/persist-tmp.ts +177 -0
- package/cli/scripts/persist.ts +54 -0
- package/cli/scripts/phase-files.ts +121 -0
- package/cli/scripts/prompt.ts +38 -0
- package/cli/scripts/purge-global-mcps.ts +313 -0
- package/cli/scripts/rejections-step.ts +37 -0
- package/cli/scripts/rtk-grok.ts +102 -0
- package/cli/scripts/scrub-spawn-prompt.ts +103 -0
- package/cli/scripts/scrub-text-lib.ts +58 -0
- package/cli/scripts/session-map.ts +69 -0
- package/cli/scripts/setup.ts +862 -0
- package/cli/scripts/skill-conflicts.ts +82 -0
- package/cli/scripts/speak.ts +370 -0
- package/cli/scripts/strategy.ts +168 -0
- package/cli/scripts/sync-global-settings.ts +316 -0
- package/cli/scripts/turn-steps.ts +249 -0
- package/cli/scripts/turn.ts +157 -0
- package/cli/scripts/typecheck-step.ts +43 -0
- package/cli/scripts/vscode-tasks.ts +175 -0
- package/cli/scripts/workspace-root.ts +160 -0
- package/cli/scripts/worktree.ts +806 -0
- package/cli/spawn.test.ts +34 -0
- package/cli/spawn.ts +27 -0
- package/cli/staged-change.constants.ts +11 -0
- package/cli/staged-change.ts +79 -0
- package/cli/stryker-preload.test.ts +50 -0
- package/cli/stryker-preload.ts +9 -0
- package/cli/sync/agents/frontmatter.test.ts +197 -0
- package/cli/sync/agents/frontmatter.ts +140 -0
- package/cli/sync/agents/hooks.test.ts +517 -0
- package/cli/sync/agents/hooks.ts +401 -0
- package/cli/sync/agents/rules.test.ts +229 -0
- package/cli/sync/agents/rules.ts +84 -0
- package/cli/sync/agents/sources.test.ts +375 -0
- package/cli/sync/agents/sources.ts +244 -0
- package/cli/sync/agents/subagents.test.ts +149 -0
- package/cli/sync/agents/subagents.ts +158 -0
- package/cli/sync/agents-text.test.ts +31 -0
- package/cli/sync/agents-text.ts +36 -0
- package/cli/sync/fixtures/copied.README.md +35 -0
- package/cli/sync/fixtures/copied.tgz +0 -0
- package/cli/sync/fixtures/maps/golden/INDEX.md +22 -0
- package/cli/sync/fixtures/maps-ws.tgz +0 -0
- package/cli/sync/git-files.test.ts +340 -0
- package/cli/sync/git-files.ts +197 -0
- package/cli/sync/git-hooks.test.ts +94 -0
- package/cli/sync/golden.test.ts +15 -0
- package/cli/sync/hooks-mode.test.ts +99 -0
- package/cli/sync/hosts.ts +28 -0
- package/cli/sync/knip-config.constants.ts +4 -0
- package/cli/sync/knip-config.test.ts +147 -0
- package/cli/sync/knip-config.ts +108 -0
- package/cli/sync/manifest.test.ts +78 -0
- package/cli/sync/manifest.ts +60 -0
- package/cli/sync/maps.test.ts +304 -0
- package/cli/sync/maps.ts +297 -0
- package/cli/sync/migrate.test.ts +2000 -0
- package/cli/sync/migrate.ts +1104 -0
- package/cli/sync/nightly-jobs.test.ts +63 -0
- package/cli/sync/nightly.constants.ts +48 -0
- package/cli/sync/nightly.test.ts +100 -0
- package/cli/sync/nightly.ts +75 -0
- package/cli/sync/outputs.test.ts +351 -0
- package/cli/sync/outputs.ts +168 -0
- package/cli/sync/oxlint-config.test.ts +178 -0
- package/cli/sync/oxlint-config.ts +168 -0
- package/cli/sync/release-jobs.test.ts +29 -0
- package/cli/sync/release-reports.test.ts +31 -0
- package/cli/sync/release-workflow.constants.ts +61 -0
- package/cli/sync/release-workflow.test.ts +192 -0
- package/cli/sync/release-workflow.ts +86 -0
- package/cli/sync/release.constants.ts +93 -0
- package/cli/sync/release.test.ts +187 -0
- package/cli/sync/release.ts +112 -0
- package/cli/sync/repo-dir.test.ts +371 -0
- package/cli/sync/repo-dir.ts +205 -0
- package/cli/sync/standards.constants.ts +8 -0
- package/cli/sync/standards.test.ts +206 -0
- package/cli/sync/standards.ts +179 -0
- package/cli/sync/stock-history.json +2796 -0
- package/cli/sync/stock-history.test.ts +66 -0
- package/cli/sync/stock-history.ts +84 -0
- package/cli/sync/stock.test.ts +47 -0
- package/cli/sync/stock.ts +24 -0
- package/cli/sync/trees.test.ts +621 -0
- package/cli/sync/trees.ts +280 -0
- package/cli/sync/validate.test.ts +299 -0
- package/cli/sync/validate.ts +402 -0
- package/cli/sync/workspace.test.ts +180 -0
- package/cli/sync/workspace.ts +138 -0
- package/cli/sync/write.test.ts +341 -0
- package/cli/sync/write.ts +231 -0
- package/cli/sync.test.ts +1495 -0
- package/cli/sync.ts +360 -0
- package/cli/tdd-scope.test.ts +36 -0
- package/cli/tdd-scope.ts +41 -0
- package/cli/test-files.ts +16 -0
- package/cli/ts-program.ts +69 -0
- package/cli/tsconfig.constants.ts +8 -0
- package/cli/workerstack-config.types.ts +21 -0
- package/dist/cli/env.d.ts +10 -0
- package/dist/cli/env.js +64 -0
- package/dist/presets/temp-root-env.d.ts +10 -0
- package/dist/presets/temp-root-env.js +20 -0
- package/dist/presets/temp-root.constants.d.ts +6 -0
- package/dist/presets/temp-root.constants.js +6 -0
- package/dist/presets/temp-root.d.ts +2 -0
- package/dist/presets/temp-root.js +60 -0
- package/dist/presets/vitest.constants.d.ts +16 -0
- package/dist/presets/vitest.constants.js +16 -0
- package/dist/presets/vitest.d.ts +11 -0
- package/dist/presets/vitest.js +67 -0
- package/dist/presets/workers-plugin.d.ts +10 -0
- package/dist/presets/workers-plugin.js +54 -0
- package/package.json +141 -4
- package/references/INDEX.md +100 -0
- package/references/browser.md +66 -0
- package/references/cascade.md +15 -0
- package/references/clasp.md +21 -0
- package/references/cloudflare.md +36 -0
- package/references/google-workspace.md +79 -0
- package/references/hooks.md +103 -0
- package/references/implementation-format.md +119 -0
- package/references/jev.md +56 -0
- package/references/lessons.md +73 -0
- package/references/listen.md +80 -0
- package/references/map.md +107 -0
- package/references/output.md +47 -0
- package/references/plan-format.md +264 -0
- package/references/review-loop.md +48 -0
- package/references/roadmap-format.md +104 -0
- package/references/rtk.md +27 -0
- package/references/scope.md +76 -0
- package/references/setup.md +42 -0
- package/references/speak.md +59 -0
- package/tsconfig/base.json +28 -0
- package/tsconfig/bun.d.ts +1 -0
- package/tsconfig/bun.json +8 -0
- package/tsconfig/reset.d.ts +1 -0
- package/tsconfig/strict.json +12 -0
- package/tsconfig/web.json +7 -0
- package/tsconfig/worker.d.ts +1 -0
- package/tsconfig/worker.json +8 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push
|
|
3
|
+
description: >
|
|
4
|
+
Commit with a Conventional Commits subject, then push. Use for /commit-push,
|
|
5
|
+
"commit and push", "commit this and push". Must push. Never force-push.
|
|
6
|
+
---
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
|
+
|
|
9
|
+
Diff pass on the hunks you will stage: delete narrating comments, unused defensive guards or try/catch on trusted paths, `any` casts that only silence types, dead compatibility, and unrelated hunks. Keep a comment only when it states a constraint the code cannot encode. Keep behavior otherwise. Do not spawn a reviewer.
|
|
10
|
+
|
|
11
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
12
|
+
|
|
13
|
+
If a unique in-progress file exists under `.tmp/repo/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
14
|
+
|
|
15
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
16
|
+
|
|
17
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
18
|
+
|
|
19
|
+
Subject: imperative lowercase no trailing period.
|
|
20
|
+
|
|
21
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO 🤖. NO trailers. No AI attribution. Work belongs to the human.
|
|
22
|
+
|
|
23
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
24
|
+
|
|
25
|
+
## Where
|
|
26
|
+
|
|
27
|
+
Run `git rev-parse --show-toplevel` and `git branch --show-current` first.
|
|
28
|
+
|
|
29
|
+
- Managed worktree (`<root>/.worktrees/<name>` on `wt/<name>`): commit there, run `cd <root> && bun repo worktree finish <name>` (from the root, not inside the worktree), then push the default branch from the root and skip the Recent rows below. `wt/*` never counts as Recent and is never pushed. If `finish` fails, resolve it as `/commit` says and push nothing.
|
|
30
|
+
- Main checkout: the gate denies a commit there unless the user's message names commit, and this command does. Commit only changes the user made there. Your own changes go through `bun repo worktree add <name>`.
|
|
31
|
+
- Any other linked worktree (T3 Code, Claude Desktop): `finish` cannot land it. Commit and push its branch per Branch.
|
|
32
|
+
|
|
33
|
+
## Branch
|
|
34
|
+
|
|
35
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
36
|
+
|
|
37
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
38
|
+
|
|
39
|
+
Recent (frozen flags; do not change):
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
git reflog -n 30
|
|
43
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Recent = unique existing non-default, non-`wt/*` names from those two outputs whose `committerdate` unix is ≤7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names → drop them, do not guess.
|
|
47
|
+
|
|
48
|
+
| state | action |
|
|
49
|
+
| current is `wt/*` | do not push; follow Where (`finish`, then push the default branch from the root) |
|
|
50
|
+
| current ≠ default AND not `wt/*` | push current |
|
|
51
|
+
| default AND 0 recent | push default |
|
|
52
|
+
| default AND exactly 1 recent exists | push that name (`git push origin <name>`, no checkout: the gate denies `git checkout` in the main checkout) |
|
|
53
|
+
| else | ask; do not push yet |
|
|
54
|
+
|
|
55
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
56
|
+
|
|
57
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
58
|
+
|
|
59
|
+
Protocol: `node_modules/@workerstack/repo/references/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-deploy
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, then deploy only if allowlisted infra already exists. Use for
|
|
5
|
+
/commit-push-deploy, "commit push deploy", "deploy this". Must push. Never
|
|
6
|
+
force-push. Never invent infra.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Diff pass on the hunks you will stage: delete narrating comments, unused defensive guards or try/catch on trusted paths, `any` casts that only silence types, dead compatibility, and unrelated hunks. Keep a comment only when it states a constraint the code cannot encode. Keep behavior otherwise. Do not spawn a reviewer.
|
|
11
|
+
|
|
12
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
13
|
+
|
|
14
|
+
If a unique in-progress file exists under `.tmp/repo/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
15
|
+
|
|
16
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
17
|
+
|
|
18
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
19
|
+
|
|
20
|
+
Subject: imperative lowercase no trailing period.
|
|
21
|
+
|
|
22
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO 🤖. NO trailers. No AI attribution. Work belongs to the human.
|
|
23
|
+
|
|
24
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
25
|
+
|
|
26
|
+
## Where
|
|
27
|
+
|
|
28
|
+
Run `git rev-parse --show-toplevel` and `git branch --show-current` first.
|
|
29
|
+
|
|
30
|
+
- Managed worktree (`<root>/.worktrees/<name>` on `wt/<name>`): commit there, run `cd <root> && bun repo worktree finish <name>` (from the root, not inside the worktree), then push the default branch from the root and skip the Recent rows below. `wt/*` never counts as Recent and is never pushed. If `finish` fails, resolve it as `/commit` says and push nothing.
|
|
31
|
+
- Main checkout: the gate denies a commit there unless the user's message names commit, and this command does. Commit only changes the user made there. Your own changes go through `bun repo worktree add <name>`.
|
|
32
|
+
- Any other linked worktree (T3 Code, Claude Desktop): `finish` cannot land it. Commit and push its branch per Branch.
|
|
33
|
+
|
|
34
|
+
## Branch
|
|
35
|
+
|
|
36
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
37
|
+
|
|
38
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
39
|
+
|
|
40
|
+
Recent (frozen flags; do not change):
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
git reflog -n 30
|
|
44
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Recent = unique existing non-default, non-`wt/*` names from those two outputs whose `committerdate` unix is ≤7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names → drop them, do not guess.
|
|
48
|
+
|
|
49
|
+
| state | action |
|
|
50
|
+
| current is `wt/*` | do not push; follow Where (`finish`, then push the default branch from the root) |
|
|
51
|
+
| current ≠ default AND not `wt/*` | push current |
|
|
52
|
+
| default AND 0 recent | push default |
|
|
53
|
+
| default AND exactly 1 recent exists | push that name (`git push origin <name>`, no checkout: the gate denies `git checkout` in the main checkout) |
|
|
54
|
+
| else | ask; do not push yet |
|
|
55
|
+
|
|
56
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
57
|
+
|
|
58
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
59
|
+
|
|
60
|
+
## Deploy
|
|
61
|
+
|
|
62
|
+
After push. Detect **existing** repo-root (or listed) paths only — never create them:
|
|
63
|
+
|
|
64
|
+
`fly.toml` `vercel.json` `netlify.toml` `wrangler.toml` `wrangler.jsonc` `cloudflare.config.ts` `railway.toml` `railway.json` `render.yaml` `render.yml` `app.yaml` `Dockerfile` `docker-compose.yml` `docker-compose.yaml` `samconfig.toml` `serverless.yml` `serverless.yaml` `Pulumi.yaml` `terraform/` `.do/app.yaml`
|
|
65
|
+
|
|
66
|
+
This repo (`package.json` `name` `@workerstack/repo`): skip deploy. Stop after push.
|
|
67
|
+
|
|
68
|
+
No allowlist hit: skip. Never invent infra, hosts, workflows, or config.
|
|
69
|
+
|
|
70
|
+
Hit: run only a deploy command already documented in-repo (scripts/CI/README). Do not guess a provider. Do not add files.
|
|
71
|
+
|
|
72
|
+
Cloudflare hit (`wrangler.toml`, `wrangler.jsonc`, `cloudflare.config.ts`) with no in-repo deploy command: run `cf deploy`. Read `node_modules/@workerstack/repo/references/cloudflare.md` first.
|
|
73
|
+
|
|
74
|
+
Protocol: `node_modules/@workerstack/repo/references/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-release
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, and for "release" run `bun repo release` from the main checkout
|
|
5
|
+
(it bumps, stamps CHANGELOG.md, pushes, waits on CI, tags), then
|
|
6
|
+
`bun repo release wait <tag>`. Use for /commit-push-release, "commit push
|
|
7
|
+
release", "release". Must push. Never force-push. No bun/npm/gh publish.
|
|
8
|
+
---
|
|
9
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
10
|
+
|
|
11
|
+
Diff pass on the hunks you will stage: delete narrating comments, unused defensive guards or try/catch on trusted paths, `any` casts that only silence types, dead compatibility, and unrelated hunks. Keep a comment only when it states a constraint the code cannot encode. Keep behavior otherwise. Do not spawn a reviewer.
|
|
12
|
+
|
|
13
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
14
|
+
|
|
15
|
+
If a unique in-progress file exists under `.tmp/repo/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
16
|
+
|
|
17
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
18
|
+
|
|
19
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
20
|
+
|
|
21
|
+
Subject: imperative lowercase no trailing period.
|
|
22
|
+
|
|
23
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO 🤖. NO trailers. No AI attribution. Work belongs to the human.
|
|
24
|
+
|
|
25
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
26
|
+
|
|
27
|
+
## Where
|
|
28
|
+
|
|
29
|
+
Run `git rev-parse --show-toplevel` and `git branch --show-current` first.
|
|
30
|
+
|
|
31
|
+
- Managed worktree (`<root>/.worktrees/<name>` on `wt/<name>`): commit there, run `cd <root> && bun repo worktree finish <name>` (from the root, not inside the worktree), then push the default branch from the root and skip the Recent rows below. `wt/*` never counts as Recent and is never pushed. If `finish` fails, resolve it as `/commit` says and push nothing.
|
|
32
|
+
- Main checkout: the gate denies a commit there unless the user's message names commit, and this command does. Commit only changes the user made there. Your own changes go through `bun repo worktree add <name>`.
|
|
33
|
+
- Any other linked worktree (T3 Code, Claude Desktop): `finish` cannot land it. Commit and push its branch per Branch.
|
|
34
|
+
|
|
35
|
+
## Branch
|
|
36
|
+
|
|
37
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
38
|
+
|
|
39
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
40
|
+
|
|
41
|
+
Recent (frozen flags; do not change):
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
git reflog -n 30
|
|
45
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Recent = unique existing non-default, non-`wt/*` names from those two outputs whose `committerdate` unix is ≤7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names → drop them, do not guess.
|
|
49
|
+
|
|
50
|
+
| state | action |
|
|
51
|
+
| current is `wt/*` | do not push; follow Where (`finish`, then push the default branch from the root) |
|
|
52
|
+
| current ≠ default AND not `wt/*` | push current |
|
|
53
|
+
| default AND 0 recent | push default |
|
|
54
|
+
| default AND exactly 1 recent exists | push that name (`git push origin <name>`, no checkout: the gate denies `git checkout` in the main checkout) |
|
|
55
|
+
| else | ask; do not push yet |
|
|
56
|
+
|
|
57
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
58
|
+
|
|
59
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
60
|
+
|
|
61
|
+
## Release
|
|
62
|
+
|
|
63
|
+
Run `bun repo release` from the main checkout (not a worktree), on the default branch, clean and equal to origin, after the commits are pushed per **Branch**. Do not ask the user for a bump and do not edit `package.json`: the command reads the Conventional Commits since the last tag. Add `--stable` (0.x to 1.0.0) or `--pre <id>` only when the user named them. Every feat, fix, perf or breaking commit in a public package stages its `CHANGELOG.md` entry under `## [Unreleased]`; the hook refuses it otherwise, and the release refuses an empty Unreleased.
|
|
64
|
+
|
|
65
|
+
1. `bun repo release` commits `chore: release <name>@<version>` (the version line and CHANGELOG.md only), pushes it, waits on CI for that commit, then tags `<name>@<version>` and pushes the tag. Its last line names the tag. A refusal prints one line that starts with repo release: and has written nothing; fix what it names and run it again.
|
|
66
|
+
2. When CI failed, read the jobs it printed, fix the cause with a failing test first and a CHANGELOG.md entry, push, and run `bun repo release` again. A rerun finishes the same version and never bumps twice. A cancelled or missing CI result is the same: pull if told to, run it again.
|
|
67
|
+
3. The tag push starts `release.yml` (generated by `bun repo sync`), which runs three jobs. **gate** checks that the tag equals the version in package.json at the tagged commit, that CHANGELOG.md has that version's section, that the commit is on the default branch and that its CI passed. **publish** packs, refuses a `catalog:` or `workspace:` version in the packed manifest, skips a version npm already serves and publishes through trusted publishing (no npm token), under `next` for a prerelease. **github** creates the GitHub release from the changelog section. Each job reruns safely: `gh workflow run release.yml -f tag=<name>@<version>` finishes a release that stopped halfway.
|
|
68
|
+
4. After the tag, run `bun repo release wait <name>@<version>` from the main checkout. A pushed tag is not a release until it prints `published <version>`. It exits 1 after 15 minutes; report that and `gh run list --workflow release`. Do not watch runs by hand.
|
|
69
|
+
5. A package that is not on npm yet cannot publish from CI: the publish job fails and prints the bootstrap steps. Tell the user to run `npm login` and `bun repo release publish <name>@<version>` at that tag on their machine, then add the trusted publisher the line names. Never do it yourself.
|
|
70
|
+
|
|
71
|
+
Do not `bun publish` or `npm publish`. Do not `bun pm pack` as publish. Do not `gh release create`. CI publishes from the tag; the one exception is the first publish of a new package, which the user runs.
|
|
72
|
+
|
|
73
|
+
Never tag by hand, never `git tag -f`, delete a tag or force-push one. A tag never moves; a bad release is fixed by the next version.
|
|
74
|
+
|
|
75
|
+
Protocol: `node_modules/@workerstack/repo/references/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: correct
|
|
3
|
+
description: >-
|
|
4
|
+
Find the mistakes agents keep repeating in this repo and make each one
|
|
5
|
+
impossible. Try architecture first, then types, then a lint whose error names
|
|
6
|
+
the fix, then a test, and write docs last. Prove each check fails on a real
|
|
7
|
+
past mistake. Repeat this each time the operator corrects you. Use for
|
|
8
|
+
/correct.
|
|
9
|
+
---
|
|
10
|
+
# Correct
|
|
11
|
+
|
|
12
|
+
The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them.
|
|
13
|
+
|
|
14
|
+
First read `principle-encode-lessons-in-structure` and follow it. Encode the lesson in the repo, not in another paragraph.
|
|
15
|
+
|
|
16
|
+
Slash `/correct` only. Not a session flag.
|
|
17
|
+
|
|
18
|
+
Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo.
|
|
19
|
+
|
|
20
|
+
## Find the mistake classes
|
|
21
|
+
|
|
22
|
+
First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Also read `.repo/lessons/INDEX.md`: every lesson with `hits` of 2 or more is a class with its evidence. Group the mistakes into classes. A class counts once it has happened twice.
|
|
23
|
+
|
|
24
|
+
## Fix each class at the highest level that works
|
|
25
|
+
|
|
26
|
+
1. **Eliminate it with architecture.** Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
|
|
27
|
+
2. **Enforce it with types so the bad state can't be written.** If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more.
|
|
28
|
+
3. **Test the behavior.** Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change.
|
|
29
|
+
4. **Write docs or agent rules last, only for judgment calls.** Nothing fails when an agent skips them.
|
|
30
|
+
|
|
31
|
+
## Fix and prove
|
|
32
|
+
|
|
33
|
+
Then fix the most frequent classes now, one worktree per class (`bun repo worktree add correct-{slug}`), each committed and finished (`/commit` runs `finish` from the root). When a fixed class came from a lesson, run `bun repo lessons rm <slug>` in that worktree, in the same commit: the check replaces the lesson. A correction you fix now but cannot encode yet goes in as a lesson (`bun repo lessons hit`, or write one) inside a worktree: the class's `correct-{slug}`, else `lesson-{slug}`. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval.
|
|
34
|
+
|
|
35
|
+
## Keep the rule table
|
|
36
|
+
|
|
37
|
+
Last, in a worktree, keep a table in `AGENTS.md` (SSOT: `agents/rules/overview.md` in this repo, a rule file under `.repo/rules/` in a consumer) that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen.
|
|
38
|
+
|
|
39
|
+
**Reply:** each class with its evidence, the level you picked, and why a higher level didn't work.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: do
|
|
3
|
+
description: 'Do a small task now: no plan, no review. Worktree, nearest test and commit still apply.'
|
|
4
|
+
---
|
|
5
|
+
# do
|
|
6
|
+
|
|
7
|
+
`/do <task>`. Skip the plan and its review. Never skip the worktree, the nearest test or the commit gate.
|
|
8
|
+
|
|
9
|
+
1. `bun repo worktree add <name>`. Edit only there.
|
|
10
|
+
2. Make the change.
|
|
11
|
+
3. Run the nearest existing test. Fix until it passes.
|
|
12
|
+
4. `/commit` in the worktree.
|
|
13
|
+
5. From the root, `bun repo worktree finish <name>`.
|
|
14
|
+
|
|
15
|
+
A change that needs a decision stops before the first edit. Reply exactly:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
this needs a decision; write a plan with /write-plan
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Empty task → ask for a task and stop.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explain
|
|
3
|
+
description: Longer human recap this reply only.
|
|
4
|
+
---
|
|
5
|
+
This reply only: explain for a human. Not a mode switch or session flag. After this reply, revert to output.md.
|
|
6
|
+
|
|
7
|
+
Still concise. Complete sentences. Prioritize clarity over token compression. Do not dump, sprawl, or narrate process.
|
|
8
|
+
Open with the verdict, failures included. The four buckets are the middle (completed / in-flight / remainder / blocker). Close on the same facts. Completed work = past tense. Omit empty. Natural language; no key tokens. Longer expansion this reply only — not the only grammar for complete sentences.
|
|
9
|
+
|
|
10
|
+
en-US default. Keep need: JSON and plan grammar when those apply.
|
|
11
|
+
|
|
12
|
+
Always-why advise recap ≠ `/explain`. `/explain` = longer expansion not the why path.
|
|
13
|
+
Freeform how/why/explain is not this skill. Slash `/explain` only.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: google-workspace
|
|
3
|
+
description: >-
|
|
4
|
+
Google Sheets, Docs, Slides, Calendar, Gmail via bun repo google-workspace.
|
|
5
|
+
---
|
|
6
|
+
# google-workspace
|
|
7
|
+
|
|
8
|
+
When the user wants a Google sheet, doc, slide, meeting, or mail, run `bun repo google-workspace`. Spec: `node_modules/@workerstack/repo/references/google-workspace.md`. If Calendar/Gmail/sheet set fail or login is missing, tell them to run `bun repo setup google-workspace` (TTY) for the handheld walk. Do not share creds. Do not invent OAuth JSON. Do not ask them to write Apps Script.
|
|
9
|
+
|
|
10
|
+
`whoami` · `scopes` · `accounts` · `login` · `sheet create|set|get|append|clear` · `doc create|append` · `drive list` · `slide create` · `meeting create [--attendees a@b,c@d]` · `mail send|list`. `--account NAME` for a second Google user on this machine.
|
|
11
|
+
|
|
12
|
+
Auth: `bun repo setup google-workspace` then `login` as needed. Two Google users on one machine: `--account NAME`. Creds stay in `~/.workerstack/` (or `~/.workerstack/workspace/NAME/`). Do not share OAuth JSON or tokens. Doctor: `bun repo doctor` reports google-workspace as optional (`oauth` `tokens` `adc` `clasprc`; no secrets). `clasprc` is Drive-only. Spec: `node_modules/@workerstack/repo/references/google-workspace.md` `node_modules/@workerstack/repo/references/setup.md`.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff
|
|
3
|
+
description: Write a session handoff under .tmp/repo/handoffs/. Continue with /pickup.
|
|
4
|
+
---
|
|
5
|
+
# handoff
|
|
6
|
+
|
|
7
|
+
One turn. Author from this session. Write once, report the absolute path, stop.
|
|
8
|
+
|
|
9
|
+
## Invocation
|
|
10
|
+
|
|
11
|
+
`/handoff [focus]`
|
|
12
|
+
|
|
13
|
+
Focus narrows what the handoff carries. Empty → whole session.
|
|
14
|
+
|
|
15
|
+
## When
|
|
16
|
+
|
|
17
|
+
Context large + work unfinished → write handoff, then advise a new session. Also on host/tool churn, or before a long unrelated detour.
|
|
18
|
+
|
|
19
|
+
Nothing done yet (no edits, no findings) → `nothing to hand off` and stop. Do not write an empty file.
|
|
20
|
+
|
|
21
|
+
## Path
|
|
22
|
+
|
|
23
|
+
`.tmp/repo/handoffs/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md`
|
|
24
|
+
|
|
25
|
+
- serial: unpadded int ≥ 1, next after existing handoffs (own counter; not plan serials)
|
|
26
|
+
- slug: lower, non `[a-z0-9]` → `-`, collapse, trim 50
|
|
27
|
+
- stamp: `created` with `-` and `:` dropped (`20260827T143000Z`)
|
|
28
|
+
|
|
29
|
+
## Format
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
---
|
|
33
|
+
serial: 1
|
|
34
|
+
name: <slug>
|
|
35
|
+
status: open # open | resumed | done
|
|
36
|
+
created: 2026-08-27T14:30:00Z # UTC, seconds, no ms
|
|
37
|
+
source: "<≤120 chars of the session task>"
|
|
38
|
+
---
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Headings, this order only: `# {slug}`, `## Goal`, `## State`, `## Context`, `## Next`, `## Watch-outs`.
|
|
42
|
+
|
|
43
|
+
| Section | Amount |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Goal | 1–3 sentences. What the session is trying to land. |
|
|
46
|
+
| State | bullets. Past tense for landed work / changed / green-red, with absolute paths. |
|
|
47
|
+
| Context | bullets. Abs paths, decisions, verdict facts the next session needs. |
|
|
48
|
+
| Next | checkbox steps, `N [ ]` phase + `N.M [ ]` leaf, all `[ ]` fresh |
|
|
49
|
+
| Watch-outs | bullets. Footguns. `(none)` allowed. |
|
|
50
|
+
|
|
51
|
+
Boxes: `^{id} [ ] {text}$`, id `N` / `N.M` / `N.M.K`. Not `- [ ]`, not `1. [ ]`. Every phase has ≥1 leaf. Fresh handoff has zero `[x]`.
|
|
52
|
+
|
|
53
|
+
Facts only. Absolute paths. No transcript paste, no dump, no secrets/tokens.
|
|
54
|
+
|
|
55
|
+
## Write
|
|
56
|
+
|
|
57
|
+
Line 1 of the body: `HANDOFF_NAME: <3-6 word name>`, then the body only.
|
|
58
|
+
|
|
59
|
+
Write under `.tmp/repo/handoffs/` (any filename in that dir). Grok `orchestrate-parent.ts` runs `cli/scripts/persist-handoff.ts`: serial/slug from `HANDOFF_NAME:` / heading, injects frontmatter, rewrites path + content. Invalid handoff or a write outside that dir is denied — fix the body, do not retry elsewhere.
|
|
60
|
+
|
|
61
|
+
Host without that hook: name the file per **Path** yourself, or pipe the body to `bun repo persist handoff --workspace {repo}` and use its `absPath`.
|
|
62
|
+
|
|
63
|
+
## Report
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
[handoff]: serial={int} path={abs}/.tmp/repo/handoffs/{serial}-{slug}-{stamp}.md
|
|
67
|
+
next: start a new session; `/pickup {serial}`
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Do not dump the handoff body.
|
|
71
|
+
|
|
72
|
+
## Picking one up
|
|
73
|
+
|
|
74
|
+
`/pickup {serial}` owns pickup. Load the file, set `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
|
|
75
|
+
|
|
76
|
+
## Rules
|
|
77
|
+
|
|
78
|
+
- One write. `/handoff` is not a mode.
|
|
79
|
+
- Handoff ≠ plan: no Steps/Verify phases, no `.tmp/repo/plans/` write. Handoff ≠ implementation journal.
|
|
80
|
+
- Never rewrite or renumber an existing handoff; new session = new serial.
|
|
81
|
+
- Protocol: `node_modules/@workerstack/repo/references/cascade.md`. Do not paste it here.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-plan
|
|
3
|
+
description: 'Execute remaining leaves in a .tmp/repo/plans checklist. Skip [x].'
|
|
4
|
+
---
|
|
5
|
+
# implement-plan
|
|
6
|
+
|
|
7
|
+
You execute the plan in this session. A plan with `reviews: 0` cannot start: the save denies the move to `in-progress`. Run `/review-plan {n}` in a fresh agent and settle it first. Start only on a plan the user approved, when the request said "plan and do it", or when `/implement-roadmap` is running a `locked` or `in-progress` roadmap. Skip `[x]`. Before the first open leaf, run `git log -3 --stat` and reconcile any newer commit that touches a file the plan lists, then read the plan's `## Previous mistakes` and do not repeat one. Start at the first open leaf. Flip only the box after each leaf. When a phase's children are `[x]`, mark the phase `[x]`. Frontmatter `in-progress` then `done`.
|
|
8
|
+
|
|
9
|
+
strategy review-fast or review-deep: read node_modules/@workerstack/repo/references/review-loop.md first; a parallel group of phases runs at once, as it says. default: ignore this line.
|
|
10
|
+
|
|
11
|
+
Arg `{n|path}` picks that file. Empty arg: unique in-progress, else unique ready, else list serials.
|
|
12
|
+
|
|
13
|
+
Worktree: before the first open leaf, run `bun repo worktree add {serial}-{name}` (serial and name from the frontmatter; it prints `.worktrees/{serial}-{name}` and reuses one that exists). Every product edit, test run and commit happens there; the gate denies product writes and commits in the main checkout. The plan, the journal and `.tmp/repo/` stay in the root. A subagent starts in the root, so its prompt names the worktree path.
|
|
14
|
+
|
|
15
|
+
Format: `node_modules/@workerstack/repo/references/plan-format.md`. Write-allowlist = paths listed in the plan, repo-relative to the worktree; an absolute path under the root names the same path there. Run Verify leaves. Do not skip a test leaf. Do not flip a behavior leaf `[x]` until its test ran.
|
|
16
|
+
|
|
17
|
+
A leaf that names a principle skill is done by reading that skill and following it. Also follow the next paragraph, and read a principle an already-read principle cites. Do not open the rest of the catalog.
|
|
18
|
+
|
|
19
|
+
When a Verify or a test fails after a fix, or `principle-attack-the-premise` fires, add a `- verify: …` or `- premise: …` entry to `## Previous mistakes` (Edit the plan; earlier entries stay). When it will happen again on other tasks, run `bun repo lessons match` on the files involved, then `hit` the matching lesson or write a new one inside the plan's worktree (`node_modules/@workerstack/repo/references/lessons.md`), so it lands with the plan's commit, and end the entry with `(lesson: {slug})`.
|
|
20
|
+
|
|
21
|
+
Before Verify, read `principle-prove-it-works` and follow it. After two fixes that share a premise fail the same gate, read `principle-attack-the-premise` before a third try. Before you ask the user, read `principle-never-block-on-the-human`. Under `/away`, or frontmatter `mode: away`, do not ask: decide, add `- decision: {question} → {choice}, because {why}` to `## Previous mistakes`, and continue; stop only on a true blocker (a missing credential, a destructive action). Before a large dump or a fan-out, read `principle-guard-the-context-window`. Fat dumps go through `bun repo job`.
|
|
22
|
+
|
|
23
|
+
On a failing-test leaf, run the test and see it fail for the missing behavior before the production edit. Then make it pass. Then run the nearest suite.
|
|
24
|
+
|
|
25
|
+
After Verify, if frontmatter `commit:` is set, run `/commit` with that subject and the journal Files. One plan, one commit, including a failing-test leaf and the fix. If a git hook fails on a path inside the plan write-allowlist, fix that code and commit again until the hook passes. Stop when the hook cites a path outside the allowlist or a missing secret. Do not skip the hook. Do not push. A plan with no `commit:` key does not auto-commit and does not finish: leave the worktree and report its path.
|
|
26
|
+
|
|
27
|
+
`/commit` in the worktree then runs `cd <root> && bun repo worktree finish {serial}-{name}` (from the root: run inside the removed worktree, the shell reports exit 1 after a successful finish, so do not rerun it), which rebases onto the default branch, fast-forwards it and removes the worktree. On a rebase conflict it aborts, keeps the worktree and names the files: resolve them there, rerun the Verify checks, run `finish` again. Mark the plan `blocked` only when you cannot land it.
|
|
28
|
+
|
|
29
|
+
On start: if this plan has no journal, Write one under `.tmp/repo/implementations/` (`IMPL_NAME:`, `IMPL_PLAN: {n}`). Format: `node_modules/@workerstack/repo/references/implementation-format.md`. After each leaf: append `N.M [x] …` to Log, update Files (repo-relative product paths) and Done. Blocked → `status: blocked` and Blockers, e.g. `- finish could not land wt/{serial}-{name}: rebase conflict in src/x.ts left unresolved in {root}/.worktrees/{serial}-{name}`. Verify done → `status: done`. Straight shots do not write a journal.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-roadmap
|
|
3
|
+
description: >-
|
|
4
|
+
Run a locked roadmap in order. Use for /implement-roadmap. Writes each missing
|
|
5
|
+
plan, then /implement-plan. Refuses a draft.
|
|
6
|
+
---
|
|
7
|
+
# implement-roadmap
|
|
8
|
+
|
|
9
|
+
You run the roadmap in this session. Format: `node_modules/@workerstack/repo/references/roadmap-format.md`.
|
|
10
|
+
|
|
11
|
+
Refuse `status: draft`. Say it is not locked and stop. Do not write a plan.
|
|
12
|
+
|
|
13
|
+
Accept `locked` or `in-progress`. Set `in-progress` when you start. Same session. Do not spawn a subagent per slice.
|
|
14
|
+
|
|
15
|
+
For each open slice, in order:
|
|
16
|
+
|
|
17
|
+
1. If `Location` is absent, run `/write-plan` from that slice's line: its title and sentence on a pointer roadmap, its Title, Goal and Why on an old-shape one. Research the slice's decisions and Usage there; they go into the plan, not the roadmap. Read the roadmap's `## Previous mistakes` first and put each entry that touches this slice in the plan's Watch-outs. The lock is the approval: do not stop for plan approval. `/write-plan` picks the type and the `commit:` subject. The plan copies the roadmap's `strategy:` unless the slice's scope argues for another (heuristic in `/write-plan`). If it hits a plan-shaping question, stop and leave the roadmap `locked` or `in-progress`.
|
|
18
|
+
2. Set `Location` to the absolute plan path `/write-plan` reported. Do not write a second plan when Location is already set.
|
|
19
|
+
3. Run `/implement-plan` on that plan. It works in the plan's worktree `{serial}-{name}` and finishes it. Do not stop between slices.
|
|
20
|
+
4. Mark the slice `[x]` only after that plan's Verify is done.
|
|
21
|
+
5. Read that plan's `## Previous mistakes`. For each entry that changes the Order or a later slice (its sentence, or on an old-shape roadmap its Goal or Why, or a Decision), add `- slice: {what plan N found} → {what changed in the roadmap}` to the roadmap and make that change in the same save. Earlier entries stay.
|
|
22
|
+
|
|
23
|
+
A failed program Verify adds `- verify: …` to the roadmap. Stop on a blocker, a failed Verify, or a plan-shaping question.
|
|
24
|
+
|
|
25
|
+
When every slice and Verify are `[x]`, promote before `done`: the roadmap lives in `.tmp/` and is lost with it. For each roadmap entry that will happen again after this program, run `bun repo lessons match` on the files involved, then `hit` the matching lesson with `--evidence "roadmap {n}"` or write a new one (`node_modules/@workerstack/repo/references/lessons.md`). Write or hit it inside a worktree (`bun repo worktree add lesson-{slug}`), commit there, and run `cd <root> && bun repo worktree finish lesson-{slug}`. Then set `status: done`.
|
|
26
|
+
|
|
27
|
+
On a pointer roadmap the slice's why goes into the child plan's Context. On an old-shape roadmap the Why stays on the roadmap. Never add a Why heading to the child plan.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jev
|
|
3
|
+
description: >-
|
|
4
|
+
Yes/no or named-option decision on text already saved. Run bun repo jev --available first. On yes, one decision call. On no, decide
|
|
5
|
+
yourself and do not mention Jev.
|
|
6
|
+
---
|
|
7
|
+
# jev
|
|
8
|
+
|
|
9
|
+
Use this when the source text is already saved and the leftover question is a yes/no or a choice among options the research already named. Spec: `node_modules/@workerstack/repo/references/jev.md`.
|
|
10
|
+
|
|
11
|
+
Run `bun repo jev --available`. It prints `yes` or `no` and exits 0.
|
|
12
|
+
|
|
13
|
+
`no`: answer the question yourself. Do not run a decision call. Do not mention Jev, a missing key, or setup.
|
|
14
|
+
|
|
15
|
+
`yes`: read `node_modules/@workerstack/repo/references/jev.md`. Write the passage and one questions file under `.tmp/repo/jev/`. Run `bun repo jev --state <state> --questions <questions>` once. Use the printed label and confidence. A low confidence is the result. Do not call again.
|
|
16
|
+
|
|
17
|
+
Open research, code, and job stay with the session. If the decision call exits non-zero, answer from the sources. Do not invent a label.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: listen
|
|
3
|
+
description: >-
|
|
4
|
+
Speech-to-text via bun repo listen (ffmpeg mic + local
|
|
5
|
+
whisper.cpp, OpenAI fallback). Input only.
|
|
6
|
+
---
|
|
7
|
+
# listen
|
|
8
|
+
|
|
9
|
+
When the user wants to dictate, transcribe a recording, or toggle a mic, run `bun repo listen`. Spec: `node_modules/@workerstack/repo/references/listen.md`. Input only (audio → text). Do not speak. Do not use `/speak`.
|
|
10
|
+
|
|
11
|
+
`whoami` · `devices` · `rec [--seconds N]` · `start` · `stop` · `toggle` · `status` · `file --path P` · `latest`. `--clip` copies the transcript. `--cwd DIR` when the process is not already in the repo (hotkeys). `rec` prints the transcript and `transcript=.tmp/repo/listen/latest.txt`.
|
|
12
|
+
|
|
13
|
+
STT: local `whisper-cli` first (mac: `brew install whisper-cpp`); first listen downloads the ggml model to `~/.workerstack/whisper/`. Else `OPENAI_API_KEY`. Mic verbs need ffmpeg. Do not tell them to pip-install openai-whisper or curl the model by hand.
|
|
14
|
+
|
|
15
|
+
If the CLI exits non-zero, print its message. Lines with `setup:` are for the user — show that command. Tell them to run `bun repo setup listen` (or `bun repo setup`) in their terminal. Do not dump JSON. Do not invent a key. Spec: `node_modules/@workerstack/repo/references/listen.md` `node_modules/@workerstack/repo/references/setup.md`.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pickup
|
|
3
|
+
description: Continue a handoff under .tmp/repo/handoffs/.
|
|
4
|
+
---
|
|
5
|
+
# pickup
|
|
6
|
+
|
|
7
|
+
Voice: `node_modules/@workerstack/repo/references/output.md`.
|
|
8
|
+
|
|
9
|
+
Load a handoff and continue in this session. Not a mode. Not `/handoff`. Inverse of `/handoff`.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
- `/pickup`
|
|
14
|
+
- `/pickup latest` (also `newest`/`last`)
|
|
15
|
+
- `/pickup {serial}`
|
|
16
|
+
- `/pickup {abs|rel|drag-drop path}`
|
|
17
|
+
- `/pickup {title substring}`
|
|
18
|
+
|
|
19
|
+
## Resolve
|
|
20
|
+
|
|
21
|
+
Read `.tmp/repo/handoffs/`. Use `bun repo job --job search|exec` when the listing is fat.
|
|
22
|
+
|
|
23
|
+
Order:
|
|
24
|
+
|
|
25
|
+
1. path-like → file if exists + FILENAME_RE `^[0-9]+-[a-z0-9]+(-[a-z0-9]+)*-\d{8}T\d{6}Z\.md$`
|
|
26
|
+
2. integer → FM serial or filename prefix
|
|
27
|
+
3. latest|newest|last → newest by FM `created`
|
|
28
|
+
4. else case-insensitive substring on name/source/H1
|
|
29
|
+
5. empty arg: 0→none; 1→auto; N→list+ask (**not** auto-newest)
|
|
30
|
+
|
|
31
|
+
List lines: serial status name created path. Prefer open|resumed first; still include done.
|
|
32
|
+
|
|
33
|
+
Matches: 0→recap missing; 1→proceed; N→list+ask never guess.
|
|
34
|
+
|
|
35
|
+
Empty/missing dir: recap no handoffs; stop.
|
|
36
|
+
|
|
37
|
+
Drag outside handoffs dir or non-FILENAME_RE: reject; list valid.
|
|
38
|
+
|
|
39
|
+
Corrupt FM: recap; do not continue on garbage.
|
|
40
|
+
|
|
41
|
+
status done + explicit serial/path: warn; still load if the user named it.
|
|
42
|
+
|
|
43
|
+
## After unique path
|
|
44
|
+
|
|
45
|
+
Read the file. Set `status: resumed`. Work in a worktree: the one the handoff names, else `bun repo worktree add <handoff slug>`; the gate denies product writes in the main checkout. Work Next leaves in order; flip only that box; all `[x]` → `status: done`; do not re-plan; stale → `/write-plan`. Edit in place. Never persist-handoff.ts on pickup.
|
|
46
|
+
|
|
47
|
+
## Recap
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
serial={int} path={abs}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Do not invent a new role tag.
|
|
54
|
+
|
|
55
|
+
## Rules
|
|
56
|
+
|
|
57
|
+
- `/handoff` stays one-turn write. This skill owns pickup.
|
|
58
|
+
- Protocol: `node_modules/@workerstack/repo/references/cascade.md`. Do not paste.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-attack-the-premise
|
|
3
|
+
description: >-
|
|
4
|
+
Apply when two or more fixes that share one premise have failed the same gate.
|
|
5
|
+
Write the premise down and test it directly before you write another fix that
|
|
6
|
+
assumes it. Use for /principle-attack-the-premise.
|
|
7
|
+
---
|
|
8
|
+
# Attack the Premise
|
|
9
|
+
|
|
10
|
+
When two or more fixes that share one premise have failed the same gate, suspect the premise, not the fixes.
|
|
11
|
+
|
|
12
|
+
Slash `/principle-attack-the-premise` only. Not a session flag.
|
|
13
|
+
|
|
14
|
+
**Why:** Each failed fix is evidence against the belief it assumed. A third fix on the same premise spends effort where the evidence already says the cause is not.
|
|
15
|
+
|
|
16
|
+
**Pattern:**
|
|
17
|
+
- **Write the premise down.** The premise is the one sentence that every failed fix assumed.
|
|
18
|
+
- **Test the premise before the next fix.** Find an observation that would come out differently if the premise were false, and make it. Look at how the failures are distributed, not only at how large they are. Make the check rerunnable per `/principle-build-the-lever`.
|
|
19
|
+
- **Follow the evidence.** If it contradicts the premise, the cause is elsewhere. Look for what the failures have in common that the premise did not predict. If it confirms the premise, ask the next "why" per `/principle-fix-root-causes`. The earlier fixes may have treated a consequence instead of the cause.
|
|
20
|
+
- **Remove the condition instead of compensating for it**, per the `/principle-laziness-protocol`. If the evidence shows that one part always lands on the losing side, change what puts it there. A mechanism that cleans up after it leaves the cause in place and adds work on every run.
|
|
21
|
+
|
|
22
|
+
**Stop:** Do not start the next fix before the premise is written down and tested.
|
|
23
|
+
|
|
24
|
+
This principle is distinct from `/principle-redesign-from-first-principles`, which rebuilds a design around a new requirement. It questions a fact the current design assumes.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-boundary-discipline
|
|
3
|
+
description: >-
|
|
4
|
+
Apply when wiring validation, error handling, or framework adapters.
|
|
5
|
+
Concentrate guards at system boundaries (CLI, config, network, external APIs);
|
|
6
|
+
trust internal types and keep business logic in pure functions. Use for
|
|
7
|
+
/principle-boundary-discipline.
|
|
8
|
+
---
|
|
9
|
+
# Boundary Discipline
|
|
10
|
+
|
|
11
|
+
Place validation, type narrowing, and error handling at system boundaries. Trust internal code unconditionally. Business logic lives in pure functions. The shell is thin and mechanical.
|
|
12
|
+
|
|
13
|
+
Slash `/principle-boundary-discipline` only. Not a session flag.
|
|
14
|
+
|
|
15
|
+
**Why:** Scattered validation is noisy, redundant, and gives a false sense of safety. Keep logic out of framework wiring so it can be tested without the framework.
|
|
16
|
+
|
|
17
|
+
**The pattern:**
|
|
18
|
+
- **At boundaries** (CLI args, config files, external APIs, network protocols): validate, return errors, handle defensively.
|
|
19
|
+
- **Inside the system:** typed data, error propagation, no re-validation. Trust the types.
|
|
20
|
+
- **Across the boundary.** Expose domain concepts, not the boundary's private representation. Keep general-purpose mechanism inside and special-purpose policy at the edge.
|
|
21
|
+
|
|
22
|
+
**Applications:**
|
|
23
|
+
|
|
24
|
+
Validation and error handling:
|
|
25
|
+
- Validate config at parse time (the boundary), not inside business logic
|
|
26
|
+
- Parse raw data into domain types at the boundary
|
|
27
|
+
- Do not re-export transport, storage, framework, or wire types through the public surface
|
|
28
|
+
- No redundant nil checks deep in call chains if the boundary already validated
|
|
29
|
+
|
|
30
|
+
Code organization:
|
|
31
|
+
- Business logic in pure functions with no framework dependencies
|
|
32
|
+
- Parse functions: pure transforms from raw bytes to typed state
|
|
33
|
+
- Prompt construction: structured state in, string out
|
|
34
|
+
- Scoring and assessment: pure transforms from state to results
|
|
35
|
+
|
|
36
|
+
**The tests:**
|
|
37
|
+
- "Is this data crossing a system boundary right now?" If not, validation is redundant.
|
|
38
|
+
- "Can this be a pure function that the shell just calls?" If yes, extract it.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-build-the-lever
|
|
3
|
+
description: >-
|
|
4
|
+
Apply to any non-trivial work, not just bulk work: edits, migrations,
|
|
5
|
+
analyses, checks. Build the tool that does it or proves it (codemod, script,
|
|
6
|
+
generator, or a skill later turns follow) instead of working by hand. The tool
|
|
7
|
+
is the artifact a reviewer can rerun. Use for /principle-build-the-lever.
|
|
8
|
+
---
|
|
9
|
+
# Build the Lever
|
|
10
|
+
|
|
11
|
+
When the work isn't trivial, build the tool that does it instead of doing it by hand.
|
|
12
|
+
|
|
13
|
+
Slash `/principle-build-the-lever` only. Not a session flag.
|
|
14
|
+
|
|
15
|
+
A codemod, generator, or script does the work the same way every time and reruns for free. The tool is one artifact a reviewer can read and rerun to check the work. Hand-done changes can only be re-verified by redoing them. A deterministic script turns "trust me" into "run this".
|
|
16
|
+
|
|
17
|
+
Default to building the lever. Skip it only when the task is trivial, a couple of obvious edits you can see at a glance.
|
|
18
|
+
|
|
19
|
+
- Do the first unit by hand to learn the recipe, then build the tool. Prove it by rerunning it on that unit and diffing against your hand-done version. Make the lever safe to rerun.
|
|
20
|
+
- Codemod or script for edits, generator for repetitive files, a dump-to-sqlite query for analysis, a rerunnable check for verification.
|
|
21
|
+
- A deterministic lever beats fan-out. If the tool can process every unit in one pass, run it yourself. Don't fan out delegates to hand-apply what a script can do.
|
|
22
|
+
- When you split work across later turns or child runs, write the lever as a skill they all read: the recipe, the verification contract, and the do-not-touch fences in one artifact. Keep it outside the delegates' write scope so they can't quietly edit the contract.
|
|
23
|
+
- Applying this principle produces a file. If you cited it and there is no codemod, script, generator, or delegate skill in the diff, you didn't apply it.
|
|
24
|
+
- Commit the lever when the work outlives the session.
|
|
25
|
+
|
|
26
|
+
The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. Per the `/principle-laziness-protocol`, build the smallest script that does or proves the job, never a framework.
|
|
27
|
+
|
|
28
|
+
Distinct from `/principle-encode-lessons-in-structure`, which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For scripting the verification itself, see `/principle-prove-it-works`.
|