From f7c55b370d37f885aefc26543c932e0ba60fa771 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 09:59:45 -0400 Subject: [PATCH 1/5] Wrap BRANCH_DEV, PLATFORM_COMPLIANCE_NOTES, and CONVENTIONS_NOTES in conditional blocks to prevent unresolved placeholder warnings for trunk-based workflows --- .agents/skills/qa/SKILL.md | 2 +- .agents/skills/release/SKILL.md | 2 +- .agents/skills/review/SKILL.md | 4 ++-- .agents/skills/setup/SKILL.md | 28 +++++++++++------------ .agents/skills/ship/SKILL.md | 2 +- .agents/skills/start/SKILL.md | 2 +- .agents/skills/status/SKILL.md | 2 +- .agents/skills/version/SKILL.md | 2 +- .claude/commands/qa.md | 2 +- .claude/commands/release.md | 2 +- .claude/commands/review.md | 4 ++-- .claude/commands/setup.md | 28 +++++++++++------------ .claude/commands/ship.md | 2 +- .claude/commands/start.md | 2 +- .claude/commands/status.md | 2 +- .claude/commands/version.md | 2 +- .claude/review-agent-prompt.md | 2 +- .codecannon.yaml | 2 +- .cursor/rules/qa.mdc | 2 +- .cursor/rules/release.mdc | 2 +- .cursor/rules/review.mdc | 4 ++-- .cursor/rules/setup.mdc | 28 +++++++++++------------ .cursor/rules/ship.mdc | 2 +- .cursor/rules/start.mdc | 2 +- .cursor/rules/status.mdc | 2 +- .cursor/rules/version.mdc | 2 +- .gemini/skills/qa/SKILL.md | 2 +- .gemini/skills/release/SKILL.md | 2 +- .gemini/skills/review/SKILL.md | 4 ++-- .gemini/skills/setup/SKILL.md | 28 +++++++++++------------ .gemini/skills/ship/SKILL.md | 2 +- .gemini/skills/start/SKILL.md | 2 +- .gemini/skills/status/SKILL.md | 2 +- .gemini/skills/version/SKILL.md | 2 +- AGENTS.md | 8 +++---- README.md | 6 ++--- docs/customization.md | 4 ++-- docs/index.md | 18 +++++++-------- docs/skills/setup.md | 2 +- skills/qa.md | 2 +- skills/review-agent.md | 4 ++++ skills/review.md | 2 +- skills/setup.md | 26 ++++++++++----------- skills/start.md | 18 +++++++++++---- sync.sh | 18 +++++++-------- templates/codecannon.yaml | 9 +++++--- templates/github/workflows/sync-check.yml | 2 +- 47 files changed, 158 insertions(+), 141 deletions(-) diff --git a/.agents/skills/qa/SKILL.md b/.agents/skills/qa/SKILL.md index bc458db..79cb5ff 100644 --- a/.agents/skills/qa/SKILL.md +++ b/.agents/skills/qa/SKILL.md @@ -141,4 +141,4 @@ After applying labels, tell the user what was done: - Never post the comment without showing it to the user first. - Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying labels). - Never merge, deploy, or take any action beyond labeling and commenting. - + diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md index 4935cee..9f484f3 100644 --- a/.agents/skills/release/SKILL.md +++ b/.agents/skills/release/SKILL.md @@ -152,4 +152,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.agents/skills/review/SKILL.md b/.agents/skills/review/SKILL.md index 837c7dc..b30cece 100644 --- a/.agents/skills/review/SKILL.md +++ b/.agents/skills/review/SKILL.md @@ -17,7 +17,7 @@ description: Run a standalone code review on a pull request If `ai` is `"off"`, say: -> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh." +> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.sh." Do not proceed. @@ -65,4 +65,4 @@ After the review agent completes, relay its verdict to the user: - This command does not commit, push, or merge anything. It only reviews. - It may be called manually at any time, not just from `/ship`. - The review comment is posted to GitHub for the audit trail. - + diff --git a/.agents/skills/setup/SKILL.md b/.agents/skills/setup/SKILL.md index 0f3b29c..00daa2c 100644 --- a/.agents/skills/setup/SKILL.md +++ b/.agents/skills/setup/SKILL.md @@ -22,18 +22,18 @@ If both exist at the working directory root → **go to State 1**. **Check B — Is there any Code Cannon submodule presence?** ```bash -test -d CodeCanon +test -d CodeCannon ``` ```bash -test -f .gitmodules && grep -q CodeCanon .gitmodules +test -f .gitmodules && grep -q CodeCannon .gitmodules ``` If either is true → **go to State 2**. **Check C — State 1 fallback** -If `.codecannon.yaml` is absent AND neither `CodeCanon/` nor `.gitmodules` exist → **go to State 1**. +If `.codecannon.yaml` is absent AND neither `CodeCannon/` nor `.gitmodules` exist → **go to State 1**. Otherwise → **go to State 2**. @@ -74,11 +74,11 @@ Show the exact command sequence: ```bash cd /path/to/your-project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Edit .codecannon.yaml — set branch names, commands, adapters -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Do not touch any file. The user runs these commands in their project directory. @@ -89,13 +89,13 @@ Do not touch any file. The user runs these commands in their project directory. Run checks 1–7 in order. Stop at the first failing check and address it. After describing the fix, tell the user to run `/setup` again once they've resolved it. Do not continue past a failing check. -### Check 1 — CodeCanon/sync.sh present +### Check 1 — CodeCannon/sync.sh present ```bash -test -f CodeCanon/sync.sh +test -f CodeCannon/sync.sh ``` -If missing: the submodule was added to `.gitmodules` or `CodeCanon/` exists as an empty directory, but it hasn't been initialized. Show: +If missing: the submodule was added to `.gitmodules` or `CodeCannon/` exists as an empty directory, but it hasn't been initialized. Show: ```bash git submodule update --init --recursive @@ -144,7 +144,7 @@ If missing: "I'll create `.codecannon.yaml` from the template — you'll want to Show: ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually. @@ -223,7 +223,7 @@ If none exist: "sync.sh hasn't been run yet — the skill commands don't exist." Show: ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually before continuing. Stop. @@ -460,7 +460,7 @@ After completing or skipping the config walkthrough, say: Show the exact command: ```bash -git add .codecannon.yaml .claude/ CodeCanon AGENTS.md +git add .codecannon.yaml .claude/ CodeCannon AGENTS.md ``` Add a note: `/start` can be used to create well-formed GitHub issues without writing any code — useful for non-developers tracking work. `/status` generates standup summaries from open issues and PRs — both are valuable outside of a development workflow. @@ -469,11 +469,11 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri ## Hard rules -- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCanon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). +- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCannon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). - Do not run `sync.sh` without explicit user permission. - Do not create `.codecannon.yaml` without explicit user permission. - Do not report a configuration problem unless confident the condition is genuinely broken. Prefer false negatives over false positives on all diagnostic checks. - Never fetch more than 100 labels in a single command. `gh label list --limit 100` is the ceiling. - Do not skip any human gate in Phase 2 or Phase 3 — each write requires confirmation. - If the user skips a config value, do not ask again. Move on. - + diff --git a/.agents/skills/ship/SKILL.md b/.agents/skills/ship/SKILL.md index 5e4a1db..7ab8e30 100644 --- a/.agents/skills/ship/SKILL.md +++ b/.agents/skills/ship/SKILL.md @@ -185,4 +185,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.agents/skills/start/SKILL.md b/.agents/skills/start/SKILL.md index d8c17ac..b4047c5 100644 --- a/.agents/skills/start/SKILL.md +++ b/.agents/skills/start/SKILL.md @@ -228,4 +228,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.agents/skills/status/SKILL.md b/.agents/skills/status/SKILL.md index 2b16a40..38983e9 100644 --- a/.agents/skills/status/SKILL.md +++ b/.agents/skills/status/SKILL.md @@ -180,4 +180,4 @@ Do not post, comment, write files, or take any action. Output only. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. - + diff --git a/.agents/skills/version/SKILL.md b/.agents/skills/version/SKILL.md index 557f359..e77f712 100644 --- a/.agents/skills/version/SKILL.md +++ b/.agents/skills/version/SKILL.md @@ -78,4 +78,4 @@ Both the version bump commit and the tag must be pushed. Tell the user the new version and tag: "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to preview for testing. When testing is complete, run `/release`." - + diff --git a/.claude/commands/qa.md b/.claude/commands/qa.md index b94b5bf..6e5cbc2 100644 --- a/.claude/commands/qa.md +++ b/.claude/commands/qa.md @@ -136,4 +136,4 @@ After applying labels, tell the user what was done: - Never post the comment without showing it to the user first. - Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying labels). - Never merge, deploy, or take any action beyond labeling and commenting. - + diff --git a/.claude/commands/release.md b/.claude/commands/release.md index c46fc74..a637ec0 100644 --- a/.claude/commands/release.md +++ b/.claude/commands/release.md @@ -147,4 +147,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.claude/commands/review.md b/.claude/commands/review.md index 2b3f13e..d83f263 100644 --- a/.claude/commands/review.md +++ b/.claude/commands/review.md @@ -12,7 +12,7 @@ Run a standalone code review on a pull request If `ai` is `"off"`, say: -> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh." +> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.sh." Do not proceed. @@ -60,4 +60,4 @@ After the review agent completes, relay its verdict to the user: - This command does not commit, push, or merge anything. It only reviews. - It may be called manually at any time, not just from `/ship`. - The review comment is posted to GitHub for the audit trail. - + diff --git a/.claude/commands/setup.md b/.claude/commands/setup.md index 7c0a9d2..1f0b664 100644 --- a/.claude/commands/setup.md +++ b/.claude/commands/setup.md @@ -17,18 +17,18 @@ If both exist at the working directory root → **go to State 1**. **Check B — Is there any Code Cannon submodule presence?** ```bash -test -d CodeCanon +test -d CodeCannon ``` ```bash -test -f .gitmodules && grep -q CodeCanon .gitmodules +test -f .gitmodules && grep -q CodeCannon .gitmodules ``` If either is true → **go to State 2**. **Check C — State 1 fallback** -If `.codecannon.yaml` is absent AND neither `CodeCanon/` nor `.gitmodules` exist → **go to State 1**. +If `.codecannon.yaml` is absent AND neither `CodeCannon/` nor `.gitmodules` exist → **go to State 1**. Otherwise → **go to State 2**. @@ -69,11 +69,11 @@ Show the exact command sequence: ```bash cd /path/to/your-project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Edit .codecannon.yaml — set branch names, commands, adapters -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Do not touch any file. The user runs these commands in their project directory. @@ -84,13 +84,13 @@ Do not touch any file. The user runs these commands in their project directory. Run checks 1–7 in order. Stop at the first failing check and address it. After describing the fix, tell the user to run `/setup` again once they've resolved it. Do not continue past a failing check. -### Check 1 — CodeCanon/sync.sh present +### Check 1 — CodeCannon/sync.sh present ```bash -test -f CodeCanon/sync.sh +test -f CodeCannon/sync.sh ``` -If missing: the submodule was added to `.gitmodules` or `CodeCanon/` exists as an empty directory, but it hasn't been initialized. Show: +If missing: the submodule was added to `.gitmodules` or `CodeCannon/` exists as an empty directory, but it hasn't been initialized. Show: ```bash git submodule update --init --recursive @@ -139,7 +139,7 @@ If missing: "I'll create `.codecannon.yaml` from the template — you'll want to Show: ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually. @@ -218,7 +218,7 @@ If none exist: "sync.sh hasn't been run yet — the skill commands don't exist." Show: ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually before continuing. Stop. @@ -455,7 +455,7 @@ After completing or skipping the config walkthrough, say: Show the exact command: ```bash -git add .codecannon.yaml .claude/ CodeCanon AGENTS.md +git add .codecannon.yaml .claude/ CodeCannon AGENTS.md ``` Add a note: `/start` can be used to create well-formed GitHub issues without writing any code — useful for non-developers tracking work. `/status` generates standup summaries from open issues and PRs — both are valuable outside of a development workflow. @@ -464,11 +464,11 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri ## Hard rules -- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCanon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). +- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCannon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). - Do not run `sync.sh` without explicit user permission. - Do not create `.codecannon.yaml` without explicit user permission. - Do not report a configuration problem unless confident the condition is genuinely broken. Prefer false negatives over false positives on all diagnostic checks. - Never fetch more than 100 labels in a single command. `gh label list --limit 100` is the ceiling. - Do not skip any human gate in Phase 2 or Phase 3 — each write requires confirmation. - If the user skips a config value, do not ask again. Move on. - + diff --git a/.claude/commands/ship.md b/.claude/commands/ship.md index baffeae..a975def 100644 --- a/.claude/commands/ship.md +++ b/.claude/commands/ship.md @@ -180,4 +180,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.claude/commands/start.md b/.claude/commands/start.md index 3a5a64d..6345104 100644 --- a/.claude/commands/start.md +++ b/.claude/commands/start.md @@ -223,4 +223,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.claude/commands/status.md b/.claude/commands/status.md index 8df3878..77d363f 100644 --- a/.claude/commands/status.md +++ b/.claude/commands/status.md @@ -175,4 +175,4 @@ Do not post, comment, write files, or take any action. Output only. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. - + diff --git a/.claude/commands/version.md b/.claude/commands/version.md index c978df4..ccd65f4 100644 --- a/.claude/commands/version.md +++ b/.claude/commands/version.md @@ -73,4 +73,4 @@ Both the version bump commit and the tag must be pushed. Tell the user the new version and tag: "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to preview for testing. When testing is complete, run `/release`." - + diff --git a/.claude/review-agent-prompt.md b/.claude/review-agent-prompt.md index 85601f5..4477634 100644 --- a/.claude/review-agent-prompt.md +++ b/.claude/review-agent-prompt.md @@ -105,4 +105,4 @@ If no findings: "No issues found. Code looks correct and follows project convent - Do not suggest improvements outside the scope of the PR. - Do not re-review files that haven't changed. - Your review is posted to GitHub for the audit trail — keep it professional. - + diff --git a/.codecannon.yaml b/.codecannon.yaml index f778699..12fbf0e 100644 --- a/.codecannon.yaml +++ b/.codecannon.yaml @@ -1,6 +1,6 @@ # .codecannon.yaml — project configuration for Code Cannon skill sync # -# This is Code Cannon's own config. Unlike consumer projects (which run CodeCanon/sync.sh), +# This is Code Cannon's own config. Unlike consumer projects (which run CodeCannon/sync.sh), # this repo runs sync as ./sync.sh — Code Cannon is not a submodule of itself. # # See config.schema.yaml for documentation on each placeholder. diff --git a/.cursor/rules/qa.mdc b/.cursor/rules/qa.mdc index 05ca798..caa66c7 100644 --- a/.cursor/rules/qa.mdc +++ b/.cursor/rules/qa.mdc @@ -142,4 +142,4 @@ After applying labels, tell the user what was done: - Never post the comment without showing it to the user first. - Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying labels). - Never merge, deploy, or take any action beyond labeling and commenting. - + diff --git a/.cursor/rules/release.mdc b/.cursor/rules/release.mdc index 24ac65f..850fbc9 100644 --- a/.cursor/rules/release.mdc +++ b/.cursor/rules/release.mdc @@ -153,4 +153,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.cursor/rules/review.mdc b/.cursor/rules/review.mdc index b07db32..2614955 100644 --- a/.cursor/rules/review.mdc +++ b/.cursor/rules/review.mdc @@ -18,7 +18,7 @@ alwaysApply: false If `ai` is `"off"`, say: -> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh." +> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.sh." Do not proceed. @@ -66,4 +66,4 @@ After the review agent completes, relay its verdict to the user: - This command does not commit, push, or merge anything. It only reviews. - It may be called manually at any time, not just from `/ship`. - The review comment is posted to GitHub for the audit trail. - + diff --git a/.cursor/rules/setup.mdc b/.cursor/rules/setup.mdc index 7b31a40..7ad5739 100644 --- a/.cursor/rules/setup.mdc +++ b/.cursor/rules/setup.mdc @@ -23,18 +23,18 @@ If both exist at the working directory root → **go to State 1**. **Check B — Is there any Code Cannon submodule presence?** ```bash -test -d CodeCanon +test -d CodeCannon ``` ```bash -test -f .gitmodules && grep -q CodeCanon .gitmodules +test -f .gitmodules && grep -q CodeCannon .gitmodules ``` If either is true → **go to State 2**. **Check C — State 1 fallback** -If `.codecannon.yaml` is absent AND neither `CodeCanon/` nor `.gitmodules` exist → **go to State 1**. +If `.codecannon.yaml` is absent AND neither `CodeCannon/` nor `.gitmodules` exist → **go to State 1**. Otherwise → **go to State 2**. @@ -75,11 +75,11 @@ Show the exact command sequence: ```bash cd /path/to/your-project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Edit .codecannon.yaml — set branch names, commands, adapters -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Do not touch any file. The user runs these commands in their project directory. @@ -90,13 +90,13 @@ Do not touch any file. The user runs these commands in their project directory. Run checks 1–7 in order. Stop at the first failing check and address it. After describing the fix, tell the user to run `/setup` again once they've resolved it. Do not continue past a failing check. -### Check 1 — CodeCanon/sync.sh present +### Check 1 — CodeCannon/sync.sh present ```bash -test -f CodeCanon/sync.sh +test -f CodeCannon/sync.sh ``` -If missing: the submodule was added to `.gitmodules` or `CodeCanon/` exists as an empty directory, but it hasn't been initialized. Show: +If missing: the submodule was added to `.gitmodules` or `CodeCannon/` exists as an empty directory, but it hasn't been initialized. Show: ```bash git submodule update --init --recursive @@ -145,7 +145,7 @@ If missing: "I'll create `.codecannon.yaml` from the template — you'll want to Show: ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually. @@ -224,7 +224,7 @@ If none exist: "sync.sh hasn't been run yet — the skill commands don't exist." Show: ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually before continuing. Stop. @@ -461,7 +461,7 @@ After completing or skipping the config walkthrough, say: Show the exact command: ```bash -git add .codecannon.yaml .claude/ CodeCanon AGENTS.md +git add .codecannon.yaml .claude/ CodeCannon AGENTS.md ``` Add a note: `/start` can be used to create well-formed GitHub issues without writing any code — useful for non-developers tracking work. `/status` generates standup summaries from open issues and PRs — both are valuable outside of a development workflow. @@ -470,11 +470,11 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri ## Hard rules -- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCanon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). +- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCannon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). - Do not run `sync.sh` without explicit user permission. - Do not create `.codecannon.yaml` without explicit user permission. - Do not report a configuration problem unless confident the condition is genuinely broken. Prefer false negatives over false positives on all diagnostic checks. - Never fetch more than 100 labels in a single command. `gh label list --limit 100` is the ceiling. - Do not skip any human gate in Phase 2 or Phase 3 — each write requires confirmation. - If the user skips a config value, do not ask again. Move on. - + diff --git a/.cursor/rules/ship.mdc b/.cursor/rules/ship.mdc index 29187ab..805c7b4 100644 --- a/.cursor/rules/ship.mdc +++ b/.cursor/rules/ship.mdc @@ -186,4 +186,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.cursor/rules/start.mdc b/.cursor/rules/start.mdc index 771c602..fad6da7 100644 --- a/.cursor/rules/start.mdc +++ b/.cursor/rules/start.mdc @@ -229,4 +229,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.cursor/rules/status.mdc b/.cursor/rules/status.mdc index c9030d7..f0b5c8e 100644 --- a/.cursor/rules/status.mdc +++ b/.cursor/rules/status.mdc @@ -181,4 +181,4 @@ Do not post, comment, write files, or take any action. Output only. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. - + diff --git a/.cursor/rules/version.mdc b/.cursor/rules/version.mdc index 51f4fc5..290af5d 100644 --- a/.cursor/rules/version.mdc +++ b/.cursor/rules/version.mdc @@ -79,4 +79,4 @@ Both the version bump commit and the tag must be pushed. Tell the user the new version and tag: "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to preview for testing. When testing is complete, run `/release`." - + diff --git a/.gemini/skills/qa/SKILL.md b/.gemini/skills/qa/SKILL.md index 46ad04a..97fea27 100644 --- a/.gemini/skills/qa/SKILL.md +++ b/.gemini/skills/qa/SKILL.md @@ -141,4 +141,4 @@ After applying labels, tell the user what was done: - Never post the comment without showing it to the user first. - Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying labels). - Never merge, deploy, or take any action beyond labeling and commenting. - + diff --git a/.gemini/skills/release/SKILL.md b/.gemini/skills/release/SKILL.md index 01b6dec..e35a255 100644 --- a/.gemini/skills/release/SKILL.md +++ b/.gemini/skills/release/SKILL.md @@ -152,4 +152,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.gemini/skills/review/SKILL.md b/.gemini/skills/review/SKILL.md index 09381ac..73f565f 100644 --- a/.gemini/skills/review/SKILL.md +++ b/.gemini/skills/review/SKILL.md @@ -17,7 +17,7 @@ description: Run a standalone code review on a pull request If `ai` is `"off"`, say: -> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh." +> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.sh." Do not proceed. @@ -65,4 +65,4 @@ After the review agent completes, relay its verdict to the user: - This command does not commit, push, or merge anything. It only reviews. - It may be called manually at any time, not just from `/ship`. - The review comment is posted to GitHub for the audit trail. - + diff --git a/.gemini/skills/setup/SKILL.md b/.gemini/skills/setup/SKILL.md index 7135c68..16ee702 100644 --- a/.gemini/skills/setup/SKILL.md +++ b/.gemini/skills/setup/SKILL.md @@ -22,18 +22,18 @@ If both exist at the working directory root → **go to State 1**. **Check B — Is there any Code Cannon submodule presence?** ```bash -test -d CodeCanon +test -d CodeCannon ``` ```bash -test -f .gitmodules && grep -q CodeCanon .gitmodules +test -f .gitmodules && grep -q CodeCannon .gitmodules ``` If either is true → **go to State 2**. **Check C — State 1 fallback** -If `.codecannon.yaml` is absent AND neither `CodeCanon/` nor `.gitmodules` exist → **go to State 1**. +If `.codecannon.yaml` is absent AND neither `CodeCannon/` nor `.gitmodules` exist → **go to State 1**. Otherwise → **go to State 2**. @@ -74,11 +74,11 @@ Show the exact command sequence: ```bash cd /path/to/your-project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Edit .codecannon.yaml — set branch names, commands, adapters -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Do not touch any file. The user runs these commands in their project directory. @@ -89,13 +89,13 @@ Do not touch any file. The user runs these commands in their project directory. Run checks 1–7 in order. Stop at the first failing check and address it. After describing the fix, tell the user to run `/setup` again once they've resolved it. Do not continue past a failing check. -### Check 1 — CodeCanon/sync.sh present +### Check 1 — CodeCannon/sync.sh present ```bash -test -f CodeCanon/sync.sh +test -f CodeCannon/sync.sh ``` -If missing: the submodule was added to `.gitmodules` or `CodeCanon/` exists as an empty directory, but it hasn't been initialized. Show: +If missing: the submodule was added to `.gitmodules` or `CodeCannon/` exists as an empty directory, but it hasn't been initialized. Show: ```bash git submodule update --init --recursive @@ -144,7 +144,7 @@ If missing: "I'll create `.codecannon.yaml` from the template — you'll want to Show: ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually. @@ -223,7 +223,7 @@ If none exist: "sync.sh hasn't been run yet — the skill commands don't exist." Show: ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually before continuing. Stop. @@ -460,7 +460,7 @@ After completing or skipping the config walkthrough, say: Show the exact command: ```bash -git add .codecannon.yaml .claude/ CodeCanon AGENTS.md +git add .codecannon.yaml .claude/ CodeCannon AGENTS.md ``` Add a note: `/start` can be used to create well-formed GitHub issues without writing any code — useful for non-developers tracking work. `/status` generates standup summaries from open issues and PRs — both are valuable outside of a development workflow. @@ -469,11 +469,11 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri ## Hard rules -- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCanon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). +- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCannon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). - Do not run `sync.sh` without explicit user permission. - Do not create `.codecannon.yaml` without explicit user permission. - Do not report a configuration problem unless confident the condition is genuinely broken. Prefer false negatives over false positives on all diagnostic checks. - Never fetch more than 100 labels in a single command. `gh label list --limit 100` is the ceiling. - Do not skip any human gate in Phase 2 or Phase 3 — each write requires confirmation. - If the user skips a config value, do not ask again. Move on. - + diff --git a/.gemini/skills/ship/SKILL.md b/.gemini/skills/ship/SKILL.md index 1cd81f0..370fa87 100644 --- a/.gemini/skills/ship/SKILL.md +++ b/.gemini/skills/ship/SKILL.md @@ -185,4 +185,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.gemini/skills/start/SKILL.md b/.gemini/skills/start/SKILL.md index 2dc5b90..84fa2b7 100644 --- a/.gemini/skills/start/SKILL.md +++ b/.gemini/skills/start/SKILL.md @@ -228,4 +228,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.gemini/skills/status/SKILL.md b/.gemini/skills/status/SKILL.md index 688c891..364ea21 100644 --- a/.gemini/skills/status/SKILL.md +++ b/.gemini/skills/status/SKILL.md @@ -180,4 +180,4 @@ Do not post, comment, write files, or take any action. Output only. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. - + diff --git a/.gemini/skills/version/SKILL.md b/.gemini/skills/version/SKILL.md index 5410a28..102b7a9 100644 --- a/.gemini/skills/version/SKILL.md +++ b/.gemini/skills/version/SKILL.md @@ -78,4 +78,4 @@ Both the version bump commit and the tag must be pushed. Tell the user the new version and tag: "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to preview for testing. When testing is complete, run `/release`." - + diff --git a/AGENTS.md b/AGENTS.md index 1d8793f..45ed045 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ Skills live in `skills/*.md`. Each file has YAML frontmatter followed by the ski When editing a skill: 1. Edit the `.md` file in `skills/`. -2. Test locally by running sync against the APrimeforYou project (a known consumer): `cd ../APrimeforYou && CodeCanon/sync.sh --dry-run` +2. Test locally by running sync against the APrimeforYou project (a known consumer): `cd ../APrimeforYou && CodeCannon/sync.sh --dry-run` 3. Verify generated output looks correct before committing. ### Adding a new adapter @@ -42,13 +42,13 @@ When editing a skill: ```bash cd /path/to/a/consumer/project -../CodeCanon/sync.sh --dry-run # verify output paths and content -../CodeCanon/sync.sh # generate for real +../CodeCannon/sync.sh --dry-run # verify output paths and content +../CodeCannon/sync.sh # generate for real ``` ## Self-hosting: using Code Cannon to develop Code Cannon -- **Sync path exception**: agents working on this repo run `./sync.sh`, not `CodeCanon/sync.sh`. Every consumer project uses `CodeCanon/sync.sh` via the submodule path — this repo is the only exception. +- **Sync path exception**: agents working on this repo run `./sync.sh`, not `CodeCannon/sync.sh`. Every consumer project uses `CodeCannon/sync.sh` via the submodule path — this repo is the only exception. - **Edit-test loop**: edit a skill in `skills/` → `make check` to validate placeholders → `make dev` to preview generated output → commit and `/ship`. - **Re-run sync after skill edits**: after changing any file in `skills/`, run `./sync.sh` to regenerate `.claude/commands/`. Commit the updated generated files in the same PR as the skill source change. - **Never edit `.claude/commands/` directly** — those files are generated. Edit the source skill in `skills/` and re-run sync. diff --git a/README.md b/README.md index 9ba5df3..177d684 100644 --- a/README.md +++ b/README.md @@ -72,14 +72,14 @@ For first-time setup, run `/setup`; it can populate labels and walk through thes ```bash # Add Code Cannon to your project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init # Create and edit your config -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Generate skill files -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Or run `/setup` for a guided walkthrough that detects your project state and configures everything interactively. diff --git a/docs/customization.md b/docs/customization.md index 65dde08..8b5bf2c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -130,7 +130,7 @@ The `AGENTS.md` template provides the structure. Your additions live alongside t Every generated file includes a hash comment in its header: ``` - + ``` When you run `sync.sh`, it computes the expected hash for each file. If the file on disk has a different hash (because you edited it manually), sync.sh warns and skips that file. This protects intentional customizations. @@ -142,7 +142,7 @@ To regenerate only specific skills: `sync.sh --skill start,ship`. ### sync.sh reference ``` -./CodeCanon/sync.sh [options] +./CodeCannon/sync.sh [options] Options: --config path Project config file (default: .codecannon.yaml) diff --git a/docs/index.md b/docs/index.md index bb048b0..f508987 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,14 +41,14 @@ The agent commits; you test. `/start` writes code but does not commit — it han ### 1. Add Code Cannon as a submodule ```bash -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init ``` ### 2. Create your project config ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Edit `.codecannon.yaml` — set your branch names, check command, deploy commands, and which adapters to generate. See the [config reference](config-reference.md) for all available settings. @@ -56,7 +56,7 @@ Edit `.codecannon.yaml` — set your branch names, check command, deploy command ### 3. Run sync ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` This generates skill files for each adapter listed in your config. For Claude Code, that's `.claude/commands/*.md`. For Cursor, `.cursor/rules/*.mdc`. @@ -64,7 +64,7 @@ This generates skill files for each adapter listed in your config. For Claude Co ### 4. Copy AGENTS.md template (optional) ```bash -cp CodeCanon/templates/AGENTS.md.template AGENTS.md +cp CodeCannon/templates/AGENTS.md.template AGENTS.md ``` Edit the project-specific section at the bottom. @@ -73,7 +73,7 @@ Edit the project-specific section at the bottom. ```makefile # In your Makefile -include CodeCanon/Makefile.agents.mk +include CodeCannon/Makefile.agents.mk ``` Or copy the targets from `Makefile.agents.mk` directly. @@ -89,8 +89,8 @@ Or skip all of this and run `/setup` for a guided walkthrough. ## Keeping skills up to date ```bash -git submodule update --remote CodeCanon # pull latest skills -CodeCanon/sync.sh # regenerate skill files +git submodule update --remote CodeCannon # pull latest skills +CodeCannon/sync.sh # regenerate skill files ``` If any generated files have been manually customized, sync.sh will warn and skip them. Use `--force` to overwrite. @@ -99,9 +99,9 @@ If any generated files have been manually customized, sync.sh will warn and skip If your project still uses the previous repo URL or folder name: -1. Point `.gitmodules` at `https://github.com/LightbridgeLab/CodeCanon.git` and use submodule path `CodeCanon/` (or rename your existing checkout to match). +1. Point `.gitmodules` at `https://github.com/LightbridgeLab/CodeCannon.git` and use submodule path `CodeCannon/` (or rename your existing checkout to match). 2. Rename `.agentgate.yaml` to `.codecannon.yaml`. -3. Run `CodeCanon/sync.sh --force` once if needed so generated file headers match the new provenance marker. +3. Run `CodeCannon/sync.sh --force` once if needed so generated file headers match the new provenance marker. ## Further reading diff --git a/docs/skills/setup.md b/docs/skills/setup.md index 4c82f7a..5cc1869 100644 --- a/docs/skills/setup.md +++ b/docs/skills/setup.md @@ -24,7 +24,7 @@ No arguments. Run it in any project where Code Cannon is (or should be) installe When the submodule is present, `/setup` runs these checks in order, stopping at the first failure: -1. **`CodeCanon/sync.sh` present** — submodule initialized? +1. **`CodeCannon/sync.sh` present** — submodule initialized? 2. **`gh` installed** — GitHub CLI available? 3. **`gh` authenticated** — logged in to GitHub? 4. **Inside a GitHub repo** — remote configured? diff --git a/skills/qa.md b/skills/qa.md index 46675ad..4d4fc7d 100644 --- a/skills/qa.md +++ b/skills/qa.md @@ -8,7 +8,7 @@ args: "none | issue number" {{#if !QA_READY_LABEL}} > **QA workflow is not configured.** `/qa` requires `QA_READY_LABEL` to be set in `.codecannon.yaml` so it can find issues waiting for QA. > -> To enable: add `QA_READY_LABEL: ready-for-qa` (or your preferred label name) to `.codecannon.yaml` and re-run `CodeCanon/sync.sh`. +> To enable: add `QA_READY_LABEL: ready-for-qa` (or your preferred label name) to `.codecannon.yaml` and re-run `CodeCannon/sync.sh`. > > Note: In trunk mode, `/ship` does not apply this label automatically — you would need to apply it manually or via a separate workflow. diff --git a/skills/review-agent.md b/skills/review-agent.md index c1230d3..14d4485 100644 --- a/skills/review-agent.md +++ b/skills/review-agent.md @@ -51,7 +51,9 @@ Check these categories in order of priority: - Remove the section entirely if your stack has no platform-specific gotchas. --> +{{#if PLATFORM_COMPLIANCE_NOTES}} {{PLATFORM_COMPLIANCE_NOTES}} +{{/if}} ### 4. Conventions @@ -64,7 +66,9 @@ Check these categories in order of priority: - "Use the design system tokens — no hardcoded hex values" --> +{{#if CONVENTIONS_NOTES}} {{CONVENTIONS_NOTES}} +{{/if}} - Commit messages in imperative mood ("Add X", "Fix Y", "Remove Z") - No `.env` files, build artifacts, or secrets committed diff --git a/skills/review.md b/skills/review.md index e1f4808..076a178 100644 --- a/skills/review.md +++ b/skills/review.md @@ -15,7 +15,7 @@ args: "PR number (optional — defaults to current branch's open PR)" If `{{REVIEW_GATE}}` is `"off"`, say: -> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh." +> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.sh." Do not proceed. diff --git a/skills/setup.md b/skills/setup.md index 7cff646..72204af 100644 --- a/skills/setup.md +++ b/skills/setup.md @@ -20,18 +20,18 @@ If both exist at the working directory root → **go to State 1**. **Check B — Is there any Code Cannon submodule presence?** ```bash -test -d CodeCanon +test -d CodeCannon ``` ```bash -test -f .gitmodules && grep -q CodeCanon .gitmodules +test -f .gitmodules && grep -q CodeCannon .gitmodules ``` If either is true → **go to State 2**. **Check C — State 1 fallback** -If `.codecannon.yaml` is absent AND neither `CodeCanon/` nor `.gitmodules` exist → **go to State 1**. +If `.codecannon.yaml` is absent AND neither `CodeCannon/` nor `.gitmodules` exist → **go to State 1**. Otherwise → **go to State 2**. @@ -72,11 +72,11 @@ Show the exact command sequence: ```bash cd /path/to/your-project -git submodule add https://github.com/LightbridgeLab/CodeCanon.git CodeCanon +git submodule add https://github.com/LightbridgeLab/CodeCannon.git CodeCannon git submodule update --init -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml # Edit .codecannon.yaml — set branch names, commands, adapters -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Do not touch any file. The user runs these commands in their project directory. @@ -87,13 +87,13 @@ Do not touch any file. The user runs these commands in their project directory. Run checks 1–7 in order. Stop at the first failing check and address it. After describing the fix, tell the user to run `/setup` again once they've resolved it. Do not continue past a failing check. -### Check 1 — CodeCanon/sync.sh present +### Check 1 — CodeCannon/sync.sh present ```bash -test -f CodeCanon/sync.sh +test -f CodeCannon/sync.sh ``` -If missing: the submodule was added to `.gitmodules` or `CodeCanon/` exists as an empty directory, but it hasn't been initialized. Show: +If missing: the submodule was added to `.gitmodules` or `CodeCannon/` exists as an empty directory, but it hasn't been initialized. Show: ```bash git submodule update --init --recursive @@ -142,7 +142,7 @@ If missing: "I'll create `.codecannon.yaml` from the template — you'll want to Show: ```bash -cp CodeCanon/templates/codecannon.yaml .codecannon.yaml +cp CodeCannon/templates/codecannon.yaml .codecannon.yaml ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually. @@ -221,7 +221,7 @@ If none exist: "sync.sh hasn't been run yet — the skill commands don't exist." Show: ```bash -CodeCanon/sync.sh +CodeCannon/sync.sh ``` Ask permission to run it. If the user agrees, run it. If they decline, tell them to run it manually before continuing. Stop. @@ -458,7 +458,7 @@ After completing or skipping the config walkthrough, say: Show the exact command: ```bash -git add .codecannon.yaml .claude/ CodeCanon AGENTS.md +git add .codecannon.yaml .claude/ CodeCannon AGENTS.md ``` Add a note: `/start` can be used to create well-formed GitHub issues without writing any code — useful for non-developers tracking work. `/status` generates standup summaries from open issues and PRs — both are valuable outside of a development workflow. @@ -467,7 +467,7 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri ## Hard rules -- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCanon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). +- Only modify `.codecannon.yaml`. Do not touch any other file (except running `CodeCannon/sync.sh`, which modifies `.claude/commands/` — permitted only with explicit user approval). - Do not run `sync.sh` without explicit user permission. - Do not create `.codecannon.yaml` without explicit user permission. - Do not report a configuration problem unless confident the condition is genuinely broken. Prefer false negatives over false positives on all diagnostic checks. diff --git a/skills/start.md b/skills/start.md index 6294e57..2a98042 100644 --- a/skills/start.md +++ b/skills/start.md @@ -160,11 +160,16 @@ gh issue comment --body "## Agent Implementation Notes Ensure the base branch is up-to-date before branching: +{{#if BRANCH_DEV}} ```bash git checkout {{BRANCH_DEV}} && git pull origin {{BRANCH_DEV}} ``` - -(In trunk mode where `{{BRANCH_DEV}}` is empty, use `{{BRANCH_PROD}}` instead.) +{{/if}} +{{#if !BRANCH_DEV}} +```bash +git checkout {{BRANCH_PROD}} && git pull origin {{BRANCH_PROD}} +``` +{{/if}} Now create the feature branch: @@ -220,11 +225,16 @@ Ask: **"Does this match your understanding? Continue this ticket, or open a fres Ensure the base branch is up-to-date before branching: +{{#if BRANCH_DEV}} ```bash git checkout {{BRANCH_DEV}} && git pull origin {{BRANCH_DEV}} ``` - -(In trunk mode where `{{BRANCH_DEV}}` is empty, use `{{BRANCH_PROD}}` instead.) +{{/if}} +{{#if !BRANCH_DEV}} +```bash +git checkout {{BRANCH_PROD}} && git pull origin {{BRANCH_PROD}} +``` +{{/if}} Find and check out the existing branch, or create a new one linked to the issue: diff --git a/sync.sh b/sync.sh index 0fd6f28..e193f4a 100755 --- a/sync.sh +++ b/sync.sh @@ -1,14 +1,14 @@ #!/usr/bin/env python3 """ -CodeCanon/sync.sh — generate agent-specific skill files from source skills + project config +CodeCannon/sync.sh — generate agent-specific skill files from source skills + project config Usage: - ./CodeCanon/sync.sh # use .codecannon.yaml in current dir - ./CodeCanon/sync.sh --config path/to/config.yaml - ./CodeCanon/sync.sh --force # overwrite customized files without prompting - ./CodeCanon/sync.sh --dry-run # preview what would be written, exits 1 if any writes pending - ./CodeCanon/sync.sh --validate # check all placeholders are defined, exits 1 if any missing - ./CodeCanon/sync.sh --skill start # sync only the named skill(s), comma-separated + ./CodeCannon/sync.sh # use .codecannon.yaml in current dir + ./CodeCannon/sync.sh --config path/to/config.yaml + ./CodeCannon/sync.sh --force # overwrite customized files without prompting + ./CodeCannon/sync.sh --dry-run # preview what would be written, exits 1 if any writes pending + ./CodeCannon/sync.sh --validate # check all placeholders are defined, exits 1 if any missing + ./CodeCannon/sync.sh --skill start # sync only the named skill(s), comma-separated Generated files carry a hash comment so sync.sh can detect manual edits. If a generated file has been customized (hash mismatch), sync.sh warns and skips it. @@ -23,7 +23,7 @@ import argparse from pathlib import Path CODECANNON_DIR = Path(__file__).parent -MARKER = "generated by CodeCanon/sync.sh" +MARKER = "generated by CodeCannon/sync.sh" LEGACY_MARKER = "generated by agentgate/sync.sh" @@ -285,7 +285,7 @@ def sync_skill(skill_path, adapter, project_config, project_root, args): # Compute hash (of content, before marker line) h = content_hash(full_content) - marker_line = f"" + marker_line = f"" final_content = full_content + marker_line + '\n' # Check existing file diff --git a/templates/codecannon.yaml b/templates/codecannon.yaml index 820ef1d..2c3ee6b 100644 --- a/templates/codecannon.yaml +++ b/templates/codecannon.yaml @@ -1,14 +1,17 @@ # .codecannon.yaml — project configuration for Code Cannon skill sync # # Copy this file to your project root as .codecannon.yaml and customize. -# Run: CodeCanon/sync.sh +# Run: CodeCannon/sync.sh # -# See CodeCanon/config.schema.yaml for documentation on each placeholder. +# See CodeCannon/config.schema.yaml for documentation on each placeholder. # Which agent adapters to generate skills for. -# Available: claude, cursor +# Available: claude, cursor, gemini, codex adapters: - claude + - cursor +# - gemini +# - codex # Placeholder values substituted into skill files during sync. # Remove any you don't need; sync.sh will warn about unresolved placeholders. diff --git a/templates/github/workflows/sync-check.yml b/templates/github/workflows/sync-check.yml index 911a929..9e3a613 100644 --- a/templates/github/workflows/sync-check.yml +++ b/templates/github/workflows/sync-check.yml @@ -7,5 +7,5 @@ jobs: - uses: actions/checkout@v4 - name: Check for sync drift run: | - CodeCanon/sync.sh --dry-run + CodeCannon/sync.sh --dry-run # exits non-zero if any files would be written From 32286fb1b6255996ece2d90909378e14fbbebe14 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 10:10:12 -0400 Subject: [PATCH 2/5] Strip leading @ from reviewer handles before passing to gh pr create The gh CLI's --reviewer flag rejects handles with @ prefixes (e.g. @sebastientaggart), causing PR creation to fail with "Could not resolve user with login". The ship skill now instructs agents to strip @ from each comma-separated handle before constructing the --reviewer argument. --- .agents/skills/ship/SKILL.md | 4 ++-- .claude/commands/ship.md | 4 ++-- .cursor/rules/ship.mdc | 4 ++-- .gemini/skills/ship/SKILL.md | 4 ++-- skills/ship.md | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.agents/skills/ship/SKILL.md b/.agents/skills/ship/SKILL.md index 5e4a1db..8cd82c8 100644 --- a/.agents/skills/ship/SKILL.md +++ b/.agents/skills/ship/SKILL.md @@ -99,7 +99,7 @@ EOF )" ``` -Add `--reviewer @sebastientaggart` to the `gh pr create` command above. +Add `--reviewer` to the `gh pr create` command above using the handles from `@sebastientaggart`. Before passing them, strip any leading `@` from each comma-separated handle (e.g. `@alice,@org/team` becomes `alice,org/team`) — the `gh` CLI requires bare usernames. If a CODEOWNERS file exists, both apply: CODEOWNERS triggers automatic review requests from GitHub; the `--reviewer` flag adds the explicitly configured handles on top. @@ -185,4 +185,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.claude/commands/ship.md b/.claude/commands/ship.md index baffeae..e3f4993 100644 --- a/.claude/commands/ship.md +++ b/.claude/commands/ship.md @@ -94,7 +94,7 @@ EOF )" ``` -Add `--reviewer @sebastientaggart` to the `gh pr create` command above. +Add `--reviewer` to the `gh pr create` command above using the handles from `@sebastientaggart`. Before passing them, strip any leading `@` from each comma-separated handle (e.g. `@alice,@org/team` becomes `alice,org/team`) — the `gh` CLI requires bare usernames. If a CODEOWNERS file exists, both apply: CODEOWNERS triggers automatic review requests from GitHub; the `--reviewer` flag adds the explicitly configured handles on top. @@ -180,4 +180,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.cursor/rules/ship.mdc b/.cursor/rules/ship.mdc index 29187ab..e00f4c3 100644 --- a/.cursor/rules/ship.mdc +++ b/.cursor/rules/ship.mdc @@ -100,7 +100,7 @@ EOF )" ``` -Add `--reviewer @sebastientaggart` to the `gh pr create` command above. +Add `--reviewer` to the `gh pr create` command above using the handles from `@sebastientaggart`. Before passing them, strip any leading `@` from each comma-separated handle (e.g. `@alice,@org/team` becomes `alice,org/team`) — the `gh` CLI requires bare usernames. If a CODEOWNERS file exists, both apply: CODEOWNERS triggers automatic review requests from GitHub; the `--reviewer` flag adds the explicitly configured handles on top. @@ -186,4 +186,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.gemini/skills/ship/SKILL.md b/.gemini/skills/ship/SKILL.md index 1cd81f0..4f923bf 100644 --- a/.gemini/skills/ship/SKILL.md +++ b/.gemini/skills/ship/SKILL.md @@ -99,7 +99,7 @@ EOF )" ``` -Add `--reviewer @sebastientaggart` to the `gh pr create` command above. +Add `--reviewer` to the `gh pr create` command above using the handles from `@sebastientaggart`. Before passing them, strip any leading `@` from each comma-separated handle (e.g. `@alice,@org/team` becomes `alice,org/team`) — the `gh` CLI requires bare usernames. If a CODEOWNERS file exists, both apply: CODEOWNERS triggers automatic review requests from GitHub; the `--reviewer` flag adds the explicitly configured handles on top. @@ -185,4 +185,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/skills/ship.md b/skills/ship.md index 9049720..2e9dd84 100644 --- a/skills/ship.md +++ b/skills/ship.md @@ -110,7 +110,7 @@ EOF ``` {{#if DEFAULT_REVIEWERS}} -Add `--reviewer {{DEFAULT_REVIEWERS}}` to the `gh pr create` command above. +Add `--reviewer` to the `gh pr create` command above using the handles from `{{DEFAULT_REVIEWERS}}`. Before passing them, strip any leading `@` from each comma-separated handle (e.g. `@alice,@org/team` becomes `alice,org/team`) — the `gh` CLI requires bare usernames. If a CODEOWNERS file exists, both apply: CODEOWNERS triggers automatic review requests from GitHub; the `--reviewer` flag adds the explicitly configured handles on top. {{/if}} From 40d28802da669ab384711be8673bfb3c3de2a1a1 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 10:22:10 -0400 Subject: [PATCH 3/5] Add sync-with-base-branch step to /ship before committing --- skills/ship.md | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/skills/ship.md b/skills/ship.md index 9049720..8ac8e2a 100644 --- a/skills/ship.md +++ b/skills/ship.md @@ -59,7 +59,32 @@ If a linked issue number is identifiable, note it for the PR body. If not identi --- -## Step 4 — Commit +## Step 4 — Sync with base branch + +Bring the feature branch up to date before committing: + +{{#if BRANCH_DEV}} +``` +git fetch origin {{BRANCH_DEV}} && git merge origin/{{BRANCH_DEV}} +``` +{{/if}} +{{#if !BRANCH_DEV}} +``` +git fetch origin {{BRANCH_PROD}} && git merge origin/{{BRANCH_PROD}} +``` +{{/if}} + +If the merge completes cleanly (including fast-forward), proceed to Step 5. + +If there are merge conflicts, **stop** and say: + +> "Merge conflicts with ``. Resolve them before shipping." + +List the conflicting files. Help the user resolve them if asked, then continue. + +--- + +## Step 5 — Commit Stage all changes and commit: ``` @@ -74,7 +99,7 @@ Commit message rules: --- -## Step 5 — Push and open PR +## Step 6 — Push and open PR First, push the branch: ``` @@ -121,9 +146,9 @@ Omit the issue line entirely if no linked issue was identified in Step 3. --- -## Step 6 — Review (conditional) +## Step 7 — Review (conditional) -If `{{REVIEW_GATE}}` is `"off"`, skip directly to Step 7 (merge without review). +If `{{REVIEW_GATE}}` is `"off"`, skip directly to Step 8 (merge without review). Otherwise, load `{{REVIEW_AGENT_PROMPT}}` and perform the review for this PR. @@ -140,7 +165,7 @@ Wait for the review to complete and report its verdict. --- -## Step 7 — Act on verdict +## Step 8 — Act on verdict {{#if BRANCH_DEV}} Merge command (used by all paths below): `{{MERGE_CMD}}` From 047a2a7d5a8999b6b8bd88a6c7447ffb8097512d Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 10:54:54 -0400 Subject: [PATCH 4/5] Sync adapter files for ship/start skills and bump actions/checkout to v5 Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/ship/SKILL.md | 30 ++++++++++++++++++++++++------ .agents/skills/start/SKILL.md | 6 +----- .claude/commands/ship.md | 30 ++++++++++++++++++++++++------ .claude/commands/start.md | 6 +----- .cursor/rules/ship.mdc | 30 ++++++++++++++++++++++++------ .cursor/rules/start.mdc | 6 +----- .gemini/skills/ship/SKILL.md | 30 ++++++++++++++++++++++++------ .gemini/skills/start/SKILL.md | 6 +----- .github/workflows/sync-check.yml | 2 +- 9 files changed, 101 insertions(+), 45 deletions(-) diff --git a/.agents/skills/ship/SKILL.md b/.agents/skills/ship/SKILL.md index 8cd82c8..d91120f 100644 --- a/.agents/skills/ship/SKILL.md +++ b/.agents/skills/ship/SKILL.md @@ -56,7 +56,25 @@ If a linked issue number is identifiable, note it for the PR body. If not identi --- -## Step 4 — Commit +## Step 4 — Sync with base branch + +Bring the feature branch up to date before committing: + +``` +git fetch origin dev && git merge origin/dev +``` + +If the merge completes cleanly (including fast-forward), proceed to Step 5. + +If there are merge conflicts, **stop** and say: + +> "Merge conflicts with ``. Resolve them before shipping." + +List the conflicting files. Help the user resolve them if asked, then continue. + +--- + +## Step 5 — Commit Stage all changes and commit: ``` @@ -71,7 +89,7 @@ Commit message rules: --- -## Step 5 — Push and open PR +## Step 6 — Push and open PR First, push the branch: ``` @@ -109,9 +127,9 @@ Omit the issue line entirely if no linked issue was identified in Step 3. --- -## Step 6 — Review (conditional) +## Step 7 — Review (conditional) -If `ai` is `"off"`, skip directly to Step 7 (merge without review). +If `ai` is `"off"`, skip directly to Step 8 (merge without review). Otherwise, load `.claude/review-agent-prompt.md` and perform the review for this PR. @@ -128,7 +146,7 @@ Wait for the review to complete and report its verdict. --- -## Step 7 — Act on verdict +## Step 8 — Act on verdict Merge command (used by all paths below): `make merge` @@ -185,4 +203,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.agents/skills/start/SKILL.md b/.agents/skills/start/SKILL.md index b4047c5..3a96868 100644 --- a/.agents/skills/start/SKILL.md +++ b/.agents/skills/start/SKILL.md @@ -130,8 +130,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Now create the feature branch: ```bash @@ -190,8 +188,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Find and check out the existing branch, or create a new one linked to the issue: ```bash @@ -228,4 +224,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.claude/commands/ship.md b/.claude/commands/ship.md index e3f4993..8e4de3a 100644 --- a/.claude/commands/ship.md +++ b/.claude/commands/ship.md @@ -51,7 +51,25 @@ If a linked issue number is identifiable, note it for the PR body. If not identi --- -## Step 4 — Commit +## Step 4 — Sync with base branch + +Bring the feature branch up to date before committing: + +``` +git fetch origin dev && git merge origin/dev +``` + +If the merge completes cleanly (including fast-forward), proceed to Step 5. + +If there are merge conflicts, **stop** and say: + +> "Merge conflicts with ``. Resolve them before shipping." + +List the conflicting files. Help the user resolve them if asked, then continue. + +--- + +## Step 5 — Commit Stage all changes and commit: ``` @@ -66,7 +84,7 @@ Commit message rules: --- -## Step 5 — Push and open PR +## Step 6 — Push and open PR First, push the branch: ``` @@ -104,9 +122,9 @@ Omit the issue line entirely if no linked issue was identified in Step 3. --- -## Step 6 — Review (conditional) +## Step 7 — Review (conditional) -If `ai` is `"off"`, skip directly to Step 7 (merge without review). +If `ai` is `"off"`, skip directly to Step 8 (merge without review). Otherwise, load `.claude/review-agent-prompt.md` and perform the review for this PR. @@ -123,7 +141,7 @@ Wait for the review to complete and report its verdict. --- -## Step 7 — Act on verdict +## Step 8 — Act on verdict Merge command (used by all paths below): `make merge` @@ -180,4 +198,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.claude/commands/start.md b/.claude/commands/start.md index 6345104..f9bf938 100644 --- a/.claude/commands/start.md +++ b/.claude/commands/start.md @@ -125,8 +125,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Now create the feature branch: ```bash @@ -185,8 +183,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Find and check out the existing branch, or create a new one linked to the issue: ```bash @@ -223,4 +219,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.cursor/rules/ship.mdc b/.cursor/rules/ship.mdc index e00f4c3..c8264fd 100644 --- a/.cursor/rules/ship.mdc +++ b/.cursor/rules/ship.mdc @@ -57,7 +57,25 @@ If a linked issue number is identifiable, note it for the PR body. If not identi --- -## Step 4 — Commit +## Step 4 — Sync with base branch + +Bring the feature branch up to date before committing: + +``` +git fetch origin dev && git merge origin/dev +``` + +If the merge completes cleanly (including fast-forward), proceed to Step 5. + +If there are merge conflicts, **stop** and say: + +> "Merge conflicts with ``. Resolve them before shipping." + +List the conflicting files. Help the user resolve them if asked, then continue. + +--- + +## Step 5 — Commit Stage all changes and commit: ``` @@ -72,7 +90,7 @@ Commit message rules: --- -## Step 5 — Push and open PR +## Step 6 — Push and open PR First, push the branch: ``` @@ -110,9 +128,9 @@ Omit the issue line entirely if no linked issue was identified in Step 3. --- -## Step 6 — Review (conditional) +## Step 7 — Review (conditional) -If `ai` is `"off"`, skip directly to Step 7 (merge without review). +If `ai` is `"off"`, skip directly to Step 8 (merge without review). Otherwise, load `.claude/review-agent-prompt.md` and perform the review for this PR. @@ -129,7 +147,7 @@ Wait for the review to complete and report its verdict. --- -## Step 7 — Act on verdict +## Step 8 — Act on verdict Merge command (used by all paths below): `make merge` @@ -186,4 +204,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.cursor/rules/start.mdc b/.cursor/rules/start.mdc index fad6da7..8ae7b78 100644 --- a/.cursor/rules/start.mdc +++ b/.cursor/rules/start.mdc @@ -131,8 +131,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Now create the feature branch: ```bash @@ -191,8 +189,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Find and check out the existing branch, or create a new one linked to the issue: ```bash @@ -229,4 +225,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.gemini/skills/ship/SKILL.md b/.gemini/skills/ship/SKILL.md index 4f923bf..8a257e2 100644 --- a/.gemini/skills/ship/SKILL.md +++ b/.gemini/skills/ship/SKILL.md @@ -56,7 +56,25 @@ If a linked issue number is identifiable, note it for the PR body. If not identi --- -## Step 4 — Commit +## Step 4 — Sync with base branch + +Bring the feature branch up to date before committing: + +``` +git fetch origin dev && git merge origin/dev +``` + +If the merge completes cleanly (including fast-forward), proceed to Step 5. + +If there are merge conflicts, **stop** and say: + +> "Merge conflicts with ``. Resolve them before shipping." + +List the conflicting files. Help the user resolve them if asked, then continue. + +--- + +## Step 5 — Commit Stage all changes and commit: ``` @@ -71,7 +89,7 @@ Commit message rules: --- -## Step 5 — Push and open PR +## Step 6 — Push and open PR First, push the branch: ``` @@ -109,9 +127,9 @@ Omit the issue line entirely if no linked issue was identified in Step 3. --- -## Step 6 — Review (conditional) +## Step 7 — Review (conditional) -If `ai` is `"off"`, skip directly to Step 7 (merge without review). +If `ai` is `"off"`, skip directly to Step 8 (merge without review). Otherwise, load `.claude/review-agent-prompt.md` and perform the review for this PR. @@ -128,7 +146,7 @@ Wait for the review to complete and report its verdict. --- -## Step 7 — Act on verdict +## Step 8 — Act on verdict Merge command (used by all paths below): `make merge` @@ -185,4 +203,4 @@ Report success based on mode: - When `ai` is `"off"`, skip the review agent entirely — merge immediately after checks pass. - `/ship` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - + diff --git a/.gemini/skills/start/SKILL.md b/.gemini/skills/start/SKILL.md index 84fa2b7..0b45ced 100644 --- a/.gemini/skills/start/SKILL.md +++ b/.gemini/skills/start/SKILL.md @@ -130,8 +130,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Now create the feature branch: ```bash @@ -190,8 +188,6 @@ Ensure the base branch is up-to-date before branching: git checkout dev && git pull origin dev ``` -(In trunk mode where `dev` is empty, use `main` instead.) - Find and check out the existing branch, or create a new one linked to the issue: ```bash @@ -228,4 +224,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test - The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit --remove-assignee @me`. - Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit (or create if `false` is `true`). Never apply a label not in `bug, documentation, enhancement, chore` unless `false` is `true`. - Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation. - + diff --git a/.github/workflows/sync-check.yml b/.github/workflows/sync-check.yml index 392d70d..171ea5a 100644 --- a/.github/workflows/sync-check.yml +++ b/.github/workflows/sync-check.yml @@ -4,7 +4,7 @@ jobs: sync-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Check for sync drift run: | ./sync.sh --dry-run From 863daefd1700013c2a6992cd69ca022b087d49a2 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 11:23:48 -0400 Subject: [PATCH 5/5] Bump version to 0.3.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0c62199..0d91a54 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.1 +0.3.0