Skip to content
Merged
93 changes: 93 additions & 0 deletions .agents/skills/checkpoint/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: checkpoint
description: Code Cannon: Commit and push WIP without review or merge
---

> **Codex CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — perform any review steps inline.

---

## What `/checkpoint` does

`/checkpoint` is a lightweight save point — commit and push work-in-progress to the remote without triggering type-checks, reviews, PR creation, or merge. Use it to persist progress during long coding sessions or before context-switching.

---

## Step 1 — Verify branch

```bash
git branch --show-current
```

Protected branches (not a feature branch):
- `main`
- `dev`

If the current branch matches any of the above, **abort immediately** and say:

> "You are on `<branch>`. `/checkpoint` must be run from a feature branch."

---

## Step 2 — Check for changes

```bash
git status --porcelain
```

If the output is empty (no staged, unstaged, or untracked changes), say:

> "Nothing to checkpoint — working tree is clean."

Stop. Do not create an empty commit.

---

## Step 3 — Stage and commit

```bash
git add -A
git commit -m "WIP: <message>"
```

**Commit message rules:**
- Always prefix with `WIP: ` so these commits are visually distinct in `git log`.
- If `$ARGUMENTS` is provided, use it as `<message>` (e.g. `WIP: add auth middleware`).
- If `$ARGUMENTS` is empty, auto-generate from the diff summary (e.g. `WIP: update auth.ts, add login tests`). Keep it under 72 characters.
- Do not commit `.env` files, secrets, or build artifacts. If `git status` shows such files, add them to `.gitignore` or exclude them from staging before committing.

---

## Step 4 — Push

```bash
git push -u origin HEAD
```

If the push fails because the remote branch does not exist yet, the `-u` flag handles creation. If it fails for another reason, report the error and stop.

---

## Step 5 — Report

Count the files in the commit:

```bash
git diff --stat HEAD~1
```

Say:

> "Checkpoint saved. N file(s) committed and pushed to `<branch>`. Run `/submit-for-review` when ready to open a PR."

---

## Hard rules

- Never create a PR.
- Never trigger a review.
- Never merge.
- Never apply labels or modify issues.
- Never run `make check` — checkpoints are not quality gates.
- Do not prompt for confirmation — `/checkpoint` is a quick save, not a ceremony.
<!-- generated by CodeCannon/sync.sh | skill: checkpoint | adapter: codex | hash: a5c7187c | DO NOT EDIT — run CodeCannon/sync.sh to regenerate -->
18 changes: 13 additions & 5 deletions .agents/skills/deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,15 @@ Wait for the user to type "release" or an explicit confirmation. Any other respo

## Step 6 — Create PR: `dev` → `main`

Use your file-writing tool (not Bash) to create `/tmp/cc_release_pr_body.md`:
First, create a temp directory for this invocation:

```bash
mkdir -p /tmp/CodeCannon && mktemp -d /tmp/CodeCannon/XXXXXX
```

Note the returned path (e.g. `/tmp/CodeCannon/a8f3b2`). Use this path for all temp files in this invocation.

Then use your file-writing tool (not Bash) to create `<tmpdir>/release_pr_body.md`:

```markdown
Release vX.Y.Z
Expand All @@ -184,7 +192,7 @@ Then create the PR (do NOT use `--body`, `--body-file -`, or heredocs):
```bash
gh pr create --base main --head dev \
--title "Release vX.Y.Z" \
--body-file /tmp/cc_release_pr_body.md
--body-file <tmpdir>/release_pr_body.md
```

Note the PR number from the output.
Expand Down Expand Up @@ -215,7 +223,7 @@ git describe --abbrev=0 <version-tag>^ 2>/dev/null

If no previous tag exists, omit the "Full changelog" line.

Use your file-writing tool (not Bash) to create `/tmp/cc_release_notes.md`:
Use your file-writing tool (not Bash) to create `<tmpdir>/release_notes.md` (same temp directory from Step 6):

```markdown
## Changes
Expand All @@ -231,7 +239,7 @@ Then create the release (do NOT use `--notes`, `--notes-file -`, or heredocs):
```bash
gh release create <version-tag> \
--title "<version-tag>" \
--notes-file /tmp/cc_release_notes.md
--notes-file <tmpdir>/release_notes.md
```

Format each PR line as `- #<linked-issue> — <PR title> (PR #<N>)`. If a PR had no linked issue, omit the `#<issue>` prefix and use just the PR title.
Expand All @@ -245,4 +253,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.sh | skill: deploy | adapter: codex | hash: 6d8dd3bb | DO NOT EDIT — run CodeCannon/sync.sh to regenerate -->
<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: codex | hash: 1a6fd564 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate -->
49 changes: 43 additions & 6 deletions .agents/skills/start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,35 @@ After parsing flags, determine the active milestone in this order:

---

## Pre-check: Existing feature branch

Before entering Case A or Case B, check the current branch:

```bash
git branch --show-current
```

