Files
OwnCord/CLAUDE.md
T
J3vbandClaude Opus 5 150c6c42f4 chore: track the graphify knowledge graph and the bug-hunt ledger (#1381)
* chore: track the graphify knowledge graph and the bug-hunt ledger

Both were local-only, so a clone — including a cloud session, which sees
only tracked files — started with no graph and no findings history.

graphify-out/: the top-level built graph is now tracked so a fresh clone can
query it without a rebuild. Subdirectories stay ignored: cache/ is a
per-machine AST cache, and graphify parks the previous graph in a dated
YYYY-MM-DD/ backup on every rebuild (18 MB of stale duplicate, a local
rollback aid rather than shared state).

.gitattributes marks the tree -text: the repo-wide `* text=auto eol=lf` rule
would otherwise rewrite line endings inside .graphify_labels.json.sig, which
signs the labels byte-for-byte, and invalidate the signature on checkout.
graph.json/graph.html also get -diff, and the tree is linguist-generated so
it stays out of language stats and collapses in review.

.superpowers/: findings-ledger.json, its FINDINGS.md render and
render-ledger.mjs are tracked so contributors can add findings by PR. Hunt
transcripts, .bak snapshots and debris patches remain per-session scratch.

Tradeoff accepted deliberately: the post-commit rebuild hook rewrites
graph.json, so each refresh writes a fresh ~18 MB blob into history. Refresh
it in its own commit rather than folding it into an unrelated diff.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(graphify): refresh the graph over the newly-tracked files

The first commit added findings-ledger.json, FINDINGS.md and render-ledger.mjs
to the tracked tree, so the post-commit rebuild picked them up and rewrote the
graph. Also ignores .pending_changes, the transient rebuild-state file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(graphify): share the PreToolUse graph-first nudge hooks

The two hook-guard hooks lived in the gitignored settings.local.json with an
absolute C:/Users path, so no other clone got them. Portable form: bare
`graphify` off PATH, and `|| exit 0` so a contributor without graphify
installed is never blocked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Update graph output files and manifest

- Updated binary files: graph.html and graph.json with new content.
- Added new entry for findings-ledger.json in manifest.json with updated metadata.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 14:50:39 +02:00

3.0 KiB

OwnCord

Self-hosted chat platform (alpha). Server/ is a Go 1.26 REST + WebSocket server over SQLite with LiveKit voice/video; Client/tauri-client/ is a Tauri v2 desktop app (TypeScript frontend, thin Rust backend). Per-component detail lives in Server/CLAUDE.md and Client/tauri-client/CLAUDE.md; the protocol and schema are documented in docs/protocol.md, docs/schema.md, and docs/architecture/README.md.

Generated code — never hand-edit

CI fails on drift, and the next generator run silently discards your edit.

Generated Source of truth Workflow
Server/db/dbgen/ Server/db/queries/*.sql, Server/migrations/ db-change skill
Server/ws/message_types.go and Client/tauri-client/src/lib/protocolTypes.ts docs/protocol-schema.json protocol-change skill
Client/tauri-client/src/generated/ tauri-typegen CI patches known typegen bugs — see .github/workflows/ci.yml

Knowledge graph (graphify)

graphify-out/ holds a committed knowledge graph of this repo — god nodes, communities, cross-file edges. It is checked in so a fresh clone can query it without a rebuild.

  • For codebase questions, run graphify query "<question>" before grepping. graphify path "<A>" "<B>" for relationships, graphify explain "<concept>" for one concept. These return a scoped subgraph — far smaller than GRAPH_REPORT.md or raw grep output.
  • Read graphify-out/GRAPH_REPORT.md only for broad architecture review.
  • After changing code, graphify update . refreshes it (AST-only, no API cost). graphify hook install wires that to a post-commit hook — .git/hooks/ is not tracked, so each clone installs it once.
  • graphify-out/cache/ is a per-machine AST cache and stays ignored.

The graph is generated: never hand-edit it, and refresh it in its own commit rather than folding an 18 MB blob into an unrelated diff.

Bug-hunt ledger

.superpowers/findings-ledger.json is the shared ledger of hunt findings — open a PR against it to add one. FINDINGS.md is rendered from it:

node .superpowers/render-ledger.mjs           # rewrite FINDINGS.md
node .superpowers/render-ledger.mjs --check   # validate the ledger only

Statuses: open, fixed, declined, refuted, duplicate, blocked. Never edit FINDINGS.md by hand — edit the ledger and re-render. Everything else under .superpowers/ is per-session scratch and stays local.

Gotchas

  • Verify with the ci-check skill, not with an ad-hoc go build && go test. CI compiles four Go build-tag variants and runs a deadlock-detection pass; the default build proves nothing about the tagged ones.
  • The client unit suite is green and must stay green. Never make a failing test pass by weakening its assertions.
  • Security issues go through GitHub Security Advisories, never public issues (docs/security.md). This repo is public — unfixed defects do not belong in commits, issues, or PR descriptions.
  • Branch from main, PR to main, squash merge, conventional commit subjects.