@jeiemgi/cckit 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +4 -2
- package/AGENTS.md +17 -237
- package/README.md +27 -27
- package/SECURITY.md +4 -4
- package/bin/PROMPTS.md +12 -0
- package/bin/cckit +86 -86
- package/cckit.config.json +1 -1
- package/kit/PROMPTS.md +14 -0
- package/{commands → kit/commands}/kit-doctor.md +3 -4
- package/{commands → kit/commands}/kit-export-project.md +1 -1
- package/{commands → kit/commands}/kit-init.md +8 -20
- package/{commands → kit/commands}/kit-routines.md +1 -1
- package/{commands → kit/commands}/kit-update.md +3 -3
- package/kit/completions/cckit.bash +9 -0
- package/{databases → kit/databases}/supabase.json +1 -1
- package/{integrations → kit/integrations}/integration.schema.json +3 -3
- package/kit/interview/global.json +54 -0
- package/kit/interview/project.json +133 -0
- package/kit/modules/qa.json +63 -0
- package/kit/modules/software.json +48 -0
- package/{profiles → kit/profiles}/automation.json +1 -3
- package/{profiles → kit/profiles}/content.json +0 -2
- package/{profiles → kit/profiles}/marketing.json +0 -2
- package/{profiles → kit/profiles}/minimal.json +1 -3
- package/{profiles → kit/profiles}/research.json +1 -3
- package/{profiles → kit/profiles}/software.json +0 -2
- package/kit/routines/catalogue.json +84 -0
- package/{skills → kit/skills}/kit-add/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-annotate/SKILL.md +2 -4
- package/{skills → kit/skills}/kit-autopilot/SKILL.md +6 -6
- package/{skills → kit/skills}/kit-cleanup/SKILL.md +2 -2
- package/{skills → kit/skills}/kit-contribute/SKILL.md +8 -12
- package/{skills → kit/skills}/kit-customize/SKILL.md +5 -8
- package/{skills → kit/skills}/kit-dev/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-digest/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-effort-close/SKILL.md +4 -4
- package/{skills → kit/skills}/kit-effort-new/SKILL.md +6 -6
- package/{skills → kit/skills}/kit-effort-start/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-gc/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-page/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-status/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-close/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-new/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-pr/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-pr-merge/SKILL.md +7 -7
- package/{skills → kit/skills}/kit-task-start/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-sync/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-ux-audit/SKILL.md +16 -35
- package/{skills → kit/skills}/kit-ux-audit/references/graph-model.md +7 -26
- package/{skills → kit/skills}/kit-ux-audit/references/report.md +2 -3
- package/{skills → kit/skills}/routing.yaml +1 -1
- package/kit/statusline/kit-statusline.sh +82 -0
- package/{templates → kit/templates}/agents/analyst.md +0 -11
- package/{templates → kit/templates}/agents/auto-dev.md +0 -13
- package/{templates → kit/templates}/agents/backend.md +0 -11
- package/{templates → kit/templates}/agents/designer.md +0 -11
- package/{templates → kit/templates}/agents/devops.md +0 -11
- package/{templates → kit/templates}/agents/editor.md +0 -11
- package/{templates → kit/templates}/agents/frontend.md +0 -11
- package/{templates → kit/templates}/agents/generalist.md +0 -11
- package/{templates → kit/templates}/agents/local-delegate.md +0 -13
- package/{templates → kit/templates}/agents/n8n.md +0 -11
- package/{templates → kit/templates}/agents/pm.md +0 -11
- package/{templates → kit/templates}/agents/qa.md +0 -11
- package/{templates → kit/templates}/agents/researcher.md +0 -11
- package/{templates → kit/templates}/agents/security.md +0 -11
- package/{templates → kit/templates}/agents/tech-lead.md +0 -11
- package/{templates → kit/templates}/agents/ux.md +3 -14
- package/{templates → kit/templates}/instructions.md.tmpl +1 -18
- package/{templates → kit/templates}/kit.config.json.tmpl +0 -6
- package/{templates → kit/templates}/rules/branch-naming.md +3 -2
- package/{templates → kit/templates}/rules/merge-safety.md +3 -2
- package/{templates → kit/templates}/rules/react-annotate.md +0 -8
- package/kit.config.schema.json +11 -11
- package/lib/PROMPTS.md +14 -0
- package/{scripts/lib → lib/core}/adapter-select-test.sh +7 -7
- package/{scripts → lib/core}/advisor-test.sh +3 -3
- package/{scripts/lib → lib/core}/agent-def-test.sh +1 -1
- package/{scripts/lib → lib/core}/agent-def.sh +2 -2
- package/{scripts/lib → lib/core}/agent-launch-test.sh +3 -3
- package/{scripts/lib → lib/core}/agent-profile-test.sh +2 -2
- package/{scripts/lib → lib/core}/agent-resolve-test.sh +2 -2
- package/{scripts/lib → lib/core}/agent-resolve.sh +2 -2
- package/{scripts → lib/core}/agent-skills-external.txt +3 -3
- package/{scripts → lib/core}/agent-skills-lint-test.sh +17 -17
- package/lib/core/agent-skills-lint.sh +115 -0
- package/{scripts → lib/core}/agent-template-lint-test.sh +7 -7
- package/lib/core/agent-template-lint.sh +58 -0
- package/{scripts/lib → lib/core}/board-view-test.sh +3 -3
- package/lib/core/board-view.sh +97 -0
- package/{scripts/lib → lib/core}/branch-owner-test.sh +3 -3
- package/lib/core/branch-owner.sh +201 -0
- package/lib/core/check.sh +125 -0
- package/{scripts/lib → lib/core}/codex-hooks-test.sh +3 -3
- package/{scripts → lib/core}/commitlint-test.sh +6 -6
- package/lib/core/commitlint.sh +54 -0
- package/{scripts/config-path-test.sh → lib/core/config-path-scan-test.sh} +2 -2
- package/{scripts/lib → lib/core}/config-path-test.sh +3 -3
- package/lib/core/config-path.sh +30 -0
- package/{scripts → lib/core}/content-skills-test.sh +16 -16
- package/{scripts → lib/core}/docs-marketing-words-test.sh +2 -2
- package/{scripts → lib/core}/docs-record-tables-test.sh +2 -2
- package/{scripts/lib → lib/core}/effort-metrics-test.sh +6 -6
- package/lib/core/effort-metrics.sh +591 -0
- package/{scripts/lib → lib/core}/effort-slug-test.sh +4 -4
- package/{scripts/lib → lib/core}/effort-slug.sh +3 -3
- package/lib/core/effort.sh +339 -0
- package/{scripts/lib → lib/core}/errors-header-test.sh +19 -9
- package/lib/core/errors-header.exempt +49 -0
- package/{scripts → lib/core}/exec-targets-test.sh +3 -3
- package/lib/core/feature-map.sh +76 -0
- package/{scripts → lib/core}/force-push-fence-test.sh +8 -8
- package/lib/core/force-push-fence.sh +51 -0
- package/{scripts → lib/core}/forge-fence-test.sh +13 -13
- package/{scripts → lib/core}/forge-fence.sh +14 -14
- package/{scripts → lib/core}/forge-report-test.sh +5 -5
- package/{scripts → lib/core}/forge-report.sh +18 -14
- package/{scripts/lib → lib/core}/git-core-test.sh +5 -5
- package/{scripts/lib → lib/core}/git-remote-test.sh +3 -3
- package/{scripts → lib/core}/guard-raw-git-ops-test.sh +4 -4
- package/{scripts → lib/core}/hook-adapter-test.sh +5 -5
- package/{scripts/lib → lib/core}/hook-refresh-test.sh +5 -5
- package/{scripts → lib/core}/instruction-budget-baseline.txt +1 -1
- package/lib/core/instruction-budget-lint.sh +238 -0
- package/{scripts/lib → lib/core}/integration-install-test.sh +12 -12
- package/lib/core/integration-install.sh +257 -0
- package/{scripts/lib → lib/core}/integrations-test.sh +38 -45
- package/lib/core/integrations.sh +244 -0
- package/{scripts/lib → lib/core}/kinds-test.sh +5 -5
- package/lib/core/kinds.sh +66 -0
- package/{scripts/lib → lib/core}/kit-cli-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-cli.sh +1 -1
- package/{scripts/lib → lib/core}/kit-config-resolve.sh +2 -2
- package/{scripts/lib → lib/core}/kit-config-test.sh +11 -11
- package/lib/core/kit-config.sh +164 -0
- package/{scripts/lib → lib/core}/kit-engine-test.sh +1 -1
- package/lib/core/kit-events.sh +72 -0
- package/lib/core/kit-local.sh +87 -0
- package/{scripts/lib → lib/core}/kit-manifest.sh +1 -1
- package/{scripts/lib → lib/core}/kit-mode-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-mode.sh +3 -3
- package/{scripts/lib → lib/core}/kit-operate.sh +1 -1
- package/{scripts/lib → lib/core}/kit-profile-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-profile.sh +2 -2
- package/{scripts/lib → lib/core}/kit-state-test.sh +1 -1
- package/lib/core/knowledge-lint.sh +106 -0
- package/lib/core/layout-fence-test.sh +35 -0
- package/lib/core/layout-fence.allow +15 -0
- package/lib/core/layout-fence.baseline +4 -0
- package/lib/core/layout-fence.sh +50 -0
- package/{scripts → lib/core}/leak-fence-test.sh +10 -10
- package/{scripts/lib → lib/core}/leak-fence.sh +1 -1
- package/{scripts → lib/core}/loose-issues-test.sh +8 -8
- package/{scripts → lib/core}/loose-issues.baseline +1 -1
- package/{scripts/lib → lib/core}/loose-issues.sh +2 -2
- package/{scripts → lib/core}/marketing-walkthrough-test.sh +7 -7
- package/{scripts/lib → lib/core}/naming-test.sh +2 -2
- package/{scripts/lib → lib/core}/naming-verbs-test.sh +8 -8
- package/lib/core/naming.sh +172 -0
- package/{scripts/lib → lib/core}/orchestration-runtime-test.sh +4 -4
- package/{scripts → lib/core}/portable-test.sh +10 -6
- package/{scripts/lib → lib/core}/pr-evidence-test.sh +5 -5
- package/lib/core/pr-evidence.sh +361 -0
- package/{scripts/lib → lib/core}/qa-lane-test.sh +7 -7
- package/{scripts/lib → lib/core}/qa-lane.sh +3 -3
- package/{scripts/lib → lib/core}/qa-lanes-test.sh +5 -5
- package/lib/core/react-detect.sh +79 -0
- package/{scripts/lib → lib/core}/render-test.sh +1 -1
- package/lib/core/resident-context-test.sh +42 -0
- package/lib/core/resident-context.baseline +1 -0
- package/lib/core/resident-context.sh +56 -0
- package/lib/core/review-lint-baseline.txt +28 -0
- package/lib/core/review-lint.sh +266 -0
- package/{scripts → lib/core}/review-rules.conf +1 -1
- package/{scripts/lib → lib/core}/review-stage-test.sh +2 -2
- package/{scripts/lib → lib/core}/role-identity-test.sh +3 -3
- package/lib/core/role-identity.sh +71 -0
- package/{scripts → lib/core}/rule-recipes-test.sh +5 -5
- package/lib/core/secret-guard.sh +116 -0
- package/{scripts → lib/core}/self-install-test.sh +15 -16
- package/{scripts/lib → lib/core}/session-registry-test.sh +1 -1
- package/lib/core/session-registry.sh +233 -0
- package/{scripts → lib/core}/skill-frontmatter-baseline.txt +1 -1
- package/lib/core/skill-frontmatter-lint.sh +189 -0
- package/{scripts/lib → lib/core}/spec-lint-test.sh +1 -1
- package/lib/core/spec-lint.sh +95 -0
- package/{scripts/lib → lib/core}/stage-receipt-test.sh +4 -4
- package/{scripts/lib → lib/core}/stage-receipt.sh +3 -3
- package/{scripts → lib/core}/terms-check-test.sh +6 -6
- package/lib/core/terms-check.sh +244 -0
- package/{scripts/lib → lib/core}/test-env-test.sh +2 -2
- package/{scripts/lib → lib/core}/test-env.sh +1 -1
- package/{scripts → lib/core}/test-runner-test.sh +11 -11
- package/{scripts → lib/core}/test.sh +12 -12
- package/{scripts → lib/core}/update-path-test.sh +3 -3
- package/{scripts → lib/core}/verbs-gen.sh +9 -9
- package/{scripts → lib/core}/verbs-help-test.sh +4 -4
- package/{scripts → lib/core}/verbs-ratchet-test.sh +18 -18
- package/{scripts → lib/core}/verbs-ratchet.sh +8 -8
- package/{scripts → lib/core}/verbs-test.sh +19 -19
- package/lib/core/verbs.baseline +5 -0
- package/{scripts/lib → lib/core}/verbs.sh +2 -2
- package/{scripts/lib → lib/core}/verbs.tsv +5 -5
- package/{scripts/lib → lib/core}/version-bump-test.sh +29 -8
- package/{scripts/lib → lib/core}/version-bump.sh +15 -2
- package/{scripts/lib → lib/core}/wave-result-test.sh +2 -2
- package/{scripts/lib → lib/core}/wave-result.sh +1 -1
- package/{scripts/lib → lib/core}/worker-brief-test.sh +3 -3
- package/{scripts/lib → lib/core}/worktree-bootstrap-test.sh +1 -1
- package/{scripts/lib → lib/core}/worktree-issue-test.sh +2 -2
- package/lib/core/worktree-issue.sh +172 -0
- package/{scripts/lib → lib/core}/worktree-ports-test.sh +1 -1
- package/{scripts/lib → lib/core}/worktree-start-test.sh +2 -2
- package/lib/core/worktree-start.sh +790 -0
- package/{scripts/lib → lib/core}/zsh-safety-test.sh +11 -11
- package/{scripts/lib → lib/forge}/forge-test.sh +4 -4
- package/{scripts/lib → lib/forge}/forge.sh +1 -1
- package/{scripts/lib → lib/forge}/gh-board-add-test.sh +3 -3
- package/lib/forge/gh-log.sh +59 -0
- package/{scripts/lib → lib/forge}/gh-project-test.sh +18 -17
- package/lib/forge/gh-project.sh +379 -0
- package/{scripts/lib → lib/forge}/gh-rest-test.sh +5 -5
- package/{scripts/lib → lib/forge}/gh-rest.sh +1 -1
- package/{scripts/lib → lib/forge}/init-github.sh +18 -8
- package/lib/verbs/PROMPTS.md +146 -0
- package/lib/verbs/annotate-setup.sh +149 -0
- package/{scripts → lib/verbs}/autopilot-run-test.sh +9 -9
- package/{scripts → lib/verbs}/autopilot-run.sh +9 -9
- package/{scripts → lib/verbs}/autopilot-test.sh +7 -6
- package/{scripts → lib/verbs}/autopilot.sh +3 -3
- package/{scripts/lib → lib/verbs}/captain-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/captain.sh +7 -7
- package/lib/verbs/capture-project-ids.sh +99 -0
- package/{scripts/lib → lib/verbs}/content-kinds-gc-test.sh +7 -7
- package/{scripts/lib → lib/verbs}/contribute-root-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/contribute-root.sh +1 -1
- package/{scripts → lib/verbs}/contribute.sh +8 -8
- package/{scripts → lib/verbs}/copilot-loop-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/copilot-test.sh +11 -10
- package/{scripts/lib → lib/verbs}/copilot.sh +7 -7
- package/{scripts → lib/verbs}/database-supabase-test.sh +6 -6
- package/{scripts/lib → lib/verbs}/effort-close-subs-test.sh +6 -6
- package/{scripts/lib → lib/verbs}/effort-dispatch-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/effort-flows-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-ops-test.sh +13 -13
- package/lib/verbs/effort-ops.sh +1571 -0
- package/{scripts/lib → lib/verbs}/effort-parity-test.sh +10 -10
- package/{scripts/lib → lib/verbs}/effort-plan-test.sh +7 -7
- package/lib/verbs/effort-plan.sh +289 -0
- package/{scripts/lib → lib/verbs}/effort-review-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-review.sh +2 -2
- package/{scripts/lib → lib/verbs}/grill-record-test.sh +1 -1
- package/lib/verbs/grill-record.sh +88 -0
- package/{scripts/lib → lib/verbs}/handoff.sh +2 -2
- package/{scripts → lib/verbs}/init-content-test.sh +14 -14
- package/{scripts/lib → lib/verbs}/init-guide.sh +6 -6
- package/{scripts → lib/verbs}/init-guided-test.sh +9 -9
- package/{scripts → lib/verbs}/init-recipes-test.sh +7 -7
- package/{scripts → lib/verbs}/init-upgrade-test.sh +9 -10
- package/lib/verbs/init.sh +1598 -0
- package/{scripts → lib/verbs}/install-test.sh +5 -5
- package/lib/verbs/install.sh +31 -0
- package/{scripts → lib/verbs}/integrations-check-test.sh +9 -9
- package/lib/verbs/integrations-check.sh +157 -0
- package/{scripts → lib/verbs}/kit-add-test.sh +8 -8
- package/lib/verbs/kit-add.sh +415 -0
- package/{scripts → lib/verbs}/kit-adopt-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-adopt.sh +6 -6
- package/{scripts/lib → lib/verbs}/kit-brief-test.sh +15 -15
- package/{scripts/lib → lib/verbs}/kit-brief.sh +12 -12
- package/lib/verbs/kit-bump-version.sh +79 -0
- package/lib/verbs/kit-digest.sh +126 -0
- package/{scripts → lib/verbs}/kit-doctor-test.sh +52 -32
- package/lib/verbs/kit-doctor.sh +991 -0
- package/{scripts → lib/verbs}/kit-export-project-test.sh +4 -4
- package/lib/verbs/kit-export-project.sh +245 -0
- package/{scripts → lib/verbs}/kit-export-training-test.sh +3 -3
- package/lib/verbs/kit-export-training.sh +175 -0
- package/{scripts/lib → lib/verbs}/kit-gc-test.sh +5 -5
- package/lib/verbs/kit-gc.sh +804 -0
- package/{scripts/lib → lib/verbs}/kit-hotfix.sh +3 -3
- package/{scripts/lib → lib/verbs}/kit-interview-test.sh +2 -2
- package/lib/verbs/kit-interview.sh +319 -0
- package/{scripts/lib → lib/verbs}/kit-lib-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/kit-lib.sh +3 -3
- package/{scripts → lib/verbs}/kit-migrate-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-migrate.sh +5 -5
- package/{scripts/lib → lib/verbs}/kit-msg-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kit-msg.sh +2 -2
- package/{scripts → lib/verbs}/kit-onboard-test.sh +2 -3
- package/lib/verbs/kit-onboard.sh +69 -0
- package/{scripts → lib/verbs}/kit-promote-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-promote.sh +4 -4
- package/{scripts → lib/verbs}/kit-remove-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-remove.sh +5 -5
- package/lib/verbs/kit-routines.sh +322 -0
- package/lib/verbs/kit-self-update.sh +55 -0
- package/{scripts/lib → lib/verbs}/kit-status-test.sh +2 -2
- package/lib/verbs/kit-status.sh +650 -0
- package/{scripts/lib → lib/verbs}/kit-task-ops-test.sh +8 -2
- package/lib/verbs/kit-task-ops.sh +793 -0
- package/{scripts → lib/verbs}/kit-version-check-test.sh +3 -3
- package/lib/verbs/kit-version-check.sh +121 -0
- package/{scripts → lib/verbs}/kit-wire-test.sh +6 -6
- package/{scripts → lib/verbs}/kit-wire.sh +8 -8
- package/{scripts/lib → lib/verbs}/kto-hotfix-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/kto-task-close-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-new-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-merge-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/light-task-run-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/light-task-test.sh +9 -9
- package/{scripts/lib → lib/verbs}/light-task.sh +11 -11
- package/{scripts/lib → lib/verbs}/next-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/next.sh +4 -4
- package/{scripts → lib/verbs}/night-grant-test.sh +4 -4
- package/lib/verbs/night-grant.sh +454 -0
- package/{scripts → lib/verbs}/night-run-test.sh +3 -3
- package/{scripts → lib/verbs}/night-run.mjs +2 -2
- package/{scripts → lib/verbs}/orchestrate-test.sh +5 -5
- package/{scripts → lib/verbs}/orchestrate.sh +15 -15
- package/{scripts/lib → lib/verbs}/plan-machine-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/plan-machine.sh +4 -4
- package/{scripts/lib → lib/verbs}/plan-next-test.sh +1 -1
- package/lib/verbs/plan-next.sh +213 -0
- package/{scripts → lib/verbs}/publish.sh +10 -10
- package/{scripts/lib → lib/verbs}/review-page-test.sh +4 -4
- package/lib/verbs/review-page.sh +375 -0
- package/lib/verbs/setup-labels.sh +96 -0
- package/lib/verbs/setup-milestones.sh +34 -0
- package/{scripts → lib/verbs}/showcase.sh +2 -2
- package/{scripts/lib → lib/verbs}/sprint-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/sprint.sh +2 -2
- package/{scripts → lib/verbs}/status-test.sh +7 -7
- package/{scripts → lib/verbs}/status.sh +12 -12
- package/{scripts → lib/verbs}/task-sync-test.sh +6 -6
- package/lib/verbs/task-sync.sh +462 -0
- package/{scripts/lib → lib/verbs}/upgrade-report-test.sh +4 -4
- package/lib/verbs/ux-a11y-scan.sh +96 -0
- package/lib/verbs/ux-ds-audit.sh +146 -0
- package/lib/verbs/ux-graph-scan.sh +188 -0
- package/{scripts → lib/verbs}/wave-worker.sh +2 -2
- package/lib/verbs/web-install.sh +22 -0
- package/package.json +3 -10
- package/scripts/PROMPTS.md +13 -0
- package/scripts/agent-skills-lint.sh +12 -113
- package/scripts/agent-template-lint.sh +12 -56
- package/scripts/annotate-setup.sh +11 -151
- package/scripts/benchmark/checkpoint-test.sh +1 -1
- package/scripts/benchmark/checkpoint.sh +1 -1
- package/scripts/benchmark/gate.sh +2 -2
- package/scripts/benchmark/lib/bench-common.sh +1 -1
- package/scripts/capture-project-ids.sh +12 -86
- package/scripts/check.sh +12 -112
- package/scripts/force-push-fence.sh +12 -49
- package/scripts/init.sh +13 -1637
- package/scripts/install.sh +12 -29
- package/scripts/instruction-budget-lint.sh +13 -218
- package/scripts/integrations-check.sh +12 -155
- package/scripts/kit-add.sh +12 -413
- package/scripts/kit-bump-version.sh +13 -78
- package/scripts/kit-digest.sh +13 -125
- package/scripts/kit-doctor.sh +13 -1065
- package/scripts/kit-export-project.sh +12 -243
- package/scripts/kit-export-training.sh +12 -173
- package/scripts/kit-onboard.sh +12 -67
- package/scripts/kit-routines.sh +12 -320
- package/scripts/kit-self-update.sh +12 -53
- package/scripts/kit-version-check.sh +12 -106
- package/scripts/knowledge-lint.sh +13 -98
- package/scripts/lib/board-view.sh +13 -96
- package/scripts/lib/branch-owner.sh +12 -199
- package/scripts/lib/commitlint.sh +12 -52
- package/scripts/lib/config-path.sh +13 -29
- package/scripts/lib/effort-metrics.sh +12 -589
- package/scripts/lib/effort-ops.sh +13 -1570
- package/scripts/lib/effort-plan.sh +12 -287
- package/scripts/lib/effort.sh +13 -338
- package/scripts/lib/gh-log.sh +14 -59
- package/scripts/lib/gh-project.sh +13 -376
- package/scripts/lib/grill-record.sh +13 -87
- package/scripts/lib/integration-install.sh +12 -255
- package/scripts/lib/integrations.sh +12 -242
- package/scripts/lib/kinds.sh +13 -65
- package/scripts/lib/kit-config.sh +12 -165
- package/scripts/lib/kit-events.sh +13 -71
- package/scripts/lib/kit-gc.sh +12 -802
- package/scripts/lib/kit-interview.sh +11 -316
- package/scripts/lib/kit-local.sh +12 -85
- package/scripts/lib/kit-status.sh +12 -648
- package/scripts/lib/kit-task-ops.sh +13 -789
- package/scripts/lib/naming.sh +12 -170
- package/scripts/lib/plan-next.sh +13 -212
- package/scripts/lib/pr-evidence.sh +12 -359
- package/scripts/lib/react-detect.sh +12 -77
- package/scripts/lib/review-page.sh +11 -372
- package/scripts/lib/role-identity.sh +13 -70
- package/scripts/lib/secret-guard.sh +12 -114
- package/scripts/lib/session-registry.sh +13 -232
- package/scripts/lib/spec-lint.sh +13 -94
- package/scripts/lib/worktree-issue.sh +12 -170
- package/scripts/lib/worktree-start.sh +13 -789
- package/scripts/night-grant.sh +12 -452
- package/scripts/review-lint.sh +13 -258
- package/scripts/setup-labels.sh +11 -82
- package/scripts/setup-milestones.sh +12 -21
- package/scripts/skill-frontmatter-lint.sh +13 -181
- package/scripts/task-sync.sh +13 -450
- package/scripts/terms-check.sh +13 -241
- package/scripts/ux-a11y-scan.sh +13 -95
- package/scripts/ux-ds-audit.sh +12 -144
- package/scripts/ux-graph-scan.sh +12 -186
- package/scripts/web-install.sh +16 -20
- package/docs/kit-annotate/01-explainer.html +0 -225
- package/docs/kit-annotate/02-implementation-plan.html +0 -196
- package/docs/media/.onboarding-capture.cast +0 -5
- package/docs/media/README.md +0 -43
- package/docs/media/build-demo.sh +0 -63
- package/docs/media/build-kit-init.sh +0 -51
- package/docs/media/build-onboarding.sh +0 -51
- package/docs/media/kit-dry-run.cast +0 -107
- package/docs/media/kit-dry-run.gif +0 -0
- package/docs/media/kit-init.cast +0 -56
- package/docs/media/kit-init.gif +0 -0
- package/docs/media/kit-onboarding.cast +0 -148
- package/docs/media/kit-onboarding.gif +0 -0
- package/integrations/mempalace.json +0 -28
- package/scripts/review-lint-baseline.txt +0 -28
- package/scripts/verbs.baseline +0 -5
- package/templates/hooks/mempal_followup.sh.tmpl +0 -97
- package/templates/hooks/mempal_precompact.sh.tmpl +0 -4
- package/templates/hooks/mempal_save.sh.tmpl +0 -4
- package/templates/hooks/mempal_session_start.sh.tmpl +0 -42
- package/templates/rules/mempalace.md +0 -111
- /package/{commands → kit/commands}/kit-docs.md +0 -0
- /package/{commands → kit/commands}/kit-export-training.md +0 -0
- /package/{databases → kit/databases}/supabase/guide.html +0 -0
- /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/client.ts +0 -0
- /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/server.ts +0 -0
- /package/{githooks → kit/githooks}/pre-commit +0 -0
- /package/{integrations → kit/integrations}/emil-design-eng.json +0 -0
- /package/{integrations → kit/integrations}/graft.json +0 -0
- /package/{integrations → kit/integrations}/impeccable.json +0 -0
- /package/{integrations → kit/integrations}/lavish.json +0 -0
- /package/{integrations → kit/integrations}/mlx-lm.json +0 -0
- /package/{integrations → kit/integrations}/web-design-guidelines.json +0 -0
- /package/{recipes → kit/recipes}/nextjs-shadcn.json +0 -0
- /package/{skills → kit/skills}/kit-advisor/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/close.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/grill.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/orchestrate.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/plan.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/review.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/step-report.md +0 -0
- /package/{skills → kit/skills}/kit-docs-writer/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-effort-pr/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-next/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-onboard/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-plan-next/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-security-sweep/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-ship/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-task-pr-auto/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/a11y.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/consistency.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/heuristics.md +0 -0
- /package/{templates → kit/templates}/benchmarks/SCHEMA.md +0 -0
- /package/{templates → kit/templates}/benchmarks/abstain.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/adversarial.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/benchmark.config.json +0 -0
- /package/{templates → kit/templates}/benchmarks/quality.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/retrieval.jsonl +0 -0
- /package/{templates → kit/templates}/codex/hooks.json.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/guard-base-branch-commit.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/guard-raw-git-ops.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit-local-status.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit-mail-check.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit_version_check.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/prepush_gate.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/repo-hygiene.sh.tmpl +0 -0
- /package/{templates → kit/templates}/knowledge-INDEX.md.tmpl +0 -0
- /package/{templates → kit/templates}/lib/kit-sigil.sh.tmpl +0 -0
- /package/{templates → kit/templates}/rules/authoring.md +0 -0
- /package/{templates → kit/templates}/rules/code-retrieval.md +0 -0
- /package/{templates → kit/templates}/rules/communication-style.md +0 -0
- /package/{templates → kit/templates}/rules/delegation-brief.md +0 -0
- /package/{templates → kit/templates}/rules/design-routing.md +0 -0
- /package/{templates → kit/templates}/rules/effort-model.md +0 -0
- /package/{templates → kit/templates}/rules/gate-and-review.md +0 -0
- /package/{templates → kit/templates}/rules/issue-lifecycle.md +0 -0
- /package/{templates → kit/templates}/rules/knowledge-base.md +0 -0
- /package/{templates → kit/templates}/rules/naming-and-ids.md +0 -0
- /package/{templates → kit/templates}/rules/plain-language.md +0 -0
- /package/{templates → kit/templates}/rules/plan-next.md +0 -0
- /package/{templates → kit/templates}/rules/plan-output-format.md +0 -0
- /package/{templates → kit/templates}/rules/review-pages.md +0 -0
- /package/{templates → kit/templates}/rules/risk-tiered-review.md +0 -0
- /package/{templates → kit/templates}/rules/shared-checkout.md +0 -0
- /package/{templates → kit/templates}/rules/skill-gaps.md +0 -0
- /package/{templates → kit/templates}/rules/task-management.md +0 -0
- /package/{templates → kit/templates}/settings/settings.json.tmpl +0 -0
- /package/{templates → kit/templates}/settings/settings.local.json.tmpl +0 -0
- /package/{templates → kit/templates}/skills/NAMESPACED +0 -0
- /package/{templates → kit/templates}/skills/brand-voice/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/brand-voice/references/voice-template.md +0 -0
- /package/{templates → kit/templates}/skills/campaign/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/campaign/references/plan-template.md +0 -0
- /package/{templates → kit/templates}/skills/concrete/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/references/copy-frameworks.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/references/natural-transitions.md +0 -0
- /package/{templates → kit/templates}/skills/feature-build-refine/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/karpathy-guidelines/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/morning-briefing/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/add.json +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/design-file-template.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/generic-page-patterns.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/minimum-rules.md +0 -0
- /package/{templates → kit/templates}/skills/speckit/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/supabase-patterns/SKILL.md +0 -0
- /package/{scripts/lib → lib/core}/adapter-select.sh +0 -0
- /package/{scripts/lib → lib/core}/agent-launch.sh +0 -0
- /package/{scripts/lib → lib/core}/agent-profile.sh +0 -0
- /package/{scripts/lib → lib/core}/cckit-output.sh +0 -0
- /package/{scripts/lib → lib/core}/codex-hooks.sh +0 -0
- /package/{scripts → lib/core}/force-push-fence.baseline +0 -0
- /package/{scripts → lib/core}/forge-fence.baseline +0 -0
- /package/{scripts/lib → lib/core}/git-remote.sh +0 -0
- /package/{scripts/lib → lib/core}/hook-refresh.sh +0 -0
- /package/{scripts → lib/core}/instruction-budget-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/kit-state.sh +0 -0
- /package/{scripts/lib → lib/core}/orchestration-runtime.sh +0 -0
- /package/{scripts/lib → lib/core}/project-scan.sh +0 -0
- /package/{scripts/lib → lib/core}/render.sh +0 -0
- /package/{scripts → lib/core}/review-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/review-stage.sh +0 -0
- /package/{scripts → lib/core}/skill-frontmatter-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/task-source-file.sh +0 -0
- /package/{scripts/lib → lib/core}/task-source.sh +0 -0
- /package/{scripts/lib → lib/core}/toon.sh +0 -0
- /package/{scripts/lib → lib/core}/ui.sh +0 -0
- /package/{scripts/lib → lib/core}/worker-brief.sh +0 -0
- /package/{scripts/lib → lib/forge}/forge-github.sh +0 -0
- /package/{scripts/lib → lib/forge}/forge-none.sh +0 -0
- /package/{scripts/lib → lib/forge}/test-forge-shim.sh +0 -0
- /package/{scripts → lib/verbs}/debug.sh +0 -0
- /package/{scripts → lib/verbs}/night-run.test.mjs +0 -0
- /package/{scripts/lib → lib/verbs}/upgrade-report.sh +0 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# CLAUDE_CODE_REMOTE) in this shell
|
|
14
14
|
# test_env_unset_args print `-u NAME` pairs for env(1), one per line (the runner uses these)
|
|
15
15
|
#
|
|
16
|
-
#
|
|
16
|
+
# lib/core/test.sh scrubs the same set before it runs each test; this covers a test run directly.
|
|
17
17
|
# errors: pure — no side effects beyond unsetting variables in the current shell
|
|
18
18
|
# bash 3.2 + zsh compatible.
|
|
19
19
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# test-runner-test.sh —
|
|
2
|
+
# test-runner-test.sh — lib/core/test.sh runs files in parallel and still reports correctly (#455).
|
|
3
3
|
#
|
|
4
|
-
# Copies the runner and
|
|
4
|
+
# Copies the runner and lib/core/test-env.sh into a throwaway tree with fixture `*-test.sh`
|
|
5
5
|
# files, then asserts on the copy's exit code and output:
|
|
6
6
|
# - a failing file fails the run, and its output is printed whole, in one block
|
|
7
7
|
# - two files really run at the same time under -j 2 (each waits for the other's marker file)
|
|
8
8
|
# - a file marked `# test-runner: serial` is held back and run after the parallel phase
|
|
9
9
|
# - --serial, a path pattern, and a bad job count behave as the header of test.sh says
|
|
10
10
|
# - every test is sealed from KIT_* variables and runs with commit signing off
|
|
11
|
-
# Run: bash
|
|
11
|
+
# Run: bash lib/core/test-runner-test.sh
|
|
12
12
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
13
13
|
set -u
|
|
14
|
-
ROOT="$(cd "$(dirname "$0")
|
|
14
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
15
15
|
fail=0
|
|
16
16
|
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
17
17
|
has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> '[$2]' lacks '[$3]'"; fail=1 ;; esac; }
|
|
@@ -21,19 +21,19 @@ tmp="$(cd "$(mktemp -d)" && pwd -P)"; trap 'rm -rf "$tmp"' EXIT
|
|
|
21
21
|
# The caller's own runner settings must not steer the copy under test.
|
|
22
22
|
unset TEST_JOBS TEST_TIMINGS TEST_RUN_DIR
|
|
23
23
|
# shellcheck source=/dev/null
|
|
24
|
-
. "$ROOT/
|
|
24
|
+
. "$ROOT/lib/core/test-env.sh" && test_env_seal
|
|
25
25
|
|
|
26
26
|
# fixture <name> — a fresh tree holding the runner; echoes its path.
|
|
27
27
|
fixture() {
|
|
28
28
|
local d="$tmp/$1"
|
|
29
|
-
mkdir -p "$d/scripts/lib" "$d/bin" "$d/shared"
|
|
30
|
-
cp "$ROOT/
|
|
31
|
-
cp "$ROOT/
|
|
29
|
+
mkdir -p "$d/scripts/lib" "$d/lib/core" "$d/bin" "$d/shared"
|
|
30
|
+
cp "$ROOT/lib/core/test.sh" "$d/lib/core/test.sh"
|
|
31
|
+
cp "$ROOT/lib/core/test-env.sh" "$d/lib/core/test-env.sh"
|
|
32
32
|
printf '%s' "$d"
|
|
33
33
|
}
|
|
34
34
|
run() { # run <fixture dir> [runner args…] -> OUT (stdout+stderr), RC
|
|
35
35
|
local d="$1"; shift
|
|
36
|
-
OUT="$(bash "$d/
|
|
36
|
+
OUT="$(bash "$d/lib/core/test.sh" "$@" 2>&1)"; RC=$?
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
# ── 1. pass, fail, and a failing file's output in one block ────────────────────────────────────
|
|
@@ -145,13 +145,13 @@ fi
|
|
|
145
145
|
exit "$rc"
|
|
146
146
|
EOF
|
|
147
147
|
OUT="$(KIT_CONFIG=/elsewhere KEEP_ME=1 GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=test.kept GIT_CONFIG_VALUE_0=yes \
|
|
148
|
-
bash "$F/
|
|
148
|
+
bash "$F/lib/core/test.sh" 2>&1)"; RC=$?
|
|
149
149
|
t "a test is sealed, unsigned, and keeps the rest of its environment" "$RC" "0"
|
|
150
150
|
[ "$RC" -eq 0 ] || printf '%s\n' "$OUT"
|
|
151
151
|
has "the runner reports what it sealed" "$OUT" "sealed 1 inherited"
|
|
152
152
|
|
|
153
153
|
# ── 5. the result directory is removed ─────────────────────────────────────────────────────────
|
|
154
|
-
left="$(TMPDIR="$tmp/td" bash -c 'mkdir -p "$TMPDIR" && bash "$0/
|
|
154
|
+
left="$(TMPDIR="$tmp/td" bash -c 'mkdir -p "$TMPDIR" && bash "$0/lib/core/test.sh" >/dev/null 2>&1; ls "$TMPDIR" | wc -l' "$F" | tr -d ' ')"
|
|
155
155
|
t "the runner leaves nothing in TMPDIR" "$left" "0"
|
|
156
156
|
|
|
157
157
|
[ "$fail" -eq 0 ] && echo "test-runner: all passed" || echo "test-runner: FAILURES"
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
# lines). Exits non-zero if any test fails. bash 3.2 compatible (no mapfile/associative arrays,
|
|
5
5
|
# no `wait -n`).
|
|
6
6
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
7
|
+
# lib/core/test.sh run every discovered test, several files at a time
|
|
8
|
+
# lib/core/test.sh <pattern> run only tests whose path matches <pattern> (grep -E)
|
|
9
|
+
# lib/core/test.sh -j <N> run at most N files at once (also: --jobs N, TEST_JOBS=N)
|
|
10
|
+
# lib/core/test.sh --serial one file at a time, in sorted order (same as -j 1)
|
|
11
|
+
# lib/core/test.sh --timings print wall seconds per file, slowest first (also: TEST_TIMINGS=1)
|
|
12
12
|
#
|
|
13
13
|
# Parallelism (#455). Test files are independent: each builds its fixtures under its own `mktemp -d`
|
|
14
14
|
# and none binds a fixed port, so files run N at a time. N defaults to the CPU count, capped at 8.
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
# output is captured to its own file, so the output of a failing test is printed whole, after the
|
|
21
21
|
# run, in sorted order — never interleaved with another file's.
|
|
22
22
|
#
|
|
23
|
-
# Folded into
|
|
23
|
+
# Folded into lib/core/check.sh and run in CI (.github/workflows/test.yml).
|
|
24
24
|
set -uo pipefail
|
|
25
|
-
cd "$(cd "$(dirname "$0")
|
|
25
|
+
cd "$(cd "$(dirname "$0")/../.." && pwd)"
|
|
26
26
|
|
|
27
27
|
note() { printf '%s\n' "$*" >&2; }
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ if [ "${1:-}" = "--run-one" ]; then
|
|
|
36
36
|
# set KIT_CONFIG, exports KIT_*/CCKIT_*/EFFORT_* that would point a test at the developer's
|
|
37
37
|
# project instead of its own fixture. Each test still sets whatever it needs itself.
|
|
38
38
|
# shellcheck source=/dev/null
|
|
39
|
-
.
|
|
39
|
+
. lib/core/test-env.sh
|
|
40
40
|
seal=(-u TEST_RUN_DIR)
|
|
41
41
|
while IFS= read -r a; do [ -n "$a" ] && seal+=("$a"); done < <(test_env_unset_args)
|
|
42
42
|
# Fixture commits are never signed (#455). A developer whose global git config sets
|
|
@@ -96,7 +96,7 @@ while IFS= read -r f; do
|
|
|
96
96
|
else
|
|
97
97
|
par+=("$f")
|
|
98
98
|
fi
|
|
99
|
-
done < <(find bin scripts -type f -name '*-test.sh' 2>/dev/null | sort)
|
|
99
|
+
done < <(find bin scripts lib -type f -name '*-test.sh' 2>/dev/null | sort)
|
|
100
100
|
|
|
101
101
|
if [ "${#tests[@]}" -eq 0 ]; then
|
|
102
102
|
note "test: no *-test.sh found${PATTERN:+ matching '$PATTERN'}"
|
|
@@ -104,7 +104,7 @@ if [ "${#tests[@]}" -eq 0 ]; then
|
|
|
104
104
|
fi
|
|
105
105
|
|
|
106
106
|
# shellcheck source=/dev/null
|
|
107
|
-
.
|
|
107
|
+
. lib/core/test-env.sh
|
|
108
108
|
sealed="$(test_env_unset_args | grep -c -- '^-u$')"
|
|
109
109
|
|
|
110
110
|
RUN_DIR="$(mktemp -d "${TMPDIR:-/tmp}/cckit-test.XXXXXX")" || { note "test: mktemp failed"; exit 1; }
|
|
@@ -122,11 +122,11 @@ began=$SECONDS
|
|
|
122
122
|
i=0; list=""
|
|
123
123
|
for t in ${par[@]+"${par[@]}"}; do list="$list$i $t"$'\n'; i=$((i+1)); done
|
|
124
124
|
if [ -n "$list" ]; then
|
|
125
|
-
printf '%s' "$list" | xargs -P "$JOBS" -n 2 bash
|
|
125
|
+
printf '%s' "$list" | xargs -P "$JOBS" -n 2 bash lib/core/test.sh --run-one
|
|
126
126
|
fi
|
|
127
127
|
if [ "${#ser[@]}" -gt 0 ]; then
|
|
128
128
|
note "==> ${#ser[@]} file(s) marked serial, run alone"
|
|
129
|
-
for t in "${ser[@]}"; do bash
|
|
129
|
+
for t in "${ser[@]}"; do bash lib/core/test.sh --run-one "$i" "$t"; i=$((i+1)); done
|
|
130
130
|
fi
|
|
131
131
|
took=$((SECONDS - began))
|
|
132
132
|
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
# command on the docs page is one this file runs.
|
|
24
24
|
#
|
|
25
25
|
# Network-free: the upgrade path skips the doctor preflight; every value gh would be asked for is in
|
|
26
|
-
# the fixture config. Everything lives under one mktemp dir. Run: bash
|
|
26
|
+
# the fixture config. Everything lives under one mktemp dir. Run: bash lib/core/update-path-test.sh
|
|
27
27
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
28
28
|
set -u
|
|
29
|
-
ROOT="$(cd "$(dirname "$0")
|
|
29
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
30
30
|
# shellcheck source=/dev/null
|
|
31
|
-
. "$ROOT/
|
|
31
|
+
. "$ROOT/lib/core/test-env.sh" && test_env_seal
|
|
32
32
|
CCKIT="$ROOT/bin/cckit"
|
|
33
33
|
PAGE="$ROOT/docs-site/src/content/docs/getting-started/update.mdx"
|
|
34
34
|
fail=0
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
# verbs-gen.sh — write or check the CLI reference page's generated block (#555). The block sits
|
|
3
3
|
# between the `verbs:begin` and `verbs:end` comment markers of
|
|
4
4
|
# docs-site/src/content/docs/cli-reference.mdx and is produced by verbs_reference_md from
|
|
5
|
-
#
|
|
5
|
+
# lib/core/verbs.tsv, the one source for every verb.
|
|
6
6
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
7
|
+
# lib/core/verbs-gen.sh rewrite the block from the table
|
|
8
|
+
# lib/core/verbs-gen.sh --check rc 0 when the block matches the table, 1 (and a diff) when not
|
|
9
|
+
# lib/core/verbs-gen.sh --root <dir> act on another checkout
|
|
10
10
|
# errors: strict — set -e; a page without both markers exits 1
|
|
11
11
|
set -euo pipefail
|
|
12
|
-
ROOT="$(cd "$(dirname "$0")
|
|
12
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
13
13
|
mode="write"
|
|
14
14
|
while [ $# -gt 0 ]; do
|
|
15
15
|
case "$1" in
|
|
@@ -20,9 +20,9 @@ while [ $# -gt 0 ]; do
|
|
|
20
20
|
esac
|
|
21
21
|
done
|
|
22
22
|
page="$ROOT/docs-site/src/content/docs/cli-reference.mdx"
|
|
23
|
-
VERBS_FILE="$ROOT/
|
|
23
|
+
VERBS_FILE="$ROOT/lib/core/verbs.tsv"; export VERBS_FILE
|
|
24
24
|
# shellcheck source=/dev/null
|
|
25
|
-
source "$ROOT/
|
|
25
|
+
source "$ROOT/lib/core/verbs.sh"
|
|
26
26
|
grep -q '{/\* verbs:begin' "$page" && grep -q '{/\* verbs:end' "$page" \
|
|
27
27
|
|| { echo "verbs-gen: $page lacks the verbs:begin / verbs:end markers" >&2; exit 1; }
|
|
28
28
|
|
|
@@ -34,8 +34,8 @@ awk -v blk="$tmp/block" '
|
|
|
34
34
|
!skip { print }' "$page" > "$tmp/page"
|
|
35
35
|
|
|
36
36
|
if [ "$mode" = check ]; then
|
|
37
|
-
if cmp -s "$page" "$tmp/page"; then echo "ok verbs-gen: the CLI reference block matches
|
|
38
|
-
echo "verbs-gen: the CLI reference block drifted from
|
|
37
|
+
if cmp -s "$page" "$tmp/page"; then echo "ok verbs-gen: the CLI reference block matches lib/core/verbs.tsv"; exit 0; fi
|
|
38
|
+
echo "verbs-gen: the CLI reference block drifted from lib/core/verbs.tsv (run: bash lib/core/verbs-gen.sh)" >&2
|
|
39
39
|
diff "$page" "$tmp/page" >&2 || true
|
|
40
40
|
exit 1
|
|
41
41
|
fi
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# shellcheck shell=bash
|
|
3
3
|
# verbs-help-test.sh — #556: every verb has help. `cckit <verb> --help` is answered by the dispatcher
|
|
4
|
-
# from
|
|
4
|
+
# from lib/core/verbs.tsv before the verb runs, so it exits 0, starts with the verb's usage, names
|
|
5
5
|
# its question and its prompt, and never reaches a parser that rejects --help. Runs every verb in a
|
|
6
6
|
# throwaway git repo with a stub `gh` that refuses everything, then checks the repo is untouched.
|
|
7
7
|
# No network, no port.
|
|
8
|
-
# Run: bash
|
|
8
|
+
# Run: bash lib/core/verbs-help-test.sh
|
|
9
9
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
10
10
|
set -u
|
|
11
|
-
ROOT="$(cd "$(dirname "$0")
|
|
11
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
12
12
|
fail=0
|
|
13
13
|
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
14
14
|
CCKIT="$ROOT/bin/cckit"
|
|
15
15
|
# shellcheck source=/dev/null
|
|
16
|
-
source "$ROOT/
|
|
16
|
+
source "$ROOT/lib/core/verbs.sh"
|
|
17
17
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
18
18
|
mkdir -p "$tmp/stub" "$tmp/repo" "$tmp/home"
|
|
19
19
|
printf '#!/bin/sh\necho "gh $*" >> "%s/gh.log"\nexit 1\n' "$tmp" > "$tmp/stub/gh"; chmod +x "$tmp/stub/gh"
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# shellcheck shell=bash
|
|
3
3
|
# verbs-ratchet-test.sh — #557: renames by ratchet. The top-level verb count may only go down
|
|
4
|
-
# (
|
|
4
|
+
# (lib/core/verbs-ratchet.sh against lib/core/verbs.baseline), and an old name still works: it prints a
|
|
5
5
|
# one-line notice and runs the verb it was renamed to. Fixture tables check the ratchet; the real
|
|
6
6
|
# dispatcher checks the alias path. No network, no port.
|
|
7
|
-
# Run: bash
|
|
7
|
+
# Run: bash lib/core/verbs-ratchet-test.sh
|
|
8
8
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
9
9
|
set -u
|
|
10
|
-
ROOT="$(cd "$(dirname "$0")
|
|
10
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
11
11
|
fail=0
|
|
12
12
|
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
13
13
|
has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> missing '$3'"; fail=1 ;; esac; }
|
|
14
14
|
CCKIT="$ROOT/bin/cckit"
|
|
15
15
|
# shellcheck source=/dev/null
|
|
16
|
-
source "$ROOT/
|
|
16
|
+
source "$ROOT/lib/core/verbs.sh"
|
|
17
17
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
18
18
|
|
|
19
19
|
# ── 1. the ratchet on the real table ──────────────────────────────────────────────────────────
|
|
20
|
-
out="$(bash "$ROOT/
|
|
20
|
+
out="$(bash "$ROOT/lib/core/verbs-ratchet.sh" 2>&1)"; rc=$?
|
|
21
21
|
t "the real table holds the baseline" "$rc" "0"
|
|
22
|
-
t "the baseline is the table's verb count" "$(awk '!/^#/ && NF { print $1; exit }' "$ROOT/
|
|
22
|
+
t "the baseline is the table's verb count" "$(awk '!/^#/ && NF { print $1; exit }' "$ROOT/lib/core/verbs.baseline")" "$(verbs_count)"
|
|
23
23
|
has "the ratchet says it only goes down" "$out" "it may only go down"
|
|
24
24
|
|
|
25
25
|
# ── 2. the ratchet on fixtures ────────────────────────────────────────────────────────────────
|
|
26
|
-
mkdir -p "$tmp/fx/
|
|
27
|
-
cp "$ROOT/
|
|
28
|
-
cp "$ROOT/
|
|
26
|
+
mkdir -p "$tmp/fx/lib/core"
|
|
27
|
+
cp "$ROOT/lib/core/verbs-ratchet.sh" "$tmp/fx/lib/core/"
|
|
28
|
+
cp "$ROOT/lib/core/verbs.sh" "$tmp/fx/lib/core/"
|
|
29
29
|
row() { printf '%s\tverb\t-\tg\tgit\t-\tno\tQ?\tP.\tcckit %s\n' "$1" "$1"; }
|
|
30
|
-
{ printf 'g\tgroup\t-\t-\t-\t-\t-\tWhat?\t-\t-\n'; row one; row two; } > "$tmp/fx/
|
|
31
|
-
ratchet() { bash "$tmp/fx/
|
|
30
|
+
{ printf 'g\tgroup\t-\t-\t-\t-\t-\tWhat?\t-\t-\n'; row one; row two; } > "$tmp/fx/lib/core/verbs.tsv"
|
|
31
|
+
ratchet() { bash "$tmp/fx/lib/core/verbs-ratchet.sh" --root "$tmp/fx" 2>&1; }
|
|
32
32
|
|
|
33
|
-
printf '# c\n2\n' > "$tmp/fx/
|
|
33
|
+
printf '# c\n2\n' > "$tmp/fx/lib/core/verbs.baseline"
|
|
34
34
|
ratchet >/dev/null; t "fixture: count equal to the baseline passes" "$?" "0"
|
|
35
|
-
row three >> "$tmp/fx/
|
|
35
|
+
row three >> "$tmp/fx/lib/core/verbs.tsv"
|
|
36
36
|
out="$(ratchet)"; rc=$?
|
|
37
37
|
t "fixture: a new top-level verb fails" "$rc" "1"
|
|
38
38
|
has "fixture: the refusal says where a new verb goes" "$out" "goes under an existing one"
|
|
39
|
-
printf '# c\n4\n' > "$tmp/fx/
|
|
39
|
+
printf '# c\n4\n' > "$tmp/fx/lib/core/verbs.baseline"
|
|
40
40
|
out="$(ratchet)"; rc=$?
|
|
41
41
|
t "fixture: a count below the baseline fails until the baseline drops" "$rc" "1"
|
|
42
|
-
has "fixture: the refusal names the number to write" "$out" "Lower
|
|
43
|
-
printf 'old\talias\tone\t-\tgit\t-\t-\t-\t-\t-\n' >> "$tmp/fx/
|
|
44
|
-
printf '3\n' > "$tmp/fx/
|
|
42
|
+
has "fixture: the refusal names the number to write" "$out" "Lower lib/core/verbs.baseline to 3"
|
|
43
|
+
printf 'old\talias\tone\t-\tgit\t-\t-\t-\t-\t-\n' >> "$tmp/fx/lib/core/verbs.tsv"
|
|
44
|
+
printf '3\n' > "$tmp/fx/lib/core/verbs.baseline"
|
|
45
45
|
ratchet >/dev/null; t "fixture: an alias row does not count" "$?" "0"
|
|
46
|
-
printf '# no number\n' > "$tmp/fx/
|
|
46
|
+
printf '# no number\n' > "$tmp/fx/lib/core/verbs.baseline"
|
|
47
47
|
ratchet >/dev/null; t "fixture: a baseline with no number is rc 2" "$?" "2"
|
|
48
48
|
|
|
49
49
|
# ── 3. the alias readers ──────────────────────────────────────────────────────────────────────
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# verbs-ratchet.sh — the top-level verb count may only go down (#557).
|
|
3
3
|
#
|
|
4
|
-
# Counts the `verb` rows of
|
|
5
|
-
# compares the count with the number in
|
|
4
|
+
# Counts the `verb` rows of lib/core/verbs.tsv (old names, `alias` rows, do not count) and
|
|
5
|
+
# compares the count with the number in lib/core/verbs.baseline:
|
|
6
6
|
# more than the baseline FAIL — a new top-level verb; add it as a subcommand of one that exists
|
|
7
7
|
# fewer than the baseline FAIL — lower the baseline to the new count in the same change
|
|
8
8
|
# equal ok
|
|
9
9
|
# A rename is the alias path: the old name becomes an `alias` row and keeps working, so a rename
|
|
10
10
|
# never changes the count. The ratchet only moves down.
|
|
11
11
|
#
|
|
12
|
-
# Usage: bash
|
|
12
|
+
# Usage: bash lib/core/verbs-ratchet.sh [--root <dir>]
|
|
13
13
|
# errors: strict — a gate: rc 1 on drift, rc 2 on a missing or malformed baseline
|
|
14
14
|
set -u
|
|
15
|
-
root="$(cd "$(dirname "$0")
|
|
15
|
+
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
16
16
|
[ "${1:-}" = "--root" ] && root="$2"
|
|
17
|
-
baseline_file="$root/
|
|
17
|
+
baseline_file="$root/lib/core/verbs.baseline"
|
|
18
18
|
# shellcheck source=/dev/null
|
|
19
|
-
source "$root/
|
|
20
|
-
export VERBS_FILE="$root/
|
|
19
|
+
source "$root/lib/core/verbs.sh"
|
|
20
|
+
export VERBS_FILE="$root/lib/core/verbs.tsv"
|
|
21
21
|
|
|
22
22
|
base="$(awk '!/^#/ && NF { print $1; exit }' "$baseline_file" 2>/dev/null)"
|
|
23
23
|
case "$base" in ''|*[!0-9]*) echo "x verbs ratchet: no number in $baseline_file" >&2; exit 2 ;; esac
|
|
@@ -28,7 +28,7 @@ if [ "$now" -gt "$base" ]; then
|
|
|
28
28
|
exit 1
|
|
29
29
|
fi
|
|
30
30
|
if [ "$now" -lt "$base" ]; then
|
|
31
|
-
echo "x verbs ratchet: $now top-level verbs, below the baseline of $base. Lower
|
|
31
|
+
echo "x verbs ratchet: $now top-level verbs, below the baseline of $base. Lower lib/core/verbs.baseline to $now in this change." >&2
|
|
32
32
|
exit 1
|
|
33
33
|
fi
|
|
34
34
|
echo "ok verbs ratchet: $now top-level verbs (baseline $base; it may only go down)"
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# shellcheck shell=bash
|
|
3
|
-
# verbs-test.sh — #555:
|
|
3
|
+
# verbs-test.sh — #555: lib/core/verbs.tsv is the one source for every cckit verb, and nothing that
|
|
4
4
|
# lists verbs drifts from it. Checks the table's shape, then compares it with the dispatcher's case
|
|
5
5
|
# labels, `cckit help`, `cckit commands` (human, --llm, --json), the completions, the generated block
|
|
6
|
-
# of the CLI reference page, skills/routing.yaml and
|
|
7
|
-
# checks the readers in
|
|
8
|
-
# Run: bash
|
|
6
|
+
# of the CLI reference page, skills/routing.yaml and lib/core/forge-report.sh --verbs. A fixture table
|
|
7
|
+
# checks the readers in lib/core/verbs.sh. No network, no port.
|
|
8
|
+
# Run: bash lib/core/verbs-test.sh
|
|
9
9
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
10
10
|
set -u
|
|
11
|
-
ROOT="$(cd "$(dirname "$0")
|
|
11
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
12
12
|
fail=0
|
|
13
13
|
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
14
14
|
has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> missing '$3'"; fail=1 ;; esac; }
|
|
15
|
-
TSV="$ROOT/
|
|
15
|
+
TSV="$ROOT/lib/core/verbs.tsv"
|
|
16
16
|
CCKIT="$ROOT/bin/cckit"
|
|
17
17
|
command -v jq >/dev/null 2>&1 || { echo "verbs-test: jq required" >&2; exit 1; }
|
|
18
18
|
# shellcheck source=/dev/null
|
|
19
|
-
source "$ROOT/
|
|
19
|
+
source "$ROOT/lib/core/verbs.sh"
|
|
20
20
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
21
21
|
|
|
22
22
|
# ── 1. the table's shape ─────────────────────────────────────────────────────────────────────────
|
|
@@ -71,33 +71,33 @@ t "commands --json: a multi-line usage is an array" "$(jq -r '.[] | select(.name
|
|
|
71
71
|
has "the completions read cckit commands" "$("$CCKIT" completions bash)" 'cckit commands'
|
|
72
72
|
|
|
73
73
|
# ── 4. the CLI reference page ───────────────────────────────────────────────────────────────────
|
|
74
|
-
out="$(bash "$ROOT/
|
|
74
|
+
out="$(bash "$ROOT/lib/core/verbs-gen.sh" --check 2>&1)"; rc=$?
|
|
75
75
|
t "the CLI reference block matches the table" "$rc" "0"
|
|
76
76
|
[ "$rc" -eq 0 ] || printf '%s\n' "$out" | sed -n 1,20p
|
|
77
77
|
page="$ROOT/docs-site/src/content/docs/cli-reference.mdx"
|
|
78
78
|
missing=""; for v in $(verbs_names verb); do grep -qE "\`cckit $v( |\`)" "$page" || missing="$missing $v"; done
|
|
79
79
|
t "the CLI reference names every verb" "$missing" ""
|
|
80
80
|
# The check sees drift: a fixture table with one more verb no longer matches the page.
|
|
81
|
-
mkdir -p "$tmp/fx/
|
|
82
|
-
cp "$ROOT/
|
|
83
|
-
cp "$ROOT/
|
|
81
|
+
mkdir -p "$tmp/fx/lib/core" "$tmp/fx/docs-site/src/content/docs"
|
|
82
|
+
cp "$ROOT/lib/core/verbs-gen.sh" "$tmp/fx/lib/core/"
|
|
83
|
+
cp "$ROOT/lib/core/verbs.sh" "$tmp/fx/lib/core/"
|
|
84
84
|
cp "$page" "$tmp/fx/docs-site/src/content/docs/"
|
|
85
|
-
{ cat "$TSV"; printf 'zzz\tverb\t-\tcatalog\tgit\t-\tno\tA new question?\tA new prompt.\tcckit zzz\n'; } > "$tmp/fx/
|
|
86
|
-
bash "$tmp/fx/
|
|
87
|
-
bash "$tmp/fx/
|
|
88
|
-
bash "$tmp/fx/
|
|
85
|
+
{ cat "$TSV"; printf 'zzz\tverb\t-\tcatalog\tgit\t-\tno\tA new question?\tA new prompt.\tcckit zzz\n'; } > "$tmp/fx/lib/core/verbs.tsv"
|
|
86
|
+
bash "$tmp/fx/lib/core/verbs-gen.sh" --check >/dev/null 2>&1; t "a verb added to the table fails the page check" "$?" "1"
|
|
87
|
+
bash "$tmp/fx/lib/core/verbs-gen.sh" >/dev/null 2>&1
|
|
88
|
+
bash "$tmp/fx/lib/core/verbs-gen.sh" --check >/dev/null 2>&1; t "regenerating the page clears it" "$?" "0"
|
|
89
89
|
has "the regenerated page carries the new verb" "$(cat "$tmp/fx/docs-site/src/content/docs/cli-reference.mdx")" '| `cckit zzz` | A new question? |'
|
|
90
90
|
|
|
91
91
|
# ── 5. skills/routing.yaml ──────────────────────────────────────────────────────────────────────
|
|
92
|
-
routed=" $(grep -E '^[[:space:]]+skill:' "$ROOT/skills/routing.yaml" | awk '{print $2}' | sort -u | tr '\n' ' ') "
|
|
92
|
+
routed=" $(grep -E '^[[:space:]]+skill:' "$ROOT/kit/skills/routing.yaml" | awk '{print $2}' | sort -u | tr '\n' ' ') "
|
|
93
93
|
bad=""; for s in $(verbs_rows | awk -F'\t' '$6 != "-" && $2 != "group" { print $6 }' | sort -u); do
|
|
94
|
-
[ -f "$ROOT/skills/$s/SKILL.md" ] || bad="$bad $s(no-skill)"
|
|
94
|
+
[ -f "$ROOT/kit/skills/$s/SKILL.md" ] || bad="$bad $s(no-skill)"
|
|
95
95
|
case "$routed" in *" $s "*) ;; *) bad="$bad $s(not-routed)" ;; esac
|
|
96
96
|
done
|
|
97
97
|
t "every skill the table names exists and is routed in skills/routing.yaml" "$bad" ""
|
|
98
98
|
|
|
99
|
-
# ── 6. needs matches
|
|
100
|
-
report="$(bash "$ROOT/
|
|
99
|
+
# ── 6. needs matches lib/core/forge-report.sh --verbs ────────────────────────────────────────────
|
|
100
|
+
report="$(bash "$ROOT/lib/core/forge-report.sh" --verbs | awk 'NR > 1 { print $1 "\t" $2 }')"
|
|
101
101
|
bad=""
|
|
102
102
|
while IFS=$'\t' read -r v yn; do
|
|
103
103
|
[ -n "$v" ] || continue
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# verbs.baseline — the top-level verb count lib/core/verbs-ratchet.sh holds the line at (#557).
|
|
2
|
+
# The number of `verb` rows in lib/core/verbs.tsv may only go down. A rename keeps the old name
|
|
3
|
+
# as an `alias` row, which does not count. When a verb is retired or folded under another, lower
|
|
4
|
+
# this number in the same change; the gate fails until you do.
|
|
5
|
+
38
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# verbs.sh — read
|
|
2
|
+
# verbs.sh — read lib/core/verbs.tsv, the one source for every cckit verb (#555): the grouped
|
|
3
3
|
# `cckit help`, the entry `cckit <verb> --help` prints, the `cckit commands` catalog and the alias
|
|
4
4
|
# path. Every reader of the verb list goes through these functions, so the file format lives here.
|
|
5
5
|
#
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# verbs_rows the data rows, tab-separated, comments and blanks dropped
|
|
8
8
|
# verbs_get <name> <col> one field of the non-group row named <name> (col 1-10); rc 1 if none
|
|
9
9
|
# verbs_names [kinds…] names of the rows of those kinds (default: verb default alias)
|
|
10
|
-
# verbs_count the number of `verb` rows (the ratchet in
|
|
10
|
+
# verbs_count the number of `verb` rows (the ratchet in lib/core/verbs.baseline)
|
|
11
11
|
# verbs_help the grouped help: one line per verb under each group's question
|
|
12
12
|
# verbs_entry <name> usage, question, prompt, needs and skill of one verb; rc 1 if none
|
|
13
13
|
# verbs_alias_target <name> the verb an old name runs, with any words after it; rc 1 when not an alias
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lib/core/verbs.tsv — the ONE source for every cckit verb (#555).
|
|
2
2
|
#
|
|
3
|
-
# Read by bin/cckit (help, `<verb> --help`, `commands`, the alias path), by
|
|
3
|
+
# Read by bin/cckit (help, `<verb> --help`, `commands`, the alias path), by lib/core/verbs.sh and
|
|
4
4
|
# by scripts/verbs-check.sh, which fails on drift between this file and the dispatcher's case labels,
|
|
5
|
-
# the CLI reference page, skills/routing.yaml and
|
|
5
|
+
# the CLI reference page, skills/routing.yaml and lib/core/forge-report.sh.
|
|
6
6
|
#
|
|
7
7
|
# Format: tab-separated, one row per line, exactly 10 fields; `#` lines and blank lines are skipped.
|
|
8
8
|
# 1 name the word typed after `cckit`
|
|
9
9
|
# 2 kind group a heading of `cckit help`; name = group id, question = the heading
|
|
10
10
|
# verb a top-level verb; the count of these rows is the ratchet in
|
|
11
|
-
#
|
|
11
|
+
# lib/core/verbs.baseline (it may only go down)
|
|
12
12
|
# default what bare `cckit` runs; never typed
|
|
13
13
|
# alias an old name; the dispatcher prints a one-line notice and runs <target>
|
|
14
14
|
# 3 target alias: the verb it runs, optionally followed by words (`agent lib`) · every other kind: -
|
|
15
15
|
# 4 group the group id the verb is listed under in `cckit help` (- for group and alias rows)
|
|
16
16
|
# 5 needs git runs on git alone
|
|
17
17
|
# forge reads or writes the forge (GitHub) when one is configured
|
|
18
|
-
# (
|
|
18
|
+
# (lib/core/forge-report.sh --verbs is the measurement; verbs-check compares)
|
|
19
19
|
# 6 skill the skill under skills/ that drives the verb, or -
|
|
20
20
|
# 7 ownhelp yes: after the entry, `cckit <verb> --help` also prints the verb's own help
|
|
21
21
|
# 8 question the question the verb answers, in the reader's words
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# only cckit.config.json.kitVersion, shipping releases whose .claude-plugin/plugin.json and
|
|
6
6
|
# package.json lagged behind. Guards: (1) vb_write stamps all four files, (2) publish.sh calls the
|
|
7
7
|
# shared bumper (no second implementation), (3) the repo's four version files currently agree.
|
|
8
|
-
# Run: bash
|
|
8
|
+
# Run: bash lib/core/version-bump-test.sh
|
|
9
9
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
10
10
|
set -u
|
|
11
11
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
@@ -15,13 +15,13 @@ command -v jq >/dev/null 2>&1 || { echo "version-bump-test: jq required" >&2; ex
|
|
|
15
15
|
|
|
16
16
|
# (1) vb_write stamps every surface — exercised against a throwaway copy of the four files.
|
|
17
17
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
18
|
-
mkdir -p "$tmp/.claude-plugin" "$tmp/docs-site" "$tmp/
|
|
18
|
+
mkdir -p "$tmp/.claude-plugin" "$tmp/docs-site" "$tmp/lib/core"
|
|
19
19
|
echo '{"kitVersion":"0.0.1"}' > "$tmp/cckit.config.json"
|
|
20
20
|
echo '{"version":"0.0.1"}' > "$tmp/.claude-plugin/plugin.json"
|
|
21
21
|
echo '{"version":"0.0.1"}' > "$tmp/package.json"
|
|
22
22
|
echo '{"version":"0.0.1"}' > "$tmp/docs-site/package.json"
|
|
23
|
-
cp "$ROOT/
|
|
24
|
-
(cd "$tmp" && bash
|
|
23
|
+
cp "$ROOT/lib/core/version-bump.sh" "$tmp/lib/core/version-bump.sh"
|
|
24
|
+
(cd "$tmp" && bash lib/core/version-bump.sh --write 9.9.9 >/dev/null 2>&1)
|
|
25
25
|
t "vb_write stamps cckit.config.json" "$(jq -r .kitVersion "$tmp/cckit.config.json")" "9.9.9"
|
|
26
26
|
t "vb_write stamps plugin.json" "$(jq -r .version "$tmp/.claude-plugin/plugin.json")" "9.9.9"
|
|
27
27
|
t "vb_write stamps package.json" "$(jq -r .version "$tmp/package.json")" "9.9.9"
|
|
@@ -29,9 +29,9 @@ t "vb_write stamps docs-site/package.json" "$(jq -r .version "$tmp/docs-site/pa
|
|
|
29
29
|
|
|
30
30
|
# (2) publish.sh delegates to the shared bumper — a reintroduced inline kitVersion jq is the drift.
|
|
31
31
|
t "publish.sh calls version-bump.sh --write" \
|
|
32
|
-
"$(grep -c 'version-bump.sh. --write' "$ROOT/
|
|
32
|
+
"$(grep -c 'version-bump.sh. --write' "$ROOT/lib/verbs/publish.sh")" "1"
|
|
33
33
|
t "publish.sh has no inline kitVersion bump" \
|
|
34
|
-
"$(grep -c 'kitVersion=' "$ROOT/
|
|
34
|
+
"$(grep -c 'kitVersion=' "$ROOT/lib/verbs/publish.sh")" "0"
|
|
35
35
|
|
|
36
36
|
# (3) the repo's four version surfaces agree RIGHT NOW (catches a drifted release after the fact).
|
|
37
37
|
v="$(jq -r .kitVersion "$ROOT/cckit.config.json")"
|
|
@@ -43,17 +43,38 @@ t "docs-site/package.json matches kitVersion ($v)" "$(jq -r .version "$ROOT/docs
|
|
|
43
43
|
# at 1.x it bumps the major. Driven end to end through the script, not through its functions.
|
|
44
44
|
vb_fixture_next() { # <tag> <subject> -> what --next prints
|
|
45
45
|
local r; r="$(mktemp -d)"
|
|
46
|
-
mkdir -p "$r/
|
|
46
|
+
mkdir -p "$r/lib/core"; cp "$ROOT/lib/core/version-bump.sh" "$r/lib/core/"
|
|
47
47
|
git -C "$r" init -q; git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "chore: seed"
|
|
48
48
|
git -C "$r" -c tag.gpgsign=false -c commit.gpgsign=false tag "v$1"
|
|
49
49
|
git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "$2"
|
|
50
|
-
(cd "$r" && bash
|
|
50
|
+
(cd "$r" && bash lib/core/version-bump.sh --next); rm -rf "$r"
|
|
51
51
|
}
|
|
52
52
|
t "fix at 0.10.0 -> 0.10.1" "$(vb_fixture_next 0.10.0 "fix: a")" "0.10.1"
|
|
53
53
|
t "feat at 0.10.0 -> 0.11.0" "$(vb_fixture_next 0.10.0 "feat: a")" "0.11.0"
|
|
54
54
|
t "feat! at 0.10.0 -> 0.11.0" "$(vb_fixture_next 0.10.0 "feat!: a")" "0.11.0"
|
|
55
55
|
t "feat! at 1.2.3 -> 2.0.0" "$(vb_fixture_next 1.2.3 "feat!: a")" "2.0.0"
|
|
56
56
|
|
|
57
|
+
# (4b) #625: a `Release-As: x.y.z` footer overrides the computed version, as in release-please;
|
|
58
|
+
# with several footers in the range the highest wins. Each extra argument is one more commit.
|
|
59
|
+
vb_fixture_next_many() { # <tag> <message>... -> what --next prints
|
|
60
|
+
local r m; r="$(mktemp -d)"
|
|
61
|
+
mkdir -p "$r/lib/core"; cp "$ROOT/lib/core/version-bump.sh" "$r/lib/core/"
|
|
62
|
+
git -C "$r" init -q; git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "chore: seed"
|
|
63
|
+
git -C "$r" -c tag.gpgsign=false -c commit.gpgsign=false tag "v$1"; shift
|
|
64
|
+
for m in "$@"; do git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "$m"; done
|
|
65
|
+
(cd "$r" && bash lib/core/version-bump.sh --next); rm -rf "$r"
|
|
66
|
+
}
|
|
67
|
+
t "Release-As footer at 0.12.0 -> 0.13.0" \
|
|
68
|
+
"$(vb_fixture_next_many 0.12.0 "fix: a" $'chore: release 0.13.0\n\nRelease-As: 0.13.0')" "0.13.0"
|
|
69
|
+
t "highest of two Release-As footers wins" \
|
|
70
|
+
"$(vb_fixture_next_many 0.12.0 $'chore: r\n\nRelease-As: 0.14.0' $'chore: r\n\nRelease-As: 0.13.5')" "0.14.0"
|
|
71
|
+
t "Release-As on a chore-only range still releases" \
|
|
72
|
+
"$(vb_fixture_next_many 0.12.0 $'chore: r\n\nRelease-As: 0.13.0')" "0.13.0"
|
|
73
|
+
t "Release-As in a subject is not a footer" \
|
|
74
|
+
"$(vb_fixture_next_many 0.12.0 "fix: mention Release-As: 9.9.9")" "0.12.1"
|
|
75
|
+
t "no footer keeps the computed bump" \
|
|
76
|
+
"$(vb_fixture_next_many 0.12.0 "fix: a" "docs: b")" "0.12.1"
|
|
77
|
+
|
|
57
78
|
# (5) the script and release-please agree: the config says bump-minor-pre-major, so a drift either
|
|
58
79
|
# way (config flag dropped, or the script going back to major below 1.0) fails here.
|
|
59
80
|
t "release-please-config.json has bump-minor-pre-major: true" \
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
# `feat:` -> minor; `fix|perf|refactor|revert:` -> patch; non-functional types
|
|
14
14
|
# (`docs|chore|style|test|ci|build`) and anything else -> none (no release).
|
|
15
15
|
# no commits -> none (no release).
|
|
16
|
+
# A `Release-As: x.y.z` footer in the range overrides the computed version, as release-please
|
|
17
|
+
# does; with several, the highest wins. `--next` and `--emit`'s `next=` print it.
|
|
16
18
|
# errors: strict — set -e; a bad manifest or missing tag propagates
|
|
17
19
|
set -euo pipefail
|
|
18
20
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
@@ -30,6 +32,12 @@ vb_level() {
|
|
|
30
32
|
echo none
|
|
31
33
|
}
|
|
32
34
|
|
|
35
|
+
vb_release_as() { # <range> -> the highest `Release-As: x.y.z` footer version, or nothing
|
|
36
|
+
git -C "$ROOT" log --format='%b' "$1" 2>/dev/null \
|
|
37
|
+
| sed -nE 's/^[Rr][Ee][Ll][Ee][Aa][Ss][Ee]-[Aa][Ss]:[[:space:]]*v?([0-9]+\.[0-9]+\.[0-9]+)[[:space:]]*$/\1/p' \
|
|
38
|
+
| sort -t. -k1,1n -k2,2n -k3,3n | tail -n 1
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
vb_next() {
|
|
34
42
|
local cur="${1:-0.0.0}" level="$2" M m p rest
|
|
35
43
|
M="${cur%%.*}"; rest="${cur#*.}"; m="${rest%%.*}"; p="${rest#*.}"
|
|
@@ -54,9 +62,14 @@ vb_write() {
|
|
|
54
62
|
|
|
55
63
|
_range() { local cur; cur="$(vb_current)"; if [ -n "$cur" ]; then echo "v$cur..HEAD"; else echo "HEAD"; fi; }
|
|
56
64
|
|
|
65
|
+
_next() { # the Release-As footer if the range has one, else the computed bump
|
|
66
|
+
local ra; ra="$(vb_release_as "$(_range)")"
|
|
67
|
+
if [ -n "$ra" ]; then echo "$ra"; else vb_next "$(vb_current)" "$(vb_level "$(_range)")"; fi
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
case "${1:-}" in
|
|
58
|
-
--next)
|
|
59
|
-
--emit) printf 'bump=%s\n' "$(vb_level "$(_range)")"; printf 'next=%s\n' "$(
|
|
71
|
+
--next) _next ;;
|
|
72
|
+
--emit) printf 'bump=%s\n' "$(vb_level "$(_range)")"; printf 'next=%s\n' "$(_next)" ;;
|
|
60
73
|
--write) vb_write "${2:?usage: --write <version>}" ;;
|
|
61
74
|
*) echo "usage: version-bump.sh --next | --emit | --write <version>" >&2; exit 2 ;;
|
|
62
75
|
esac
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# wave-result-test.sh — self-test for wave-result.sh under bash AND zsh, plus the wave-worker.sh
|
|
3
3
|
# wrapper that writes the records (E257.6, #263). Hermetic: KIT_STATE_DIR points at a temp dir.
|
|
4
|
-
# Run: bash
|
|
4
|
+
# Run: bash lib/core/wave-result-test.sh
|
|
5
5
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
6
6
|
|
|
7
7
|
dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|
|
@@ -12,7 +12,7 @@ if [ -n "${WR_TEST_INNER:-}" ]; then
|
|
|
12
12
|
. "$dir/wave-result.sh"
|
|
13
13
|
fail=0
|
|
14
14
|
t() { if [ "$2" = "$3" ]; then :; else echo "FAIL($WR_TEST_INNER): $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
15
|
-
worker="$dir/../wave-worker.sh"
|
|
15
|
+
worker="$dir/../verbs/wave-worker.sh"
|
|
16
16
|
|
|
17
17
|
# ── the three terminal values come from the exit status alone ───────────────────────────
|
|
18
18
|
t "rc 0 is success" "$(wr_classify_rc 0)" "success"
|