Files
codewhale/.gitignore
T
Hunter Bown 9d9616e898 feat(project): deprecate WHALE.md; add .codewhale/constitution.json authority layer
Splits repo-level guidance into two clear artifacts and deprecates the
confusing WHALE.md concept (overlapped with AGENTS.md):

- AGENTS.md is the canonical cross-agent project-instructions file.
- .codewhale/constitution.json is the CodeWhale-specific repo authority /
  prioritization policy (when local sources conflict, which to trust first; what
  to verify before claiming done). Rendered into the system prompt as a
  higher-authority <codewhale_repo_constitution> block; takes precedence over a
  legacy WHALE.md.

WHALE.md migration (compat-preserving):
- AGENTS.md now ranks above WHALE.md in both project and global discovery; with
  both present, AGENTS.md wins.
- WHALE.md is still read as a legacy fallback, but now emits a deprecation
  warning and is never created or recommended (init.rs no longer suggests it).
- Discovery/docs updated; the global CodeWhale Constitution in prompts/base.md
  is unaffected (different thing).

constitution.json:
- New RepoConstitution (serde, all fields optional, unknown fields ignored,
  schema_version checked). Discovered at .codewhale/constitution.json in the
  workspace or any parent up to the git root. Malformed JSON warns, never panics.
- Loaded after the auto-generate fallback so it can't be clobbered.

.gitignore: ignore .codewhale/ contents at any depth EXCEPT the committed
constitution.json (a directory exclude can't be negated, so **/.codewhale/* +
negation). init.rs writes the same pattern for new repos. Dogfood: this repo's
.codewhale/constitution.json added.

find_git_root made pub(crate) and reused (no duplicate loader).

Tests: AGENTS-over-WHALE precedence, WHALE legacy-read-with-warning,
constitution render + system-block surfacing, malformed-constitution warning,
gitignore-keeps-constitution. cargo test -p codewhale-tui --bins → 3946 passed;
clippy clean.

Targets codex/v0.8.53.
2026-06-03 12:12:34 -07:00

122 lines
2.1 KiB
Plaintext

# Build artifacts
/target
*.pdb
*.exe
*.dll
*.so
*.dylib
*.rlib
*.o
# Development
.env
.env.*
!.env.example
node_modules/
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
Thumbs.db
# Python
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
venv/
ENV/
env/
.venv/
*.egg-info/
dist/
# Logs
*.log
# Generated
outputs/
tmp/
backup/
# Reference papers / large research blobs (keep locally if needed, don't ship)
docs/DeepSeek_V4.pdf
docs/*.pdf
# Note: Cargo.lock is intentionally NOT ignored for reproducible builds
# Local dev scripts and temp files
*.sh
*.cmd
!scripts/**
!.github/scripts/**
test.txt
TODO*.md
todo*.md
CLAUDE.md
AGENTS.md
NEXT_SESSION.md
AI_HANDOFF.md
result.json
count_deps.py
project_overhaul_prompt.md
.codex/
.context/
.wrangler/
# Local runtime state
# Ignore everything under any .codewhale/ (snapshots, auto-generated
# instructions.md, etc.) at any depth EXCEPT the committed repo authority policy.
**/.codewhale/*
!**/.codewhale/constitution.json
.deepseek/
**/session_*.json
*.db
npm/*/bin/downloads/
# Companion app (tracked separately)
apps/
# Claude Code runtime artifacts
.claude/scheduled_tasks.lock
.claude/worktrees/
.worktrees/
.ace-tool/
# Local-only Claude / ralph notes
.claude/*.local.md
.claude/*.local.json
# Maintainer handoff + codemap notes are working-state, not user-facing
# artifacts. They've leaked into the public repo via .claude/ in the past
# (HANDOFF_v0.8.28, CODEMAP_v0.8.25) — those files now live under
# .private/handoffs/ instead. Block the patterns here so a future accidental
# add doesn't silently land on main.
.claude/HANDOFF_*
.claude/CODEMAP_*
.claude/handoff_*
.claude/codemap_*
# Maintainer-internal design notes (trade-secret material, never published)
.private/
# Maintainer-local SWE-bench scratch (instance workspaces, venvs, predictions,
# Docker harness logs). Never published.
.swebench/
deep-swe/
all_preds.jsonl
# Agent handoffs and version-specific setup plans are working-state notes, not
# public docs. Keep durable setup guidance in docs/runbooks instead.
docs/*HANDOFF*.md
docs/*handoff*.md
docs/*_PLAN.md
!docs/archive/**
# direnv
.envrc
.direnv
scripts/run_deep_swe.py