Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/commands/qa.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- generated by CodeCanon/sync.sh | skill: qa | adapter: claude | hash: 447216d6 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
You are executing the `/qa` skill. Your argument is: $ARGUMENTS

---
Expand Down
1 change: 0 additions & 1 deletion .claude/commands/release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- generated by CodeCanon/sync.sh | skill: release | adapter: claude | hash: b470d522 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
You are executing the `/release` skill. Your argument is: $ARGUMENTS

---
Expand Down
3 changes: 1 addition & 2 deletions .claude/commands/setup.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- generated by CodeCanon/sync.sh | skill: setup | adapter: claude | hash: 5e26ca1c | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
You are executing the `/setup` skill. Your argument is: $ARGUMENTS

---
Expand Down Expand Up @@ -470,4 +469,4 @@ Add a note: `/start` can be used to create well-formed GitHub issues without wri
- 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.
<!-- generated by CodeCanon/sync.sh | skill: setup | adapter: claude | hash: bdb21058 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
<!-- generated by CodeCanon/sync.sh | skill: setup | adapter: claude | hash: 5e26ca1c | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
1 change: 0 additions & 1 deletion .claude/commands/ship.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- generated by CodeCanon/sync.sh | skill: ship | adapter: claude | hash: d98aef47 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
You are executing the `/ship` skill. Your argument is: $ARGUMENTS

---
Expand Down
4 changes: 2 additions & 2 deletions .claude/commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Show the user: `On branch feature/<name>`

Now write the code. Do NOT commit anything.

When done, say: **"The code is ready for review. Please run `make dev` and test locally. Let me know if it looks good, needs changes, or should be scrapped."**
When done, say: **"The code is ready for review. Please run `make dev` and test locally. Let me know if it looks good, needs changes, or should be scrapped. When you're happy, run `/ship` to commit, push, and open a PR."**

- User says looks good → run `/ship`
- User requests changes → iterate, repeat this message
Expand Down Expand Up @@ -213,7 +213,7 @@ gh issue comment <number> --body "Resuming work. <brief note on what's being con

Continue from where work left off. Do NOT commit.

When done, say: **"The code is ready for review. Please run `make dev` and test locally."**
When done, say: **"The code is ready for review. Please run `make dev` and test locally. When you're happy, run `/ship` to commit, push, and open a PR."**

---

Expand Down
3 changes: 1 addition & 2 deletions .claude/commands/version.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- generated by CodeCanon/sync.sh | skill: version | adapter: claude | hash: ab8011ef | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
You are executing the `/version` skill. Your argument is: $ARGUMENTS

---
Expand Down Expand Up @@ -80,4 +79,4 @@ Report based on mode:
- **Trunk mode** (`dev` empty): "Tagged vX.Y.Z. Run `/release` to create the GitHub Release."
- **Two-branch mode** (`dev` set, `` empty): "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to preview for testing. When testing is complete, run `/release`."
- **Three-branch mode** (both set): "Tagged vX.Y.Z. Run `make deploy-preview` to deploy to staging. When testing is complete, run `/release`."
<!-- generated by CodeCanon/sync.sh | skill: version | adapter: claude | hash: 955517c9 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
<!-- generated by CodeCanon/sync.sh | skill: version | adapter: claude | hash: ab8011ef | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Makefile — CodeCannon project-specific targets
#
# Workflow targets (branch, pr, abandon, merge, promote) come from Makefile.agents.mk.
# This file adds CodeCannon-specific targets: sync, versioning, and deployment.

INTEGRATION_BRANCH = dev
include Makefile.agents.mk

.PHONY: check dev sync bump-patch bump-minor bump-major set-version deploy-preview deploy-prod
Expand Down Expand Up @@ -57,10 +63,10 @@ endif
git commit -m "Bump version to $(V)"
git tag v$(V)

# Publish the integration branch so consumers can pick up changes via submodule update.
# Push the integration branch for preview/testing.
deploy-preview:
git push origin development
git push origin $(INTEGRATION_BRANCH)

# Publish a tagged release to main.
# Publish a tagged release to production.
deploy-prod:
git push origin main --tags
git push origin $(PRODUCTION_BRANCH) --tags
30 changes: 29 additions & 1 deletion Makefile.agents.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@
# Configuration:
# INTEGRATION_BRANCH — the branch PRs target (default: development)
# PRODUCTION_BRANCH — the production branch (default: main)
# STAGING_BRANCH — optional staging/pre-prod branch (default: empty)
# FEATURE_PREFIX — prefix for feature branches (default: feature/)
#
# Workflow modes:
# Two-branch (default): feature → INTEGRATION_BRANCH → PRODUCTION_BRANCH
# Three-branch: feature → INTEGRATION_BRANCH → STAGING_BRANCH → PRODUCTION_BRANCH
#
# Set STAGING_BRANCH to enable three-branch mode. When set:
# - `promote` target becomes available (PR: integration → staging)
# - STAGING_BRANCH is protected from direct feature work

