Skip to content

feat(shield): single canonical output — Markdown source, HTML as a build artifact#65

Merged
ashwinimanoj merged 10 commits into
mainfrom
fix/output
Jun 8, 2026
Merged

feat(shield): single canonical output — Markdown source, HTML as a build artifact#65
ashwinimanoj merged 10 commits into
mainfrom
fix/output

Conversation

@ashwinimanoj

Copy link
Copy Markdown
Contributor

What & why

Shield wrote every artifact twice and committed both: the authored .md and an HTML mirror under outputs/ (plus the root dashboard assets). 41 HTML files were tracked in git alongside their Markdown — confusing, doubled diffs, and a standing drift risk, since HTML carries zero unique information (it's rendered purely from Markdown).

This makes Markdown the single canonical, committed output. HTML + site assets become local build artifacts — gitignored and regenerated on demand. The browsable dashboard (the real consumer — people open it locally) is preserved; it's just built, not committed.

Design + plan: docs/superpowers/specs/2026-06-08-shield-single-canonical-output-design.md, docs/superpowers/plans/2026-06-08-shield-single-canonical-output.md.

Changes

  • rerender_all.py now renders the complete HTML set — including enhanced-*.md and detailed/*.md reviewer docs it previously skipped (so nothing is lost when HTML stops being committed).
  • render-output.sh — one build script: renders all pages (rerender_all.py) then writes the dashboard + shared assets (write_shield_assets.py). Idempotent.
  • /shield render — thin command that triggers the build script.
  • .gitignore — demotes outputs/ trees + root index.html/manifest.js/css/js to build artifacts; the 41 tracked HTML files + root assets are git rm --cached (kept on disk).
  • Proseoutput-paths.yaml, session-start hook, artifacts.md, manifest-schema.md now describe HTML as a gitignored build artifact pointing at /shield render.
  • Version — shield bumped to 2.28.0 in marketplace.json (no root pyproject.toml).

Eval coverage (per CLAUDE.md — required for plugin asset changes)

Three executable evals, all passing (5 passed):

  • test_rerender_all.py — regression: enhanced-* / detailed/* now render.
  • test_render_output.py — end-to-end build produces pages and dashboard assets; errors on a bad dir.
  • test_gitignore_html_artifacts.py.gitignore covers the artifacts and no Shield HTML is tracked.

The /shield render command is a thin trigger fully exercised by test_render_output.py.

Verification

  • pytest test_rerender_all.py test_render_output.py test_gitignore_html_artifacts.py → 5 passed
  • git ls-files 'docs/shield/**/*.html' → 0

🤖 Generated with Claude Code

ashwinimanoj and others added 10 commits June 8, 2026 13:29
… build artifact

Design spec: Markdown is the one committed/authored output; HTML + site
assets become local, gitignored build artifacts regenerated on demand by a
render-output.sh build script, triggered by a thin /shield render command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Six tasks: complete rerender_all coverage (enhanced-*/detailed/*), add
render-output.sh build script, /shield render command, gitignore+untrack HTML,
prose updates, version bump. Each task is TDD with an executable eval.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ender

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parentheses in a sequenceDiagram participant alias ("caller (/backlog add
or skill)") break Mermaid's parser ("Syntax error in text"). Rephrase the
alias without parens. Fixed in both the canonical docs/lld/ copy and the
docs/shield/ draft.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitHub's parser pinned the error to diagram line 10: the ';' in
"append entry (...); validate in-memory doc" is treated as a statement
separator, so Mermaid tries to parse "validate in-memory doc" as a new
statement and fails expecting an arrow. Replace ';' with 'then'. (The
earlier alias-parens change was not the cause.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ashwinimanoj ashwinimanoj merged commit 2e20daa into main Jun 8, 2026
11 checks passed
@ashwinimanoj ashwinimanoj deleted the fix/output branch June 8, 2026 12:48
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