You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/superpowers/specs/2026-08-27-markdown-url-placement-go-port-design.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,28 @@ Rewrite PR #171 so its authoritative guide validator is implemented in Go rather
6
6
7
7
This port removes the TypeScript guide-linter implementation and linter-only npm dependencies. It does not claim to remove Node or TypeScript from the whole repository: drafting, orchestration, stale sweep, and other pipeline commands remain separate future migrations.
8
8
9
+
## Reconciliation After the Factory Prerequisite
10
+
11
+
The prerequisite factory work merged before this branch was finalized and removed the
12
+
remaining TypeScript drafting pipeline. Reconciliation with current `main` therefore
13
+
replaces the temporary TypeScript adapter described below with direct factory consumers;
14
+
the adapter sections remain the approved pre-reconciliation rationale, not the final tree.
15
+
Node 24 remains pinned for repository JavaScript tooling, while the prerequisite removed
16
+
the TypeScript 7 pipeline rather than this port reintroducing obsolete code.
17
+
18
+
`tools/lint-guide` remains the sole semantic implementation. Factory CI tests and builds
19
+
that nested module. The production guide-draft workflow installs Go 1.22, builds the
20
+
command once to `${{ runner.temp }}/lint-guide`, and exports `LINT_GUIDE_BIN` at job scope.
21
+
`factory/scripts/validate.sh` consumes that binary and falls back to building the same
22
+
nested command for local use. The factory image also builds the nested command and copies
23
+
only the static executable into the runtime image. The public `go` module contains only
24
+
published API and generation code; duplicate checker and CLI packages are removed.
25
+
26
+
The factory's partial-export contract adds `--meta-only` without changing the original
27
+
human/JSON target, ordering, or `0`/`1`/`2` contracts. The factory coordinator accepts
28
+
exit `0` or `1`, validates exactly one grouped JSON guide result, and flattens only its
29
+
`findings`; exit `2` or malformed output is operational failure.
Copy file name to clipboardExpand all lines: factory/coordinator.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ REVIEWER 1/3 — technical and source accuracy, using `doctrine/roles/technical-
40
40
REVIEWER 2/3 — setup-file and doctrine fidelity, using `doctrine/roles/fidelity.md`.
41
41
REVIEWER 3/3 — editorial clarity and audience fit, using `doctrine/roles/review.md` and the selected persona file.
42
42
43
-
Each reviewer runs in its own caught boundary with `output_schema` equal to `factory/schemas/review-findings.schema.json` and the universal one-repair protocol. The full concurrent dispatch/collection runs in an enclosing caught boundary. Run the shell/linter in its own caught boundary from `/workspace`, exactly `/usr/local/bin/lint-guide --json /workspace/guides/<slug>`; never invoke `go` or `go run`. Validate parsed linter JSON before use. A completed review wave means valid output from all 3 reviewers plus a successfully parsed linter result. A failed reviewer output, malformed output after repair, linter failure, or invalid linter JSON fails the wave and must not complete the wave and therefore do not increment `review_rounds`; it selects `failed` and routes to reporting.
43
+
Each reviewer runs in its own caught boundary with `output_schema` equal to `factory/schemas/review-findings.schema.json` and the universal one-repair protocol. The full concurrent dispatch/collection runs in an enclosing caught boundary. Run the shell/linter in its own caught boundary from `/workspace`, exactly `/usr/local/bin/lint-guide --json /workspace/guides/<slug>`; never invoke `go` or `go run`. Accept linter exit `0` (clean) or `1` (findings), reject exit `2`, and validate exactly one grouped JSON result whose `guide` is `/workspace/guides/<slug>` and whose `findings` is an array; flatten only that `findings` array for review. A completed review wave means valid output from all 3 reviewers plus a successfully parsed linter result. A failed reviewer output, malformed output after repair, linter invocation failure, or invalid linter JSON fails the wave and must not complete the wave and therefore do not increment `review_rounds`; it selects `failed` and routes to reporting.
44
44
45
45
Only after a completed review wave increment actual `review_rounds` by one (maximum 3). Normalize semantic duplicates without dropping sources; linter blockers equal reviewer blockers. If there are no blockers, select `converged`. If blockers remain and `review_rounds < 3`, start exactly one revision in a caught boundary with all normalized findings, doctrine, current files, and the selected persona; forbid external research and outside edits. Its strict `output_schema` has only `completed` (boolean), `addressed` (array), and `disputed` (array). Apply one repair and revision completion verification, then always run a confirmatory review wave; a revision can never directly converge. Repeat while capacity remains. If the confirmatory third wave has final-round blockers, select `blocked`; do not revise again. Thus at most three review/revision rounds occur, represented by at most three complete waves, and the report records the actual count.
0 commit comments