From a97c567b01c0f1c9e0323224e2fd205fb4eda522 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Tue, 13 Jan 2026 15:23:21 -0600 Subject: [PATCH] feat: add .claude/rules/ for auto-loaded contribution rules Split GSD style guidance into: - .claude/rules/style.md - global style rules (always loaded) - .claude/rules/commands.md - path-scoped for commands/gsd/ - .claude/rules/workflows.md - path-scoped for workflows/ - .claude/rules/templates.md - path-scoped for templates/ - .claude/rules/references.md - path-scoped for references/ - GSD-STYLE.md - comprehensive reference for deep dives Rules auto-load via Claude Code's .claude/rules/ feature (v2.0.64+). Path-scoped rules only activate when editing matching files. Co-Authored-By: Claude Opus 4.5 --- .claude/rules/commands.md | 64 ++++++ .claude/rules/references.md | 36 +++ .claude/rules/style.md | 87 ++++++++ .claude/rules/templates.md | 48 ++++ .claude/rules/workflows.md | 46 ++++ GSD-STYLE.md | 430 ++++++++++++++++++++++++++++++++++++ 6 files changed, 711 insertions(+) create mode 100644 .claude/rules/commands.md create mode 100644 .claude/rules/references.md create mode 100644 .claude/rules/style.md create mode 100644 .claude/rules/templates.md create mode 100644 .claude/rules/workflows.md create mode 100644 GSD-STYLE.md diff --git a/.claude/rules/commands.md b/.claude/rules/commands.md new file mode 100644 index 000000000..d59a04e8e --- /dev/null +++ b/.claude/rules/commands.md @@ -0,0 +1,64 @@ +--- +paths: + - "commands/gsd/**/*.md" +--- + +# Slash Command Rules + +Rules for editing files in `commands/gsd/`. + +## File Structure + +```yaml +--- +name: gsd:command-name +description: One-line description +argument-hint: "" or "[optional]" +allowed-tools: [Read, Write, Bash, Glob, Grep, AskUserQuestion] +--- +``` + +## Section Order + +1. `` — What/why/when (always present) +2. `` — @-references to workflows, templates, references +3. `` — Dynamic content: `$ARGUMENTS`, bash output, @file refs +4. `` or `` elements — Implementation steps +5. `` — Measurable completion checklist + +## Core Principle + +**Commands are thin wrappers.** Delegate detailed logic to workflows. + +Commands answer "what to do", workflows answer "how to do it". + +## @-Reference Patterns + +```markdown + +@~/.claude/get-shit-done/workflows/execute-phase.md +@~/.claude/get-shit-done/templates/summary.md +@~/.claude/get-shit-done/references/plan-format.md + + + +$ARGUMENTS + +@.planning/PROJECT.md +@.planning/STATE.md + +``` + +- `execution_context`: Static resources (workflows, templates, references) +- `context`: Dynamic project state and arguments + +## Success Criteria Format + +```xml + +- [ ] Specific, measurable criterion +- [ ] Another verifiable outcome + +``` + +Use checkbox format. Each criterion must be objectively verifiable. diff --git a/.claude/rules/references.md b/.claude/rules/references.md new file mode 100644 index 000000000..3a2cdabe7 --- /dev/null +++ b/.claude/rules/references.md @@ -0,0 +1,36 @@ +--- +paths: + - "get-shit-done/references/**/*.md" +--- + +# Reference File Rules + +Rules for editing files in `get-shit-done/references/`. + +## Outer Container Pattern + +References typically use an outer XML container related to the filename: + +- `principles.md` → `...` +- `checkpoints.md` → `...` then `...` +- `plan-format.md` → `...` then `...` + +Not a strict rule — check the file you're editing. + +## Internal Structure + +Internal organization varies. Common patterns: +- Semantic sub-containers (``, ``) +- Markdown headers within XML +- Code examples in fenced blocks + +## Teaching Patterns + +References often teach by contrast: +- Show vague vs. specific examples +- Explain WHY something is problematic +- Provide concrete alternatives + +## Key Principle + +References explain concepts and patterns loaded by workflows/commands when relevant. Match the style of the specific reference you're editing. diff --git a/.claude/rules/style.md b/.claude/rules/style.md new file mode 100644 index 000000000..307ae9dc0 --- /dev/null +++ b/.claude/rules/style.md @@ -0,0 +1,87 @@ +# GSD Style Rules + +These rules apply to ALL files in this repository. + +## Language & Tone + +**Imperative voice.** "Execute tasks", "Create file" — not "Execution is performed" + +**No filler.** Absent: "Let me", "Just", "Simply", "Basically", "I'd be happy to" + +**No sycophancy.** Absent: "Great!", "Awesome!", "Excellent!", "I'd love to help" + +**Brevity with substance.** Good: "JWT auth with refresh rotation using jose library" Bad: "Phase complete" + +## Temporal Language Ban + +Never write: "We changed X to Y", "Previously", "No longer", "Instead of" + +Always: Describe current state only. + +Exception: CHANGELOG.md, git commits (their purpose IS tracking change) + +## Anti-Patterns + +### Enterprise Patterns (Banned) +- Story points, sprint ceremonies, RACI matrices +- Human dev time estimates (days/weeks) +- Team coordination, knowledge transfer docs + +### Generic XML (Banned) +Don't use: `
`, ``, `` + +Use semantic tags: ``, ``, ``, `` + +## Naming Conventions + +| Type | Convention | Example | +|------|------------|---------| +| Files | kebab-case | `execute-phase.md` | +| Commands | `gsd:kebab-case` | `gsd:execute-phase` | +| Step names | snake_case | `name="load_project_state"` | +| Bash variables | CAPS_UNDERSCORES | `PHASE_ARG` | +| Type attributes | colon separator | `type="checkpoint:human-verify"` | + +## XML Conventions + +XML tags are semantic containers. Use Markdown headers for hierarchy within. + +```xml + + +## Primary Goal +Build authentication system + +## Success Criteria +- Users can log in + + + +
+ + Build authentication + +
+``` + +## @-References + +@-references are lazy loading signals — instructions to read, not pre-loaded content. + +``` +@~/.claude/get-shit-done/workflows/execute-phase.md # Static (always load) +@.planning/DISCOVERY.md (if exists) # Conditional +``` + +## Commit Format + +``` +{type}({phase}-{plan}): {description} +``` + +Types: `feat`, `fix`, `test`, `refactor`, `docs`, `chore` + +Rules: +- One commit per task +- Stage files individually (never `git add .`) +- Include `Co-Authored-By: Claude` line diff --git a/.claude/rules/templates.md b/.claude/rules/templates.md new file mode 100644 index 000000000..1f7ab1050 --- /dev/null +++ b/.claude/rules/templates.md @@ -0,0 +1,48 @@ +--- +paths: + - "get-shit-done/templates/**/*.md" +--- + +# Template Rules + +Rules for editing files in `get-shit-done/templates/`. + +## Structure Varies + +Templates don't follow a uniform structure. Some patterns: + +- Most start with `# [Name] Template` header +- Many include a `