Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions .claude/rules/decisions.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
# Team Decisions

## Core Architecture
- [markdown-source-of-truth](.claude/decisions/markdown-source-of-truth.md) — Markdown files are source of truth. FTS5 index is derived — delete it and it rebuilds.
- [append-only-decisions](.claude/decisions/append-only-decisions.md) — Append-only is enforced by git. Edit in place, delete when obsolete, git log preserves history.
- [git-is-the-history-layer](.claude/decisions/git-is-the-history-layer.md) — Edit decisions in place, delete when obsolete. Git tracks evolution — no supersedes/withdrawn needed.
- [stdlib-only-in-src](.claude/decisions/stdlib-only-in-src.md) — Zero external dependencies in src/. Stdlib-only Python 3.11+.
- [pure-methods-on-store](.claude/decisions/pure-methods-on-store.md) — No side effects at import time on DecisionStore.
- [team-first-decisions](.claude/decisions/team-first-decisions.md) — Decisions write to .claude/decisions/ in repo. Memory is fallback for non-repo contexts only.

## Policy Engine
- [policy-evaluation-order](.claude/decisions/policy-evaluation-order.md) — BLOCK → LIFECYCLE → CONTEXT → NUDGE. Block/reject fail-fast. Plugin always forces ok=True (advisory).
- [session-state-in-tmp](.claude/decisions/session-state-in-tmp.md) — Per-session state in /tmp with atomic O_CREAT|O_EXCL marker files.

## Hook Dispatch
- [bash-dispatch-fast-paths](.claude/decisions/bash-dispatch-fast-paths.md) — dispatch.sh avoids spawning Python for no-op events via fast-paths.
- [dispatch-errors-never-break-claude](.claude/decisions/dispatch-errors-never-break-claude.md) — dispatch.sh traps ERR and exits 0. Plugin errors must never break Claude Code.

## Search & Storage
- [fts5-search-pipeline](.claude/decisions/fts5-search-pipeline.md) — FTS5 MATCH with BM25, fallback to weighted keyword matching.
- [incremental-sync-over-full-rebuild](.claude/decisions/incremental-sync-over-full-rebuild.md) — FTS5 index uses incremental sync with per-file mtime, not full rebuild.
- [tag-summary-over-per-decision-listing](.claude/decisions/tag-summary-over-per-decision-listing.md) — Session-context injects tag counts and query hint instead of listing individual decisions.

## Skills & UX
- [single-skill-entry-point](.claude/decisions/single-skill-entry-point.md) — One /decision skill handles capture, search, and manage via intent detection.
- [no-capture-confirmation](.claude/decisions/no-capture-confirmation.md) — Agents write decisions without confirmation. /decision undo is the safety net.
- [merge-tags-stats-into-list](.claude/decisions/merge-tags-stats-into-list.md) — Consolidated /decision:tags and /decision:stats into /decision:list as --tags and --stats flags.
- [search-skill-prefer-preseeded](.claude/decisions/search-skill-prefer-preseeded.md) — Search skill presents pre-seeded hook results first, falls back to Glob/Grep only if needed.

## Nudges
- [capture-nudge-corroboration-requirement](.claude/decisions/capture-nudge-corroboration-requirement.md) — Capture-nudge requires trigger phrase + technical signal (or 2+ phrases) to reduce false positives.
- [query-preseed-hook-for-skill](.claude/decisions/query-preseed-hook-for-skill.md) — UserPromptSubmit hook pre-seeds Python query results before the skill runs Glob/Grep.
- [stop-hook-nudge-for-decision-capture](.claude/decisions/stop-hook-nudge-for-decision-capture.md) — Stop hook nudges agent to capture decisions before session ends.

- [stale-path-all-decisions](.claude/decisions/stale-path-all-decisions.md) — Stale affects-path warnings fire for all decision writes, not just new ones.

## Affects
- [stale-path-all-decisions](.claude/decisions/stale-path-all-decisions.md) — Stale affects-path warnings fire for all decision writes, not just new ones

## Architecture
- [append-only-decisions](.claude/decisions/append-only-decisions.md) — Append-only is enforced by git, not file conventions. Edit in place, delete when obsolete, git log preserves history.
- [bash-dispatch-fast-paths](.claude/decisions/bash-dispatch-fast-paths.md) — dispatch.sh avoids spawning Python for no-op hook events via fast-paths
- [dispatch-errors-never-break-claude](.claude/decisions/dispatch-errors-never-break-claude.md) — dispatch.sh traps ERR and exits 0 — plugin errors must never break Claude Code
- [fts5-search-pipeline](.claude/decisions/fts5-search-pipeline.md) — Search uses FTS5 with BM25 ranking, falling back to weighted keyword matching
- [git-is-the-history-layer](.claude/decisions/git-is-the-history-layer.md) — Edit decisions in place, delete when obsolete. Git tracks the full evolution — no supersedes/withdrawn ceremony needed.
- [markdown-source-of-truth](.claude/decisions/markdown-source-of-truth.md) — Markdown files are the source of truth — FTS5 index is derived and disposable
- [no-capture-confirmation](.claude/decisions/no-capture-confirmation.md) — Agents write decisions automatically without confirmation prompts — /decision undo is the safety net
- [policy-evaluation-order](.claude/decisions/policy-evaluation-order.md) — Policies evaluate BLOCK → LIFECYCLE → CONTEXT → NUDGE with fail-fast on block/reject
- [pure-methods-on-store](.claude/decisions/pure-methods-on-store.md) — No side effects at import time on DecisionStore
- [session-state-in-tmp](.claude/decisions/session-state-in-tmp.md) — Per-session state in /tmp with atomic O_CREAT|O_EXCL marker files for once-per-session policies
- [single-skill-entry-point](.claude/decisions/single-skill-entry-point.md) — One /decision skill handles capture, search, and manage via intent detection
- [skill-hook-cli-boundary](.claude/decisions/skill-hook-cli-boundary.md) — Skill = intent + behavior guidance, hooks = correctness enforcement, CLI = data access + computation
- [stdlib-only-in-src](.claude/decisions/stdlib-only-in-src.md) — Zero external dependencies in src/ — stdlib-only Python 3.11+
- [team-first-decisions](.claude/decisions/team-first-decisions.md) — Decisions write to .claude/decisions/ in repo by default. Memory is fallback for non-repo contexts only.

