CLAUDE.md · git:20260918.26bbfe4 · 2026-09-18 · sha256 4fec8a8fcb8b1dd3
CLAUDE.md git:20260918.26bbfe4A
Immutable. This exact content is served forever at /api/v1/blob/4fec8a8fcb8b1dd3.
You are the assistant for the **specclaw** project.
Working directory: this is a git checkout of the specclaw repo (base branch `main`). Commands run from here. One remote exists:
`origin` = `chan4lk/specclaw` (branches are pushed there and PRs are merged there). There is no `upstream` remote in this checkout. Confirm with `git remote -v` rather than trusting this line.
You can use Bash freely (auto permission mode). Useful binaries on PATH: git, gh (GitHub CLI), node/npm, bun, python.
# Git workflow
- Always `git pull --ff-only origin main` before starting work.
- Make changes on a feature branch — never commit directly to `main`. Branch names: `claude/<short-task>` or `<operator-handle>/<topic>`.
- Stage and commit small focused units. Use clear commit messages with the *why*, not just the *what*.
- Push the branch (`git push -u origin <branch>`). Authentication is already wired via `GIT_ASKPASS` or `GIT_SSH_COMMAND` — no token prompts.
- Open a pull request with `gh pr create --repo chan4lk/specclaw --base main --head <branch> --title "..." --body "..."`. Report the PR URL (in Discord via `mcp__mcd__reply` when running under the Discord channel, otherwise in the terminal reply).
**Always name `--repo` explicitly.** If a second remote is ever added, a bare `gh pr create` may resolve to it and open a cross-fork PR against the wrong repo. PRs are merged on `chan4lk/specclaw`.
- For small fixes, request review in the PR body or `@mention` the operator.
# Version bump rule
**Always bump the plugin version before opening a PR.** This applies to every PR — features, fixes, and chores alike.
Version files to bump (patch increment `X.Y.Z → X.Y.Z+1`):
- `plugins/specclaw/.claude-plugin/plugin.json` — `"version"` field
- `.claude-plugin/marketplace.json` — `"version"` field inside the `"plugins"` array entry for `"specclaw"`
Both files must stay in sync. Commit the bump as a separate commit (`chore: bump version to X.Y.Z`) before or as part of the PR branch. `specclaw-pr` will auto-bump via `ensure_version_bumped()` if `plugin.version_files` is configured, but do it manually when working outside the specclaw lifecycle.
# Cloning additional repos
If you need to look at another repo: `git clone <url>` into a sibling directory under `~/.claude/channels/discord-multi/projects/specclaw/_deps/<name>` or wherever fits. Don't pollute this working tree with unrelated code.
# Interactive progress reporting (REQUIRED when running under the Discord channel)
This section applies when messages arrive in `<channel source="discord">` envelopes and `mcp__mcd__reply` is available. In a plain terminal session, report progress in the reply text instead.
The operator cannot see your terminal. During any multi-step task (specclaw build, verify, refactor), post a brief `mcp__mcd__reply` update at every milestone — do not go silent until the end:
- When you start a task/wave: one line saying what you're doing and rough ETA.
- When a task, wave, or subagent batch completes: one line with the result (e.g. "T2 done — run_capped routed via run-long, tests green. Starting T3.").
- Before any stretch likely to take >5 minutes without tool output (large synthesis, long test run): say so first ("Long verify run starting, ~10 min, will report back").
- On errors or unexpected findings: report immediately, don't batch for the summary.
One short line per update. This is not optional — silence longer than ~5 minutes during active work is a bug.
# Discord conventions
Inbound messages arrive wrapped in `<channel source="discord" ...>BODY</channel>` envelopes — BODY is what the operator typed. Respond by calling `mcp__mcd__reply` with `{ text, reply_to? }`. Do NOT call `mcp__discord__reply`. Don't print transcript text outside the reply tool — Discord users only see what `mcp__mcd__reply` emits. Keep replies brief; for long output, post the highlights and offer to dig in.
Other tools (`mcp__mcd__react`, `mcp__mcd__edit_message`, `mcp__mcd__download_attachment`, `mcp__mcd__fetch_messages`) are available when useful — for example `download_attachment` to grab an inbound file, or `react` for a fast acknowledgment before a long task.