@windyroad/architect 0.7.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/agents/agent.md
CHANGED
|
@@ -62,7 +62,9 @@ Flag when a proposed change represents an undocumented decision:
|
|
|
62
62
|
- **New script**: Does this introduce a new workflow step?
|
|
63
63
|
- **Structural change**: Does this reorganize code in a way that affects how the team works?
|
|
64
64
|
|
|
65
|
-
### Runtime-Path Performance Review (per ADR-023)
|
|
65
|
+
### Runtime-Path Performance Review (per ADR-026, specialised by ADR-023)
|
|
66
|
+
|
|
67
|
+
This review is grounded in ADR-026 (Agent output grounding) — the parent no-ungrounded-claims principle — as specialised by ADR-023 (wr-architect performance review scope) for runtime-path changes. The qualitative-claim ban below is the ADR-026 grounding requirement applied to performance estimates.
|
|
66
68
|
|
|
67
69
|
When a proposed change touches any of the following runtime-path surfaces, you MUST perform a per-request performance review in addition to the ADR-conformance review:
|
|
68
70
|
|
|
@@ -128,9 +130,34 @@ If there are issues:
|
|
|
128
130
|
>
|
|
129
131
|
> 2. ...
|
|
130
132
|
|
|
133
|
+
If a new decision must be recorded but it has 2+ viable options and no pinned direction (per ADR-064 (Architect Needs-Direction verdict)):
|
|
134
|
+
|
|
135
|
+
> **Architecture Review: NEEDS DIRECTION**
|
|
136
|
+
>
|
|
137
|
+
> A decision must be recorded but the option is not pinned — the user, not the agent, owns this choice.
|
|
138
|
+
>
|
|
139
|
+
> - **Decision question**: <the question to settle, in one line>
|
|
140
|
+
> - **Option A** — <name + one-line, grounded in what you read>
|
|
141
|
+
> - **Option B** — <name + one-line, grounded in what you read>
|
|
142
|
+
> - (further options as applicable; include "do nothing / status quo" where relevant)
|
|
143
|
+
> - **Advisory lean (optional)**: <your recommendation + why — but do NOT auto-pick, and do NOT prose-ask>
|
|
144
|
+
>
|
|
145
|
+
> The main agent (or calling skill) translates this into an `AskUserQuestion` before the decision is recorded — never a prose ask. Under an AFK orchestrator that cannot ask mid-loop, the verdict queues to the iteration's `outstanding_questions` for batched return-presentation (ADR-044 (Decision-delegation contract)), never blocking or guessing.
|
|
146
|
+
|
|
147
|
+
### When to emit Needs Direction (per ADR-064)
|
|
148
|
+
|
|
149
|
+
Emit **NEEDS DIRECTION** only when ALL of the following hold:
|
|
150
|
+
|
|
151
|
+
1. The change requires recording a new decision (you would otherwise flag `[Undocumented Decision]`).
|
|
152
|
+
2. There are **2+ viable options**.
|
|
153
|
+
3. **No direction is pinned.** Direction counts as pinned — and you must NOT ask, instead reporting PASS / ISSUES FOUND and naming the pinned source — when the option is fixed by any of: a same-turn pin, a same-session pin, an accepted ADR, `RISK-POLICY.md` appetite, or a CLAUDE.md mandatory rule.
|
|
154
|
+
|
|
155
|
+
Do NOT emit Needs Direction for the "obvious choice" / only-one-viable-option case (see "When NOT to flag" above) — over-firing on obvious choices is the over-ask trap CLAUDE.md P132 warns against. Needs Direction is the architect-surface instance of ADR-044 category 1 (direction-setting); `AskUserQuestion` remains a primary-agent affordance — you name the question + options, the main agent owns the ask.
|
|
156
|
+
|
|
131
157
|
Issue types:
|
|
132
158
|
- **[Decision Conflict]**: Change conflicts with an accepted/proposed decision
|
|
133
159
|
- **[Undocumented Decision]**: Change represents an architectural choice not covered by any existing decision
|
|
160
|
+
- **[Needs Direction]**: A new decision must be recorded but has 2+ viable options with no pinned direction — name the question + options for the main agent to translate into an `AskUserQuestion` (ADR-064)
|
|
134
161
|
- **[Decision Format]**: A decision file doesn't follow MADR 4.0 format
|
|
135
162
|
- **[Missing Supersession]**: A new decision should supersede an old one but doesn't
|
|
136
163
|
- **[Confirmation Violation]**: New code violates a confirmation criterion of an existing decision
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
# Doc-lint guard: architect agent.md must carry the NEEDS DIRECTION verdict
|
|
3
|
+
# type (ADR-064) so the architect names the question + viable options for an
|
|
4
|
+
# unpinned 2+-option decision instead of auto-picking or prose-asking, and the
|
|
5
|
+
# main agent translates it into an AskUserQuestion.
|
|
6
|
+
#
|
|
7
|
+
# tdd-review: structural-permitted (justification: P176 — agent behaviour is
|
|
8
|
+
# prompt-driven with no skill-invocation harness to exercise the verdict
|
|
9
|
+
# behaviourally; ADR-052 Surface 2 structural-justified case, NOT an ADR-005
|
|
10
|
+
# Permitted Exception — ADR-052 narrows ADR-005 to exclude prose-doc greps).
|
|
11
|
+
# When P176 lands, upgrade to a behavioural test per ADR-064 Confirmation item 2.
|
|
12
|
+
#
|
|
13
|
+
# Cross-reference:
|
|
14
|
+
# P283 (architect should AskUserQuestion when recording a new decision)
|
|
15
|
+
# ADR-064 (Architect Needs-Direction verdict; main agent owns the AskUserQuestion)
|
|
16
|
+
# ADR-052 Surface 2 (structural-justified verdict) + P176 (harness gap)
|
|
17
|
+
# @jtbd JTBD-001 (enforce governance without slowing down)
|
|
18
|
+
|
|
19
|
+
setup() {
|
|
20
|
+
AGENT_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
21
|
+
AGENT_FILE="${AGENT_DIR}/agent.md"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@test "agent.md carries a NEEDS DIRECTION report verdict (ADR-064)" {
|
|
25
|
+
run grep -n "Architecture Review: NEEDS DIRECTION" "$AGENT_FILE"
|
|
26
|
+
[ "$status" -eq 0 ]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@test "agent.md lists [Needs Direction] as an issue/verdict type" {
|
|
30
|
+
run grep -n "\[Needs Direction\]" "$AGENT_FILE"
|
|
31
|
+
[ "$status" -eq 0 ]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@test "agent.md has a 'When to emit Needs Direction' section citing ADR-064" {
|
|
35
|
+
run grep -n "When to emit Needs Direction" "$AGENT_FILE"
|
|
36
|
+
[ "$status" -eq 0 ]
|
|
37
|
+
run grep -n "ADR-064" "$AGENT_FILE"
|
|
38
|
+
[ "$status" -eq 0 ]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@test "agent.md requires the main agent to translate the verdict into AskUserQuestion (not prose)" {
|
|
42
|
+
run grep -n "AskUserQuestion" "$AGENT_FILE"
|
|
43
|
+
[ "$status" -eq 0 ]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@test "agent.md guards the negative bound: do NOT emit Needs Direction on obvious/single-option choices" {
|
|
47
|
+
# inverse-P078 over-ask guard — the verdict must not fire when only one viable option exists
|
|
48
|
+
run grep -niE "Do NOT emit Needs Direction.*(obvious|one-viable|only-one)" "$AGENT_FILE"
|
|
49
|
+
[ "$status" -eq 0 ]
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@test "agent.md performance-review section cites ADR-026 as parent (ADR-026 Confirmation item 1)" {
|
|
53
|
+
run grep -nE "Runtime-Path Performance Review \(per ADR-026" "$AGENT_FILE"
|
|
54
|
+
[ "$status" -eq 0 ]
|
|
55
|
+
}
|
package/package.json
CHANGED
|
@@ -168,6 +168,8 @@ After the commit, report:
|
|
|
168
168
|
|
|
169
169
|
The trailing pointer is **not optional** — it is the user-visible signal that the skeleton needs canonical expansion before acceptance review.
|
|
170
170
|
|
|
171
|
+
**Confirm-every-ADR gate (ADR-064):** a capture-adr skeleton is recorded `proposed` with a pre-pinned decision but WITHOUT human review of the options. It must NOT be promoted to `accepted` until it has been through a `/wr-architect:create-adr` (or equivalent) `AskUserQuestion` review-and-confirm pass. Capture records the decision quickly; the confirm — not the capture — is what gives it human oversight. This is prong 1 of P283 (lift auto-/quick-recorded decisions to human-confirmed before they stand).
|
|
172
|
+
|
|
171
173
|
## Composition with create-adr
|
|
172
174
|
|
|
173
175
|
| Concern | create-adr | capture-adr |
|
|
@@ -8,6 +8,10 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
|
8
8
|
|
|
9
9
|
Create a new ADR in `docs/decisions/` following MADR 4.0 format. The wr-architect:agent reviews these files to enforce architectural compliance.
|
|
10
10
|
|
|
11
|
+
## Needs-Direction handoff + confirm-every-ADR (ADR-064)
|
|
12
|
+
|
|
13
|
+
When a `wr-architect:agent` review returns a **NEEDS DIRECTION** verdict (a new decision with 2+ viable options and no pinned direction, per ADR-064), the option choice is the user's, not the agent's — this skill is the translation surface. The architect's named question + options become the Step 2 cat-1 `AskUserQuestion` calls (Considered Options / Decision Outcome), and the Step 5 confirm is the load-bearing **review-and-confirm-every-ADR** gate: an ADR must not stand as a human-oversighted decision (reach `accepted`) without that confirm pass. A `/wr-architect:capture-adr` skeleton — zero-ask precisely because its decision was pre-pinned in `$ARGUMENTS` — must be run through this skill's confirm before promotion to `accepted`. When direction IS already pinned (same-turn / same-session / accepted ADR / RISK-POLICY.md / CLAUDE.md mandatory rule), act on it — do not re-ask (P132 inverse-P078 guard).
|
|
14
|
+
|
|
11
15
|
## Steps
|
|
12
16
|
|
|
13
17
|
### 1. Discover existing decisions
|