diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 230a413..6e8ef6a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "okr", - "version": "1.5.0", + "version": "1.6.0", "description": "Expert OKR guidance for Norwegian public sector. Write, review, cascade, track and govern OKR based on Google/Doerr methodology adapted for 4-month tertial cycles.", "author": { "name": "Kjell Tore Guttormsen" diff --git a/CHANGELOG.md b/CHANGELOG.md index 944f93f..37151d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.0] - 2026-06-26 + +### Added +- **`okr-second-brain-search`-skill** — on-demand retrieval over en OKF-kompatibel markdown-wiki (`.claude/okr/` prosjekt + `~/.claude/okr/org/` home) via native Glob/Read/Grep, i fri chat OG under `/okr:*`-kommandoer. Semantisk dekomponering med opptil 3 query-variasjoner; ingen for-injeksjon av alt innhold. +- **OKF-frontmatter på alle kontekstfiler** — org-profil (`type: Organisasjonsprofil`) og tre-skrivere (`type: Tildelingsbrev`/`Virksomhetsplan`/`Overordnede OKR`/`OKR`/`Retrospektiv`/`Status`) emitterer ekte OKF-schema (Title-Case `type` + `resource`/`title`/`description`/`tags`/`timestamp`). +- **`scripts/okf-index.mjs`** — genererer `index.md` per nivå (verbatim OKF-format `* [title](link) - description`) per bundle-rot. +- **`scripts/okf-check.mjs`** — validerer at hver konsept-fil bærer `type:`; rapporterer `okf_version` per rot. +- **`scripts/compose-org-profile.mjs`** — bygger nestet org-profil-YAML med top-level OKF-nøkler før pipe til `write-org-profile.mjs`. +- **`lib/frontmatter.mjs`** — delt frontmatter-parser/skriver; konsoliderer duplisert parse-logikk i begge hooks og fikser comment-leak på usiterte verdier. + +### Changed +- **`inject-okr-context.mjs` splittet** — for-injiserer ikke lenger hele kontekstfil-enumerasjonen; emitterer kjerne-profil + én resolvert peker til `index.md` (< 512 B, uavhengig av filantall). Retrieval skjer on-demand via skill. +- **`/okr:analyse`** leser `historikk/` direkte (Glob/Read) etter hook-splitten. +- **Begge hooks** ruter frontmatter-parsing gjennom delt `lib/frontmatter.mjs`. + ## [1.5.0] - 2026-06-26 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index 6e5e035..99147dc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# OKR Offentlig Sektor v1.5.0 +# OKR Offentlig Sektor v1.6.0 Expert OKR guidance for Norwegian public sector. Google/Doerr methodology adapted for 4-month tertial cycles. @@ -17,7 +17,7 @@ Expert OKR guidance for Norwegian public sector. Google/Doerr methodology adapte | `/okr:analyse` | Cross-cycle analytics with Mermaid trend visualizations | | `/okr:oppsett` | Configure plugin: onboarding interview (full/mvp), cycle archival, profile update. Args: `full\|mvp\|arkiver\|oppdater\|vis` | | `/okr:export` | Export OKR deliverables (quality review, gap matrix, status report, retrospective) to print-ready PDF via weasyprint | -| `/okr:freshen-references` | KB self-evaluator: score the 16 reference files against an anchored rubric + currency-poll public sources | +| `/okr:freshen-references` | KB self-evaluator: score the 16 domain reference files against an anchored rubric + currency-poll public sources | | `/okr:help` | Full overview of all commands, agents, and recommended cycle workflow | ## Agents @@ -40,12 +40,15 @@ Expert OKR guidance for Norwegian public sector. Google/Doerr methodology adapte | UserPromptSubmit | command | Inject org profile (expanded YAML), current cycle, `.claude/okr/` summary, and archived cycle count | | PreCompact | prompt | Preserve OKR draft state during compaction | -## Skill +## Skills | Component | Location | |-----------|----------| -| SKILL.md | `skills/okr-offentlig-sektor/SKILL.md` | +| SKILL.md (okr-offentlig-sektor) | `skills/okr-offentlig-sektor/SKILL.md` | | References (17) | `skills/okr-offentlig-sektor/references/` | +| SKILL.md (okr-second-brain-search) | `skills/okr-second-brain-search/SKILL.md` | + +The second skill (`okr-second-brain-search`) does on-demand retrieval over the user's OKF-compatible wiki (native Glob/Read/Grep, no MCP) — see OKF Knowledge Layout below. ## State Management @@ -56,6 +59,19 @@ Context tree: `.claude/okr/` — `strategisk-kontekst/`, `syklus/[id]/`, `histor Onboarding state: `onboarding_status` field in okr.local.md (`partial` | `fullfort`) Cycle archival: `/okr:oppsett arkiver` — moves `syklus/` to `historikk/`, generates `retrospektiv.md` +## OKF Knowledge Layout + +Context files carry OKF-compatible frontmatter (Knowledge Catalog "Documents/kb Layout", aka "Metadata as Code" — not a formal "OKF v0.1" standard): a Title-Case `type` (`Organisasjonsprofil`, `Tildelingsbrev`, `Virksomhetsplan`, `Overordnede OKR`, `OKR`, `Retrospektiv`, `Status`) plus recommended `resource`/`title`/`description`/`tags`/`timestamp`. Only `type` is de-facto required. The flat frontmatter parser reads only single-line keys (`type`, profile/config fields); tree files may carry multi-line `tags` lists without breaking it. + +**Two bundle roots** with distinct lifecycles: project `.claude/okr/` (cwd-bound cycle/work) and home `~/.claude/okr/org/` (reinstall-surviving org identity). Each root carries its own `index.md` (no frontmatter; `# H1` + `* [title](link) - description`) and an `okf_version` marker. `okf-index`/`okf-check` run per root; retrieval Globs both (project preferred, else home). + +- `lib/frontmatter.mjs` — shared frontmatter parser/writer; both hooks route through it (strips trailing ` #…` only from unquoted values). +- `scripts/okf-index.mjs` — regenerate a root's per-level `index.md` (verbatim OKF index format). +- `scripts/okf-check.mjs` — validate each concept file carries `type:` (exit 1 + count otherwise); report `okf_version` per root. +- `scripts/compose-org-profile.mjs` — build the nested org-profile YAML with top-level OKF keys (`type`/`resource`/`timestamp`) before piping to `write-org-profile.mjs`. + +Retrieval is on-demand via the `okr-second-brain-search` skill. The UserPromptSubmit hook no longer pre-injects the full context-file enumeration — it emits the core profile plus one resolved pointer to `index.md` (< 512 B, independent of file count). + ## Language Policy - Commands, agents, user-facing text: Norwegian @@ -80,4 +96,6 @@ Cycle archival: `/okr:oppsett arkiver` — moves `syklus/` to `historikk/`, gene /okr:freshen-references ──→ (inline KB-evaluator + currency-polling via WebSearch/Task) /okr:help ──→ (inline command/agent/workflow overview) SessionStart ──→ coaching-hook.mjs (proactive coaching) +UserPromptSubmit ──→ inject-okr-context.mjs (core profile + resolved index.md pointer) +okr-second-brain-search (skill) ──→ Glob/Read/Grep over .claude/okr/ + ~/.claude/okr/org/ (on-demand retrieval) ``` diff --git a/README.md b/README.md index 1ccdcb5..cb06111 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *AI-generated: all code produced by Claude Code through dialog-driven development. [Full disclosure →](../../README.md#ai-generated-code-disclosure)* -![Version](https://img.shields.io/badge/version-1.5.0-blue) +![Version](https://img.shields.io/badge/version-1.6.0-blue) ![Platform](https://img.shields.io/badge/platform-Claude_Code_Plugin-purple) ![Agents](https://img.shields.io/badge/agents-7-orange) ![Commands](https://img.shields.io/badge/commands-13-blue) @@ -252,6 +252,13 @@ The plugin understands this hierarchy and helps you maintain alignment at every | PreCompact | Preserves OKR draft state if the conversation gets long | | Stop | Reminds you to save work to your tracking system | +### Skills + +| Skill | Role | +|-------|------| +| okr-offentlig-sektor | Core OKR methodology and Norwegian public-sector domain knowledge | +| okr-second-brain-search | On-demand retrieval from your personal OKF wiki (`.claude/okr/` + `~/.claude/okr/org/`) — in free chat and during `/okr:*` commands, without pre-injecting everything | + ### Knowledge Base 17 reference files covering OKR methodology, Norwegian public sector governance, antipatterns, meeting guides, metrics library, anchored quality rubrics, integration patterns, and more. The plugin reads only what's relevant to each interaction — never the whole library at once. @@ -283,6 +290,7 @@ The plugin understands this hierarchy and helps you maintain alignment at every | Version | Date | Highlights | |---------|------|------------| +| **1.6.0** | 2026-06-26 | OKF «second brain»: on-demand retrieval-skill (`okr-second-brain-search`) over OKF-wiki, OKF-frontmatter på kontekstfiler, `okf-index`/`okf-check`, delt frontmatter-modul, slankere inject-hook | | **1.5.0** | 2026-06-26 | Referansegrad-løft (Fase 3): `/okr:help`, `/okr:export` (PDF), `/okr:freshen-references`, ankret kvalitetsrubrikk, atomisk org-profil-skriving | | **1.4.0** | 2026-06-24 | Domenedybde + kildeintegritet (Fase 1), UX-/kommando-/agent-modning (Fase 2), hybrid org-kontekst-lesing | | 1.3.2 | 2026-06-24 | Fix: loopende Stop-hook fjernet | diff --git a/skills/okr-offentlig-sektor/SKILL.md b/skills/okr-offentlig-sektor/SKILL.md index 5bb5a9d..0e6f87e 100644 --- a/skills/okr-offentlig-sektor/SKILL.md +++ b/skills/okr-offentlig-sektor/SKILL.md @@ -2,7 +2,7 @@ name: okr-offentlig-sektor description: >- OKR (Objectives and Key Results) for Norwegian public sector: writing OKR, reviewing OKR quality, cascading OKR from strategy to team, tracking progress, running OKR meetings, translating tildelingsbrev to OKR. Also CFR, OKR antipatterns, scoring, Oboard. Triggers on: "OKR", "skriv OKR", "vurder OKR", "OKR-scoring", "kaskadere OKR", "tildelingsbrev til OKR", "OKR for offentlig sektor". -version: "1.5.0" +version: "1.6.0" --- # OKR Skill for Offentlig Sektor (Norge)