docs(claude-md): tighten State-Management prose (okr CLAUDE.md near-optimal)

CLAUDE.md loads every turn while working in this repo (measured 1,732
always-loaded tokens — the whole per-repo delta; no .claude/rules or .mcp.json).
Unlike the larger plugins, this file is already information-dense (tables + precise
design contracts), and the OKF Knowledge Layout content is under active development
(the "OKF second-brain spec" work), so it is left untouched.

The only safe, fact-preserving compression is the org-profile State-Management
paragraph (stable infra, not OKF-spec): same facts, tighter wording. 1,732→1,717
tok. The one remaining lever — the command→agent Architecture routing diagram
(~230 tok) — is a deliberate wiring reference and is kept; it can move to
/okr:help on request. Docs-only — no version bump, no catalog ref change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01683eAqVecv9VZfQzL8CQ9h
This commit is contained in:
Kjell Tore Guttormsen 2026-06-29 10:22:57 +02:00
commit f0ef6c1abc

View file

@ -53,7 +53,7 @@ The second skill (`okr-second-brain-search`) does on-demand retrieval over the u
## State Management
User configuration: `.claude/okr.local.md` in the project directory (not in plugin root).
Org profile (reinstall-surviving): `~/.claude/okr/org/profil.md` the machine-global org identity (`organisasjon:`/`program:`), written atomically (temp + `renameSync`) by `scripts/write-org-profile.mjs` during `/okr:oppsett`. Resolution is most-specific-wins: a project-local `.claude/okr.local.md` overrides the home profile; the home profile is the backwards-compatible fallback when no project config exists (read side: `hooks/scripts/inject-okr-context.mjs`). On any home-write failure the helper circuit-breaks to the gitignored project-local `.claude/okr.local.md`. Only the org *profile* migrates to home — cycle/`historikk` data stays cwd-bound.
Org profile (reinstall-surviving): `~/.claude/okr/org/profil.md` — machine-global org identity (`organisasjon:`/`program:`), written atomically (temp + `renameSync`) by `scripts/write-org-profile.mjs` during `/okr:oppsett`. Resolution is most-specific-wins: project-local `.claude/okr.local.md` overrides the home profile (the backwards-compatible fallback when no project config exists; read side `hooks/scripts/inject-okr-context.mjs`). Home-write failure → circuit-break to the gitignored project-local file. Only the org *profile* migrates to home; cycle/`historikk` data stays cwd-bound.
Template: `templates/okr.local.md.template`
Context tree: `.claude/okr/``strategisk-kontekst/`, `syklus/[id]/`, `historikk/`, `dokumenter/`
Onboarding state: `onboarding_status` field in okr.local.md (`partial` | `fullfort`)