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
8 changes: 5 additions & 3 deletions .agents/skills/deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Required branch: `dev` (two-branch mode).

If not on the required branch, abort and say: "Switch to `<required-branch>` before running `/deploy`."

Pull the latest changes before proceeding:
Sync to the remote before proceeding. The deploy branch is never edited locally under the CodeCannon workflow (only fast-forwarded from CodeCannon's own merges), so a hard reset to origin is the correct sync; the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git pull
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

---
Expand Down Expand Up @@ -265,4 +267,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 `<url>`. Run `make deploy-prod` to ship to production."
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: codex | hash: 330712b1 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: codex | hash: 76f59506 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
14 changes: 9 additions & 5 deletions .agents/skills/start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ gh issue comment <number> --body-file <tmpdir>/issue_comment.md

### Step 4 — Create feature branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching. The hard reset below is safe under the CodeCannon workflow (the integration/production branch is never edited locally — all changes flow through PRs), but the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Now create the feature branch:
Expand Down Expand Up @@ -286,10 +288,12 @@ Present numbered findings:

### Step 4 — Check out branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching (same safety rationale as Case A Step 4):

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Find and check out the existing branch, or create a new one linked to the issue:
Expand Down Expand Up @@ -324,4 +328,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 <number> --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 `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: codex | hash: 834fb83e | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: codex | hash: d06c14d1 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
8 changes: 5 additions & 3 deletions .claude/commands/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ Required branch: `dev` (two-branch mode).

If not on the required branch, abort and say: "Switch to `<required-branch>` before running `/deploy`."

Pull the latest changes before proceeding:
Sync to the remote before proceeding. The deploy branch is never edited locally under the CodeCannon workflow (only fast-forwarded from CodeCannon's own merges), so a hard reset to origin is the correct sync; the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git pull
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

---
Expand Down Expand Up @@ -260,4 +262,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 `<url>`. Run `make deploy-prod` to ship to production."
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: claude | hash: 5bb8e194 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: claude | hash: 4b61442a | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
14 changes: 9 additions & 5 deletions .claude/commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ gh issue comment <number> --body-file <tmpdir>/issue_comment.md

### Step 4 — Create feature branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching. The hard reset below is safe under the CodeCannon workflow (the integration/production branch is never edited locally — all changes flow through PRs), but the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Now create the feature branch:
Expand Down Expand Up @@ -281,10 +283,12 @@ Present numbered findings:

### Step 4 — Check out branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching (same safety rationale as Case A Step 4):

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Find and check out the existing branch, or create a new one linked to the issue:
Expand Down Expand Up @@ -319,4 +323,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 <number> --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 `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: claude | hash: d7feebf1 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: claude | hash: 939500d4 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
8 changes: 5 additions & 3 deletions .cursor/rules/deploy.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ Required branch: `dev` (two-branch mode).

If not on the required branch, abort and say: "Switch to `<required-branch>` before running `/deploy`."

Pull the latest changes before proceeding:
Sync to the remote before proceeding. The deploy branch is never edited locally under the CodeCannon workflow (only fast-forwarded from CodeCannon's own merges), so a hard reset to origin is the correct sync; the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git pull
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

---
Expand Down Expand Up @@ -266,4 +268,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 `<url>`. Run `make deploy-prod` to ship to production."
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: cursor | hash: bcbec2e6 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: cursor | hash: 4a679a44 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
14 changes: 9 additions & 5 deletions .cursor/rules/start.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ gh issue comment <number> --body-file <tmpdir>/issue_comment.md

### Step 4 — Create feature branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching. The hard reset below is safe under the CodeCannon workflow (the integration/production branch is never edited locally — all changes flow through PRs), but the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Now create the feature branch:
Expand Down Expand Up @@ -287,10 +289,12 @@ Present numbered findings:

### Step 4 — Check out branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching (same safety rationale as Case A Step 4):

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Find and check out the existing branch, or create a new one linked to the issue:
Expand Down Expand Up @@ -325,4 +329,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 <number> --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 `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: cursor | hash: c2521db6 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: cursor | hash: 07fc85a6 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
8 changes: 5 additions & 3 deletions .gemini/skills/deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Required branch: `dev` (two-branch mode).

If not on the required branch, abort and say: "Switch to `<required-branch>` before running `/deploy`."

Pull the latest changes before proceeding:
Sync to the remote before proceeding. The deploy branch is never edited locally under the CodeCannon workflow (only fast-forwarded from CodeCannon's own merges), so a hard reset to origin is the correct sync; the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git pull
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

---
Expand Down Expand Up @@ -265,4 +267,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 `<url>`. Run `make deploy-prod` to ship to production."
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: gemini | hash: 7014d32b | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: deploy | adapter: gemini | hash: 9825eeb3 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
14 changes: 9 additions & 5 deletions .gemini/skills/start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ gh issue comment <number> --body-file <tmpdir>/issue_comment.md

### Step 4 — Create feature branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching. The hard reset below is safe under the CodeCannon workflow (the integration/production branch is never edited locally — all changes flow through PRs), but the dirty-tree guard catches accidental local edits before they get silently discarded:

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Now create the feature branch:
Expand Down Expand Up @@ -286,10 +288,12 @@ Present numbered findings:

### Step 4 — Check out branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching (same safety rationale as Case A Step 4):

```bash
git checkout dev && git pull origin dev
git checkout dev
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on dev — resolve before continuing."; exit 1; }
git fetch origin dev && git reset --hard origin/dev
```

Find and check out the existing branch, or create a new one linked to the issue:
Expand Down Expand Up @@ -324,4 +328,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 <number> --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 `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: gemini | hash: bfd6c6c5 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: gemini | hash: 189241b7 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
11 changes: 10 additions & 1 deletion Makefile.agents.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ merge:
fi; \
gh pr merge --merge && \
git checkout $(INTEGRATION_BRANCH) && \
git pull origin $(INTEGRATION_BRANCH) && \
if ! git diff --quiet || ! git diff --cached --quiet; then \
echo "Error: uncommitted changes on $(INTEGRATION_BRANCH); refusing to reset to origin. Resolve manually."; exit 1; \
fi; \
git fetch origin $(INTEGRATION_BRANCH) && \
ahead=$$(git rev-list --count origin/$(INTEGRATION_BRANCH)..HEAD); \
if [ "$$ahead" != "0" ]; then \
echo "Warning: discarding $$ahead local-only commit(s) on $(INTEGRATION_BRANCH) to match origin (recover via 'git reflog' within 90 days):"; \
git log --oneline origin/$(INTEGRATION_BRANCH)..HEAD; \
fi; \
git reset --hard origin/$(INTEGRATION_BRANCH) && \
echo "PR merged into $(INTEGRATION_BRANCH)."

# Promote integration branch to staging. Creates a PR: INTEGRATION_BRANCH → STAGING_BRANCH.
Expand Down
22 changes: 20 additions & 2 deletions skills/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,28 @@ Required branch: `{{BRANCH_PROD}}` (trunk mode).

If not on the required branch, abort and say: "Switch to `<required-branch>` before running `/deploy`."

Pull the latest changes before proceeding:
Sync to the remote before proceeding. The deploy branch is never edited locally under the CodeCannon workflow (only fast-forwarded from CodeCannon's own merges), so a hard reset to origin is the correct sync; the dirty-tree guard catches accidental local edits before they get silently discarded:

{{#if BRANCH_TEST}}
```bash
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_TEST}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_TEST}} && git reset --hard origin/{{BRANCH_TEST}}
```
{{/if}}
{{#if !BRANCH_TEST}}
{{#if BRANCH_DEV}}
```bash
git pull
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_DEV}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_DEV}} && git reset --hard origin/{{BRANCH_DEV}}
```
{{/if}}
{{#if !BRANCH_DEV}}
```bash
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_PROD}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_PROD}} && git reset --hard origin/{{BRANCH_PROD}}
```
{{/if}}
{{/if}}

---

Expand Down
20 changes: 14 additions & 6 deletions skills/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,20 @@ gh issue comment <number> --body-file <tmpdir>/issue_comment.md

### Step 4 — Create feature branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching. The hard reset below is safe under the CodeCannon workflow (the integration/production branch is never edited locally — all changes flow through PRs), but the dirty-tree guard catches accidental local edits before they get silently discarded:

{{#if BRANCH_DEV}}
```bash
git checkout {{BRANCH_DEV}} && git pull origin {{BRANCH_DEV}}
git checkout {{BRANCH_DEV}}
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_DEV}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_DEV}} && git reset --hard origin/{{BRANCH_DEV}}
```
{{/if}}
{{#if !BRANCH_DEV}}
```bash
git checkout {{BRANCH_PROD}} && git pull origin {{BRANCH_PROD}}
git checkout {{BRANCH_PROD}}
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_PROD}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_PROD}} && git reset --hard origin/{{BRANCH_PROD}}
```
{{/if}}

Expand Down Expand Up @@ -345,16 +349,20 @@ Present numbered findings:

### Step 4 — Check out branch

Ensure the base branch is up-to-date before branching:
Ensure the base branch is a perfect mirror of origin before branching (same safety rationale as Case A Step 4):

{{#if BRANCH_DEV}}
```bash
git checkout {{BRANCH_DEV}} && git pull origin {{BRANCH_DEV}}
git checkout {{BRANCH_DEV}}
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_DEV}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_DEV}} && git reset --hard origin/{{BRANCH_DEV}}
```
{{/if}}
{{#if !BRANCH_DEV}}
```bash
git checkout {{BRANCH_PROD}} && git pull origin {{BRANCH_PROD}}
git checkout {{BRANCH_PROD}}
git diff --quiet && git diff --cached --quiet || { echo "Uncommitted changes on {{BRANCH_PROD}} — resolve before continuing."; exit 1; }
git fetch origin {{BRANCH_PROD}} && git reset --hard origin/{{BRANCH_PROD}}
```
{{/if}}

Expand Down
Loading