4.1 KiB
Harness-Free Mode B Amendment Implementation Plan
For agentic workers: Execute this plan task-by-task with
superpowers:executing-plans; usesuperpowers:test-driven-developmentfor the build behavior change andsuperpowers:verification-before-completionbefore reporting results.
Goal: Restore Gradle bootstrap and Clean Architecture dependency enforcement without recreating the absent development harness.
Architecture: One strict JSON registry under src/config/architecture/ owns all 19 leaf
identities, paths, and allowed production project edges. Gradle settings validate and include the
registry fail-closed; the root dependency verification task reads the same file and checks actual
production project dependencies against it.
Tech Stack: Gradle Groovy DSL, Groovy JsonSlurper, strict JSON, Java 21.
Working policy: Human-only git handling. Do not stage, commit, amend, push, or create a PR.
Task 1: Capture the broken bootstrap
Files:
-
Read:
src/settings.gradle -
Run
cd src && ./gradlew help --console=plain. -
Confirm exit 1 is caused by the missing
.harness/project/modules.yaml, not dependency resolution or an unrelated build failure.
Task 2: Add the Gradle-owned registry
Files:
-
Create:
src/config/architecture/modules.json -
Read: each of the 19 leaf-module
build.gradlefiles -
Record exactly 19 unique module IDs, Gradle paths, and repository-relative source paths.
-
Set
allowed_dependenciesfrom each leaf's currentapi,implementation,compileOnly, andruntimeOnlyproject dependencies. -
Exclude test/fixture configurations from production policy and keep
sample-portfolioa fixture consumer that no production leaf may depend on. -
Parse the file with Python's strict JSON parser and compare its edges with the checked-in leaf build declarations.
Task 3: Restore Gradle bootstrap and dependency enforcement
Files:
-
Modify:
src/settings.gradle -
Modify:
src/build.gradle -
Make settings load only
config/architecture/modules.json. -
Fail closed on a missing registry, wrong root/module/field types, empty values, duplicate identities or paths, unsafe path shapes, unknown/self dependencies, count drift, or missing source directories.
-
Include every registered Gradle path and map it to its repository-root-relative source directory.
-
Make
verifyCleanArchitectureDependenciesread the same registry without a second module list. -
Preserve all-leaf coverage and forbidden-edge checks, explicitly reject a production edge to
sample-portfolio, and replace stale error wording with actionable registry guidance.
Task 4: Align active repository guidance
Files:
-
Modify:
AGENTS.md -
Modify:
CLAUDE.md -
Modify:
README.md -
Modify:
src/README.md -
Modify: all 19 nearest leaf-module
CLAUDE.mdfiles that name the old registry -
Annotate as superseded: the 2026-07-20 harness design and plan
-
Point active topology and allowed-edge guidance to
src/config/architecture/modules.json. -
State that focused commands are derived from the owning Gradle path rather than a task packet.
-
Keep all eight local HARD-STOP meanings, architecture boundaries, human-only git policy, verification discipline, and LLM Wiki capture requirements.
-
Make the earlier harness documents explicit historical provenance rather than active reconstruction instructions.
Task 5: Verify from a fresh Gradle invocation
Files:
-
Verify: all changed files
-
Run
cd src && ./gradlew help --console=plain. -
Run
cd src && ./gradlew projects --console=plain. -
Run
cd src && ./gradlew verifyCleanArchitectureDependencies --console=plain. -
Run a deterministic strict-JSON script proving exactly 19 unique IDs/Gradle paths and existing source directories.
-
Run a deterministic comparison between registry edges and leaf production project dependencies.
-
Run
git diff --checkandgit status --short. -
Report exact exits, any unavailable checks, LLM Wiki capture outcome, and remaining risks without claiming the broader Phase A/refactor is complete.