Skip to content

Commit 3d7f52a

Browse files
committed
feat: arch voice for plugin
1 parent 16f828b commit 3d7f52a

12 files changed

Lines changed: 345 additions & 3 deletions

File tree

.archcore/.sync-state.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,6 +3366,11 @@
33663366
"source": "plugin/context-filtering-pipeline.doc.md",
33673367
"target": "plugin/commands-system.spec.md",
33683368
"type": "related"
3369+
},
3370+
{
3371+
"source": "plugin/architect-voice-default.adr.md",
3372+
"target": "plugin/precision-over-coverage.adr.md",
3373+
"type": "extends"
33693374
}
33703375
]
33713376
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: "Architect Voice as Default Documentation Style"
3+
status: accepted
4+
tags:
5+
- "architecture"
6+
- "plugin"
7+
- "precision"
8+
---
9+
10+
## Context
11+
12+
Research across all plugin prompts (`precision-rules.md`, `agents/archcore-assistant.md`, 7 SKILL.md files) found no content style constraint: agents composing `.archcore/` documents defaulted to developer-style output — implementation code, function signatures, and step-by-step code walkthroughs in document types where architectural rationale is the primary signal. Documents serving as AI agent context deliver higher signal-to-noise when they capture *why* decisions were made and *what they cost*, not *how* implementations work — the code is already readable from `@path/to/file` references in source.
13+
14+
## Decision
15+
16+
Adopted **architect voice** as the default content standard: expert, concise, precise, and argued. A document should let a senior engineer understand *why*, *what*, and *what it costs* in 30 seconds. `@path/to/file` references, identifiers, measurements, and version strings are used freely — they are the architect's vocabulary. Pasting code bodies, implementation walkthroughs, and AI-padded filler are defects. The constraint is codified in `skills/_shared/precision-rules.md` Rule 6 and `agents/archcore-assistant.md` Quality Standards. Code blocks remain appropriate for types where the exact textual format is the artifact: `rule` (Good/Bad), `guide` (steps), `cpat` (Before/After), and on explicit user request.
17+
18+
## Alternatives Considered
19+
20+
1. **Add voice rule to MCP server instructions (`internal/mcp/server.go`)** — rejected because MCP instructions are host-agnostic and serve Cursor, Copilot, Codex CLI, and Claude Code equally; Claude Code-specific narrative preferences do not belong in a shared layer.
21+
2. **Modify CLI templates (`templates/templates.go`) to remove code placeholders** — ruled out because templates define document *structure*, not voice; removing code blocks from `spec` or `doc` templates would break valid use cases where code is genuinely normative (wire formats, protocol contracts).
22+
3. **No change, rely on per-user prompting** — deferred; creates inconsistent defaults where each new user gets developer-style output until they discover an override.
23+
24+
## Consequences
25+
26+
- [expected] ADR, RFC, PRD, plan, and spec documents produced without explicit user override will contain argued rationale rather than implementation detail — shorter, faster for AI agents to process.
27+
- Tradeoff: users who need inline code examples in non-code-native types must explicitly request them; the escape hatch is always available but not the default.
28+
- [expected] Per-composition token overhead from Rule 6 and agent definition additions: ~190 tokens (~6–8% on a typical `create_document` workflow).
29+
- Rule 6 is a behavioral default, not a structural gate — `bin/check-precision` does not enforce it.
30+
31+
## Superseded when
32+
33+
- User research shows ≥ 30% of first-time users explicitly request inline code in ADRs or PRDs before being prompted — indicating the default misaligns with actual usage patterns.
34+
- A content-profile system is introduced that allows per-type voice configuration in `.archcore/settings.json`.

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "archcore",
33
"description": "Make your AI agent code with your project's architecture, rules, and decisions.",
4-
"version": "0.4.4",
4+
"version": "0.4.6",
55
"author": {
66
"name": "Archcore"
77
},

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "archcore",
33
"description": "Make your AI agent code with your project's architecture, rules, and decisions.",
4-
"version": "0.4.4",
4+
"version": "0.4.6",
55
"author": {
66
"name": "Archcore",
77
"url": "https://archcore.ai"

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "archcore",
33
"displayName": "Archcore",
44
"description": "Make your AI agent code with your project's architecture, rules, and decisions.",
5-
"version": "0.4.4",
5+
"version": "0.4.6",
66
"author": {
77
"name": "Archcore"
88
},

agents/archcore-assistant.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,10 @@ When reviewing or creating documents, ensure:
9292
- Tags are relevant and consistent with existing tags
9393
- Relations capture real semantic links, not just proximity
9494
- Status reflects reality (draft work is `draft`, decided work is `accepted`)
95+
- **Architect voice**: Expert, concise, precise, argued. A senior engineer
96+
reads the document in 30 seconds and knows *why*, *what*, and *what it
97+
costs*. Use `@path/to/file`, identifiers, measurements, and `@`-references
98+
freely. Avoid pasting code bodies — reference the source instead. Avoid
99+
filler and implementation walkthroughs that add no architectural signal.
100+
Code blocks belong in `rule`/`guide`/`cpat` or when explicitly requested.
101+
See `skills/_shared/precision-rules.md` Rule 6.

agents/archcore-assistant.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,11 @@ When reviewing or creating documents, ensure:
7272
- Tags are relevant and consistent with existing tags
7373
- Relations capture real semantic links, not just proximity
7474
- Status reflects reality (draft work is `draft`, decided work is `accepted`)
75+
- **Architect voice**: Expert, concise, precise, argued. A senior engineer
76+
reads the document in 30 seconds and knows *why*, *what*, and *what it
77+
costs*. Use `@path/to/file`, identifiers, measurements, and `@`-references
78+
freely. Avoid pasting code bodies — reference the source instead. Avoid
79+
filler and implementation walkthroughs that add no architectural signal.
80+
Code blocks belong in `rule`/`guide`/`cpat` or when explicitly requested.
81+
See `skills/_shared/precision-rules.md` Rule 6.
7582
"""

bin/check-precision

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# 4. Body length above placeholder threshold
1515
# 5. No cross-document body references to other .archcore/ documents
1616
# (precision-rules.rule.md Rule 5 — relations belong in the graph)
17+
# 6. No multi-line code blocks (>=5 content lines) in architect-voice types
18+
# (precision-rules.rule.md Rule 6 — use @references instead)
1719

1820
SCRIPT_DIR=$(dirname "$0")
1921
# shellcheck source=lib/normalize-stdin.sh
@@ -136,6 +138,35 @@ if [ -n "$CROSS_HITS" ]; then
136138
add_finding "body references other .archcore/ documents ($CROSS_HITS) — move these links to the relation graph via mcp__archcore__add_relation"
137139
fi
138140

141+
# --- Check 6: Multi-line code blocks in architect-voice types ---
142+
# Source of truth: skills/_shared/precision-rules.md Rule 6.
143+
# Code blocks with >=5 content lines signal pasted implementation detail;
144+
# types where architect voice applies must prefer @path/to/file references.
145+
# Exempted types (code blocks are the artifact): rule, guide, cpat.
146+
case "$DOC_TYPE" in
147+
adr|rfc|doc|prd|idea|plan|mrd|brd|urd|brs|strs|syrs|srs)
148+
LONG_BLOCK=$(printf '%s' "$BODY" | awk '
149+
/^[[:space:]]*```/ {
150+
if (in_block) {
151+
# closing fence: check accumulated line count
152+
if (block_lines >= 5) { found = 1; exit }
153+
in_block = 0
154+
block_lines = 0
155+
} else {
156+
in_block = 1
157+
block_lines = 0
158+
}
159+
next
160+
}
161+
in_block { block_lines++ }
162+
END { if (found) print "yes" }
163+
')
164+
if [ "$LONG_BLOCK" = "yes" ]; then
165+
add_finding "code block >=5 lines in $DOC_TYPE — architect voice prefers @path/to/file references over pasted implementation detail (Rule 6)"
166+
fi
167+
;;
168+
esac
169+
139170
# --- Emit soft warnings if any ---
140171
if [ -n "$FINDINGS" ]; then
141172
archcore_hook_info "Precision check on $ARCHCORE_DOC_PATH (soft, non-blocking) — $FINDINGS. See skills/_shared/precision-rules.md and adr-contract.md (plugin-shipped)."

skills/_shared/precision-rules.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,33 @@ composing documents of type `adr`, `spec`, `rule`, `guide`. See also
7878
belong in the relation graph (`mcp__archcore__add_relation`), not in the
7979
body.
8080

81+
6. **Architect voice: expert, concise, precise, argued.** Documents are
82+
decision records and context maps — not implementation walkthroughs. The
83+
target quality is: a senior engineer reads it in 30 seconds and knows
84+
*why* this exists, *what* was decided, and *what it costs*. Verbose
85+
AI-padded prose that restates the obvious is a defect.
86+
87+
**Use freely:**
88+
- `@path/to/file` references, commit hashes, PR links, issue numbers
89+
- Inline code for identifiers, function names, type names, version strings,
90+
CLI flags — anything that names a concrete artifact
91+
- Measurements, thresholds, SLOs, dates — exact values beat adjectives
92+
93+
**Avoid:**
94+
- Pasting function bodies or multi-line code blocks where a `@reference`
95+
would suffice — the source file is readable; the document is not its copy
96+
- Filler phrases ("This document describes...", "In summary, we can see...")
97+
- Generic implementation detail that adds no architectural signal
98+
99+
**Code blocks belong** in types where the exact textual format IS the
100+
artifact: `rule` (Good/Bad examples), `guide` (terminal steps), `cpat`
101+
(Before/After). Also appropriate in any type when the user explicitly
102+
requests them or when the format itself is normative (wire protocol,
103+
config schema, CLI interface).
104+
105+
This default applies to: `adr`, `rfc`, `doc`, `prd`, `idea`, `plan`, `mrd`,
106+
`brd`, `urd`, `brs`, `strs`, `syrs`, `srs`.
107+
81108
## Enforcement
82109

83110
- The plugin's `bin/check-precision` PostToolUse hook detects forbidden lexicon

skills/init/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ Each non-empty mode additionally runs hotspot capture-candidate proposal (Step 6
5555

5656
## Execution
5757

58+
Content voice: default to architectural prose — decisions, rationale, intent.
59+
See `skills/_shared/precision-rules.md` Rule 6. Code blocks only where the
60+
document type requires it (`rule`, `guide`, `cpat`) or the user asks.
61+
5862
### Pre-flight: CLI availability check
5963

6064
Before any init step, verify that the Archcore CLI is available on PATH. The canonical installer is documented at https://docs.archcore.ai/cli/install/ — use it as the single source of truth; do **not** suggest other channels (`brew`, `go install`, etc.) even if the user mentions them.

0 commit comments

Comments
 (0)