Skip to content

feat(config): layered repo and user config - #9

Merged
Conava merged 4 commits into
mainfrom
feat/layered-config
Nov 17, 2026
Merged

Conava merged 4 commits into
mainfrom
feat/layered-config

Conversation

@Conava

@Conava Conava commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the single devline.local.md settings file with layered config. Each key is resolved separately, in this order:

  1. the request
  2. the repo file .claude/devline.md (committed)
  3. the user file ${CLAUDE_CONFIG_DIR:-~/.claude}/devline/config.md
  4. the owning skill's ## Defaults section
  • One shared reference, skills/setup/references/config.md, covers precedence, format and the key table. Every skill and agent that reads config points to it.
  • Both files use flat key: value frontmatter plus optional prose. Prose policy, such as "always squash", beats the git skill's defaults.
  • Legacy fallback: if a layer's new file is missing, the old devline.local.md is read as that layer, and the user is told once to move it. Setup offers the move.
  • Setup writes the repo file, the user file or both from new templates, and flags personal keys before they land in the committed file.
  • Removed documented keys that nothing read: frontend_framework, cve_branch_strategy and cve_auto_*, and all migrate_* keys.
  • README: a short Configuration section replaces the settings tables.

Tests

  • New skills/setup/tests/test_config.py, added to CI. It checks that:
    • each key is in its owner's Defaults section;
    • each owner points to the reference;
    • no file mentions the legacy name outside the migration note.
  • design 16, kb-m3e 7, kb-engineering 23 and setup 4 pass.

Try it

Use a throwaway repo with CLAUDE_CONFIG_DIR=/tmp/devline-cfg/home claude --plugin-dir <this branch>:

  • Put branch_format in both files. /devline:git commit on main should offer the repo file's branch name.
  • Delete the repo file. It should offer the user file's name.
  • Add a legacy devline.local.md. It should be read, with a one-time hint to move it.

Settings lived in one per-repo devline.local.md (plus a user copy that
only the design skill read), so personal preferences had to be repeated
in every repo and project rules sat next to them in an ignored file.

Each key now resolves from the first layer that sets it: the request,
the committed repo file .claude/devline.md, the user file
${CLAUDE_CONFIG_DIR:-~/.claude}/devline/config.md, then the owner
skill's Defaults section. Both files use flat YAML frontmatter plus
optional prose for rules no key can say, such as squash merges.

One shared reference holds the lookup rules, the legacy fallback and
the key table; skills and agents point to it instead of naming a file.
A missing new file falls back to the old devline.local.md, with a
one-time hint to move it.

Keys that nothing read are dropped from the documented set:
frontend_framework, the cve_ branch, commit and push keys, and the
migrate_ keys.
Setup wrote only the per-repo devline.local.md, walking four fixed
batches. It now asks which config file to write, lists the keys that
usually belong in that layer with their defaults, asks for prose rules,
and writes only what differs from the defaults.

When a legacy devline.local.md exists without its replacement, setup
offers to move it and flags personal settings before they land in the
committed repo file. The output-token check moves into the
prerequisites step.
The full key tables duplicated the skills and drifted from them. The
README now explains the two files and the precedence, shows one
example, and links the shared key table.
Fails when a key in the shared table is missing from its owner's
Defaults section, when an owner stops pointing to the shared reference,
or when any file other than the migration note names the legacy config
file. Runs in the validate workflow.
@Conava
Conava merged commit ce31d60 into main Nov 17, 2026
1 check passed
@Conava
Conava deleted the feat/layered-config branch November 17, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant