Skip to content

Add the create-loom-gauntlet skill: brownfield map recon or greenfield part-0 bootstrap - #55

Open
jpwinans wants to merge 2 commits into
mainfrom
skills/create-loom-gauntlet
Open

Add the create-loom-gauntlet skill: brownfield map recon or greenfield part-0 bootstrap#55
jpwinans wants to merge 2 commits into
mainfrom
skills/create-loom-gauntlet

Conversation

@jpwinans

Copy link
Copy Markdown
Owner

Ships /create-loom-gauntlet in-repo as the canonical copy — self-contained (no create-gauntlet dependency) and dual-mode: the existing brownfield machinery for mapped repos, plus a greenfield mode for building a new product in a blank repo.

The problem this solves: the skill previously assumed a /map-codebase graph exists, and its gate checked only that map-manifest.json exists — so a manifest over an empty graph (what mapping a blank repo produces) passed the gate and generated a prompt whose GRAPH FACTS were hollow assertions dressed as verified ground truth. Meanwhile the documented fallback for every gate failure was a user-level skill (create-gauntlet) that this repo does not ship, and whose model guidance had drifted stale against a correction this skill already carries (effort levels are not dispatchable).

The mode gate

Store reachability first (both modes need it — the ledger lives in FalkorDB; a typed NOT_FOUND still proves the store is up), then the mode from two observables, both recorded in the generated prompt:

  • Map substance: manifest exists AND graph-stats reports entityCount > 0. A manifest over an empty graph is treated as absent.
  • Extractable source: git ls-files over the six languages /map-codebase extracts.

Substance → brownfield, unchanged. Neither → greenfield. Source without a map → stop with instructions to map first (guessed contracts are worse than no gauntlet). Hybrid tasks (new subsystem in a mapped repo) run brownfield plus the part-0 discipline for the new subsystem only.

Greenfield design

The map describes what is; a new product is what will be — so independence is established by construction, then verified:

  • Part 0, serialized first, always: the interface contract between exactly the parts that will parallelize, the acceptance suite encoding the brief's measurable properties ("fast" gains a number before generation), and a working toolchain — the objective's named <test/lint/build> commands don't pre-exist in a blank repo, so part 0's exit criterion establishes them. Enumeration-shaped, opus critic.
  • Bootstrap: when part 0 passes, the run maps itself with /map-codebase and every brownfield rule binds from then on — graph recon, blast-radius verification of the constructed independence, the critics' graph toolkit. Re-map (incremental) at each phase boundary. Degrade rule: bootstrap is an upgrade, never a blocker.
  • Map write rules differ by mode on purpose: brownfield's map is a frozen read-only baseline for the run; greenfield's map advances only via the scheduled /map-codebase runs — no agent writes it directly in either mode.
  • A greenfield product exits the gauntlet already mapped: the next gauntlet on that repo is brownfield from day one.

Evidence

  • Brownfield gate executed against this repo: substance 7,300 entities; the drift path exercised for real (manifest at 11e6e83 vs HEAD, git diff --name-only scoping); capability probes returned sessions/receipts yes.
  • Greenfield gate executed against a scratch blank repo: branched determinately to greenfield; reproduced uv run loom failing to spawn in a repo without the venv — the --directory transport requirement is now recorded in the prompt's Transport slot because we watched it fail, not because we guessed.
  • Audit: zero create-gauntlet references remain; every mode fork resolves to exactly one variant under the output lint; description is 444 chars of triggering conditions only.
  • Two defects were found and fixed by the executed walkthroughs (a precondition referencing the ledger graph before run start creates it; the reachability semantics above) — neither was visible from re-reading the prose.

Suggested test

The end-to-end case this revision hasn't run: point /create-loom-gauntlet at a blank repo with a short product brief and check the generated prompt states its mode in GRAPH FACTS, carries part 0 with all three obligations, and cites the bootstrap + degrade rule. For regression, generate against this repo and confirm the brownfield output is materially unchanged from the previous skill version.

~/.claude/skills/create-loom-gauntlet is now a symlink here (per the repo's no-duplicates policy); the pre-revision original is backed up at ~/.claude/backups/.

…d part-0 bootstrap

Moves /create-loom-gauntlet into the repo as the canonical copy and makes it
self-contained: the create-gauntlet dependency is removed, with the base
gauntlet requirements inlined into the skill's non-negotiables.

The dependency gate now decides a mode from two observables instead of
assuming a mapped repo: map substance (graph-stats entityCount > 0 — a
manifest over an empty graph is treated as absent) and extractable source
(git ls-files over the six languages /map-codebase extracts). Mapped repos
run the existing brownfield machinery unchanged; blank or scaffold-only
repos run greenfield — a serialized part 0 freezes the interface contract
between the parts that parallelize, writes the acceptance suite from the
brief's measurable properties, and establishes the toolchain the objective's
named commands require, then the run bootstraps its own map with
/map-codebase and converges to brownfield rules for every later phase.
Unmapped repos with existing code stop with instructions to map first.

Map write rules differ by mode on purpose: the brownfield map graph stays a
frozen read-only baseline for the run, while the greenfield map advances
only via the scheduled /map-codebase runs. Bootstrap carries a degrade rule
(an upgrade, never a blocker), and the store-reachability check documents
that a typed NOT_FOUND still proves the store is up.
…d run

Gate steps 2 and 3 lose their ask-the-user branches: mapping or refreshing
is now the announced default action — a present human can interrupt it, an
absent one has nothing to decline — and stopping requires an observable
fact: map failure, or a cost cap the user already stated. GRAPH FACTS
records a map built or refreshed at generation, with the entityCount
disclosed as post-map. Brownfield adjective tasks get a derivation recipe
in recon: the objective's number comes from recorded tensions, invariant
claims, and failing commands, stated in DELIVERABLE so no builder
re-litigates it.

Loop mechanics tightened where the run found exploits or gaps.
Completeness and why-safe claims are regenerated by every critic round
they recur, closing the repair-verification loophole that let an
unverified closed-case comment survive three rounds. Measurement parts
touching any paid or metered resource carry a mock-first
machinery-and-precondition gate before real spend is authorized. Worktree
dispatches forbid git stash (refs/stash is repo-global; parallel builders
can silently apply each other's WIP — reproduced live) and prescribe WIP
commits on the worktree branch instead. Evidence directories gain
copy-aside plus per-batch read-only sealing, the lead's checkpoint is
also exported as JSON so it survives a store wipe, and the watchdog
restores the pre-flight backup before any manual reconstruction.
Reference selection keeps find-callers primary — corroborate, never
substitute; a pattern's instance list never justifies the winner. The
ledger documents the {score, basis} confidence shape, and the Transport
slot carries the zsh single-quoting discipline plus the scriptPath
invocation form for mapping foreign repos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants