T-FQN9-dev-loop-agent-pants-build-joins-check-with-a-drift-gate-and
State: closed/done · Impact: medium · Complexity: medium
Once sdlc builds through agent-pants, a stale built output (edited a
vault note, forgot to rebuild) needs to be caught the same way docs generate --check catches stale generated docs today, and an iterating
developer needs a live-reload loop rather than re-running agent-pants build by hand after every skill edit.
sdlc.yaml’s check verb has no agent-pants build/drift step (sdlc
doesn’t build through agent-pants yet). No --watch mode exists for
agent-pants against sdlc’s plugin.
Proposed
Section titled “Proposed”agent-pants build (via the nested config) joins the check verb list
as a drift gate — rebuild in memory (or to a temp location) and diff
against the committed output, failing on drift, mirroring docs generate --check’s pattern. A --watch mode rebuilds on save. This
repo’s own live Claude session loads the rendered plugin tree, so the
dev loop is: edit a vault note, agent-pants build --watch rebuilds,
the running session picks up the change without a manual copy step.
Approach
Section titled “Approach”Add an— already exists as the separateagent-pants build --check(or equivalent) drift modeagent-pants checksubcommand (buildandcheckare one render/diff path in the core, two modes in the CLI); no new drift mode was needed.- Add
agent-pants check(scoped to sdlc’s nested config) tosdlc.yaml’scheck:verb list. - Add
--watchtoagent-pants build(file-watch the vault root, rebuild on change). - Confirm this repo’s Claude Code session (which loads the plugin from its built/rendered location) reflects a —watch-triggered rebuild without a restart.
| Area | Note |
|---|---|
agent-pants crate/CLI | —check and —watch modes — outside solutions/ontological |
sdlc.yaml | This repo’s check verb list |
solutions/ontological/agent-pants.yaml | Drift-check invocation |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
agent-pants checkexits non-zero when the vault has an uncommitted change the built output doesn’t reflect, and 0 when they match. - AC-2:
sdlc.yaml’scheck:list runs the drift check as part of a normalsdlc run checkpass. - AC-3:
agent-pants build --watchrebuilds within a few seconds of a saved vault-note edit, verified manually or via a test harness that touches a file and polls the output.
Out of scope
Section titled “Out of scope”- Hot-reloading the CLI binary itself (cli/sdlc.js) — only skill/plugin note changes are in the watch loop’s scope.
- A UI for the watch mode; terminal output is sufficient.
Dependencies
Section titled “Dependencies”- The nested agent-pants.yaml the drift check and watch mode run against.