codebyplan 1.5.1 → 1.8.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/dist/cli.js +4462 -748
- package/package.json +5 -1
- package/templates/.gitkeep +0 -0
- package/templates/README.md +20 -0
- package/templates/agents/cbp-cc-executor.md +213 -0
- package/templates/agents/cbp-database-agent.md +229 -0
- package/templates/agents/cbp-improve-claude.md +245 -0
- package/templates/agents/cbp-improve-round.md +284 -0
- package/templates/agents/cbp-mechanical-edits.md +111 -0
- package/templates/agents/cbp-research.md +282 -0
- package/templates/agents/cbp-round-executor.md +604 -0
- package/templates/agents/cbp-security-agent.md +134 -0
- package/templates/agents/cbp-task-check.md +213 -0
- package/templates/agents/cbp-task-planner.md +582 -0
- package/templates/agents/cbp-test-e2e-agent.md +363 -0
- package/templates/agents/cbp-testing-qa-agent.md +400 -0
- package/templates/context/mcp-docs.md +139 -0
- package/templates/hooks/README.md +236 -0
- package/templates/hooks/cbp-auto-test-hooks.sh +44 -0
- package/templates/hooks/cbp-lint-format-on-edit.sh +159 -0
- package/templates/hooks/cbp-maestro-yaml-validate.sh +100 -0
- package/templates/hooks/cbp-mcp-migration-guard.sh +32 -0
- package/templates/hooks/cbp-mcp-round-sync.sh +79 -0
- package/templates/hooks/cbp-mcp-worktree-inject.sh +76 -0
- package/templates/hooks/cbp-notify.sh +68 -0
- package/templates/hooks/cbp-plugin-dispatch.sh +29 -0
- package/templates/hooks/cbp-pre-commit-quality-gate.sh +204 -0
- package/templates/hooks/cbp-statusline.sh +347 -0
- package/templates/hooks/cbp-subagent-statusline.sh +182 -0
- package/templates/hooks/cbp-test-coverage-gate.sh +144 -0
- package/templates/hooks/cbp-test-hooks.sh +320 -0
- package/templates/hooks/hooks.json +85 -0
- package/templates/hooks/validate-context-usage.sh +59 -0
- package/templates/hooks/validate-git-commit.sh +78 -0
- package/templates/hooks/validate-git-stash-deny.sh +32 -0
- package/templates/hooks/validate-structure-lengths.sh +57 -0
- package/templates/hooks/validate-structure-lib.sh +104 -0
- package/templates/hooks/validate-structure-patterns.sh +54 -0
- package/templates/hooks/validate-structure-scope.sh +33 -0
- package/templates/hooks/validate-structure-smoke.sh +95 -0
- package/templates/hooks/validate-structure-templates.sh +34 -0
- package/templates/hooks/validate-structure.sh +69 -0
- package/templates/rules/.gitkeep +0 -0
- package/templates/rules/README.md +47 -0
- package/templates/rules/context-file-loading.md +52 -0
- package/templates/rules/scope-vocabulary.md +64 -0
- package/templates/rules/todo-backend.md +109 -0
- package/templates/settings.project.base.json +55 -0
- package/templates/settings.user.base.json +25 -0
- package/templates/skills/cbp-build-cc-agent/SKILL.md +139 -0
- package/templates/skills/cbp-build-cc-agent/examples/read-only-reviewer.md +32 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-hooks.md +41 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +25 -0
- package/templates/skills/cbp-build-cc-agent/reference/cbp-quality.md +153 -0
- package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +37 -0
- package/templates/skills/cbp-build-cc-agent/reference/permission-modes.md +18 -0
- package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +67 -0
- package/templates/skills/cbp-build-cc-agent/templates/agent.md +66 -0
- package/templates/skills/cbp-build-cc-claude-file/SKILL.md +178 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/minimal-project.md +33 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/monorepo-with-imports.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/imports.md +72 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/project-claude-md.md +48 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/user-claude-md.md +22 -0
- package/templates/skills/cbp-build-cc-memory/SKILL.md +201 -0
- package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +13 -0
- package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +14 -0
- package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +59 -0
- package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +62 -0
- package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +4 -0
- package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +15 -0
- package/templates/skills/cbp-build-cc-mode/SKILL.md +99 -0
- package/templates/skills/cbp-build-cc-rule/SKILL.md +176 -0
- package/templates/skills/cbp-build-cc-rule/examples/global-rule.md +19 -0
- package/templates/skills/cbp-build-cc-rule/examples/scoped-rule.md +41 -0
- package/templates/skills/cbp-build-cc-rule/reference/paths-patterns.md +48 -0
- package/templates/skills/cbp-build-cc-rule/templates/rule.md +32 -0
- package/templates/skills/cbp-build-cc-settings/SKILL.md +220 -0
- package/templates/skills/cbp-build-cc-settings/examples/hooks-config.json +64 -0
- package/templates/skills/cbp-build-cc-settings/examples/permissions-config.json +34 -0
- package/templates/skills/cbp-build-cc-settings/examples/sandbox-config.json +42 -0
- package/templates/skills/cbp-build-cc-settings/reference/cbp-conventions.md +104 -0
- package/templates/skills/cbp-build-cc-settings/reference/permission-rules.md +61 -0
- package/templates/skills/cbp-build-cc-settings/reference/scope-precedence.md +73 -0
- package/templates/skills/cbp-build-cc-settings/reference/settings-fields.md +166 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.json +23 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.local.json +10 -0
- package/templates/skills/cbp-build-cc-skill/SKILL.md +154 -0
- package/templates/skills/cbp-build-cc-skill/examples/dynamic-context.md +31 -0
- package/templates/skills/cbp-build-cc-skill/examples/fork-skill.md +22 -0
- package/templates/skills/cbp-build-cc-skill/examples/knowledge-skill.md +25 -0
- package/templates/skills/cbp-build-cc-skill/examples/task-skill.md +29 -0
- package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +157 -0
- package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +35 -0
- package/templates/skills/cbp-build-cc-skill/reference/string-substitutions.md +60 -0
- package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +90 -0
- package/templates/skills/cbp-build-cc-skill/templates/skill.md +51 -0
- package/templates/skills/cbp-checkpoint-check/SKILL.md +156 -0
- package/templates/skills/cbp-checkpoint-complete/SKILL.md +109 -0
- package/templates/skills/cbp-checkpoint-create/SKILL.md +287 -0
- package/templates/skills/cbp-checkpoint-end/SKILL.md +241 -0
- package/templates/skills/cbp-checkpoint-update/SKILL.md +115 -0
- package/templates/skills/cbp-frontend-a11y/SKILL.md +109 -0
- package/templates/skills/cbp-frontend-a11y/reference/aria-roles-states.md +130 -0
- package/templates/skills/cbp-frontend-a11y/reference/contrast-visual.md +122 -0
- package/templates/skills/cbp-frontend-a11y/reference/keyboard-patterns.md +154 -0
- package/templates/skills/cbp-frontend-a11y/reference/semantic-html.md +111 -0
- package/templates/skills/cbp-frontend-design/SKILL.md +145 -0
- package/templates/skills/cbp-frontend-design/reference/nextjs-scss.md +118 -0
- package/templates/skills/cbp-frontend-design/reference/rn-expo.md +101 -0
- package/templates/skills/cbp-frontend-design/reference/tauri-react.md +82 -0
- package/templates/skills/cbp-frontend-ui/SKILL.md +262 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-label-maps.md +42 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-layout-patterns.md +105 -0
- package/templates/skills/cbp-frontend-ui/reference/variant-defaults.md +149 -0
- package/templates/skills/cbp-frontend-ux/SKILL.md +181 -0
- package/templates/skills/cbp-git-branch-feat-create/SKILL.md +115 -0
- package/templates/skills/cbp-git-commit/SKILL.md +278 -0
- package/templates/skills/cbp-git-worktree-create/SKILL.md +226 -0
- package/templates/skills/cbp-git-worktree-remove/SKILL.md +145 -0
- package/templates/skills/cbp-merge-main/SKILL.md +228 -0
- package/templates/skills/cbp-round-check/SKILL.md +104 -0
- package/templates/skills/cbp-round-end/SKILL.md +183 -0
- package/templates/skills/cbp-round-end/reference/findings-presentation.md +44 -0
- package/templates/skills/cbp-round-end/reference/inline-fallback.md +35 -0
- package/templates/skills/cbp-round-execute/SKILL.md +211 -0
- package/templates/skills/cbp-round-execute/reference/inline-fallback.md +59 -0
- package/templates/skills/cbp-round-input/SKILL.md +165 -0
- package/templates/skills/cbp-round-start/SKILL.md +222 -0
- package/templates/skills/cbp-round-update/SKILL.md +163 -0
- package/templates/skills/cbp-session-end/SKILL.md +187 -0
- package/templates/skills/cbp-session-start/SKILL.md +155 -0
- package/templates/skills/cbp-ship/SKILL.md +332 -0
- package/templates/skills/cbp-ship/reference/changesets-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/eas-cli-overview.md +60 -0
- package/templates/skills/cbp-ship/reference/gh-cli-overview.md +135 -0
- package/templates/skills/cbp-ship/reference/gh-cli-shipment-commands.md +283 -0
- package/templates/skills/cbp-ship/reference/npm-publish-monorepo.md +252 -0
- package/templates/skills/cbp-ship/reference/npm-publish-oidc-trusted.md +157 -0
- package/templates/skills/cbp-ship/reference/npm-publish-overview.md +171 -0
- package/templates/skills/cbp-ship/reference/preflight-checklist.md +88 -0
- package/templates/skills/cbp-ship/reference/railway-nestjs-deployment.md +169 -0
- package/templates/skills/cbp-ship/reference/railway-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/railway-troubleshooting.md +168 -0
- package/templates/skills/cbp-ship/reference/release-please-overview.md +99 -0
- package/templates/skills/cbp-ship/reference/surface-expo-eas.md +155 -0
- package/templates/skills/cbp-ship/reference/surface-npm.md +180 -0
- package/templates/skills/cbp-ship/reference/surface-railway.md +152 -0
- package/templates/skills/cbp-ship/reference/surface-supabase.md +178 -0
- package/templates/skills/cbp-ship/reference/surface-tauri.md +138 -0
- package/templates/skills/cbp-ship/reference/surface-vercel.md +124 -0
- package/templates/skills/cbp-ship/reference/surface-vscode-ext.md +144 -0
- package/templates/skills/cbp-ship/reference/surfaces.md +60 -0
- package/templates/skills/cbp-ship/reference/testflight-automation.md +215 -0
- package/templates/skills/cbp-ship/reference/testflight-internal-vs-external.md +69 -0
- package/templates/skills/cbp-ship/reference/testflight-overview.md +98 -0
- package/templates/skills/cbp-ship/reference/versioning.md +116 -0
- package/templates/skills/cbp-ship/scripts/detect-surfaces.sh +217 -0
- package/templates/skills/cbp-ship/scripts/verify-expo-eas.sh +35 -0
- package/templates/skills/cbp-ship/scripts/verify-npm.sh +21 -0
- package/templates/skills/cbp-ship/scripts/verify-railway.sh +41 -0
- package/templates/skills/cbp-ship/scripts/verify-supabase.sh +19 -0
- package/templates/skills/cbp-ship/scripts/verify-tauri.sh +24 -0
- package/templates/skills/cbp-ship/scripts/verify-vercel.sh +32 -0
- package/templates/skills/cbp-ship/scripts/verify-vscode-ext.sh +25 -0
- package/templates/skills/cbp-ship/templates/eas.json +66 -0
- package/templates/skills/cbp-ship/templates/railway.toml +15 -0
- package/templates/skills/cbp-ship/templates/release-please-config.json +17 -0
- package/templates/skills/cbp-ship/templates/vercel.json +19 -0
- package/templates/skills/cbp-ship/templates/vscodeignore +21 -0
- package/templates/skills/cbp-ship/templates/workflow-changesets.yml +41 -0
- package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +53 -0
- package/templates/skills/cbp-ship/templates/workflow-npm-publish.yml +36 -0
- package/templates/skills/cbp-ship/templates/workflow-release-please.yml +21 -0
- package/templates/skills/cbp-ship/templates/workflow-tauri-release.yml +69 -0
- package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +31 -0
- package/templates/skills/cbp-ship-configure/SKILL.md +296 -0
- package/templates/skills/cbp-ship-configure/reference/expo-mobile.md +204 -0
- package/templates/skills/cbp-ship-configure/reference/npm-package.md +165 -0
- package/templates/skills/cbp-ship-configure/reference/railway-backend.md +199 -0
- package/templates/skills/cbp-ship-configure/reference/supabase.md +200 -0
- package/templates/skills/cbp-ship-configure/reference/tauri-desktop.md +181 -0
- package/templates/skills/cbp-ship-configure/reference/vercel.md +117 -0
- package/templates/skills/cbp-ship-configure/reference/vscode-ext.md +155 -0
- package/templates/skills/cbp-ship-main/SKILL.md +65 -0
- package/templates/skills/cbp-supabase-branch-check/SKILL.md +337 -0
- package/templates/skills/cbp-supabase-branch-check/reference/dag-steps.md +29 -0
- package/templates/skills/cbp-supabase-migrate/SKILL.md +314 -0
- package/templates/skills/cbp-supabase-migrate/reference/advisor-triage.md +70 -0
- package/templates/skills/cbp-supabase-migrate/reference/cli-fallback.md +87 -0
- package/templates/skills/cbp-supabase-migrate/reference/preflight-dry-run.md +58 -0
- package/templates/skills/cbp-supabase-setup/SKILL.md +239 -0
- package/templates/skills/cbp-supabase-setup/reference/branching-setup.md +121 -0
- package/templates/skills/cbp-supabase-setup/reference/cli-fallback.md +109 -0
- package/templates/skills/cbp-task-check/SKILL.md +166 -0
- package/templates/skills/cbp-task-complete/SKILL.md +206 -0
- package/templates/skills/cbp-task-complete/reference/checkpoint-done-branching.md +48 -0
- package/templates/skills/cbp-task-complete/reference/next-step-heuristic.md +56 -0
- package/templates/skills/cbp-task-create/SKILL.md +167 -0
- package/templates/skills/cbp-task-start/SKILL.md +239 -0
- package/templates/skills/cbp-task-testing/SKILL.md +277 -0
- package/templates/skills/cbp-todo/SKILL.md +97 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: legacy-payments
|
|
3
|
+
description: Background context for the legacy payments module. Loads automatically when editing anything under src/payments/legacy/.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
paths:
|
|
6
|
+
- "src/payments/legacy/**"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Legacy Payments Context
|
|
10
|
+
|
|
11
|
+
The legacy payments module predates our current Stripe integration. It handles:
|
|
12
|
+
|
|
13
|
+
- Authorize.net transactions (pre-2021 customers only)
|
|
14
|
+
- Manual ACH reconciliation via nightly CSV imports
|
|
15
|
+
- A custom currency-conversion table that does not use the FX service
|
|
16
|
+
|
|
17
|
+
## Constraints
|
|
18
|
+
|
|
19
|
+
- Do not rewrite in TypeScript — this module is scheduled for deprecation in Q3
|
|
20
|
+
- All new payment features go in `src/payments/stripe/` instead
|
|
21
|
+
- Bug fixes are allowed but must include a regression test in `tests/payments/legacy/`
|
|
22
|
+
|
|
23
|
+
## Why it's still here
|
|
24
|
+
|
|
25
|
+
Customers on grandfathered contracts cannot be migrated without manual outreach. Product has a migration plan in `docs/migrations/payments-2026.md`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Stage and commit the current changes
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *) Bash(git diff *)
|
|
6
|
+
argument-hint: [commit message]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Stage and commit the current working directory changes.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
- Status: !`git status --short`
|
|
14
|
+
- Staged diff: !`git diff --cached --stat`
|
|
15
|
+
- Unstaged diff: !`git diff --stat`
|
|
16
|
+
|
|
17
|
+
## Your task
|
|
18
|
+
|
|
19
|
+
Based on the status and diffs above, create a commit with message:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
$ARGUMENTS
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Steps:
|
|
26
|
+
1. Stage relevant files with `git add`
|
|
27
|
+
2. Verify staging with `git status`
|
|
28
|
+
3. Commit with the message above
|
|
29
|
+
4. Show the resulting commit with `git log -1`
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: org-shared
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Skill Authoring Quality
|
|
6
|
+
|
|
7
|
+
Quality expectations and structure for `/.claude/skills/{name}/SKILL.md` files. This file adds CBP-specific constraints on top of the official Claude Code skills spec.
|
|
8
|
+
|
|
9
|
+
## Required CBP Frontmatter
|
|
10
|
+
|
|
11
|
+
Every skill MUST have `scope:` in addition to the Claude Code native fields:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
---
|
|
15
|
+
scope: org-shared # structural marker: org-shared | project-shared | repo-only:<repo-name>
|
|
16
|
+
name: cbp-skill-name
|
|
17
|
+
description: One sentence — shown in skill list and used for auto-matching
|
|
18
|
+
---
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`scope:` is a CBP structural marker — not read by Claude Code itself. Missing `scope:` fails validation (`validate-skill.sh` / `validate-structure-scope.sh`).
|
|
22
|
+
|
|
23
|
+
## What Skills Are
|
|
24
|
+
|
|
25
|
+
Skills are user-invocable commands that run in the main conversation. They follow a step-by-step workflow, can spawn agents, call MCP tools, and interact with the user.
|
|
26
|
+
|
|
27
|
+
Skills are NOT agents — they don't run in isolation. They have access to the full conversation context and auto-loaded rules.
|
|
28
|
+
|
|
29
|
+
## Required Sections
|
|
30
|
+
|
|
31
|
+
Every skill MUST have these sections:
|
|
32
|
+
|
|
33
|
+
| Section | Purpose | Skip When |
|
|
34
|
+
| --------------------- | --------------------------------------------- | ---------------------- |
|
|
35
|
+
| **Frontmatter** | name, description, triggers, argument-hint | Never |
|
|
36
|
+
| **Title + one-liner** | What this skill does | Never |
|
|
37
|
+
| **Instructions** | Numbered steps with clear actions | Never |
|
|
38
|
+
| **Integration** | Triggered by, reads, writes, spawns, triggers | Never |
|
|
39
|
+
| Pipeline | Visual flow showing command chain | No chain exists |
|
|
40
|
+
| Arguments | Parameter table | No arguments accepted |
|
|
41
|
+
| When to Use | Activation conditions | Obvious from name |
|
|
42
|
+
| Key Rules | Constraints specific to this skill | No special constraints |
|
|
43
|
+
|
|
44
|
+
## Frontmatter
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
---
|
|
48
|
+
name: cbp-skill-name
|
|
49
|
+
description: One sentence — shown in skill list
|
|
50
|
+
triggers: [cbp-followup-command]
|
|
51
|
+
argument-hint: [optional args description]
|
|
52
|
+
---
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `name:` — must match folder name, kebab-case
|
|
56
|
+
- `triggers:` — skills this skill auto-triggers (not skills that trigger it)
|
|
57
|
+
- `argument-hint:` — shown to user, describes expected arguments
|
|
58
|
+
|
|
59
|
+
## Quality Expectations
|
|
60
|
+
|
|
61
|
+
### Max Lines: 300
|
|
62
|
+
|
|
63
|
+
If a skill exceeds 300 lines, it's doing too much. Options:
|
|
64
|
+
|
|
65
|
+
1. Extract complex logic to a spawned agent
|
|
66
|
+
2. Move reference data to a context file
|
|
67
|
+
3. Split into multiple skills in a pipeline
|
|
68
|
+
|
|
69
|
+
### Steps Must Be Concrete
|
|
70
|
+
|
|
71
|
+
Each step should be a single action with a clear outcome. No multi-paragraph explanations.
|
|
72
|
+
|
|
73
|
+
| Bad | Good |
|
|
74
|
+
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
|
|
75
|
+
| "Analyze the situation and determine the best course of action based on the current state" | "Use MCP `get_current_task` with repo_id. If no task: show error." |
|
|
76
|
+
| "Process the results appropriately" | "Save to task context via MCP `update_task(task_id, context: {...})`" |
|
|
77
|
+
|
|
78
|
+
### One Responsibility Per Skill
|
|
79
|
+
|
|
80
|
+
A skill should do one thing in the pipeline. If a skill both plans AND executes, split it.
|
|
81
|
+
|
|
82
|
+
| Wrong | Right |
|
|
83
|
+
| --------------------------------------- | ------------------------------------------------------------ |
|
|
84
|
+
| `/cbp-round` (plans + executes + tests) | `/cbp-round-start` → `/cbp-round-execute` → `/cbp-round-end` |
|
|
85
|
+
|
|
86
|
+
### Pipeline Clarity
|
|
87
|
+
|
|
88
|
+
If the skill is part of a chain, show it:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
/cbp-round-start (planning) → [user approval] → /cbp-round-execute (auto)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Approval Gates
|
|
95
|
+
|
|
96
|
+
Skills that need user input before proceeding must:
|
|
97
|
+
|
|
98
|
+
1. Present the information clearly
|
|
99
|
+
2. End with a `Reply with:` block listing options
|
|
100
|
+
3. Wait — never auto-proceed past an approval gate
|
|
101
|
+
|
|
102
|
+
### Auto-Trigger vs Wait
|
|
103
|
+
|
|
104
|
+
| Situation | Action |
|
|
105
|
+
| ---------------------------- | ------------------------------- |
|
|
106
|
+
| Next step is deterministic | Auto-trigger the next skill |
|
|
107
|
+
| User approval needed | Wait with `Reply with:` options |
|
|
108
|
+
| User must do external action | Wait with instructions |
|
|
109
|
+
| Multiple valid paths | Present options, wait |
|
|
110
|
+
|
|
111
|
+
## Command Follow-Up Format
|
|
112
|
+
|
|
113
|
+
When a skill stops and waits:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
**Next:**
|
|
119
|
+
Run `/cbp-command-name` to:
|
|
120
|
+
- Action 1
|
|
121
|
+
- Action 2
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
Waiting for user to run [command-name].
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## When to Create vs Update a Skill
|
|
129
|
+
|
|
130
|
+
| Situation | Action |
|
|
131
|
+
| ----------------------------------------- | -------------------------------------------------------- |
|
|
132
|
+
| Existing skill covers the workflow | Update its SKILL.md |
|
|
133
|
+
| New workflow, no existing skill covers it | Create new skill |
|
|
134
|
+
| Existing skill is too large (>300 lines) | Extract agent or context, keep skill as orchestrator |
|
|
135
|
+
| Pattern seen < 5 times | Don't create a skill yet — wait for pattern to stabilize |
|
|
136
|
+
|
|
137
|
+
## Integration Section Format
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
## Integration
|
|
141
|
+
|
|
142
|
+
- **Triggered by**: [what invokes this skill]
|
|
143
|
+
- **Reads**: [MCP tools and files read]
|
|
144
|
+
- **Writes**: [MCP tools and files written]
|
|
145
|
+
- **Spawns**: [agents spawned]
|
|
146
|
+
- **Triggers**: [next skill in chain]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Common Mistakes
|
|
150
|
+
|
|
151
|
+
| Mistake | Fix |
|
|
152
|
+
| --------------------------------------------- | ----------------------------------------------------------- |
|
|
153
|
+
| Hardcoding file paths | Use paths from structure rules |
|
|
154
|
+
| Skipping MCP calls, using conversation memory | Always read from DB — it's the source of truth |
|
|
155
|
+
| Steps that say "if needed" without criteria | Define the criteria explicitly |
|
|
156
|
+
| Mixing planning and execution in one skill | Split into separate skills with auto-trigger |
|
|
157
|
+
| No error handling for MCP failures | Add "If no X found: show error message" after each MCP call |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Skill Frontmatter Reference
|
|
2
|
+
|
|
3
|
+
Source: official Claude Code skills spec. All fields are optional; `description` is recommended.
|
|
4
|
+
|
|
5
|
+
| Field | Purpose |
|
|
6
|
+
|-------|---------|
|
|
7
|
+
| `name` | Display name — becomes `/slash-command`. Lowercase, digits, hyphens, max 64 chars. Defaults to directory name |
|
|
8
|
+
| `description` | What the skill does and when to use it. Claude matches against this |
|
|
9
|
+
| `when_to_use` | Additional trigger phrases. Appended to `description` in the listing |
|
|
10
|
+
| `argument-hint` | Autocomplete hint, e.g. `[issue-number]` |
|
|
11
|
+
| `arguments` | Named positional args, e.g. `[file mode]` → `$file`, `$mode` |
|
|
12
|
+
| `disable-model-invocation` | `true` → only user can invoke (via `/name`) |
|
|
13
|
+
| `user-invocable` | `false` → hidden from `/` menu, Claude-only |
|
|
14
|
+
| `allowed-tools` | Pre-approve tools while the skill is active |
|
|
15
|
+
| `model` | Override model for this skill's turn. **Plugin skills authored in CBP MUST set this explicitly** — `inherit` is not permitted; defaults to `sonnet`. See [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the canonical matrix |
|
|
16
|
+
| `effort` | Override effort level (`low`/`medium`/`high`/`xhigh`/`max`). **Plugin skills authored in CBP MUST set this explicitly** (no commented-out placeholder); defaults to `xhigh`. See [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the matrix |
|
|
17
|
+
| `context` | `fork` → run in a subagent |
|
|
18
|
+
| `agent` | Subagent type when `context: fork` — built-in or custom |
|
|
19
|
+
| `hooks` | Hooks scoped to this skill's lifecycle |
|
|
20
|
+
| `paths` | Globs that auto-load the skill when matching files are in play |
|
|
21
|
+
| `shell` | `bash` (default) or `powershell` for `!`-commands |
|
|
22
|
+
|
|
23
|
+
## Character budget
|
|
24
|
+
|
|
25
|
+
Combined `description` + `when_to_use` truncates at **1,536 characters** in the skill listing. Front-load the key use case.
|
|
26
|
+
|
|
27
|
+
Total skill-description budget in context: 1% of the context window (fallback 8,000 chars). Raise with `SLASH_COMMAND_TOOL_CHAR_BUDGET` env var.
|
|
28
|
+
|
|
29
|
+
## Invocation × loading matrix
|
|
30
|
+
|
|
31
|
+
| Frontmatter | You can invoke | Claude can invoke | When loaded |
|
|
32
|
+
|-------------|----------------|-------------------|-------------|
|
|
33
|
+
| (default) | Yes | Yes | Description in context; body loads on invoke |
|
|
34
|
+
| `disable-model-invocation: true` | Yes | No | Description NOT in context; body loads on user invoke |
|
|
35
|
+
| `user-invocable: false` | No | Yes | Description in context; body loads on auto-invoke |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Skill String Substitutions
|
|
2
|
+
|
|
3
|
+
Source: official Claude Code skills spec.
|
|
4
|
+
|
|
5
|
+
| Placeholder | Expands to |
|
|
6
|
+
|-------------|------------|
|
|
7
|
+
| `$ARGUMENTS` | Full argument string as typed |
|
|
8
|
+
| `$ARGUMENTS[N]` | Nth positional arg (0-indexed, shell-quoted) |
|
|
9
|
+
| `$N` | Shorthand for `$ARGUMENTS[N]` |
|
|
10
|
+
| `$name` | Named arg declared in `arguments:` frontmatter |
|
|
11
|
+
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
|
12
|
+
| `${CLAUDE_SKILL_DIR}` | Skill's own directory (use to reference bundled files) |
|
|
13
|
+
|
|
14
|
+
## Quoting rules
|
|
15
|
+
|
|
16
|
+
Indexed args use shell-style quoting. Wrap multi-word values:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
/my-skill "hello world" second
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `$0` → `hello world`
|
|
23
|
+
- `$1` → `second`
|
|
24
|
+
- `$ARGUMENTS` → the full raw string
|
|
25
|
+
|
|
26
|
+
## Named args example
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
name: migrate-component
|
|
31
|
+
arguments: [component, source, target]
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
Migrate $component from $source to $target.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Invocation: `/migrate-component SearchBar React Vue`
|
|
38
|
+
|
|
39
|
+
## Fallback
|
|
40
|
+
|
|
41
|
+
If the user passes arguments but the body has no placeholder, Claude Code appends `ARGUMENTS: <input>` to the end of the content.
|
|
42
|
+
|
|
43
|
+
## Dynamic context (preprocessing)
|
|
44
|
+
|
|
45
|
+
The `` !`<cmd>` `` syntax runs *before* Claude sees the skill:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
- Status: !`git status --short`
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Multi-line fenced form:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
```!
|
|
55
|
+
node --version
|
|
56
|
+
pnpm test -- --listFailingTests
|
|
57
|
+
```
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Output replaces the placeholder. Claude only sees the rendered prompt, not the raw command. Can be disabled globally with `disableSkillShellExecution: true` in settings.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Validate a Claude Code skill file.
|
|
3
|
+
# Usage: validate-skill.sh <path-to-SKILL.md>
|
|
4
|
+
# Exit 0 = valid, exit 1 = invalid (errors printed to stderr).
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
FILE="${1:?Usage: validate-skill.sh <path-to-SKILL.md>}"
|
|
9
|
+
|
|
10
|
+
if [ ! -f "$FILE" ]; then
|
|
11
|
+
echo "ERROR: file not found: $FILE" >&2
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
errors=0
|
|
16
|
+
err() { echo " - $1" >&2; errors=$((errors + 1)); }
|
|
17
|
+
|
|
18
|
+
# Must be named SKILL.md
|
|
19
|
+
if [ "$(basename "$FILE")" != "SKILL.md" ]; then
|
|
20
|
+
err "file must be named SKILL.md (got $(basename "$FILE"))"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Directory name should match name field
|
|
24
|
+
dir=$(basename "$(dirname "$FILE")")
|
|
25
|
+
|
|
26
|
+
if ! head -1 "$FILE" | grep -qE '^---\s*$'; then
|
|
27
|
+
err "missing YAML frontmatter opener '---'"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
fm=$(awk '/^---[[:space:]]*$/{n++; next} n==1{print} n==2{exit}' "$FILE")
|
|
31
|
+
|
|
32
|
+
# Name: if present, must be kebab-case and match directory
|
|
33
|
+
if grep -qE '^name:\s*' <<< "$fm"; then
|
|
34
|
+
name=$(grep -E '^name:' <<< "$fm" | head -1 | sed -E 's/^name:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/')
|
|
35
|
+
if ! [[ "$name" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
|
|
36
|
+
err "name must be lowercase kebab-case (got '$name')"
|
|
37
|
+
fi
|
|
38
|
+
if [ ${#name} -gt 64 ]; then
|
|
39
|
+
err "name exceeds 64 chars (got ${#name})"
|
|
40
|
+
fi
|
|
41
|
+
if [ "$name" != "$dir" ]; then
|
|
42
|
+
err "name '$name' does not match directory '$dir'"
|
|
43
|
+
fi
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Description recommended
|
|
47
|
+
grep -qE '^description:\s*' <<< "$fm" || echo " WARN: no description — Claude will use first paragraph" >&2
|
|
48
|
+
|
|
49
|
+
# CBP scope required
|
|
50
|
+
grep -qE '^scope:\s*' <<< "$fm" || err "missing CBP required field: scope (org-shared|project-shared|repo-only:<repo-name>)"
|
|
51
|
+
|
|
52
|
+
# Model (if present)
|
|
53
|
+
model=$(grep -E '^model:' <<< "$fm" | head -1 | sed -E 's/^model:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/' || true)
|
|
54
|
+
if [ -n "$model" ] && [[ ! "$model" =~ ^(sonnet|opus|haiku|inherit|claude-.+)$ ]]; then
|
|
55
|
+
err "model invalid: '$model'"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Effort (if present)
|
|
59
|
+
effort=$(grep -E '^effort:' <<< "$fm" | head -1 | sed -E 's/^effort:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/' || true)
|
|
60
|
+
if [ -n "$effort" ] && [[ ! "$effort" =~ ^(low|medium|high|xhigh|max)$ ]]; then
|
|
61
|
+
err "effort invalid: '$effort'"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
# Context (if present)
|
|
65
|
+
ctx=$(grep -E '^context:' <<< "$fm" | head -1 | sed -E 's/^context:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/' || true)
|
|
66
|
+
if [ -n "$ctx" ] && [ "$ctx" != "fork" ]; then
|
|
67
|
+
err "context only supports 'fork' (got '$ctx')"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Warn if context: fork without a task body
|
|
71
|
+
if [ "$ctx" = "fork" ]; then
|
|
72
|
+
body=$(awk '/^---[[:space:]]*$/{n++; next} n>=2{print}' "$FILE")
|
|
73
|
+
if [ -z "$(echo "$body" | tr -d '[:space:]')" ]; then
|
|
74
|
+
err "context: fork requires an actionable body; the skill body is empty"
|
|
75
|
+
fi
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Line count advisory
|
|
79
|
+
lines=$(wc -l < "$FILE")
|
|
80
|
+
if [ "$lines" -gt 300 ]; then
|
|
81
|
+
echo " WARN: SKILL.md is $lines lines (CBP recommends <300; hard limit 600 enforced by validate-structure-lengths.sh). Consider moving reference material to reference/*.md" >&2
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
if [ "$errors" -gt 0 ]; then
|
|
85
|
+
echo "validation FAILED ($errors issue(s)) for $FILE" >&2
|
|
86
|
+
exit 1
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
echo "validation OK: $FILE"
|
|
90
|
+
exit 0
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: org-shared # CBP sync marker: org-shared | project-shared | repo-only:<repo-name>
|
|
3
|
+
name: skill-name
|
|
4
|
+
description: What this skill does and when to use it. Front-load the key use case — this is how Claude matches.
|
|
5
|
+
# when_to_use: Additional trigger phrases and example requests
|
|
6
|
+
# argument-hint: [file] [mode]
|
|
7
|
+
# arguments: [file, mode] # named positional args -> $file, $mode
|
|
8
|
+
# disable-model-invocation: false # true = only user can invoke via /name
|
|
9
|
+
# user-invocable: true # false = only Claude can invoke (hidden from / menu)
|
|
10
|
+
# allowed-tools: Read, Grep, Glob, Bash(git status *)
|
|
11
|
+
# review with /cbp-build-cc-mode if defaults don't fit this skill's purpose
|
|
12
|
+
model: sonnet
|
|
13
|
+
effort: xhigh
|
|
14
|
+
# context: fork # runs in a forked subagent
|
|
15
|
+
# agent: Explore # subagent type: Explore | Plan | general-purpose | <custom>
|
|
16
|
+
# paths: # glob patterns that scope auto-loading
|
|
17
|
+
# - "src/**/*.ts"
|
|
18
|
+
# shell: bash # bash | powershell (requires CLAUDE_CODE_USE_POWERSHELL_TOOL=1)
|
|
19
|
+
# hooks:
|
|
20
|
+
# PreToolUse:
|
|
21
|
+
# - matcher: "Bash"
|
|
22
|
+
# hooks:
|
|
23
|
+
# - type: command
|
|
24
|
+
# command: "./scripts/validate.sh"
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Skill title
|
|
28
|
+
|
|
29
|
+
One-line purpose.
|
|
30
|
+
|
|
31
|
+
## When to use
|
|
32
|
+
|
|
33
|
+
- [Trigger 1]
|
|
34
|
+
- [Trigger 2]
|
|
35
|
+
|
|
36
|
+
## Instructions
|
|
37
|
+
|
|
38
|
+
1. [First concrete step]
|
|
39
|
+
2. [Second step]
|
|
40
|
+
3. [Third step]
|
|
41
|
+
|
|
42
|
+
## Arguments
|
|
43
|
+
|
|
44
|
+
`$ARGUMENTS` — [what the user passes]
|
|
45
|
+
|
|
46
|
+
(Or named: `$file` is the first arg, `$mode` is the second.)
|
|
47
|
+
|
|
48
|
+
## Additional resources
|
|
49
|
+
|
|
50
|
+
- Template: [templates/example.md](templates/example.md)
|
|
51
|
+
- Reference: [reference/fields.md](reference/fields.md)
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: org-shared
|
|
3
|
+
name: cbp-checkpoint-check
|
|
4
|
+
description: Full re-evaluation of a checkpoint with before/after comparison
|
|
5
|
+
argument-hint: [CHK-NNN]
|
|
6
|
+
effort: xhigh
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Checkpoint Check Command
|
|
10
|
+
|
|
11
|
+
Full re-evaluation: compares initial ideas vs delivered work, aggregates files across all tasks, checkpoint-level file approval, final QA, user discussion.
|
|
12
|
+
|
|
13
|
+
## Instructions
|
|
14
|
+
|
|
15
|
+
### Step 1: Identify Checkpoint
|
|
16
|
+
|
|
17
|
+
**If arguments provided:** Parse `$ARGUMENTS` for CHK-NNN format, extract number. Use MCP `get_checkpoints` to find by number.
|
|
18
|
+
|
|
19
|
+
**If NO arguments:** Use MCP `get_current_task` to get the active checkpoint.
|
|
20
|
+
|
|
21
|
+
If no checkpoint found, show error and stop.
|
|
22
|
+
|
|
23
|
+
### Step 2: Load All Data
|
|
24
|
+
|
|
25
|
+
1. Get checkpoint details (context, research, qa, ideas, goal, user_context)
|
|
26
|
+
2. Use MCP `get_tasks` for the checkpoint
|
|
27
|
+
3. For each task, use MCP `get_rounds` to get all rounds
|
|
28
|
+
|
|
29
|
+
### Step 3: Before/After Comparison
|
|
30
|
+
|
|
31
|
+
Compare the checkpoint's initial state vs delivered work:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
## Before/After: CHK-[NNN]
|
|
35
|
+
|
|
36
|
+
### Initial Ideas
|
|
37
|
+
[List checkpoint.ideas descriptions]
|
|
38
|
+
|
|
39
|
+
### Initial Goal
|
|
40
|
+
[checkpoint.goal]
|
|
41
|
+
|
|
42
|
+
### Delivered Work
|
|
43
|
+
| Task | Title | Status | Rounds | Key Outcome |
|
|
44
|
+
|------|-------|--------|--------|-------------|
|
|
45
|
+
| TASK-[N] | [title] | [status] | [round count] | [brief from task.context.check_verdict] |
|
|
46
|
+
|
|
47
|
+
### Alignment
|
|
48
|
+
- [For each idea: was it addressed? By which task(s)?]
|
|
49
|
+
- [Any ideas not addressed?]
|
|
50
|
+
- [Any scope additions not in original ideas?]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Step 4: Aggregate Files Changed
|
|
54
|
+
|
|
55
|
+
Collect ALL files_changed across ALL tasks (deduplicated, latest action wins):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
### Shared File Tracking ([N] total files)
|
|
59
|
+
| File | Tasks Modified In | Final Status | User Approved |
|
|
60
|
+
|------|-------------------|--------------|---------------|
|
|
61
|
+
| [path] | TASK-1, TASK-3 | approved | yes/no |
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Checkpoint-level approval rules:**
|
|
65
|
+
- Completed task/round file approvals CANNOT be changed
|
|
66
|
+
- If user marks a file unapproved at checkpoint level → must create new task to fix
|
|
67
|
+
- One file can appear in multiple tasks
|
|
68
|
+
|
|
69
|
+
### Step 5: Final QA
|
|
70
|
+
|
|
71
|
+
Aggregate QA from all tasks and rounds:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
### QA Summary
|
|
75
|
+
| Check | Status | Source |
|
|
76
|
+
|-------|--------|--------|
|
|
77
|
+
| Build | pass/fail | Last round of TASK-[N] |
|
|
78
|
+
| Lint | pass/fail | Last round of TASK-[N] |
|
|
79
|
+
| Types | pass/fail | Last round of TASK-[N] |
|
|
80
|
+
|
|
81
|
+
### Task-Level QA
|
|
82
|
+
| Task | Check Verdict | Testing Status | Fix Rounds |
|
|
83
|
+
|------|---------------|----------------|------------|
|
|
84
|
+
| TASK-[N] | READY | all_pass | [N] |
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Re-run build/lint/types on current codebase to verify nothing regressed across tasks.
|
|
88
|
+
|
|
89
|
+
### Step 5b: Whole-Checkpoint E2E
|
|
90
|
+
|
|
91
|
+
Aggregate the files touched across all tasks (reusing Step 4's deduplicated table) and run e2e once against the union of pages they affect.
|
|
92
|
+
|
|
93
|
+
1. **Build `pages_affected`** — derive from Step 4's `files_changed` union using the same heuristic as `cbp-test-e2e-agent` Step 5.1 (Next.js: `app/<route>/page.tsx` chains; Expo: screen files; Tauri: route components; fallback: directory-based grouping). Deduplicate by route / screen.
|
|
94
|
+
|
|
95
|
+
2. **Spawn `cbp-test-e2e-agent`** via the Agent tool with:
|
|
96
|
+
|
|
97
|
+
`test_strategy` is intentionally omitted — the agent auto-detects per-app via its Step 1.5 DB tech-stack lookup (`get_repos`) and Step 2 filesystem reconciliation. Mixed-framework monorepos disambiguate via `tech_stack.apps[]`; pre-pass `test_strategy` only when DB tech_stack is empty AND filesystem probe is ambiguous.
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
input:
|
|
101
|
+
repo_id: [from .codebyplan/repo.json]
|
|
102
|
+
round_number: 0 # sentinel — "whole checkpoint"
|
|
103
|
+
whole_checkpoint_mode: true # skips R2+ filter; runs full union
|
|
104
|
+
files_changed: [union across tasks]
|
|
105
|
+
pages_affected: [aggregated]
|
|
106
|
+
has_auth: [boolean, from .codebyplan/server.json + repo]
|
|
107
|
+
dev_server_port: [from .codebyplan/server.json]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. **Wait for completion.** The agent's output carries `whole_checkpoint_aggregated: true` confirming whole-checkpoint formatting.
|
|
111
|
+
|
|
112
|
+
4. **On pass** (`e2e_output.status === 'completed'` AND `e2e_output.test_results.failed === 0`): append a row to the Step 5 QA Summary table:
|
|
113
|
+
```
|
|
114
|
+
| Checkpoint E2E | pass | aggregated |
|
|
115
|
+
```
|
|
116
|
+
Continue to Step 6.
|
|
117
|
+
|
|
118
|
+
5. **On fail** (`e2e_output.status === 'failed'` OR `e2e_output.test_results.failed > 0`): build a failure summary from `e2e_output.test_results.failures[]` grouped by `category`. Surface via `AskUserQuestion`:
|
|
119
|
+
- **(a) Create fix-task in CHK-{NNN} (recommended)** — invoke MCP `create_task` with `checkpoint_id=current_checkpoint_id`, `title="Fix checkpoint-level e2e failures (CHK-{NNN})"`, `requirements` containing the detailed failure breakdown (category counts, files involved, pages broken, screenshot paths from `e2e_output.screenshots[]`), AND `context: { source_checkpoint_id, e2e_failure_summary: { category_counts, pages_broken, screenshot_paths }, fix_type: "checkpoint_e2e" }` so downstream `cbp-task-planner` Phase 1.5 can verify failure premises programmatically without re-parsing the requirements text. Per `infra-issue-absorption.md` "Resolve-in-Current-Scope by Default", checkpoint-level e2e failures absorb into the active checkpoint — not standalone.
|
|
120
|
+
- **(b) Surface as warning only — proceed to checkpoint-end** — append `| Checkpoint E2E | warning | N failures (deferred) |` to Step 5 QA Summary; continue to Step 6.
|
|
121
|
+
- **(c) Halt — review manually** — STOP and wait for the user.
|
|
122
|
+
|
|
123
|
+
See `infra-issue-absorption.md` Catalog row "Checkpoint-level e2e failure" for the routing rationale.
|
|
124
|
+
|
|
125
|
+
### Step 6: User Discussion
|
|
126
|
+
|
|
127
|
+
Present findings and discuss with user:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
### Assessment
|
|
131
|
+
|
|
132
|
+
**All ideas addressed**: [yes/no — list gaps if any]
|
|
133
|
+
**All files approved**: [yes/no — list unapproved if any]
|
|
134
|
+
**All QA passed**: [yes/no — list failures if any]
|
|
135
|
+
**Production ready**: [yes/no — reasoning]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
If unapproved files exist:
|
|
139
|
+
- Suggest creating a new task to address them
|
|
140
|
+
- **STOP** — wait for user decision
|
|
141
|
+
|
|
142
|
+
### Step 7: Save Results
|
|
143
|
+
|
|
144
|
+
Update checkpoint via MCP `update_checkpoint`:
|
|
145
|
+
- `qa`: aggregated QA results
|
|
146
|
+
- `context`: add `check_results` with before/after, file summary, assessment
|
|
147
|
+
|
|
148
|
+
### Step 8: Route
|
|
149
|
+
|
|
150
|
+
If all clear, auto-trigger `/cbp-checkpoint-end`.
|
|
151
|
+
|
|
152
|
+
## Integration
|
|
153
|
+
|
|
154
|
+
- **Reads**: MCP `get_checkpoints`, `get_tasks`, `get_rounds`, `get_current_task`
|
|
155
|
+
- **Writes**: MCP `update_checkpoint` (qa, context)
|
|
156
|
+
- **Triggers**: `/cbp-checkpoint-end` (auto, if ready) or STOPS for `/cbp-task-create` (if issues)
|