@jeiemgi/cckit 0.11.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 +22 -238
- package/README.md +66 -56
- package/SECURITY.md +4 -4
- package/bin/PROMPTS.md +12 -0
- package/bin/cckit +181 -140
- 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 +4 -4
- package/kit/skills/kit-advisor/SKILL.md +75 -0
- package/kit/skills/kit-advisor/references/close.md +53 -0
- package/kit/skills/kit-advisor/references/grill.md +69 -0
- package/kit/skills/kit-advisor/references/orchestrate.md +56 -0
- package/kit/skills/kit-advisor/references/plan.md +64 -0
- package/kit/skills/kit-advisor/references/review.md +47 -0
- package/kit/skills/kit-advisor/references/step-report.md +61 -0
- package/{skills → kit/skills}/kit-annotate/SKILL.md +2 -4
- package/{skills → kit/skills}/kit-autopilot/SKILL.md +7 -7
- package/{skills → kit/skills}/kit-cleanup/SKILL.md +4 -4
- 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 +20 -12
- package/{skills → kit/skills}/kit-effort-new/SKILL.md +17 -14
- package/{skills → kit/skills}/kit-effort-pr/SKILL.md +7 -7
- 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-next/SKILL.md +7 -7
- package/{skills → kit/skills}/kit-page/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-plan-next/SKILL.md +10 -11
- package/{skills → kit/skills}/kit-status/SKILL.md +6 -6
- 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-auto/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-pr-merge/SKILL.md +10 -10
- package/{skills → kit/skills}/kit-task-start/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-sync/SKILL.md +5 -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 +6 -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}/hooks/kit-mail-check.sh.tmpl +1 -1
- package/{templates → kit/templates}/instructions.md.tmpl +4 -21
- package/{templates → kit/templates}/kit.config.json.tmpl +0 -6
- package/{templates → kit/templates}/rules/authoring.md +7 -3
- package/{templates → kit/templates}/rules/branch-naming.md +3 -2
- package/{templates → kit/templates}/rules/delegation-brief.md +4 -0
- package/{templates → kit/templates}/rules/effort-model.md +34 -31
- package/{templates → kit/templates}/rules/gate-and-review.md +1 -1
- package/{templates → kit/templates}/rules/merge-safety.md +12 -9
- package/{templates → kit/templates}/rules/naming-and-ids.md +20 -24
- package/{templates → kit/templates}/rules/plan-next.md +5 -5
- package/{templates → kit/templates}/rules/react-annotate.md +0 -8
- package/{templates → kit/templates}/skills/campaign/SKILL.md +2 -2
- 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/lib/core/advisor-test.sh +55 -0
- 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 +4 -2
- package/{scripts/lib → lib/core}/agent-resolve.sh +5 -4
- 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 +17 -17
- 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 +8 -4
- package/{scripts/lib → lib/core}/effort-slug.sh +8 -7
- 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/lib/core/force-push-fence-test.sh +44 -0
- package/lib/core/force-push-fence.baseline +1 -0
- 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 +7 -7
- 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 +2 -2
- 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/lib/core/loose-issues-test.sh +102 -0
- package/lib/core/loose-issues.baseline +5 -0
- package/lib/core/loose-issues.sh +65 -0
- package/{scripts → lib/core}/marketing-walkthrough-test.sh +7 -7
- package/lib/core/naming-test.sh +112 -0
- package/lib/core/naming-verbs-test.sh +126 -0
- 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 +11 -7
- 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 +4 -4
- 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/lib/core/spec-lint-test.sh +63 -0
- package/lib/core/spec-lint.sh +95 -0
- package/{scripts/lib → lib/core}/stage-receipt-test.sh +136 -4
- package/{scripts/lib → lib/core}/stage-receipt.sh +186 -7
- 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 +24 -19
- package/{scripts → lib/core}/verbs-ratchet.sh +8 -8
- package/{scripts → lib/core}/verbs-test.sh +23 -23
- package/lib/core/verbs.baseline +5 -0
- package/{scripts/lib → lib/core}/verbs.sh +3 -3
- package/{scripts/lib → lib/core}/verbs.tsv +22 -20
- 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 +4 -4
- package/{scripts/lib → lib/core}/worker-brief.sh +1 -1
- 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-github.sh +18 -7
- package/{scripts/lib → lib/forge}/forge-test.sh +4 -4
- package/{scripts/lib → lib/forge}/forge.sh +1 -1
- package/lib/forge/gh-board-add-test.sh +118 -0
- package/lib/forge/gh-log.sh +59 -0
- package/lib/forge/gh-project-test.sh +251 -0
- package/lib/forge/gh-project.sh +379 -0
- package/{scripts/lib → lib/forge}/gh-rest-test.sh +17 -13
- package/{scripts/lib → lib/forge}/gh-rest.sh +190 -16
- package/{scripts/lib → lib/forge}/init-github.sh +18 -8
- package/{scripts/lib → lib/forge}/test-forge-shim.sh +2 -1
- 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 +7 -7
- package/{scripts/lib → lib/verbs}/captain-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/captain.sh +8 -8
- 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 +12 -12
- package/{scripts/lib → lib/verbs}/copilot-test.sh +15 -14
- package/{scripts/lib → lib/verbs}/copilot.sh +19 -19
- package/{scripts → lib/verbs}/database-supabase-test.sh +6 -6
- package/lib/verbs/effort-close-subs-test.sh +96 -0
- package/{scripts/lib → lib/verbs}/effort-dispatch-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-flows-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-ops-test.sh +111 -22
- package/lib/verbs/effort-ops.sh +1571 -0
- package/{scripts/lib → lib/verbs}/effort-parity-test.sh +47 -41
- package/{scripts/lib → lib/verbs}/effort-plan-test.sh +7 -7
- package/lib/verbs/effort-plan.sh +289 -0
- package/lib/verbs/effort-review-test.sh +107 -0
- package/lib/verbs/effort-review.sh +93 -0
- package/lib/verbs/grill-record-test.sh +49 -0
- package/lib/verbs/grill-record.sh +88 -0
- package/{scripts/lib → lib/verbs}/handoff.sh +3 -3
- 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 +44 -15
- package/{scripts/lib → lib/verbs}/kit-brief.sh +101 -16
- 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 +57 -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 +2 -2
- package/{scripts/lib → lib/verbs}/kit-lib.sh +10 -10
- 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 +5 -5
- 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 +25 -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 +20 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-merge-test.sh +46 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-test.sh +6 -6
- 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 +26 -11
- package/{scripts/lib → lib/verbs}/next-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/next.sh +10 -10
- 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 +13 -13
- 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/lib/verbs/sprint-test.sh +96 -0
- package/lib/verbs/sprint.sh +216 -0
- package/{scripts → lib/verbs}/status-test.sh +8 -8
- package/{scripts → lib/verbs}/status.sh +16 -16
- package/{scripts → lib/verbs}/task-sync-test.sh +40 -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 -70
- package/scripts/check.sh +12 -106
- package/scripts/force-push-fence.sh +14 -0
- 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 -971
- 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 -1243
- package/scripts/lib/effort-plan.sh +12 -287
- package/scripts/lib/effort.sh +13 -365
- package/scripts/lib/gh-log.sh +14 -59
- package/scripts/lib/gh-project.sh +13 -254
- package/scripts/lib/grill-record.sh +14 -0
- 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 -738
- package/scripts/lib/naming.sh +14 -0
- 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 +14 -0
- package/scripts/lib/worktree-issue.sh +12 -170
- package/scripts/lib/worktree-start.sh +13 -748
- 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 -370
- 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/lib/gh-project-test.sh +0 -135
- 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-docs-writer/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-onboard/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-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_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/code-retrieval.md +0 -0
- /package/{templates → kit/templates}/rules/communication-style.md +0 -0
- /package/{templates → kit/templates}/rules/design-routing.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/plain-language.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/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}/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/forge}/forge-none.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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# shellcheck shell=bash
|
|
3
|
+
# effort-close-subs-test.sh — `cckit effort close` closes only the finished subs (#565, decision 52).
|
|
4
|
+
# Hermetic: the forge shim (test-forge-shim.sh) answers like the REST API and logs `METHOD path {json}`;
|
|
5
|
+
# a throwaway git repo with a bare remote. Run: bash lib/verbs/effort-close-subs-test.sh
|
|
6
|
+
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
7
|
+
set -u
|
|
8
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
9
|
+
# shellcheck source=/dev/null
|
|
10
|
+
. "$ROOT/lib/core/test-env.sh" && test_env_seal
|
|
11
|
+
LIB="$ROOT/lib"
|
|
12
|
+
fail=0
|
|
13
|
+
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
14
|
+
tc() { if grep -qE "$2" "$1"; then echo "ok: $3"; else echo "FAIL: $3 (no /$2/ in $1)"; fail=1; fi; }
|
|
15
|
+
command -v jq >/dev/null 2>&1 || { echo "effort-close-subs-test: jq required" >&2; exit 1; }
|
|
16
|
+
command -v git >/dev/null 2>&1 || { echo "effort-close-subs-test: git required" >&2; exit 1; }
|
|
17
|
+
|
|
18
|
+
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
19
|
+
export GH_LOG="$tmp/gh.log"; export GH_N="$tmp/n"; : > "$GH_LOG"; printf '0' > "$GH_N"
|
|
20
|
+
stub="$tmp/bin"
|
|
21
|
+
# shellcheck source=/dev/null
|
|
22
|
+
. "$LIB/forge/test-forge-shim.sh"; forge_shim_install "$stub"
|
|
23
|
+
export PATH="$stub:$PATH" GH_TOKEN=test-token CCKIT_FORGE=github
|
|
24
|
+
export GH_TITLE="[E66] demo effort" GH_LABELS='[{"name":"kind:task"}]'
|
|
25
|
+
export GH_HEAD="effort/66-demo" GH_BASE="main" GH_MERGEABLE=true
|
|
26
|
+
export GH_BODY='## Goal\nship it\n\n## Spec\n- it ships'
|
|
27
|
+
# Effort #66 has four subs: 601 already closed, 602 open but delivered by a `Closes #602` commit,
|
|
28
|
+
# 603 open but delivered by a commit tagged with its step id [E66.3], 604 open and delivered by
|
|
29
|
+
# nothing — the one that must stay open.
|
|
30
|
+
export GH_FIXTURE="$tmp/fixture.sh"
|
|
31
|
+
cat > "$GH_FIXTURE" <<'SH'
|
|
32
|
+
case "$method $ep" in
|
|
33
|
+
"GET repos/o/r/issues/66/sub_issues")
|
|
34
|
+
out='[{"number":601,"state":"closed","title":"[E66.1] first"},
|
|
35
|
+
{"number":602,"state":"open","title":"[E66.2] second"},
|
|
36
|
+
{"number":603,"state":"open","title":"[E66.3] third"},
|
|
37
|
+
{"number":604,"state":"open","title":"[E66.4] release later"}]' ;;
|
|
38
|
+
esac
|
|
39
|
+
SH
|
|
40
|
+
export KIT_REPO="o/r" EFFORT_REPO="o/r" KIT_BASE_BRANCH="main" KIT_WT_INSTALL=0
|
|
41
|
+
# shellcheck source=/dev/null
|
|
42
|
+
source "$LIB/core/effort.sh" 2>/dev/null
|
|
43
|
+
# shellcheck source=/dev/null
|
|
44
|
+
source "$LIB/verbs/effort-ops.sh"
|
|
45
|
+
|
|
46
|
+
# ── the pure partition ───────────────────────────────────────────────────────────────────────────
|
|
47
|
+
refs="$(printf '#602\nE66.3\n')"
|
|
48
|
+
part="$(printf '%s\n' "601|closed|[E66.1] a" "602|open|[E66.2] b" "603|OPEN|[E66.3] c" "604|open|[E66.4] d" "605|open|[E67.3] e" \
|
|
49
|
+
| _eo_partition_subs 66 "$refs" | tr '\n' ' ')"
|
|
50
|
+
t "partition: closed, #-delivered and step-delivered are done; the rest stay open" "$part" \
|
|
51
|
+
"done|601|closed done|602|open done|603|open open|604|[E66.4] d open|605|[E67.3] e "
|
|
52
|
+
t "partition: no subs → no output" "$(printf '' | _eo_partition_subs 66 "$refs")" ""
|
|
53
|
+
|
|
54
|
+
# ── --help answers without resolving an effort (#578) ─────────────────────────────────────────────
|
|
55
|
+
: > "$GH_LOG"
|
|
56
|
+
h="$(effort_close --help 2>&1)"; rc=$?
|
|
57
|
+
t "effort close --help exits 0" "$rc" "0"
|
|
58
|
+
case "$h" in "cckit effort close"*) echo "ok: effort close --help prints the usage" ;; *) echo "FAIL: effort close --help: $h"; fail=1 ;; esac
|
|
59
|
+
h="$(effort_pr --help 2>&1)"; rc=$?
|
|
60
|
+
t "effort pr --help exits 0" "$rc" "0"
|
|
61
|
+
case "$h" in "cckit effort pr"*) echo "ok: effort pr --help prints the usage" ;; *) echo "FAIL: effort pr --help: $h"; fail=1 ;; esac
|
|
62
|
+
t "--help made no forge call" "$(grep -c . "$GH_LOG")" "0"
|
|
63
|
+
|
|
64
|
+
# ── effort close with one unfinished sub ─────────────────────────────────────────────────────────
|
|
65
|
+
( cd "$tmp" && git init -q --bare remote.git )
|
|
66
|
+
( cd "$tmp" && git clone -q remote.git work 2>/dev/null \
|
|
67
|
+
&& cd work && git -c user.email=t@t -c user.name=t commit -q --allow-empty -m init \
|
|
68
|
+
&& git push -q origin HEAD:main )
|
|
69
|
+
cd "$tmp/work" || exit 1
|
|
70
|
+
effort_start 66 demo >/dev/null 2>&1
|
|
71
|
+
cd "$tmp/work/.claude/worktrees/effort+66-demo" || { echo "FAIL: no effort worktree"; exit 1; }
|
|
72
|
+
c() { git -c user.email=t@t -c user.name=t commit -q --allow-empty -m "$1"; }
|
|
73
|
+
c "$(printf 'feat: second step [E66.2]\n\nCloses #602')"
|
|
74
|
+
c "feat: third step [E66.3]"
|
|
75
|
+
c "docs: mention #604 is follow-up work (#602)" # names #604, but its last #ref is #602
|
|
76
|
+
|
|
77
|
+
: > "$GH_LOG"
|
|
78
|
+
out="$(effort_close 66 2>&1)"; rc=$?
|
|
79
|
+
cd "$tmp/work" || exit 1
|
|
80
|
+
t "close succeeds with an open sub (rc 0)" "$rc" "0"
|
|
81
|
+
tc "$GH_LOG" '^PUT repos/o/r/pulls/[0-9]+/merge ' "close squash-merges the effort PR"
|
|
82
|
+
tc "$GH_LOG" '^PATCH repos/o/r/issues/66 \{"state":"closed","state_reason":"completed"\}$' "close closes the parent"
|
|
83
|
+
tc "$GH_LOG" '^PATCH repos/o/r/issues/602 \{"state":"closed","state_reason":"completed"\}$' "close closes the sub a commit closes"
|
|
84
|
+
tc "$GH_LOG" '^PATCH repos/o/r/issues/603 \{"state":"closed","state_reason":"completed"\}$' "close closes the sub a step tag delivers"
|
|
85
|
+
t "close does not re-close the already-closed sub" "$(grep -c '^PATCH repos/o/r/issues/601 ' "$GH_LOG")" "0"
|
|
86
|
+
t "close leaves the unfinished sub open (no write to #604)" "$(grep -cE '^(PATCH|POST|PUT|DELETE) repos/o/r/issues/604' "$GH_LOG")" "0"
|
|
87
|
+
t "close detaches nothing (no DELETE of any kind)" "$(grep -c '^DELETE ' "$GH_LOG")" "0"
|
|
88
|
+
tc "$GH_LOG" '^POST repos/o/r/issues/66/comments .*Finished sub-issues: #601, #602, #603' "the close comment lists the finished subs"
|
|
89
|
+
tc "$GH_LOG" '^POST repos/o/r/issues/66/comments .*Left open, still linked.*- #604 \[E66\.4\] release later' "the close comment lists the open sub"
|
|
90
|
+
t "the comment is posted before the parent closes" \
|
|
91
|
+
"$(grep -nE '^POST repos/o/r/issues/66/comments |^PATCH repos/o/r/issues/66 ' "$GH_LOG" | sed -E 's/^[0-9]+:(POST|PATCH).*/\1/' | tr '\n' ' ')" "POST PATCH "
|
|
92
|
+
case "$out" in *"left open: sub #604"*) echo "ok: the output flags the open sub as it closes" ;; *) echo "FAIL: no left-open line: $out"; fail=1 ;; esac
|
|
93
|
+
case "$out" in *"closed with unfinished sub-issues still open"*"#604"*) echo "ok: the report ends with the open sub" ;; *) echo "FAIL: no closing report of the open sub: $out"; fail=1 ;; esac
|
|
94
|
+
t "no gh subcommand ran" "$(grep -c '^GH-SUBCOMMAND' "$GH_LOG")" "0"
|
|
95
|
+
|
|
96
|
+
[ "$fail" = 0 ] && echo "ALL OK (effort-close-subs)" || { echo "effort-close-subs: FAILURES"; exit 1; }
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# unset, `_eff_base` fell back to main, and `cckit effort start` silently created worktrees from
|
|
6
6
|
# origin/main on a non-main-based repo (and the KIT_PROJECTS_V2 board guard never fired via the CLI).
|
|
7
7
|
# Static contract test over bin/cckit: extract the branch block, assert load_kit_config comes first.
|
|
8
|
-
# Run: bash
|
|
8
|
+
# Run: bash lib/verbs/effort-dispatch-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)"
|
|
@@ -18,16 +18,16 @@ blk="$(awk '/^ effort\)/{f=1} f{print} f && /^ ;;$/{exit}' "$BIN")"
|
|
|
18
18
|
t "effort) branch found" "$([ -n "$blk" ] && echo yes)" "yes"
|
|
19
19
|
|
|
20
20
|
cfg_ln="$(printf '%s\n' "$blk" | grep -n 'load_kit_config' | sed -n 1p | cut -d: -f1)"
|
|
21
|
-
lib_ln="$(printf '%s\n' "$blk" | grep -n 'source "\$LIB/effort\.sh"' | sed -n 1p | cut -d: -f1)"
|
|
21
|
+
lib_ln="$(printf '%s\n' "$blk" | grep -n 'source "\$LIB/core/effort\.sh"' | sed -n 1p | cut -d: -f1)"
|
|
22
22
|
t "effort) loads the project config" "$([ -n "$cfg_ln" ] && echo yes)" "yes"
|
|
23
23
|
t "config load precedes the effort libs" "$([ -n "$cfg_ln" ] && [ -n "$lib_ln" ] && [ "$cfg_ln" -lt "$lib_ln" ] && echo yes)" "yes"
|
|
24
24
|
|
|
25
25
|
# #243: every effort subcommand the usage advertises must actually dispatch, `chain` included
|
|
26
26
|
# — a docs/code drift guard (a subcommand documented but not wired falls through to the usage line).
|
|
27
27
|
# The usage lives in the verb table (#555): one `cckit effort <sub>` line per subcommand.
|
|
28
|
-
usage_subs="$(awk -F'\t' '$1 == "effort" && $2 == "verb" { print $10 }' "$(dirname "$BIN")/../
|
|
29
|
-
| sed 's/\\n/\n/g' | awk '$1 == "cckit" && $2 == "effort" { printf "%s%s", sep, $3; sep = " " }')"
|
|
30
|
-
t "the verb table's usage lists the effort subcommands" "$usage_subs" "new chain start pr close plan"
|
|
28
|
+
usage_subs="$(awk -F'\t' '$1 == "effort" && $2 == "verb" { print $10 }' "$(dirname "$BIN")/../lib/core/verbs.tsv" \
|
|
29
|
+
| sed 's/\\n/\n/g' | awk '$1 == "cckit" && $2 == "effort" && !seen[$3]++ { printf "%s%s", sep, $3; sep = " " }')"
|
|
30
|
+
t "the verb table's usage lists the effort subcommands" "$usage_subs" "new sub retitle chain start pr close plan sprint review"
|
|
31
31
|
for s in $usage_subs; do
|
|
32
32
|
t "effort) dispatches '$s'" \
|
|
33
33
|
"$(printf '%s\n' "$blk" | grep -cE "^ ${s}\)" | tr -d ' ')" "1"
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
# `cckit effort new --flow X` works out of the box in any configured repo. Resolution order:
|
|
5
5
|
# explicit EFFORT_FLOWS env var (wins) -> effort.flows[] in the project config -> built-in default.
|
|
6
6
|
# Hermetic: throwaway configs pointed at via KIT_CONFIG (no network, no gh).
|
|
7
|
-
# Run: bash
|
|
7
|
+
# Run: bash lib/verbs/effort-flows-test.sh
|
|
8
8
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
9
9
|
set -u
|
|
10
10
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
11
|
-
LIB="$ROOT/
|
|
11
|
+
LIB="$ROOT/lib"
|
|
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
|
command -v jq >/dev/null 2>&1 || { echo "effort-flows-test: jq required — skipping"; exit 0; }
|
|
@@ -22,7 +22,7 @@ printf '%s' '{"github":{"repo":"o/r"}}' > "$tmp/noflows.json"
|
|
|
22
22
|
flows_for() {
|
|
23
23
|
local cfg="$1"; shift
|
|
24
24
|
env -i PATH="$PATH" HOME="${HOME:-/tmp}" KIT_CONFIG="$cfg" KIT_REPO="o/r" "$@" \
|
|
25
|
-
bash -c "source '$LIB/effort.sh' 2>/dev/null; printf '%s' \"\$EFFORT_FLOWS\""
|
|
25
|
+
bash -c "source '$LIB/core/effort.sh' 2>/dev/null; printf '%s' \"\$EFFORT_FLOWS\""
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
# 1. effort.flows[] in the config replaces the built-in default.
|
|
@@ -41,7 +41,7 @@ t "exported KIT_EFFORT_FLOWS is honored" \
|
|
|
41
41
|
# 5. the title lint enforces the CONFIGURED vocabulary.
|
|
42
42
|
lint_rc() {
|
|
43
43
|
env -i PATH="$PATH" HOME="${HOME:-/tmp}" KIT_CONFIG="$tmp/flows.json" KIT_REPO="o/r" \
|
|
44
|
-
bash -c "source '$LIB/effort.sh' 2>/dev/null; effort_title_lint \"\$1\" >/dev/null 2>&1" _ "$1"
|
|
44
|
+
bash -c "source '$LIB/core/effort.sh' 2>/dev/null; effort_title_lint \"\$1\" >/dev/null 2>&1" _ "$1"
|
|
45
45
|
}
|
|
46
46
|
lint_rc "[Effort] 9 · [Growth] faster onboarding"; t "lint accepts a config flow" "$?" "0"
|
|
47
47
|
lint_rc "[Effort] 9 · [Core] faster onboarding"; t "lint rejects a flow outside the config vocabulary" "$?" "1"
|
|
@@ -49,7 +49,7 @@ lint_rc "[Effort] 9 · [Core] faster onboarding"; t "lint rejects a flow outsi
|
|
|
49
49
|
# 6. load_kit_config exports KIT_EFFORT_FLOWS (space-joined) for every downstream consumer.
|
|
50
50
|
t "load_kit_config exports KIT_EFFORT_FLOWS" \
|
|
51
51
|
"$(env -i PATH="$PATH" HOME="${HOME:-/tmp}" KIT_CONFIG="$tmp/flows.json" \
|
|
52
|
-
bash -c "source '$LIB/kit-config.sh'; load_kit_config >/dev/null 2>&1; printf '%s' \"\$KIT_EFFORT_FLOWS\"")" \
|
|
52
|
+
bash -c "source '$LIB/core/kit-config.sh'; load_kit_config >/dev/null 2>&1; printf '%s' \"\$KIT_EFFORT_FLOWS\"")" \
|
|
53
53
|
"Growth Checkout Platform"
|
|
54
54
|
|
|
55
55
|
[ "$fail" -eq 0 ] && echo "ALL OK (effort-flows)" || echo "effort-flows: FAILURES"
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
# shellcheck shell=bash
|
|
3
3
|
# effort-ops-test.sh — covers the effort lifecycle ops (#48). Hermetic: the forge shim
|
|
4
4
|
# (test-forge-shim.sh) answers like the REST API over a curl stand-in and logs `METHOD path {json}`;
|
|
5
|
-
# a throwaway git repo with a bare remote. Run: bash
|
|
5
|
+
# a throwaway git repo with a bare remote. Run: bash lib/verbs/effort-ops-test.sh
|
|
6
6
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
7
7
|
set -u
|
|
8
8
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
9
9
|
# Sealed from the caller's KIT_*/CCKIT_*/EFFORT_* (#369): this suite builds its own fixture.
|
|
10
10
|
# shellcheck source=/dev/null
|
|
11
|
-
. "$ROOT/
|
|
12
|
-
LIB="$ROOT/
|
|
13
|
-
SCRIPTS="$ROOT/
|
|
11
|
+
. "$ROOT/lib/core/test-env.sh" && test_env_seal
|
|
12
|
+
LIB="$ROOT/lib"
|
|
13
|
+
SCRIPTS="$ROOT/lib"
|
|
14
14
|
fail=0
|
|
15
15
|
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
16
16
|
tc() { if grep -qE "$2" "$1"; then echo "ok: $3"; else echo "FAIL: $3 (no /$2/ in gh log)"; fail=1; fi; }
|
|
@@ -25,10 +25,14 @@ export GH_LOG="$tmp/gh.log"; export GH_N="$tmp/n"; : > "$GH_LOG"; printf '0' > "
|
|
|
25
25
|
# effort_pr reads is #99 (GH_TITLE/GH_LABELS); its PR is #9 from effort/99-demo onto main.
|
|
26
26
|
stub="$tmp/bin"
|
|
27
27
|
# shellcheck source=/dev/null
|
|
28
|
-
. "$LIB/test-forge-shim.sh"; forge_shim_install "$stub"
|
|
28
|
+
. "$LIB/forge/test-forge-shim.sh"; forge_shim_install "$stub"
|
|
29
29
|
export PATH="$stub:$PATH" GH_TOKEN=test-token CCKIT_FORGE=github
|
|
30
30
|
export GH_TITLE="[Effort] 99 · demo effort" GH_LABELS='[{"name":"role:tech-lead"},{"name":"kind:task"}]'
|
|
31
31
|
export GH_HEAD="effort/99-demo" GH_BASE="main" GH_MERGEABLE=true
|
|
32
|
+
# The parent body every GET issues/<n> answers (JSON-escaped): it carries a Spec, so effort_close
|
|
33
|
+
# goes past its Spec check (E546.5). The Spec cases below override it.
|
|
34
|
+
SPEC_BODY='## Goal\nship it\n\n## Spec\n- it ships'
|
|
35
|
+
export GH_BODY="$SPEC_BODY"
|
|
32
36
|
# What the shim does not know, answered by request (GH_FIXTURE is sourced after the shim's own case):
|
|
33
37
|
# GH_DEP_PRS the open PRs based on the effort branch (REST shape), to GET pulls?base=… (#358)
|
|
34
38
|
# GH_DEP_PRS_RC an HTTP status that makes that read fail · GH_PR_EDIT_RC=1 fails the re-target PATCH
|
|
@@ -52,17 +56,19 @@ no_gh() { t "$1: no gh subcommand ran" "$(grep -c '^GH-SUBCOMMAND' "$GH_LOG")" "
|
|
|
52
56
|
export KIT_REPO="o/r" EFFORT_REPO="o/r" KIT_BASE_BRANCH="main"
|
|
53
57
|
export KIT_WT_INSTALL=0 # #119: skip the dependency install during the hermetic worktree bootstrap
|
|
54
58
|
# shellcheck source=/dev/null
|
|
55
|
-
source "$LIB/effort.sh" 2>/dev/null
|
|
59
|
+
source "$LIB/core/effort.sh" 2>/dev/null
|
|
56
60
|
# shellcheck source=/dev/null
|
|
57
|
-
source "$LIB/effort-ops.sh"
|
|
61
|
+
source "$LIB/verbs/effort-ops.sh"
|
|
58
62
|
|
|
59
63
|
# ── effort_new ────────────────────────────────────────────────────────────────────────────────
|
|
60
64
|
: > "$GH_LOG"
|
|
61
|
-
parent="$(effort_new --flow Core "demo effort" "first sub" "second sub" 2>/dev/null)"
|
|
65
|
+
parent="$(effort_new --flow Core --spec "it ships" "demo effort" "first sub" "second sub" 2>/dev/null)"
|
|
62
66
|
t "effort_new returns the parent number" "$parent" "1"
|
|
63
67
|
t "effort_new creates parent + 2 subs (3 issues)" "$(grep -cE "$CREATE_RE" "$GH_LOG")" "3"
|
|
64
68
|
t "effort_new links 2 native sub-issues" "$(grep -c '^POST repos/o/r/issues/1/sub_issues ' "$GH_LOG")" "2"
|
|
65
|
-
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"
|
|
69
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"demo effort"' "effort_new files the parent under its name"
|
|
70
|
+
tc "$GH_LOG" '^PATCH repos/o/r/issues/1 \{"title":"\[E1\] demo effort"\}$' "effort_new renames the parent [E<n>] <name>, no [Flow] tag"
|
|
71
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"\[E1\.2\] second sub"' "effort_new titles a sub [E<n>.<step>] <name>"
|
|
66
72
|
# every kit-defined label is ensured (created idempotently) BEFORE the issue create uses it (#153)
|
|
67
73
|
tc "$GH_LOG" '^POST repos/o/r/labels \{"name":"ctx:' "effort_new ensures the ctx:* label exists"
|
|
68
74
|
tc "$GH_LOG" '^POST repos/o/r/labels \{"name":"kind:task"' "effort_new ensures the kind label exists"
|
|
@@ -75,6 +81,63 @@ effort_new "refactor the whole scripts/kit wiring layer" >/dev/null 2>&1 && rc=0
|
|
|
75
81
|
t "effort_new rejects a bad title" "$rc" "1"
|
|
76
82
|
t "effort_new creates nothing on a bad title" "$(grep -cE "$CREATE_RE" "$GH_LOG")" "0"
|
|
77
83
|
|
|
84
|
+
# ── E546.5: the ## Spec section — checked before any forge write ──────────────────────────────
|
|
85
|
+
: > "$GH_LOG"
|
|
86
|
+
err="$(effort_new "demo effort" "first sub" 2>&1 >/dev/null)" && rc=0 || rc=1
|
|
87
|
+
t "effort_new refuses a body without a Spec" "$rc" "1"
|
|
88
|
+
t "effort_new writes nothing without a Spec" "$(grep -c . "$GH_LOG")" "0"
|
|
89
|
+
case "$err" in *"no list item"*"--spec"*) echo "ok: the refusal gives the reason and the flag" ;; *) echo "FAIL: no-Spec refusal: $err"; fail=1 ;; esac
|
|
90
|
+
: > "$GH_LOG"
|
|
91
|
+
effort_new --spec "TBD" "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
92
|
+
t "effort_new refuses a placeholder-only Spec" "$rc" "1"
|
|
93
|
+
t "effort_new writes nothing on a placeholder" "$(grep -c . "$GH_LOG")" "0"
|
|
94
|
+
: > "$GH_LOG"
|
|
95
|
+
effort_new --spec-file "$tmp/no-such-spec" "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
96
|
+
t "effort_new refuses an unreadable --spec-file" "$rc" "1"
|
|
97
|
+
t "effort_new writes nothing on that refusal" "$(grep -c . "$GH_LOG")" "0"
|
|
98
|
+
printf '1. new refuses without it\n2. close re-checks it\n' > "$tmp/spec.md"
|
|
99
|
+
: > "$GH_LOG"
|
|
100
|
+
effort_new --spec-file "$tmp/spec.md" "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
101
|
+
t "effort_new takes the Spec from --spec-file" "$rc" "0"
|
|
102
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"demo effort","body":"## Goal\\n[^"]*\\n\\n## Spec\\n1\. new refuses without it\\n2\. close re-checks it\\n\\n## Scope' \
|
|
103
|
+
"the Spec section sits after Goal, the list kept as written"
|
|
104
|
+
: > "$GH_LOG"
|
|
105
|
+
effort_sub 99 "third step" --spec "TODO" >/dev/null 2>&1 && rc=0 || rc=1
|
|
106
|
+
t "effort_sub refuses a placeholder --spec" "$rc" "1"
|
|
107
|
+
t "effort_sub writes nothing on that refusal" "$(grep -c . "$GH_LOG")" "0"
|
|
108
|
+
: > "$GH_LOG"
|
|
109
|
+
GH_LABELS='[{"name":"effort"},{"name":"kind:task"}]' effort_sub 99 "third step" --body "one line" --spec "the step lands" >/dev/null 2>&1
|
|
110
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"\[E99\.3\] third step","body":"one line\\n\\n## Spec\\n- the step lands\\n\\nSub-issue of #99' \
|
|
111
|
+
"effort_sub --spec adds a one-line Spec to the sub body"
|
|
112
|
+
|
|
113
|
+
# ── E547.2: the ## Grilling record — linted before any forge write, appended last ───────────────
|
|
114
|
+
: > "$GH_LOG"
|
|
115
|
+
err="$(effort_new --spec "it ships" --grilling "1. only one decision" "demo effort" 2>&1 >/dev/null)" && rc=0 || rc=1
|
|
116
|
+
t "effort_new refuses a Grilling record that is not one" "$rc" "1"
|
|
117
|
+
t "effort_new writes nothing on a bad Grilling record" "$(grep -c . "$GH_LOG")" "0"
|
|
118
|
+
case "$err" in *"Grilled:"*"--grilling"*) echo "ok: the Grilling refusal names the missing line and the flag" ;; *) echo "FAIL: Grilling refusal: $err"; fail=1 ;; esac
|
|
119
|
+
printf 'Grilled: the owner, 2026-11-24, in session.\n1. a sprint is one week\n2. waves run inside it\n3. the advisor writes no code\n' > "$tmp/grill.md"
|
|
120
|
+
: > "$GH_LOG"
|
|
121
|
+
effort_new --spec "it ships" --grilling-file "$tmp/grill.md" "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
122
|
+
t "effort_new accepts the grill stage's record" "$rc" "0"
|
|
123
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"demo effort","body":"## Goal[^"]*## Verification\\n[^"]*\\n\\n## Grilling\\n\\nGrilled: the owner, 2026-11-24, in session\.\\n1\. a sprint is one week' \
|
|
124
|
+
"the Grilling section closes the body, the record kept as written"
|
|
125
|
+
: > "$GH_LOG"
|
|
126
|
+
effort_new --spec "it ships" --grilling-file "$tmp/no-such-grill" "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
127
|
+
t "effort_new refuses an unreadable --grilling-file" "$rc" "1"
|
|
128
|
+
|
|
129
|
+
# ── #570: --sprint files the effort into a week's sprint ────────────────────────────────────────
|
|
130
|
+
: > "$GH_LOG"
|
|
131
|
+
effort_new --spec "it ships" --sprint=2026-11-25 "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
132
|
+
t "effort_new --sprint=<day> files the effort" "$rc" "0"
|
|
133
|
+
tc "$GH_LOG" '^POST repos/o/r/milestones \{"title":"2026-W48"' "effort_new --sprint opens the sprint milestone"
|
|
134
|
+
tc "$GH_LOG" '^POST repos/o/r/issues \{"title":"demo effort","body":"[^"]*\\n\\n## Sprint\\n2026-W48 · Monday 2026-11-23 to Monday 2026-11-30"' \
|
|
135
|
+
"the body names the sprint and its Monday-to-Monday bounds"
|
|
136
|
+
: > "$GH_LOG"
|
|
137
|
+
effort_new --spec "it ships" --sprint=2026-11-25 --milestone v1 "demo effort" >/dev/null 2>&1 && rc=0 || rc=1
|
|
138
|
+
t "effort_new refuses --sprint with another --milestone" "$rc" "1"
|
|
139
|
+
t "effort_new writes nothing on that refusal" "$(grep -c . "$GH_LOG")" "0"
|
|
140
|
+
|
|
78
141
|
# ── effort_start / effort_pr / effort_close (real git + bare remote) ───────────────────────────
|
|
79
142
|
( cd "$tmp" && git init -q --bare remote.git )
|
|
80
143
|
( cd "$tmp" && git clone -q remote.git work \
|
|
@@ -108,7 +171,7 @@ cd "$tmp/work/.claude/worktrees/effort+99-demo"
|
|
|
108
171
|
effort_pr 99 --summary "SUMMARY-MARKER" --for-agents "AGENTS-MARKER" >/dev/null 2>&1
|
|
109
172
|
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"[^"]*","head":"effort/99-demo","base":"main"' "effort_pr opens effort/99 → main"
|
|
110
173
|
# #363: parity with the kit-effort-pr skill — the verb is the one implementation.
|
|
111
|
-
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"feat: demo effort \[
|
|
174
|
+
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"feat: demo effort \[E99\]"' "effort_pr titles with a conventional subject + the [#N] id"
|
|
112
175
|
# labels, milestone (M1 is milestone 3 in the shim) and the author land in ONE PATCH on the PR
|
|
113
176
|
tc "$GH_LOG" '^PATCH repos/o/r/issues/7 \{"labels":\["role:tech-lead","kind:task"\]' "effort_pr inherits the parent's labels"
|
|
114
177
|
tc "$GH_LOG" '^PATCH repos/o/r/issues/7 \{.*"milestone":3\}$' "effort_pr inherits the parent's milestone"
|
|
@@ -143,11 +206,34 @@ t "effort_pr refuses a non-conventional --title" "$rc" "1"
|
|
|
143
206
|
t "effort_pr opened nothing on a non-conventional --title" "$(grep -cE "$PR_RE" "$GH_LOG")" "0"
|
|
144
207
|
: > "$GH_LOG"
|
|
145
208
|
effort_pr 99 --type fix >/dev/null 2>&1
|
|
146
|
-
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"fix: demo effort \[
|
|
209
|
+
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"fix: demo effort \[E99\]"' "effort_pr --type sets the conventional type"
|
|
147
210
|
: > "$GH_LOG"
|
|
148
211
|
KIT_PR_TITLE_STYLE=issue-title effort_pr 99 >/dev/null 2>&1
|
|
149
212
|
tc "$GH_LOG" '^POST repos/o/r/pulls \{"title":"(\[Tech Lead\] )?\[#99\] demo effort"' "effort_pr issue-title style keeps the [#N] name form, no commitlint refusal"
|
|
150
213
|
|
|
214
|
+
# ── effort_close E546.5: the parent's Spec is re-read and checked before anything else ─────────
|
|
215
|
+
: > "$GH_LOG"
|
|
216
|
+
close_out="$(GH_BODY='## Goal\nship it' effort_close 99 2>&1)"; rc=$?
|
|
217
|
+
t "effort_close refuses a parent without a Spec (rc 1)" "$rc" "1"
|
|
218
|
+
case "$close_out" in *"no '## Spec' section"*"--no-spec-check"*) echo "ok: the Spec refusal gives the reason and the escape" ;; *) echo "FAIL: Spec refusal message: $close_out"; fail=1 ;; esac
|
|
219
|
+
t "effort_close merged nothing on a missing Spec" "$(grep -cE "$MERGE_RE" "$GH_LOG")" "0"
|
|
220
|
+
t "effort_close only read the parent on a missing Spec" "$(grep -vc '^GET repos/o/r/issues/99 ' "$GH_LOG")" "0"
|
|
221
|
+
: > "$GH_LOG"
|
|
222
|
+
close_out="$(GH_BODY='## Spec\n- TODO' effort_close 99 2>&1)"; rc=$?
|
|
223
|
+
t "effort_close refuses a placeholder-only Spec (rc 1)" "$rc" "1"
|
|
224
|
+
: > "$GH_LOG"
|
|
225
|
+
close_out="$(GH_FAIL_EP="repos/o/r/issues/99" effort_close 99 2>&1)"; rc=$?
|
|
226
|
+
t "effort_close refuses when the body cannot be read (rc 1)" "$rc" "1"
|
|
227
|
+
case "$close_out" in *"could not read #99"*) echo "ok: an unread body is not a checked one" ;; *) echo "FAIL: unread-body message: $close_out"; fail=1 ;; esac
|
|
228
|
+
# --no-spec-check skips the check, says so in one line, and the close goes on to its next gate
|
|
229
|
+
# (here the trace backstop below, since the branch has no commits yet).
|
|
230
|
+
: > "$GH_LOG"
|
|
231
|
+
close_out="$(GH_BODY='## Goal\nship it' effort_close 99 --no-spec-check 2>&1)"; rc=$?
|
|
232
|
+
t "effort_close --no-spec-check prints one skip notice" "$(printf '%s\n' "$close_out" | grep -c 'Spec check skipped for #99 (--no-spec-check)')" "1"
|
|
233
|
+
case "$close_out" in *"refusing to squash"*) echo "ok: --no-spec-check passes the Spec check" ;; *) echo "FAIL: --no-spec-check did not pass: $close_out"; fail=1 ;; esac
|
|
234
|
+
t "effort_close --no-spec-check does not read the body" "$(grep -c '^GET repos/o/r/issues/99 ' "$GH_LOG")" "0"
|
|
235
|
+
effort_close 99 --bogus >/dev/null 2>&1; t "effort_close refuses an unknown flag (rc 2)" "$?" "2"
|
|
236
|
+
|
|
151
237
|
# ── effort_close #120: refuse-squash-without-trace backstop ────────────────────────────────────
|
|
152
238
|
# With NO commits on the effort branch, effort_snapshot_subs captures no trace → close must refuse
|
|
153
239
|
# (the squash would erase per-sub history), and must NOT merge.
|
|
@@ -267,7 +353,9 @@ t "effort_close leaves a PR on another base alone" "$(grep -c '^PATCH repos/o/r
|
|
|
267
353
|
t "effort_close re-targets before the merge deletes the branch" \
|
|
268
354
|
"$(grep -nE 'PATCH repos/o/r/pulls/43 |PUT repos/o/r/pulls/9/merge' "$GH_LOG" | sed -E 's/^[0-9]+:(PATCH|PUT).*/\1/' | tr '\n' ' ')" "PATCH PUT "
|
|
269
355
|
case "$close_out" in *"PR 41 re-targeted to main"*) echo "ok: close output carries the re-targeted line" ;; *) echo "FAIL: no re-targeted line in close output"; fail=1 ;; esac
|
|
270
|
-
|
|
356
|
+
# #565: the shim's subs are already closed — close keeps their close reason (no second PATCH);
|
|
357
|
+
# the open-sub cases are in effort-close-subs-test.sh
|
|
358
|
+
t "effort_close does not re-close an already-closed sub" "$(grep -c '^PATCH repos/o/r/issues/101 ' "$GH_LOG")" "0"
|
|
271
359
|
tc "$GH_LOG" '^PATCH repos/o/r/issues/99 \{"state":"closed","state_reason":"completed"\}$' "effort_close closes the parent"
|
|
272
360
|
no_gh "effort_close"
|
|
273
361
|
case "$close_out" in *"metrics:"*) echo "ok: capture_effort_metrics composed into close" ;; *) echo "FAIL: no metrics capture in close"; fail=1 ;; esac
|
|
@@ -395,7 +483,7 @@ t "a file under a rules subdirectory is not" "$(_re_hit .claude/rules/loca
|
|
|
395
483
|
t "skills / hooks / lib / agents stay kit-managed" \
|
|
396
484
|
"$(_re_hit .claude/skills/x/SKILL.md)$(_re_hit .claude/hooks/h.sh)$(_re_hit .claude/lib/l.sh)$(_re_hit .claude/agents/a.md)$(_re_hit scripts/lib/x.sh)" "yesyesyesyesyes"
|
|
397
485
|
re_rules="$(printf '%s\n' "$_EO_KIT_MANAGED_RE" | sed -n 's/.*rules\/(\([^)]*\)).*/\1/p' | tr '|' '\n' | sort)"
|
|
398
|
-
tpl_rules="$(find "$ROOT/templates/rules" -maxdepth 1 -type f -name '*.md' -exec basename {} .md \; | sort)"
|
|
486
|
+
tpl_rules="$(find "$ROOT/kit/templates/rules" -maxdepth 1 -type f -name '*.md' -exec basename {} .md \; | sort)"
|
|
399
487
|
t "the regex lists exactly the templates/rules basenames" "$re_rules" "$tpl_rules"
|
|
400
488
|
case "$tpl_rules" in "") echo "FAIL: no templates/rules/*.md found — the sync assertion compared nothing"; fail=1 ;; esac
|
|
401
489
|
|
|
@@ -417,7 +505,7 @@ t "relations_add respects a mid-body section" \
|
|
|
417
505
|
# It used to be built inline with `$( … )`, which eats trailing newlines — the section shipped as the
|
|
418
506
|
# single mangled line `## Relations- Depends on #4- Depends on #9`. Both now go through the formatter.
|
|
419
507
|
: > "$GH_LOG"; printf '0' > "$GH_N"
|
|
420
|
-
effort_new --depends-on "#4,9" "depends on effort" >/dev/null 2>&1
|
|
508
|
+
effort_new --spec "it ships" --depends-on "#4,9" "depends on effort" >/dev/null 2>&1
|
|
421
509
|
# the body travels as a JSON string in the POST issues line, so a line break is a literal \n there
|
|
422
510
|
tc "$GH_LOG" '^POST repos/o/r/issues \{.*\\n## Relations\\n' "--depends-on writes ## Relations on its own line"
|
|
423
511
|
tc "$GH_LOG" '^POST repos/o/r/issues \{.*\\n- Depends on #4\\n' "--depends-on writes the first dep on its own line"
|
|
@@ -746,7 +834,7 @@ t "wip: an unknown flag writes nothing" "$(grep -c . "$CH_LOG" | tr -d ' ')"
|
|
|
746
834
|
# 14. scope: the gate is an EFFORT gate. `cckit start <issue>` (wt_start, worktree-start.sh) has no
|
|
747
835
|
# WIP limit — a static guard so widening the scope can't happen by accident.
|
|
748
836
|
t "wip: the plain-task start path is not gated" \
|
|
749
|
-
"$(grep -c '_eff_wip_gate\|effort_wip_rows' "$LIB/worktree-start.sh" | tr -d ' ')" "0"
|
|
837
|
+
"$(grep -c '_eff_wip_gate\|effort_wip_rows' "$LIB/core/worktree-start.sh" | tr -d ' ')" "0"
|
|
750
838
|
|
|
751
839
|
cd "$tmp/work" || exit 1
|
|
752
840
|
|
|
@@ -756,14 +844,14 @@ cd "$tmp/work" || exit 1
|
|
|
756
844
|
# it. `cckit effort plan` therefore answered "no open efforts found" for every effort ever
|
|
757
845
|
# made, in every repo, with no error anywhere. A static check because the failure mode is
|
|
758
846
|
# silence — there is nothing at runtime to notice.
|
|
759
|
-
plan_label="$(sed -n 's/.*forge_rest "repos\/\$repo\/issues" [^|]*-f labels=\([a-z][a-z-]*\).*/\1/p' "$LIB/effort-plan.sh" | sed -n 1p)"
|
|
847
|
+
plan_label="$(sed -n 's/.*forge_rest "repos\/\$repo\/issues" [^|]*-f labels=\([a-z][a-z-]*\).*/\1/p' "$LIB/verbs/effort-plan.sh" | sed -n 1p)"
|
|
760
848
|
t "plan queries a label at all" "${plan_label:-MISSING}" "effort"
|
|
761
849
|
t "effort_new applies the label plan queries" \
|
|
762
|
-
"$(grep -c "labels=\"$plan_label," "$LIB/effort-ops.sh" | tr -d ' ')" "1"
|
|
850
|
+
"$(grep -c "labels=\"$plan_label," "$LIB/verbs/effort-ops.sh" | tr -d ' ')" "1"
|
|
763
851
|
t "effort_new ensures the label exists before using it" \
|
|
764
|
-
"$(grep -c "_eff_ensure_label \"$plan_label\"" "$LIB/effort-ops.sh" | tr -d ' ')" "1"
|
|
852
|
+
"$(grep -c "_eff_ensure_label \"$plan_label\"" "$LIB/verbs/effort-ops.sh" | tr -d ' ')" "1"
|
|
765
853
|
t "setup-labels provisions the label plan queries" \
|
|
766
|
-
"$(grep -c "ensure_label \"$plan_label\"" "$SCRIPTS/setup-labels.sh" | tr -d ' ')" "1"
|
|
854
|
+
"$(grep -c "ensure_label \"$plan_label\"" "$SCRIPTS/verbs/setup-labels.sh" | tr -d ' ')" "1"
|
|
767
855
|
|
|
768
856
|
# 16. #330 — a failed forge read is said, never a silent rc 1. With the issue read failing, the bare
|
|
769
857
|
# `title="$(…)"` assignment ended effort_start under `set -e` with no output at all. GH_FAIL_EP
|
|
@@ -782,10 +870,11 @@ t "#330: a re-start with the forge failing cuts no fallback branch" \
|
|
|
782
870
|
"$(git show-ref --verify --quiet refs/heads/effort/802-effort && echo yes || echo no)" "no"
|
|
783
871
|
# effort_close: a failed PR read (GET pulls?head=…) refuses by name instead of dying on the bare
|
|
784
872
|
# assignment — and before the capture writes a records.jsonl row and consumes the start marker (the
|
|
785
|
-
# write-then-fail #394 exists to prevent).
|
|
873
|
+
# write-then-fail #394 exists to prevent). --no-spec-check: the chain fixture answers 404 for #801's
|
|
874
|
+
# body, and the read under test here is the PR's.
|
|
786
875
|
: > "$CH_LOG"
|
|
787
876
|
out="$( set -e; cd "$(git worktree list --porcelain | awk -v b=refs/heads/effort/801-effort '/^worktree /{w=$2} $2==b{print w}')" \
|
|
788
|
-
&& GH_FAIL_EP="repos/o/r/pulls" KIT_FORCE=1 effort_close 801 2>&1 )"; rc=$?
|
|
877
|
+
&& GH_FAIL_EP="repos/o/r/pulls" KIT_FORCE=1 effort_close 801 --no-spec-check 2>&1 )"; rc=$?
|
|
789
878
|
t "#330: effort_close refuses when the PR cannot be read (rc 1)" "$rc" "1"
|
|
790
879
|
case "$out" in *"could not read the PR for effort/801-effort"*) echo "ok: #330: effort_close names the failed PR read" ;;
|
|
791
880
|
*) echo "FAIL: #330: effort_close gave no reason -> '$out'"; fail=1 ;; esac
|
|
@@ -793,7 +882,7 @@ t "#330: nothing was merged on the failed read" "$(grep -cE "$MERGE_RE" "$CH_LOG
|
|
|
793
882
|
out="$( set -e; cd "$(git worktree list --porcelain | awk -v b=refs/heads/effort/801-effort '/^worktree /{w=$2} $2==b{print w}')" \
|
|
794
883
|
&& echo work > rest-twin.txt && git add rest-twin.txt \
|
|
795
884
|
&& git -c user.email=t@t -c user.name=t commit -q -m "feat: work (#801)" \
|
|
796
|
-
&& GH_FAIL_EP="repos/o/r/pulls" KIT_FORCE=1 effort_close 801 2>&1 )"; rc=$?
|
|
885
|
+
&& GH_FAIL_EP="repos/o/r/pulls" KIT_FORCE=1 effort_close 801 --no-spec-check 2>&1 )"; rc=$?
|
|
797
886
|
t "#330: with a trace, effort_close still refuses the failed PR read (rc 1)" "$rc" "1"
|
|
798
887
|
case "$out" in
|
|
799
888
|
*"metrics:"*) echo "FAIL: #330: metrics captured before the failed PR read was refused -> '$out'"; fail=1 ;;
|