## Hooks
- [capture-nudge-corroboration-requirement](.claude/decisions/capture-nudge-corroboration-requirement.md) — Capture-nudge requires trigger phrase + technical signal (or 2+ phrases) to reduce false positives

## Plugin Architecture
- [query-preseed-hook-for-skill](.claude/decisions/query-preseed-hook-for-skill.md) — UserPromptSubmit hook pre-seeds Python query results before the query skill runs Glob/Grep
- [stop-hook-nudge-for-decision-capture](.claude/decisions/stop-hook-nudge-for-decision-capture.md) — Stop hook nudges agent to capture decisions before session ends
- [tag-summary-over-per-decision-listing](.claude/decisions/tag-summary-over-per-decision-listing.md) — Session-context injects tag counts and query hint instead of listing individual decisions

## Search
- [incremental-sync-over-full-rebuild](.claude/decisions/incremental-sync-over-full-rebuild.md) — FTS5 index uses incremental sync with per-file mtime instead of full rebuild on every change
- [search-skill-prefer-preseeded](.claude/decisions/search-skill-prefer-preseeded.md) — Search skill presents pre-seeded hook results first, falls back to Glob/Grep only if needed

## Skills
- [merge-tags-stats-into-list](.claude/decisions/merge-tags-stats-into-list.md) — Consolidated /decision:tags and /decision:stats into /decision:list as --tags and --stats flags

## Superpowers
- [superpowers-design-first](.claude/decisions/superpowers-design-first.md) — Always brainstorm and validate design before writing any code
- [superpowers-detailed-plans](.claude/decisions/superpowers-detailed-plans.md) — Implementation plans must be complete with zero placeholders
- [superpowers-git-worktrees](.claude/decisions/superpowers-git-worktrees.md) — Use git worktrees for feature branch isolation with verified baselines
- [superpowers-spec-before-quality](.claude/decisions/superpowers-spec-before-quality.md) — Review spec compliance before code quality — wrong code polished is waste
- [superpowers-subagent-development](.claude/decisions/superpowers-subagent-development.md) — Fresh subagent per task with two-stage review (spec then quality)
- [superpowers-systematic-debugging](.claude/decisions/superpowers-systematic-debugging.md) — Root cause investigation before any fixes — no random changes
- [superpowers-tdd](.claude/decisions/superpowers-tdd.md) — No production code without a failing test first (RED-GREEN-REFACTOR)
- [superpowers-verify-before-complete](.claude/decisions/superpowers-verify-before-complete.md) — No completion claims without fresh verification evidence

## Versioning
- [semver-versioning](.claude/decisions/semver-versioning.md) — Use semantic versioning (semver) for all releases
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## Unreleased

### Removed
- **Superpowers autoseeding** — the SessionStart hook no longer creates 8 `superpowers-*.md` decision files when the Superpowers plugin is detected. Manufactured decisions conflict with the zero-config, user-authored philosophy. Spec/plan extraction from `docs/superpowers/` files is unchanged.

## 1.3.0 — 2026-04-13

### Features
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ See the [Guide](GUIDE.md) for all commands, `affects` matching rules, team adopt

## Superpowers integration

If you use [Superpowers](https://github.com/obra/superpowers), Code Decisions detects it automatically and does two things:

**Seeds methodology decisions.** On first session, the plugin creates 8 decision files documenting the Superpowers methodology — TDD, design-before-code, systematic debugging, subagent-driven development, and more. These are searchable, tagged `superpowers`, and committed to git so your whole team inherits them.
If you use [Superpowers](https://github.com/obra/superpowers), Code Decisions detects it automatically and extracts decisions from your design specs and implementation plans.

**Extracts decisions from specs and plans.** When Superpowers writes a design spec (`docs/superpowers/specs/`) or implementation plan (`docs/superpowers/plans/`), Code Decisions scans the content for trade-offs and approach choices. On the first implementation edit, it nudges the agent to capture those choices as decisions — so they surface automatically when teammates edit the affected files later.

Expand Down
10 changes: 0 additions & 10 deletions src/decision/policy/session_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ def _session_init_condition(data: dict[str, Any], state: SessionState) -> Policy
store = state.get_store()
store.ensure_dir()

# Seed decisions from detected plugins (idempotent, fast)
try:
from ..seeds import get_registry

seeded = get_registry().seed_decisions(store)
if seeded:
print(f" ◆ seeded {seeded} decisions from superpowers methodology", file=sys.stderr)
except Exception as exc:
print(f"decision: seed error: {exc}", file=sys.stderr)

# Rebuild rules index if decision files changed outside Claude Code
_rebuild_index_if_stale(state)

Expand Down
136 changes: 0 additions & 136 deletions src/decision/seeds/__init__.py

This file was deleted.

Loading