Repository navigation
fix(spec): stop the review page dropping spec text and colliding anchors - #254
atkachenko wants to merge 2 commits into
Conversation
The review-page renderer (scripts/render-spec.mjs) lost content that the markdown spec carries, and /awos:spec Step 10 kept its temp files at a predictable path. Renderer: - keep indented non-checkbox bullets as requirement prose (only the "Acceptance Criteria:" label is skipped) - keep a flat requirement bullet that has no acceptance criteria - keep text written before the first requirement, in the flat shape and in the "### N.M" shape, including a checkbox the status bar counts - keep text under the Scope heading before its subsections - give two-digit items a dash in the card id (1.12 -> r1-12) so 1.12 and 11.2 no longer share r112; one-digit items keep the rNM form - replace the invalid `.tabbar button` font shorthand with valid declarations commands/spec.md Step 10: - create one `mktemp -d` directory per run for the view-model and the artifact fragment, and remove that directory on cleanup - name the `#rN-M` anchor form next to the `#r21` example Two-digit card ids change (2.10 was r210, is now r2-10) on pages rendered from now on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Barley review of Reviewed 4 of 4 changed files. The change updates the spec renderer and the /awos:spec command's temp-file handling. I kept one low-impact issue in the renderer: checkboxes written directly under the Scope heading are counted in the status bar but never shown. I dropped the mktemp concern as speculative. Context conflicts
Other findings
Posted by Barley for scenario "AWOS review draft scenario", set up by Maksym Miroshnichenko (MaksymMiroshnichenko) |
|
Barley re-review of Since the last review (
|
|
One more defect in
function badge(src) {
const key = String(src).toLowerCase();
const label = SOURCE_LABELS[key] || esc(src);
const cls = SOURCE_LABELS[key] ? key : 'kb';
return `<span class="src ${cls}">${label}</span>`;
}Output of the function from the 1.7.0 file:
The name comes from a Suggested fix: use |
What
The review page that
/awos:specStep 10 renders (scripts/render-spec.mjs→functional-spec.html) lost content the markdown spec carries. A review of a downstream project that vendors AWOS 1.7.0 found six renderer defects; all six reproduced onmainbefore this change.**Acceptance Criteria:**label is skipped### N.Msubsection already did; positional numbering is unchanged### N.Mshape)1.12and11.2both got the card idr1121.12→r1-12. One-digit items keeprNM.tabbar button { font: 600 14px/1.4 inherit }is an invalid shorthand, so browsers ignored itfont: inheritplus separate weight, size and line-heightcommands/spec.mdStep 10:mktemp -ddirectory per run, and cleanup removes that directory. The old names (${TMPDIR:-/tmp}/spec-view-[index].json) were predictable in shared temp storage, and two runs on the same spec index overwrote and deleted each other's file.#r21anchor example now names the#rN-Mform for two-digit items.Reviewer notes
r210and is nowr2-10. Only pages rendered from now on are affected; an existing test that pinnedr210is updated.inline()escaping; there is no new output path.patch.Tests
tests/render-spec.test.js: seven new tests, one per contract above (plus the lead-in checkbox), on a flat-shaped and a### N.M-shaped fixture.tests/lint-prompts.test.js: the pin on the old temp path is replaced by pins on themktemp -dline, the directory cleanup, and the#rN-Mwording.npm testandnpx prettier . --checkpass locally./awos:specrun in a scratch project.🤖 Generated with Claude Code