Help us improve
Share bugs, ideas, or general feedback.
From chief-skills
Interviews the user to capture a rule into `.chief/_rules/` or scaffolds the rules directory. Use when the user has a rule in mind and wants to write it proactively.
npx claudepluginhub thaitype/chief --plugin chief-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/chief-skills:chief-ruleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping the user capture a single rule into `.chief/_rules/`. This is the proactive counterpart to `/chief-retro` — use it whenever the user has a rule in mind and wants to write it down now.
Guides creation of .claude/rules/ files for path-scoped project conventions using TDD workflow: RED (test gaps), GREEN (write rule), REFACTOR (optimize). Triggers on 'add rule', 'create convention', 'scope guideline'.
Manages modular Claude rules in .claude/rules/ directory, supporting path-specific globs, brace expansion, project-wide, and user-level rules. Use to create, edit, list, generate, or sync rules.
Generates project-specific CLAUDE.md rules by detecting stack from package.json, Cargo.toml, pyproject.toml, go.mod, git log, and user-selecting categories like response format, library preference, code review stance. Use for new projects, repo onboarding, or establishing conventions.
Share bugs, ideas, or general feedback.
You are helping the user capture a single rule into .chief/_rules/. This is the proactive counterpart to /chief-retro — use it whenever the user has a rule in mind and wants to write it down now.
One invocation = one rule (path 2) or scaffolding only (path 1). Re-run for more.
Just inspect — do NOT create anything yet. Note for later use:
.chief/ exists.chief/_rules/ exists.chief/_rules/README.md existsScaffolding (creating .chief/, .chief/_rules/, the README) happens at the END of the chosen path, not now. If the user bails out, we leave the filesystem untouched.
Ask the user, with exactly two options:
Pick one:
- Scaffold
.chief/_rules/only (I'll write rules manually later, or use/chief-retroafter work)- Interview me — write a rule now
If 1 → run the scaffold routine below, then stop. If 2 → continue to step 3. (Scaffolding happens later, in step 7, alongside the rule write.)
_rules/ is missing)Create .chief/ if missing.
Create .chief/_rules/ if missing.
Write .chief/_rules/README.md if missing, with this content:
# .chief/_rules/
Global rules that govern this project's autonomous AI work. Lower priority than `AGENTS.md`, higher than milestone goals.
## Categories
- `_standard/` — Coding standards, architecture constraints
- `_contract/` — Data models, API contracts, schemas
- `_goal/` — High-level goals (shared across milestones)
- `_verification/` — Test commands, build requirements, definition of done
Subfolders are created **lazily** — on first rule in that category. Empty subfolders are not required.
Use `/chief-rule` to add rules proactively, or `/chief-retro` to capture them after a milestone retrospective.
Do NOT create the four category subfolders. They remain lazy until the first rule lands in each.
After scaffolding for path 1: tell the user the README path and stop.
Ask each question separately. Wait for the answer before moving on. Keep questions short. Skip a question if the user says "skip" or "n/a" — but do not skip Q1 (what).
commit-style, db-naming, pr-size). No .md suffix needed.Based on the answers, propose one of the four categories:
_standard/ — coding standards, naming, formatting, architectural constraints, "how we write code"_contract/ — data models, API contracts, schemas, type-level invariants_goal/ — high-level goals shared across milestones, product direction_verification/ — test commands, build requirements, definition of done, CI gatesTell the user which category you picked and why (one sentence). Ask them to confirm or override.
Write the draft using plain markdown, no frontmatter:
# <The rule statement, as a single declarative sentence>
**Why:** <motivation from Q2>
**How to apply:** <scope from Q3>
## Example
<code or prose example from Q4 — omit this section if user skipped Q4>
Show the rendered draft to the user. Ask once: "Write this to .chief/_rules/<category>/<filename>.md?"
If user requests changes, apply them and re-show. Do not loop more than three rounds — if alignment stalls, write the current draft and tell the user they can edit it manually.
Before writing, check if .chief/_rules/<category>/<filename>.md already exists.
If it does, read the existing file first, then classify the relationship and propose the right action:
| Relationship | Detection signal | Action |
|---|---|---|
| Identical | New rule's statement, why, and how-to-apply substantially match existing | Skip. Tell user the rule is already captured. Stop. |
| Refines / extends | Same concern, new adds detail (e.g. clarifies scope, adds an example, tightens wording) | Merge: produce a unified version that preserves both. Show diff. Backup existing to <filename>.md.bak. Confirm, then write. |
| Contradicts | New rule reverses or replaces existing | Replace: show old vs new side-by-side. Backup existing to <filename>.md.bak. Confirm, then write. |
| Different concern, name collision | Existing file's H1 / Why is about a different thing despite same filename | Suggest a more specific filename. Loop back to step 3 question 5 (filename) with the user. |
NEVER overwrite without backing up to .bak first. NEVER skip the read-before-write step on collision.
.chief/_rules/ does not exist yet, run the scaffold routine from step 2 first (creates .chief/, .chief/_rules/, and _rules/README.md)..chief/_rules/_standard/) if missing — this is the lazy creation point.Then report:
.bak).chief/_rules/**Stop. Do not ask "add another?" — one rule per invocation. User re-runs for the next.
.chief/_rules/README.md on first run). Do not scaffold milestones, project.md, or anything else._standard/, _contract/, _goal/, or _verification/ when the first rule lands there..bak backup AND user confirmation..chief/_rules/ (except the read of AGENTS.md if you need it for context — but you usually do not)..chief/_rules/ files are plain markdown — keep the convention.