Skip to content

Simplify harness to the doc-prescribed minimum#4

Merged
adamlutz merged 1 commit into
mainfrom
chore/harness-002-simplify
May 19, 2026
Merged

Simplify harness to the doc-prescribed minimum#4
adamlutz merged 1 commit into
mainfrom
chore/harness-002-simplify

Conversation

@adamlutz

Copy link
Copy Markdown
Member

Rolls back the project to what Lecture 05 + the wider harness-engineering course actually prescribe — no more, no less. The motivation was the merge-conflict friction on `claude-progress.md`: it conflicted on every parallel-branch merge because four moving parts (Next action, Current state, Sessions log, Decisions) all changed on every branch. The doc's actual answer is a tiny `PROGRESS.md` plus an append-only `DECISIONS.md`.

While doing the split, I audited everything else against the lecture and trimmed cruft I'd accumulated.

Net effect

+477 / −1144 lines. Repo is roughly 2× lighter and more closely matches the form the course prescribes.

Split (the original ask)

  • `claude-progress.md` → `PROGRESS.md` (~25 lines: Current state, Completed, In progress, Known issues, Next steps) + `DECISIONS.md` (append-only dated entries).
  • Sessions log dropped — per-session detail belongs in the PR description (which doesn't conflict across branches).

Deletions (drift removed)

Deleted Why
`docs/WHY_HARNESS_FOR_RN.md` 250-line narrative essay; the course itself is the source
`docs/E2E_TESTING.md` duplicated content in `.maestro/README.md`
`docs/VERIFICATION.md` duplicated `scripts/verify.sh`'s header comment
`docs/UI.md` premature — comes back when `ui-001` starts
`lib/log.ts` speculative; no production caller
`lib/feature-list.ts` speculative; only the (also-deleted) test imported it
`tests/feature-list.test.ts` tested deleted code
`scripts/feature_list.schema.json` redundant — the validator script IS the spec

Trimmed (kept but slimmed)

File Before → after
`docs/HARNESS.md` 270 → ~80 lines
`docs/SESSION.md` ~120 → ~60 lines (now centred on the lecture's 4-question continuity checklist)
`docs/ARCHITECTURE.md` ~90 → ~50 lines
`docs/RN_PLATFORM.md` ~90 → ~55 lines
`AGENTS.md` ~85 → ~55 lines
`README.md` ~190 → ~75 lines
`package.json` scripts dropped `sim:*:screenshot`, `e2e:ios`, `e2e:android`, `test:ci` aliases — use the underlying scripts/flags

Mechanical updates

  • `init.sh` step 7 now tails `PROGRESS.md` (was `claude-progress.md`).
  • `scripts/check-clean-state.sh` simplified from 5 checks to 4; checks `PROGRESS.md` for the Next steps section.
  • `scripts/feature-list-check.js` — tightened the canonical id regex (`-`, 3-digit zero-padded), cleaner error messages.
  • `feature_list.json` — dropped `$schema`, `description`, `states` fields (validator doesn't need them). Added `harness-002` for this work.

Verified

  • `npm run verify` → green (typecheck, lint, jest --passWithNoTests, schema; `5 features — todo:3 in_progress:1 blocked:0 done:1`)
  • `bash scripts/check-clean-state.sh` → 3/4 green (the 4th flag is the uncommitted state of this commit itself; expected)

Follow-up

PR #3 (`feat/ci-001-actions`) will need to rebase on this and update one path in `scripts/harness-ci-checks.sh` — it currently looks for a "Next action" block in `claude-progress.md`; after this lands, it should look for "Next steps" in `PROGRESS.md`. That's a single `sed`-shaped change. I'll handle it after this PR merges.

🤖 Generated with Claude Code

The repo had drifted: a 230-line claude-progress.md that conflicted on
every parallel-branch merge, four "explainer" docs that the lecture
source already covers better, speculative lib/__tests__ with no callers,
duplicate validators, redundant npm script aliases. This commit rolls
all of that back to the simple form the harness-engineering course
actually prescribes.

DELETED
- claude-progress.md (single bloated file)
- docs/UI.md, docs/VERIFICATION.md, docs/E2E_TESTING.md,
  docs/WHY_HARNESS_FOR_RN.md (cruft; the lecture is the source)
- lib/log.ts, lib/feature-list.ts (speculative; no production caller)
- __tests__/feature-list.test.ts (tested deleted code)
- scripts/feature_list.schema.json (the validator IS the spec)

ADDED (per Lecture 05's actual prescription)
- PROGRESS.md — ~25 lines: current state, completed, in progress,
  known issues, next steps. Only block that's mutable is "Next steps".
- DECISIONS.md — append-only dated decisions. Conflict-free in
  practice because each entry is a new section.

TRIMMED
- docs/HARNESS.md     270 → ~80 lines
- docs/SESSION.md     ~120 → ~60 lines
- docs/ARCHITECTURE.md ~90 → ~50 lines
- docs/RN_PLATFORM.md  ~90 → ~55 lines
- AGENTS.md           ~85 → ~55 lines
- CLAUDE.md           ~35 → ~25 lines
- README.md           ~190 → ~75 lines
- package.json: dropped sim:*:screenshot, e2e:ios, e2e:android,
  test:ci aliases (use the underlying scripts/flags directly)

UPDATED
- init.sh — tails PROGRESS.md (was claude-progress.md)
- scripts/check-clean-state.sh — 4 checks instead of 5, looks at
  PROGRESS.md
- scripts/feature-list-check.js — tighter id pattern; cleaner errors
- feature_list.json — dropped $schema, description, states fields;
  added harness-002 (this feature); slimmed other entries

VERIFIED LOCALLY
- npm run verify        → green (typecheck, lint, jest passWithNoTests, schema)
- bash scripts/check-clean-state.sh → 3/4 checks green (one is the
  uncommitted state of this commit itself)
- feature_list.json has 5 features: harness-001 done, ui-001 todo,
  ui-002 todo, e2e-001 todo, harness-002 in_progress (WIP=1 ✓)

FOLLOW-UPS (other branches)
- feat/ci-001-actions (PR #3) needs to rebase and update
  scripts/harness-ci-checks.sh to check PROGRESS.md (was checking
  claude-progress.md). Doc-aligned: this is its own commit on that
  branch, not a force-push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adamlutz adamlutz merged commit 253c167 into main May 19, 2026
adamlutz added a commit that referenced this pull request May 19, 2026
PR #4 split claude-progress.md into PROGRESS.md + DECISIONS.md and deleted
the speculative lib/ and __tests__/ directories plus several docs. Update
harness-ci-checks.sh so its invariants point at what now exists:

- Check 1/6: PROGRESS.md → "## Next steps" (was claude-progress.md →
  "Next action").
- Check 2/6: scan only app/components/hooks for stray debug markers; lib/
  and __tests__/ no longer exist.
- Check 4/6: REQUIRED set now AGENTS.md, CLAUDE.md, init.sh,
  feature_list.json, PROGRESS.md, DECISIONS.md, docs/HARNESS.md,
  docs/SESSION.md, docs/ARCHITECTURE.md, docs/RN_PLATFORM.md (drops
  claude-progress.md, docs/VERIFICATION.md, docs/E2E_TESTING.md;
  adds PROGRESS.md, DECISIONS.md, docs/SESSION.md).

Verified locally: scripts/harness-ci-checks.sh exits 0 and npm run verify
is green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
adamlutz added a commit that referenced this pull request May 20, 2026
The repo had drifted from project-specific notes ("the bring-up is
complete", "next available work is ui-001") toward template-shaped
content (everything in scripts/, docs/, .maestro/ is generic harness
machinery). This commit makes the intent explicit.

README rewrite:
- Opens with a "GitHub template — Use this template" callout so the
  github.com button is discoverable.
- New "What's included" section listing harness subsystems, init
  phase, baseline gate, end-of-session gate, naming standard,
  Maestro, sim helpers, GitHub Actions CI.
- New "Conspicuously not included" section — calls out the absence of
  lib/, __tests__/, design system, networking. The harness is about
  HOW, not WHAT.
- New "First things to edit" section walking a user through the
  setup tasks after cloning (README, app.json, feature_list.json,
  PROGRESS.md, DECISIONS.md, package.json).

GitHub template flag set via `gh repo edit --template`. Verified:
  $ gh repo view --json isTemplate
  {"isTemplate": true}

feature_list.json:
- Flipped harness-002 to done at SHA be68289 (was still in_progress
  from PR #4's working state; the merge to main happened but the
  bookkeeping commit was missing — fixing here).
- Added docs-001 (this feature) with status in_progress. WIP=1 ✓.

PROGRESS.md:
- Updated to reflect harness-002 done, docs-001 in progress, PR #3
  still open. Next steps point at landing PR #3 before this PR so
  the README's GitHub Actions reference is accurate on main.

The README mentions .github/workflows/harness.yml which lands when
PR #3 merges — this PR should merge after that one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant