Skip to content

feat: wire userConfig values into templates, commands, and hooks #306

@tractorjuice

Description

@tractorjuice

Follow-up to #210. The userConfig schema is declared in arckit-claude/.claude-plugin/plugin.json (v4.6.12) and the two API-key fields are wired through .mcp.json, but the three non-secret fields are declared-but-unused.

This issue tracks the consumption work to make those values actually flow into generated artifacts.

Fields to wire

Key Where it should be consumed
organisation_name Document Control Owner / header in every template
default_classification Document Control Classification field default
governance_framework Command + agent prompts (UK Gov vs Generic toggle)

Proposed work

1. Templates (arckit-claude/templates/*.md and .arckit/templates/*.md)

Replace hard-coded placeholders in Document Control blocks:

  • [PUBLIC / OFFICIAL / OFFICIAL-SENSITIVE / SECRET]${user_config.default_classification} with current placeholder as fallback hint
  • [OWNER_NAME_AND_ROLE] → reference ${user_config.organisation_name} where appropriate
  • Decide whether to substitute in the template file itself or have the generating command perform the substitution before writing

2. Commands and agents

  • Pick the commands/agents whose output differs by governance regime (e.g. requirements, sobc, service-standard, caf, tcop) and have them check ${user_config.governance_framework} to enable/disable UK Gov-specific sections.
  • For Generic: skip GDS Service Standard / TCoP / NCSC CAF / Orange Book / Green Book sections; keep core architecture/risk/business case content.
  • For UK Gov (default): keep current behaviour.
  • Relates to Non UK-specific version of arc-kit #304 (Non UK-specific version of arc-kit) — the governance_framework flag is the mechanism by which Non UK-specific version of arc-kit #304 ships.

3. Hooks (arckit-claude/hooks/)

  • Audit hook scripts for places where org-specific behaviour belongs (e.g. classification validation, owner-field validation) and read CLAUDE_PLUGIN_OPTION_<KEY> env vars where useful.
  • Likely candidates: validate-arc-filename.mjs, any Document Control validators, score validators.

4. Converter

  • Confirm scripts/converter.py still handles non-Claude targets cleanly once template substitution lands (it already rewrites ${user_config.KEY}${KEY} in .mcp.json, but template rewriting may need analogous handling so Codex/Gemini/OpenCode/Copilot users get sensible defaults).

5. Tests

  • Install plugin fresh in a test repo, configure all three values, generate a representative artifact (/arckit.requirements), and verify the values appear in Document Control.
  • Run the same flow with governance_framework=Generic and confirm UK Gov sections drop out.

Out of scope

  • Adding new userConfig fields beyond the five already declared.
  • Changing the schema validator behaviour (Claude Code core).

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions