Skip to content

General: Move on-demand agent docs out of the always-loaded rules - #37

Merged
d4rken merged 1 commit into
mainfrom
worktree-docs-restructure
Jul 28, 2026
Merged

General: Move on-demand agent docs out of the always-loaded rules#37
d4rken merged 1 commit into
mainfrom
worktree-docs-restructure

Conversation

@d4rken

@d4rken d4rken commented Jul 28, 2026

Copy link
Copy Markdown
Member

What changed

No user-facing behavior change — this is AI-assistant documentation under .claude/ plus four source comments.

The repository guidance is split into what every session needs (always-loaded .claude/rules/) and what only some sessions need (.claude/skills/, loaded on demand).

Technical Context

Why now: #36 renamed .claude/rules/release.md.claude/skills/release/SKILL.md as a pure rename with zero content change. A skill needs YAML frontmatter (name, description) to be loadable, so release has been sitting in main as a broken skill since that commit. This PR finishes the restructuring it started.

What moved (content is unchanged in each move — verified verbatim):

To From Holds
skills/release frontmatter added; also takes back the screenshot workflow that rules/build-commands.md was duplicating
skills/device-qualification rules/privileged-access.md qualification protocol, verified-device ledger, per-OEM known gaps
skills/oem-adapters rules/architecture.md per-OEM adapter detail — keys, value domains, write ordering, session overrides

rules/architecture.md goes 208 → 95 lines, rules/privileged-access.md 231 → 136. Each keeps a pointer to its skill, so the reading path from "I'm touching control code" to the adapter/ledger detail is still one hop.

No nested CLAUDE.md. An earlier draft of this work put the adapter detail in app/src/main/java/eu/darken/amply/charging/CLAUDE.md to get directory-scoped auto-loading. That is not a pattern this repo wants, so it became a skill instead, and .claude/CLAUDE.md now states the rule explicitly to stop it being re-nested next to the code later.

Source comments: four files referenced the qualification ledger at .claude/rules/privileged-access.md, which no longer holds it — they now point at .claude/skills/device-qualification/. Comment-only edits; compileFossDebugKotlin passes. SettingsSnapshotSource.kt still points at privileged-access.md for the wizard rules, which is correct — that section did not move.

Also: .claude/CLAUDE.md claimed status 0.1.0-beta1 (actual: 0.2.1-beta0); it now defers to VERSION so it cannot drift again.

Review guidance

Diff is large but almost entirely relocation. The parts worth actually reading are the three skill frontmatter blocks (do the description fields describe when to invoke them accurately?) and the pointer lines left behind in rules/architecture.md, rules/privileged-access.md, rules/agent-instructions.md, and .claude/CLAUDE.md.

Finishes the restructuring #36 landed half of: rules/release.md was renamed
to skills/release/SKILL.md there as a pure rename, so it has been sitting in
main without YAML frontmatter and cannot load as a skill.

Three bodies of reference now live in .claude/skills/, each with frontmatter,
and the always-loaded rules keep only what every session needs:

- release — regains its frontmatter, and takes back the screenshot workflow
  that build-commands.md was duplicating
- device-qualification — qualification protocol, verified-device ledger and
  per-OEM known gaps, out of privileged-access.md
- oem-adapters — per-OEM adapter detail (keys, value domains, write ordering,
  session overrides), out of architecture.md

Content is unchanged in the move. architecture.md goes 208 -> 95 lines and
privileged-access.md 231 -> 136; each keeps a pointer to its skill, and
CLAUDE.md states the no-nested-CLAUDE.md rule explicitly so the adapter
detail is not re-nested next to the code later.

Source comments that pointed at the ledger in .claude/rules/privileged-access.md
now point at the skill. Comment-only; compileFossDebugKotlin passes. The
CLAUDE.md status line claimed 0.1.0-beta1 and now defers to VERSION.
@github-actions github-actions Bot added the enhancement New feature or request label Jul 28, 2026
@d4rken d4rken added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jul 28, 2026
@d4rken
d4rken merged commit 26d4100 into main Jul 28, 2026
12 checks passed
@d4rken
d4rken deleted the worktree-docs-restructure branch July 28, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant