# Harness-Free Mode B Amendment Implementation Plan > **For agentic workers:** Execute this plan task-by-task with > `superpowers:executing-plans`; use `superpowers:test-driven-development` for the build behavior > change and `superpowers:verification-before-completion` before 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` - [x] Run `cd src && ./gradlew help --console=plain`. - [x] 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.gradle` files - [x] Record exactly 19 unique module IDs, Gradle paths, and repository-relative source paths. - [x] Set `allowed_dependencies` from each leaf's current `api`, `implementation`, `compileOnly`, and `runtimeOnly` project dependencies. - [x] Exclude test/fixture configurations from production policy and keep `sample-portfolio` a fixture consumer that no production leaf may depend on. - [x] 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` - [x] Make settings load only `config/architecture/modules.json`. - [x] 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. - [x] Include every registered Gradle path and map it to its repository-root-relative source directory. - [x] Make `verifyCleanArchitectureDependencies` read the same registry without a second module list. - [x] 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.md` files that name the old registry - Annotate as superseded: the 2026-07-20 harness design and plan - [x] Point active topology and allowed-edge guidance to `src/config/architecture/modules.json`. - [x] State that focused commands are derived from the owning Gradle path rather than a task packet. - [x] Keep all eight local HARD-STOP meanings, architecture boundaries, human-only git policy, verification discipline, and LLM Wiki capture requirements. - [x] 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 --check` and `git status --short`. - [ ] Report exact exits, any unavailable checks, LLM Wiki capture outcome, and remaining risks without claiming the broader Phase A/refactor is complete.