Remove the ward-over-ward-kdl graft layer (Go overrides/shadows on specverb-generated verbs) #407

Closed
opened 2026-07-01 06:59:33 +00:00 by coilysiren · 7 comments
Owner

Filed from the read-only director surface (she/her). Tracking issue - Kai flagged this for removal soon, not now.

(Corrected scope. My first draft guessed this was the mountWardKdlExec command-tree auto-mount, because I anchored to commit 24641d6 without reading it. Having now fetched and read it, the real subject is the Go-side override/graft layer below. The auto-mount is a separate, adjacent mechanism and is not in this scope unless Kai says otherwise.)

Anchor commit: 24641d6 - fix(ops): graft --body-file back onto the issue comment shadow (closes #404). Fixing the #404 bug meant grafting again, which is exactly why it is the trigger for this cleanup.

What "graft ward over ward-kdl" is

The layer where ward's Go patches over ward-kdl-generated (specverb) command leaves - the override* / graft* / shadow functions in cmd/ward/ops.go that mutate the built ops forgejo group after specverb.Build in buildForgejoOps. Each is a Go workaround for something the guardfile/spec does not generate the way ward wants.

The layer (scope of "all of it"), in cmd/ward/ops.go

  • overrideForgejoViewIssue (:146) - swaps the built issue view leaf for the lean / closed-issue-warning version (the ward#380 shadow).
  • overrideForgejoCreateIssue (:171) - grafts a --quiet machine-output mode onto issue create.
  • the --body-file graft on issue comment (24641d6, mirrors overrideForgejoCreateIssue) - added to fix #404 after the ward#380 shadow dropped specverb's synthesized --body-file.
  • graftForgejoAdminExec (:120) - appends the exec-dialect admin/doctor subtree onto the group.

Find every site in a real clone with rg -n 'override|graft|[Ss]hadow' cmd/ward/ops.go (the public substrate scrubs the token graft -> in, which is what threw my first pass). Include any sibling overrides on other spec areas.

The target state the removal needs

These grafts exist because the ward-kdl guardfile/spec does not generate the desired leaf (lean issue view, --quiet, --body-file, the closed-warn shadow). So removing them means pushing each behavior down into the ward-kdl authoring layer (guardfile/spec + specverb) so the generated verb is already correct with no Go patch. Per-graft design question: can the guardfile express it (a flag, an output mode, a shadow), or does specverb need a new capability? Composes with the four-layer cleanup in agentic-os#306 / #308.

Guardrail already in place

24641d6 added TestForgejoClientInvocationsUseAcceptedFlags - a skew guard so a dropped flag fails the build, not at dispatch. Keep and extend it through the removal, so pushing behavior into ward-kdl cannot silently drop a flag again.

Status: tracking only, not dispatched

consult - needs the per-graft "can ward-kdl express this?" design first, and pulling a graft before its behavior is re-homed regresses the verb (this is precisely how #404 happened). Dispatch alongside / after #306/#308.

Filed from the read-only director surface (she/her). Tracking issue - Kai flagged this for removal **soon**, not now. **(Corrected scope.** My first draft guessed this was the `mountWardKdlExec` command-tree auto-mount, because I anchored to commit 24641d6 without reading it. Having now fetched and read it, the real subject is the Go-side override/graft layer below. The auto-mount is a **separate, adjacent** mechanism and is **not** in this scope unless Kai says otherwise.) **Anchor commit:** [24641d6](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/commit/24641d66393dd342a8f550a958e5de339a4ad8d1) - `fix(ops): graft --body-file back onto the issue comment shadow (closes #404)`. Fixing the #404 bug meant **grafting again**, which is exactly why it is the trigger for this cleanup. ## What "graft ward over ward-kdl" is The layer where ward's Go **patches over ward-kdl-generated (specverb) command leaves** - the `override*` / `graft*` / shadow functions in `cmd/ward/ops.go` that mutate the built `ops forgejo` group **after** `specverb.Build` in `buildForgejoOps`. Each is a Go workaround for something the guardfile/spec does not generate the way ward wants. ## The layer (scope of "all of it"), in cmd/ward/ops.go - `overrideForgejoViewIssue` (:146) - swaps the built `issue view` leaf for the lean / closed-issue-warning version (the **ward#380 shadow**). - `overrideForgejoCreateIssue` (:171) - grafts a `--quiet` machine-output mode onto `issue create`. - the **`--body-file` graft on `issue comment`** (24641d6, mirrors `overrideForgejoCreateIssue`) - added to fix #404 after the ward#380 shadow dropped specverb's synthesized `--body-file`. - `graftForgejoAdminExec` (:120) - appends the exec-dialect admin/doctor subtree onto the group. Find every site in a real clone with `rg -n 'override|graft|[Ss]hadow' cmd/ward/ops.go` (the public substrate scrubs the token `graft` -> `in`, which is what threw my first pass). Include any sibling overrides on other spec areas. ## The target state the removal needs These grafts exist because the ward-kdl guardfile/spec does not generate the desired leaf (lean `issue view`, `--quiet`, `--body-file`, the closed-warn shadow). So removing them means **pushing each behavior down into the ward-kdl authoring layer** (guardfile/spec + specverb) so the generated verb is already correct with no Go patch. Per-graft design question: can the guardfile express it (a flag, an output mode, a shadow), or does `specverb` need a new capability? Composes with the four-layer cleanup in **agentic-os#306 / #308**. ## Guardrail already in place 24641d6 added `TestForgejoClientInvocationsUseAcceptedFlags` - a skew guard so a dropped flag fails the build, not at dispatch. Keep and extend it through the removal, so pushing behavior into ward-kdl cannot silently drop a flag again. ## Status: tracking only, not dispatched consult - needs the per-graft "can ward-kdl express this?" design first, and pulling a graft before its behavior is re-homed regresses the verb (this is precisely how #404 happened). Dispatch alongside / after #306/#308.
coilysiren changed title from Remove the ward-over-ward-kdl graft (retire runtime command-tree grafting) to Remove the ward-over-ward-kdl graft layer (Go overrides/shadows on specverb-generated verbs) 2026-07-01 07:02:48 +00:00
Member

Labeled headless/P3: scope is the corrected one in the body (the Go override/graft layer, NOT the auto-mount). Sequence after the #453/#455 restructure to avoid churning code that is about to move. Recorded by Claude Code (Fable) during the 2026-07-01 ward launch triage session with Kai.

Labeled headless/P3: scope is the corrected one in the body (the Go override/graft layer, NOT the auto-mount). Sequence after the #453/#455 restructure to avoid churning code that is about to move. Recorded by Claude Code (Fable) during the 2026-07-01 ward launch triage session with Kai.
Member

🔒 Reserved by ward agent --driver claude — container engineer-claude-ward-407 on host KAI-DESKTOP-TOWER is carrying this issue (reserved 2026-07-04T08:46:00Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent --driver claude` — container `engineer-claude-ward-407` on host `KAI-DESKTOP-TOWER` is carrying this issue (reserved 2026-07-04T08:46:00Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh** — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

⚠️ Reopened: this run's work did not land on main

An ephemeral ward container (claude mode) dispatched for this issue finished but its work was not merged to main, so the reaper preserved it on a branch before teardown and reopened the issue (its closes #407 never reached main). Recover from the salvage branch below.

  • Repo: coilyco-flight-deck/ward
  • Salvage branch: ward-salvage/ward-df8343fa
  • Reason: merge conflict integrating onto main
  • Container uptime at reap: 5m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token)

Reap diagnostics

--- reap diagnostics ---
ward version:      v0.385.0
version source:    pinned via WARD_VERSION/--ward-version (v0.385.0)
HEAD:              f7f3c1e7aad6
origin/main:       1f68ead98237
ancestry:          HEAD is NOT yet on origin/main - residual work remains to land
decision gate:     provenance missing or unreadable
reason:            merge conflict integrating onto main
provenance:        missing or unreadable
run-owned landed:  no
working tree:      1 dirty path(s)
container uptime:  5m (baked Forgejo PAT age proxy)
--- end reap diagnostics ---

Recover

git fetch https://forgejo.coilysiren.me/coilyco-flight-deck/ward.git ward-salvage/ward-df8343fa
git checkout -b ward-salvage/ward-df8343fa FETCH_HEAD

Working tree at reap time

?? docs/ops-forgejo-graft-removal.md

— Claude (she/her), via ward agent

## ⚠️ Reopened: this run's work did not land on `main` An ephemeral `ward container` (claude mode) dispatched for this issue finished but its work was **not merged to `main`**, so the reaper preserved it on a branch before teardown and reopened the issue (its `closes #407` never reached `main`). Recover from the salvage branch below. - **Repo:** `coilyco-flight-deck/ward` - **Salvage branch:** `ward-salvage/ward-df8343fa` - **Reason:** merge conflict integrating onto main - **Container uptime at reap:** 5m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token) ## Reap diagnostics ``` --- reap diagnostics --- ward version: v0.385.0 version source: pinned via WARD_VERSION/--ward-version (v0.385.0) HEAD: f7f3c1e7aad6 origin/main: 1f68ead98237 ancestry: HEAD is NOT yet on origin/main - residual work remains to land decision gate: provenance missing or unreadable reason: merge conflict integrating onto main provenance: missing or unreadable run-owned landed: no working tree: 1 dirty path(s) container uptime: 5m (baked Forgejo PAT age proxy) --- end reap diagnostics --- ``` ## Recover ```bash git fetch https://forgejo.coilysiren.me/coilyco-flight-deck/ward.git ward-salvage/ward-df8343fa git checkout -b ward-salvage/ward-df8343fa FETCH_HEAD ``` ## Working tree at reap time ``` ?? docs/ops-forgejo-graft-removal.md ``` <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

Relabeled headless->consult in the 2026-07-06 backlog re-triage (stale headless label over a standing human-gate).

Relabeled headless->consult in the 2026-07-06 backlog re-triage (stale headless label over a standing human-gate).
Author
Owner

Correction. The preceding "Relabeled headless->consult" comment is inaccurate - the relabel did NOT apply, and this issue still carries headless. This container's Forgejo write path routes through a broker that serves only the issue write tier (create / edit / comment / close / reopen); issue-label add/remove is out of tier and was refused. The headless->consult relabel is deferred to a surface (or role) that holds the issue-label tier - or requires the broker's write tier to include issue-label. Tracked back on ward#621.

**Correction.** The preceding "Relabeled headless->consult" comment is **inaccurate** - the relabel did NOT apply, and this issue still carries `headless`. This container's Forgejo write path routes through a broker that serves only the **issue write tier** (create / edit / comment / close / reopen); `issue-label add`/`remove` is **out of tier** and was refused. The headless->consult relabel is deferred to a surface (or role) that holds the issue-label tier - or requires the broker's write tier to include issue-label. Tracked back on ward#621.
Member

🔒 Reserved by ward agent --driver claude — container engineer-claude-ward-407 on host KAI-DESKTOP-TOWER is carrying this issue (reserved 2026-07-07T06:17:04Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-flight-deck/ward#407 · branch issue-407 · driver claude · workflow direct-main
  • Run: engineer-claude-ward-407 · ward v0.419.0 · dispatched 2026-07-07T06:17:04Z
  • Comment thread: 4 included in the pre-flight read, 1 stripped (ward's own automated comments).

Issue body as seeded:

Filed from the read-only director surface (she/her). Tracking issue - Kai flagged this for removal **soon**, not now.

**(Corrected scope.** My first draft guessed this was the `mountWardKdlExec` command-tree auto-mount, because I anchored to commit 24641d6 without reading it. Having now fetched and read it, the real subject is the Go-side override/graft layer below. The auto-mount is a **separate, adjacent** mechanism and is **not** in this scope unless Kai says otherwise.)

**Anchor commit:** [24641d6](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/commit/24641d66393dd342a8f550a958e5de339a4ad8d1) - `fix(ops): graft --body-file back onto the issue comment shadow (closes #404)`. Fixing the #404 bug meant **grafting again**, which is exactly why it is the trigger for this cleanup.

## What "graft ward over ward-kdl" is

The layer where ward's Go **patches over ward-kdl-generated (specverb) command leaves** - the `override*` / `graft*` / shadow functions in `cmd/ward/ops.go` that mutate the built `ops forgejo` group **after** `specverb.Build` in `buildForgejoOps`. Each is a Go workaround for something the guardfile/spec does not generate the way ward wants.

## The layer (scope of "all of it"), in cmd/ward/ops.go

- `overrideForgejoViewIssue` (:146) - swaps the built `issue view` leaf for the lean / closed-issue-warning version (the **ward#380 shadow**).
- `overrideForgejoCreateIssue` (:171) - grafts a `--quiet` machine-output mode onto `issue create`.
- the **`--body-file` graft on `issue comment`** (24641d6, mirrors `overrideForgejoCreateIssue`) - added to fix #404 after the ward#380 shadow dropped specverb's synthesized `--body-file`.
- `graftForgejoAdminExec` (:120) - appends the exec-dialect admin/doctor subtree onto the group.

Find every site in a real clone with `rg -n 'override|graft|[Ss]hadow' cmd/ward/ops.go` (the public substrate scrubs the token `graft` -> `in`, which is what threw my first pass). Include any sibling overrides on other spec areas.

… (truncated to 2000 chars; full body is on this issue)

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.419.0).

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent --driver claude` — container `engineer-claude-ward-407` on host `KAI-DESKTOP-TOWER` is carrying this issue (reserved 2026-07-07T06:17:04Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh** — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-flight-deck/ward#407` · branch `issue-407` · driver `claude` · workflow `direct-main` - **Run:** `engineer-claude-ward-407` · ward `v0.419.0` · dispatched `2026-07-07T06:17:04Z` - **Comment thread:** 4 included in the pre-flight read, 1 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-02T00:22:36Z), @coilysiren (2026-07-04T08:51:36Z), @coilysiren (2026-07-06T19:40:25Z), @coilysiren (2026-07-06T19:42:13Z) - stripped: @coilyco-ops (2026-07-04T08:46:05Z) **Issue body as seeded:** ``` Filed from the read-only director surface (she/her). Tracking issue - Kai flagged this for removal **soon**, not now. **(Corrected scope.** My first draft guessed this was the `mountWardKdlExec` command-tree auto-mount, because I anchored to commit 24641d6 without reading it. Having now fetched and read it, the real subject is the Go-side override/graft layer below. The auto-mount is a **separate, adjacent** mechanism and is **not** in this scope unless Kai says otherwise.) **Anchor commit:** [24641d6](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/commit/24641d66393dd342a8f550a958e5de339a4ad8d1) - `fix(ops): graft --body-file back onto the issue comment shadow (closes #404)`. Fixing the #404 bug meant **grafting again**, which is exactly why it is the trigger for this cleanup. ## What "graft ward over ward-kdl" is The layer where ward's Go **patches over ward-kdl-generated (specverb) command leaves** - the `override*` / `graft*` / shadow functions in `cmd/ward/ops.go` that mutate the built `ops forgejo` group **after** `specverb.Build` in `buildForgejoOps`. Each is a Go workaround for something the guardfile/spec does not generate the way ward wants. ## The layer (scope of "all of it"), in cmd/ward/ops.go - `overrideForgejoViewIssue` (:146) - swaps the built `issue view` leaf for the lean / closed-issue-warning version (the **ward#380 shadow**). - `overrideForgejoCreateIssue` (:171) - grafts a `--quiet` machine-output mode onto `issue create`. - the **`--body-file` graft on `issue comment`** (24641d6, mirrors `overrideForgejoCreateIssue`) - added to fix #404 after the ward#380 shadow dropped specverb's synthesized `--body-file`. - `graftForgejoAdminExec` (:120) - appends the exec-dialect admin/doctor subtree onto the group. Find every site in a real clone with `rg -n 'override|graft|[Ss]hadow' cmd/ward/ops.go` (the public substrate scrubs the token `graft` -> `in`, which is what threw my first pass). Include any sibling overrides on other spec areas. ``` … (truncated to 2000 chars; full body is on this issue) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.419.0). </details> <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

WARD-OUTCOME: blocked - consult + guardrail landed on main; the actual graft removal is gated on upstream cli-guard capabilities a ward container cannot build.

The honest finding is that none of the four grafts can be re-homed into the guardfile as it stands. I checked the action grammar against the pinned engine: it has no node to shape an action's output (that kills the lean issue view projection and the create --quiet template) and no node to source an input from a file (that kills comment --body-file on the shadow). Graft 4 (admin/doctor) is a cross-dialect merge the generator does not emit. So every re-home needs a new cli-guard/specverb capability first, then a release plus a go.mod/REF bump, then the guardfile rewrite, then the deletion. cli-guard is a pinned upstream this container is not granted to touch, so the removal cannot land from here without regressing a verb (the #404 failure this issue warns about).

What fought back: the public substrate scrubs tokens in my tool output (bool reads as boon, override as n, body-file as n), so reading cli-guard source was unreliable. I leaned on empirical probes instead - ward-kdl ... --help and a node-name grep - which is what pinned down that create gets --body-file natively but the comment shadow does not. That was the satisfying part.

What actually landed: I recovered the prior run's salvaged design doc from ward-salvage/ward-df8343fa, corrected its version and path facts against this clone, trimmed it under the doc caps, and wrote the TestForgejoGraftInventory guardrail it had only proposed. All hooks green, pushed to main. I deliberately did not close this issue - it is a tracking issue and the removal is still open work.

What a human needs to decide: whether to authorize and sequence the upstream cli-guard capability work (per-graft, in the order docs/ops-forgejo-graft-removal.md lays out). That is the only thing that unblocks the deletion. Confidence in the analysis is high. Confidence that the removal is doable inside a ward container is zero, by construction.

  • Claude (she/her), via ward agent
WARD-OUTCOME: blocked - consult + guardrail landed on main; the actual graft removal is gated on upstream cli-guard capabilities a ward container cannot build. The honest finding is that none of the four grafts can be re-homed into the guardfile as it stands. I checked the `action` grammar against the pinned engine: it has no node to shape an action's output (that kills the lean `issue view` projection and the `create --quiet` template) and no node to source an input from a file (that kills `comment --body-file` on the shadow). Graft 4 (admin/doctor) is a cross-dialect merge the generator does not emit. So every re-home needs a new cli-guard/specverb capability first, then a release plus a go.mod/REF bump, then the guardfile rewrite, then the deletion. cli-guard is a pinned upstream this container is not granted to touch, so the removal cannot land from here without regressing a verb (the #404 failure this issue warns about). What fought back: the public substrate scrubs tokens in my tool output (`bool` reads as `boon`, `override` as `n`, `body-file` as `n`), so reading cli-guard source was unreliable. I leaned on empirical probes instead - `ward-kdl ... --help` and a node-name grep - which is what pinned down that `create` gets `--body-file` natively but the `comment` shadow does not. That was the satisfying part. What actually landed: I recovered the prior run's salvaged design doc from `ward-salvage/ward-df8343fa`, corrected its version and path facts against this clone, trimmed it under the doc caps, and wrote the `TestForgejoGraftInventory` guardrail it had only proposed. All hooks green, pushed to main. I deliberately did **not** close this issue - it is a tracking issue and the removal is still open work. What a human needs to decide: whether to authorize and sequence the upstream cli-guard capability work (per-graft, in the order docs/ops-forgejo-graft-removal.md lays out). That is the only thing that unblocks the deletion. Confidence in the analysis is high. Confidence that the removal is doable inside a ward container is zero, by construction. - Claude (she/her), via ward agent
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#407
No description provided.