/thrum:project-philosophyfrom thrum
Establishes and updates a project's implementation philosophy document (.thrum/philosophy.md) defining anti-patterns, red flags, and project-specific rules for implementation agents.
Ships in thrum. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
.thrum/philosophy.md — the single authoritative location. project-setup and
every implementation-agent prompt read from this path only. Non-standard paths
are handled by the fallback migration (documented below), not by moving the
canonical target.
On every invocation, dispatch in this order. Earlier branches short-circuit later ones.
.thrum/philosophy.md is absent. If
a legacy philosophy doc exists elsewhere in the repo, offer move/link/fresh
before generating anything new. If no legacy doc is found, fall through to
branch 1..thrum/philosophy.md from project inspection + interactive prompts
(documented below).AskUserQuestion, write only on confirmation.The modes are idempotent — running the skill repeatedly on a stable project should produce no file changes after the first run.
Note: human-in-the-loop required. This skill uses
AskUserQuestionfor first-run project-specific prompts, re-run-evolved diff approval, and fallback-migration three-way choice. It cannot run unattended in CI or any other non-interactive automation context. Invoke it only from a session that can answer prompts.
Runs before the First-run branch when .thrum/philosophy.md is absent. If the
user has a philosophy doc at a legacy path, offer a three-way choice rather than
ignoring it and generating a parallel doc.
find . -type f \( -name "*philosophy*" -o -name "*anti-pattern*" -o -name "*implementation-standards*" -o -name "CONTRIBUTING.md" \) \
-not -path '*/node_modules/*' \
-not -path '*/.git/*' \
-not -path '*/dist/*' \
-not -path '*/build/*' \
2>/dev/null | head
Common legacy locations: dev-docs/implementation-philosophy.md,
docs/anti-patterns.md, CONTRIBUTING.md with an anti-patterns section.
If zero candidates: fall through to First-run. If one or more candidates: present the choice.
AskUserQuestionQuestion: "Found existing philosophy doc at <path>. What should I do?"
Options:
git mv <path> .thrum/philosophy.md. Preserves history via rename;
the file moves to the canonical location and the legacy path stops existing..thrum/philosophy.md with a single line: See: <path>.
The legacy doc stays in place; the canonical path becomes a pointer. Useful
when the legacy path is load-bearing (e.g., referenced from a
CONTRIBUTING.md that can't be retargeted cheaply)..thrum/philosophy.md via
the First-run flow. The legacy doc stays unmodified. Useful when the legacy
doc is stale or incomplete.If multiple candidates were found, ask which one first (separate
AskUserQuestion) before offering move/link/fresh.
Move path:
mkdir -p .thrum/
git mv <legacy-path> .thrum/philosophy.md
git mv requires the repo to be initialized with at least one commit on the
current branch. If the repo has no commits (fresh git init), fall back to a
plain mv + git add, and note in the final message that rename history is not
preserved.
Link path:
mkdir -p .thrum/
printf 'See: %s\n' "<legacy-path>" > .thrum/philosophy.md
Fresh path: Drop into First-run mode without touching the legacy file.
Tell the user what was done and where the canonical doc now lives. If move or
link was chosen, exit (the doc is materialized — no further generation
needed). If fresh was chosen, continue into First-run Step 1.
Triggered when .thrum/philosophy.md does not exist AND no non-standard
philosophy doc is found (or the fallback migration is skipped via the "fresh"
option).
Inspect the repo root for manifest files and pick the primary language:
| File present | Language |
|---|---|
go.mod | Go |
package.json | JavaScript / TypeScript |
Cargo.toml | Rust |
pyproject.toml or setup.py or requirements.txt | Python |
pom.xml or build.gradle* | Java / Kotlin |
Gemfile | Ruby |
mix.exs | Elixir |
If multiple are present, record the repo as polyglot and pick the most prominent by file count.
Grep the detected language's manifest for well-known framework markers:
cmd/ layout + net/http or gin-gonic or chi → web service; cobra
→ CLI; pure library if neithernext in package.json → Next.js; react without Next → React SPA;
express/fastify → Node backendfastapi/flask/django in dependencies → web backend;
pytorch/tensorflow → MLtokio/actix-web/axum → async service; bin-only → CLICheck for test files and harness config:
*_test.go files; testing package import → stdlib; testify →
assertions; ginkgo → BDD__tests__/ or *.test.ts; jest.config.*, vitest.config.*,
playwright.config.*tests/ dir; pytest.ini, conftest.py#[cfg(test)] blocks; cargo test always availableRecord the harness in the rendered template so implementation-agent prompts know how to run tests.
Sample the codebase for:
if err != nil { return ..., fmt.Errorf(...) };
Rust: ? propagation; TS: try/catch vs. Result types)fmt.Println; named logger vs.
package-level)Grep narrow — 20–50 lines is enough to surface the dominant convention. Don't read the whole repo; surface what's consistent, let the user correct via prompts.
Use AskUserQuestion for items the codebase can't reveal:
Each prompt should offer a clear default (usually "none"). Philosophy doc quality comes from real answers, not filler.
AskUserQuestionpermits at most 4 options per question. Exceeding the limit triggers a runtime "Invalid tool parameters" / "expected array to have <=4 items" error. Each of the categories above has a natural option count that can grow past 4 once a real team's rules are listed — so use multiple sequential questions (e.g. "category?" → "specific item within category?") rather than packing options into a single prompt. Prefer one prompt per category over one prompt with all categories listed.
Read resources/philosophy-template.md and interpolate the detected + provided
values. Template interpolation uses simple placeholder substitution:
{{LANGUAGE}} → "Go 1.22"
{{FRAMEWORK}} → "cobra CLI + net/http server"
{{TEST_HARNESS}} → "stdlib testing + testify assertions"
{{CONVENTIONS}} → bullet list of detected patterns
{{ANTI_PATTERNS}} → bullet list from user prompts
{{RED_FLAGS}} → bullet list from user prompts
For any placeholder with no detected or provided value, leave a commented
<!-- TODO: … --> line rather than silent emptiness — the user should see
what's missing and can fill in later.
.thrum/philosophy.mdmkdir -p .thrum/ then write the rendered content. Announce the path in the
final message so the user knows where to edit it manually later.
Triggered when .thrum/philosophy.md exists. The goal is a fast,
side-effect-free sanity check that confirms the doc is still accurate for the
current project state.
Read .thrum/philosophy.md in full. Parse its sections — at minimum the
language/framework line, the test harness line, and the anti-patterns list.
Walk the same detection steps as first-run, but compare rather than write:
CLAUDE.md (or equivalent) — is every anti-pattern in
CLAUDE.md reflected in the doc?Each check is a boolean "matches" vs. "differs". Keep the comparison narrow; this mode should not do deep inspection.
Print:
.thrum/philosophy.mdis current; no changes needed.
Do NOT write to the file. Do NOT update mtime. Do NOT create backups. Exit cleanly.
If at least one check reports "differs", transition to the re-run-evolved flow (below). The drift detection from Step 2 becomes the input to the diff proposal.
Idempotency invariant: re-running /project-philosophy on an unchanged project
must never modify any file. Tests for this mode should confirm mtime is
untouched — stat -c %Y .thrum/philosophy.md on Linux,
stat -f %m .thrum/philosophy.md on macOS.
Triggered when .thrum/philosophy.md exists AND the unchanged-mode sanity check
flagged drift. This is the load-bearing idempotency path — philosophy docs
accumulate learned anti-patterns over time, so silent overwrites destroy
context. The merge-proposal shape is the only correct shape.
Never silently overwrite. Philosophy docs are not regenerated — they are evolved. If the user has added hand-written anti-patterns, post-mortem references, or team-specific notes, those must survive every re-run. A write without explicit user confirmation is a bug.
Same as re-run-unchanged Step 1. Keep the parsed sections in memory so the diff proposal can cite them.
Four drift categories, conservative on purpose:
go.mod's go 1.X differs from the
doc's stated version; package.json lists [email protected] but doc says
[email protected].ginkgo imports appear but the doc lists
only stdlib testing. New playwright.config.ts exists but doc doesn't
mention E2E.{{ANTI_PATTERNS}}
section; anything new in CLAUDE.md is a drift candidate..golangci.yml,
eslint.config.js, ruff.toml that weren't mentioned in the doc.Start conservative. Expand the detector list only based on real-use feedback — over-eager drift detection pesters users and erodes trust in the skill.
Present drift as a readable sectional diff, one item per drift category. Each item should have:
Example shape:
### Proposed updates to `.thrum/philosophy.md`
**1. Framework version bump**
- Current: "Next.js 14"
- Proposed: "Next.js 15"
- Rationale: `package.json` lists `"next": "^15.0.0"`
**2. New anti-pattern from CLAUDE.md**
- Proposed addition under "## Anti-patterns":
> - Never run migrations from an agent session — always via the release
> pipeline.
- Rationale: Added to CLAUDE.md in commit abc1234 after the 2026-03 incident.
AskUserQuestionUse AskUserQuestion with:
.thrum/philosophy.md.
Apply all, select, or decline?"Apply all, Select items to apply, Decline (keep doc as-is)If the user picks Select items, fire a follow-up AskUserQuestion with
per-item yes/no choices.
Apply approved edits in-place. For each applied edit:
<!-- updated YYYY-MM-DD via project-philosophy re-run-evolved -->Write the file once, at the end. Announce the applied items in the final message.
If the user declines (or selects zero items), do NOT write to the file. Record
the skipped proposal in .thrum/philosophy-skipped.jsonl (append-only, one JSON
line per decline) with the timestamp and the drift items proposed. Future runs
can re-surface the same items without re-computing drift from scratch.
Skipped-proposal log is advisory — its absence is not an error.
What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/adversarial-critiqueUse when an implementer is blocked mid-work by a design flaw, contradiction, or unforeseen fork with 2-3 ways to resolve it - produces a defended pick that unblocks the work and leaves an audit trail so the decision can be revisited if it later proves wrong/configure-rolesDetect environment and generate customized role-based preamble templates for your Thrum agents. Creates .thrum/role_templates/ files that auto-apply on agent registration.
/coordinator-context-monitoringUse when managing live implementer/brainstormer agents during a long coordination session, at epic merge gates, after a busy dispatch hour, or whenever you suspect an agent is approaching context limits. Prevents 97%-context silent blow-ups by running a sweep + pre-emptive restart before the agent degrades. Safe to wire into a recurring cron that INVOKES this skill — the skill applies tier-ladder judgment, only firing autonomous restarts at the >85% tier. What's forbidden is a cron/script that fires restarts unconditionally without going through this skill's tier ladder./coordinator-dispatching-workUse when starting an epic, dispatching to an implementer, creating a worktree for an agent, or spawning a sub-agent. Loads coordinator-specific discipline for kicking off implementation work./coordinator-managing-state-and-lifecycleUse when ending a session, when updating project state, when managing beads epics, or before session close. Loads coordinator-specific discipline for owning project state and shepherding the team's lifecycle./coordinator-post-restart-sweepUse immediately after the coordinator returns from a restart, compaction, or extended absence — as the first deliberate action post-prime. Detects agents whose latest assistant message indicates they are blocked waiting for a coordinator decision the coordinator may not have seen (question surfaced in pane, not in inbox). Safe to run any time the session feels "we've been gone a while"; not just post-restart. Pairs with the coordinator-context-monitoring sweep (sibling sweep, different lens).npx claudepluginhub thrum-team/thrum --plugin thrumOther plugins' skills for the same job