INTEGRATION_BRANCH ?= development
PRODUCTION_BRANCH ?= main
STAGING_BRANCH ?=
FEATURE_PREFIX ?= feature/

.PHONY: branch pr abandon merge
.PHONY: branch pr abandon merge promote

# Create a feature branch from the integration branch.
# Usage: make branch name=<feature-name>
Expand All @@ -33,6 +43,9 @@ pr:
if [ "$$branch" = "$(PRODUCTION_BRANCH)" ] || [ "$$branch" = "$(INTEGRATION_BRANCH)" ]; then \
echo "Error: cannot PR from $$branch. Use a feature branch."; exit 1; \
fi; \
if [ -n "$(STAGING_BRANCH)" ] && [ "$$branch" = "$(STAGING_BRANCH)" ]; then \
echo "Error: cannot PR from $$branch. Use a feature branch."; exit 1; \
fi; \
git push -u origin "$$branch" && \
gh pr create --base $(INTEGRATION_BRANCH) --fill

Expand All @@ -42,6 +55,9 @@ abandon:
if [ "$$branch" = "$(PRODUCTION_BRANCH)" ] || [ "$$branch" = "$(INTEGRATION_BRANCH)" ]; then \
echo "Error: cannot abandon $$branch."; exit 1; \
fi; \
if [ -n "$(STAGING_BRANCH)" ] && [ "$$branch" = "$(STAGING_BRANCH)" ]; then \
echo "Error: cannot abandon $$branch."; exit 1; \
fi; \
git checkout . && \
git clean -fd && \
git checkout $(INTEGRATION_BRANCH) && \
Expand All @@ -54,6 +70,9 @@ merge:
if [ "$$branch" = "$(PRODUCTION_BRANCH)" ] || [ "$$branch" = "$(INTEGRATION_BRANCH)" ]; then \
echo "Error: cannot merge from $$branch. Use a feature branch."; exit 1; \
fi; \
if [ -n "$(STAGING_BRANCH)" ] && [ "$$branch" = "$(STAGING_BRANCH)" ]; then \
echo "Error: cannot merge from $$branch. Use a feature branch."; exit 1; \
fi; \
pr_url=$$(gh pr view --json url -q .url 2>/dev/null); \
if [ -z "$$pr_url" ]; then \
echo "Error: no open PR found for $$branch."; exit 1; \
Expand All @@ -66,3 +85,12 @@ merge:
git checkout $(INTEGRATION_BRANCH) && \
git pull origin $(INTEGRATION_BRANCH) && \
echo "PR merged into $(INTEGRATION_BRANCH)."

# Promote integration branch to staging. Creates a PR: INTEGRATION_BRANCH → STAGING_BRANCH.
# Only available in three-branch mode (STAGING_BRANCH is set).
promote:
ifndef STAGING_BRANCH
$(error promote requires STAGING_BRANCH to be set (three-branch mode))
endif
gh pr create --base $(STAGING_BRANCH) --head $(INTEGRATION_BRANCH) \
--title "Promote $(INTEGRATION_BRANCH) → $(STAGING_BRANCH)" --fill
4 changes: 2 additions & 2 deletions skills/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Show the user: `On branch feature/<name>`

Now write the code. Do NOT commit anything.

When done, say: **"The code is ready for review. Please run `{{DEV_CMD}}` and test locally. Let me know if it looks good, needs changes, or should be scrapped."**
When done, say: **"The code is ready for review. Please run `{{DEV_CMD}}` and test locally. Let me know if it looks good, needs changes, or should be scrapped. When you're happy, run `/ship` to commit, push, and open a PR."**

- User says looks good → run `/ship`
- User requests changes → iterate, repeat this message
Expand Down Expand Up @@ -216,7 +216,7 @@ gh issue comment <number> --body "Resuming work. <brief note on what's being con

Continue from where work left off. Do NOT commit.

When done, say: **"The code is ready for review. Please run `{{DEV_CMD}}` and test locally."**
When done, say: **"The code is ready for review. Please run `{{DEV_CMD}}` and test locally. When you're happy, run `/ship` to commit, push, and open a PR."**

---

Expand Down
Loading