Skip to content

feat(claude): user_config defaults in command/agent prompts + governance alignment scan#396

Open
ErbolTakhirov wants to merge 1 commit into
tractorjuice:mainfrom
ErbolTakhirov:feat/userconfig-wiring-v2
Open

feat(claude): user_config defaults in command/agent prompts + governance alignment scan#396
ErbolTakhirov wants to merge 1 commit into
tractorjuice:mainfrom
ErbolTakhirov:feat/userconfig-wiring-v2

Conversation

@ErbolTakhirov
Copy link
Copy Markdown

Summary

This PR is a scoped v2 follow-up to the previous feat/userconfig-wiring attempt, rebuilt from current main to avoid cross-PR regressions.

It keeps only the intended architecture:

  • Add user_config-based defaulting guidance in Claude command bodies.
  • Add the same defaulting guidance in Claude agent bodies.
  • Add arckit-claude/hooks/governance-scan.mjs checks for plugin default alignment gaps (Classification / Owner).

Included in This PR

1) Command Body Updates (Claude)

Command text now includes guidance to:

  • Default [CLASSIFICATION] and [OWNER_NAME_AND_ROLE] from \${user_config.*} where available.
  • Prompt the user when a default is unavailable.
  • Apply Governance Framework Mode logic (UK Gov vs Generic) in body instructions.

2) Agent Body Updates (Claude)

Agent prompts follow the same pattern:

  • Use \${user_config.*} defaults in prompt body logic.
  • Fall back to user prompt when defaults are missing.
  • Preserve governance-mode behavior in agent instructions.

3) Governance Scan Hook

Introduces arckit-claude/hooks/governance-scan.mjs behavior that:

  • Reads plugin defaults from CLAUDE_PLUGIN_OPTION_* environment variables.
  • Adds a Plugin Default Alignment Gaps section.
  • Flags artifact-level metadata mismatches for:
    • Classification
    • Owner

Explicitly Out of Scope

To keep this PR merge-safe and aligned with prior review feedback, the following are intentionally excluded:

  • Template-level \${user_config.*} substitution changes.
  • Bulk template rewrites across plugin trees.
  • scripts/converter.py placeholder rewrite/copy flows.
  • Any arckit-paperclip/ script reintroductions or related regressions.
  • Changes to:
    • arckit-claude/commands/pages.md
    • arckit-claude/templates/pages-template.html
    • arckit-claude/hooks/allow-mcp-tools.mjs
  • Deletions/overwrites of recently merged guide/docs work.

Rationale

user_config interpolation is reliable in command/agent body text, but not in arbitrary template file contents loaded at runtime.
This PR therefore applies defaults only where substitution is guaranteed and avoids template-level substitution risk.

Validation Notes

  • Rebuilt from current main to avoid silent reverts.
  • Diff intentionally constrained to:
    • Claude command bodies
    • Claude agent bodies
    • governance scan hook
  • No template/converter/paperclip regression surface included.

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