If already on a `feature/*` branch and `$ARGUMENTS` is **not** a number (i.e. this is new work, not a resume):

Say:

> **"You're already on `feature/<name>`. Would you like to create a GitHub issue linked to this branch and start coding? Or switch to the base branch first? (yes to continue here / no to abort)"**

Stop. Wait for the user to respond.

- **Yes** → proceed to **Case A**, but **skip Step 4** (branch creation) entirely. The current branch is used as-is. In Step 3, after creating the issue, link it to the existing branch by running:
```bash
gh issue develop <number> --base <base-branch> --name <current-branch-name>
```
This links the issue to the branch in GitHub without creating or checking out a new branch. If `gh issue develop` fails because the branch already exists on the remote, that is fine — the link may already be established. Continue to Step 5.
- **No / abort** → stop. Tell the user to switch to the base branch and run `/start` again.

If already on a `feature/*` branch and `$ARGUMENTS` **is** a number → proceed to **Case B** normally (it handles branch checkout itself).

If on any other branch → proceed to Case A or Case B as determined by the `$ARGUMENTS` check above.

---

## Case A: New work (text description)

### Step 1 — Investigate
Expand Down Expand Up @@ -95,7 +124,15 @@ The friendly text question is required regardless of harness mode. If your harne

Create the issue in two steps — **this exact sequence is mandatory**:

**Step 3a — Write the body to a temp file.** Use your file-writing tool (Write in Claude Code, equivalent in other agents) to create `/tmp/cc_issue_body.md` with the structured markdown body (see sections below). Do NOT use Bash/shell to write this file. Do NOT use heredocs, `cat`, or `echo`. The file-writing tool bypasses shell parsing entirely.
**Step 3a — Create a temp directory and write the body file.** Run:

```bash
mkdir -p /tmp/CodeCannon && mktemp -d /tmp/CodeCannon/XXXXXX
```

Note the returned path (e.g. `/tmp/CodeCannon/a8f3b2`). Use this path for all temp files in this invocation.

Then use your file-writing tool (Write in Claude Code, equivalent in other agents) to create `<tmpdir>/issue_body.md` with the structured markdown body (see sections below). Do NOT use Bash/shell to write this file. Do NOT use heredocs, `cat`, or `echo`. The file-writing tool bypasses shell parsing entirely.

**Step 3b — Run `gh issue create`** with `--body-file` pointing to the temp file:

Expand All @@ -105,7 +142,7 @@ gh issue create \
--assignee @me \
[--label "<resolved labels>"] \
[--milestone "<resolved milestone>"] \
--body-file /tmp/cc_issue_body.md
--body-file <tmpdir>/issue_body.md
```

> **IMPORTANT — never pass body content inline in the `gh` command.** Do not use `--body`, `--body-file -`, heredocs (`<<EOF` or `<<'EOF'`), or `$(cat ...)`. All of these embed markdown in a Bash command, which triggers permission prompts that cannot be permanently allowed (the shell parser flags `#` headings, quoted delimiters, and substitutions). The two-step pattern above — file-writing tool then `--body-file <path>` — is the only approach that works without prompts across Claude Code, Gemini CLI, Cursor, and Codex.
Expand Down Expand Up @@ -153,7 +190,7 @@ Show the user: `Created issue #<number>: <title>`

Then immediately post agent implementation notes as a comment.

Use your file-writing tool (not Bash) to create `/tmp/cc_issue_comment.md`:
Use your file-writing tool (not Bash) to create `<tmpdir>/issue_comment.md` (same temp directory from Step 3a):
```markdown
## Agent Implementation Notes

Expand All @@ -162,7 +199,7 @@ Use your file-writing tool (not Bash) to create `/tmp/cc_issue_comment.md`:

Then post it (do NOT use `--body` or heredocs — same rule as Step 3):
```bash
gh issue comment <number> --body-file /tmp/cc_issue_comment.md
gh issue comment <number> --body-file <tmpdir>/issue_comment.md
```

### Step 4 — Create feature branch
Expand Down Expand Up @@ -271,9 +308,9 @@ When done, say: **"The code is ready for review. Please run `make dev` and test
- Do not write or edit any source file before `git branch --show-current` shows `feature/*`.
- Do not use `make branch` — always use `gh issue develop` so the branch is linked to the issue in GitHub.
- Do not commit during `/start` — commits happen in `/submit-for-review`.
- If already on a feature branch when `/start` is invoked, warn the user before creating another branch.
- If already on a feature branch when `/start` is invoked with new work (Case A), prompt the user to either continue on the current branch (skipping branch creation) or abort. See **Pre-check: Existing feature branch** above.
- `gh issue create` must use `--title` and `--body` flags. Never open an interactive editor.
- 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.sh | skill: start | adapter: codex | hash: 7ba07088 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate -->
<!-- generated by CodeCannon/sync.sh | skill: start | adapter: codex | hash: a1701c1d | DO NOT EDIT — run CodeCannon/sync.sh to regenerate -->
Loading
Loading