Skip to content

fix: instantiate knot-rider from the RSR template - #17

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/instantiate-template
Jul 27, 2026
Merged

fix: instantiate knot-rider from the RSR template#17
hyperpolymath merged 2 commits into
mainfrom
fix/instantiate-template

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

knot-rider was scaffolded from rsr-template-repo but never instantiated — {{PLACEHOLDER}} tokens survived throughout, including in the .zig sources, so the Zig FFI seam genuinely did not parse. This PR cures the instantiation for real.

  • Identity placeholders substituted across ~80 files ({{PROJECT_NAME}}, {{OWNER}}, {{REPO}}, {{AUTHOR}}, {{FORGE}}, {{LICENSE}}, etc.) — real values used throughout, intentional generic scaffolding (docs-template/, ADR templates, K9 example configs, native Justfile {{recipe}} interpolation) left untouched.
  • .github/settings.yml landmine fixed: an unsubstituted name: "{{REPO}}" under the probot/settings config would have made the app try to rename the repo to the literal string {{REPO}} on the next push to main.
  • Zig FFI seam now genuinely builds and tests: {{project}}_*knot_rider_*, plus two real Zig 0.16 incompatibilities fixed along the way (opaque types can no longer carry fields; callconv(.C)callconv(.c)). build.zig was previously inert scaffolding with zero real build targets — rewrote it to actually compile main.zig as a static library and wire zig build test to the real test suites. zig fmt --check, zig build, and zig build test all pass (4/4 tests).
  • .machine_readable/6a2/{CLADE,ECOSYSTEM,STATE}.a2ml still described rsr-template-repo's own identity/purpose/"95% complete, production maturity" claim — hardcoded wrong content, not a {{}} token. Fixed the fields that feed the CLAUDE.md arrival-pack generator, then regenerated CLAUDE.md for real via just claude-md rather than hand-editing the generated region.
  • Justfile TODO/echo stubs rewired to real commands: build/test/fmt/fmt-check → real zig build/zig build test/zig fmt; lintidris2 --typecheck abi.ipkg; e2e/aspectbash tests/e2e.sh / bash tests/aspect_tests.sh; deps → checks the Zig toolchain. Deleted run/run-verbose/bench/readiness recipes rather than leave echo "..." fake-pass stubs — this repo is a C-ABI library with no application entry point and no bench/readiness suite exists.
  • Two real false positives fixed in tests/aspect_tests.sh that the newly-wired aspect recipe surfaced: documentation prose describing banned patterns (sorry, Admitted) was being flagged as a violation, and Zig build-cache files were being scanned for SPDX headers. just test-all / just quality are genuinely green now, not just newly-wired-but-red.
  • Removed obsolete template machinery: scripts/validate-template.sh, tests/e2e/template_instantiation_test.sh, benches/template_bench.sh, .machine_readable/ai/PLACEHOLDERS.adoc. No workflow referenced any of them (re-verified).
  • README/EXPLAINME/AFFIRMATION rewritten honestly.

This project's purpose remains undocumented

This is deliberate, not an oversight. knot-rider's specific technical purpose is not documented anywhere in this repository or the wider hyperpolymath estate registry (checked: reposystem tool registry, verisimdb-data, gitbot-fleet, estate memory). The only repo-specific content that exists is GitHub's own description, a knowing pun on the Knight Rider intro monologue:

A shadowy flight into the dangerous world of a man, who is either permanently or very often undone by circumstance.

That's wordplay, not a spec. README.adoc says this plainly rather than inventing a product story.

Known, out-of-scope findings (not fixed here)

  • The literal string rsr-template-repo (not a {{}} placeholder, so outside this PR's defined scope) still appears as leftover self-referential text in ~40 files under .machine_readable/contractiles/, docs/onboarding/, docs/status/, .machine_readable/coaptation/, etc. I fixed the highest-impact instances (the ones feeding CLAUDE.md, the Justfile's user-facing doctor/tour output, and de-duplicated .machine_readable/contractiles/Justfile back into a hardlink of the root Justfile per its own dust-check). A full sweep of this second bug class would roughly double the size of this change and is a reasonable follow-up.
  • docs/status/TEST-NEEDS.adoc describes rsr-template-repo's own historical test-suite development (not knot-rider's) — left as-is, flagged as stale.
  • idris2 --typecheck abi.ipkg was verified to pass in this environment (exit 0, warnings only), but this wasn't part of the original ask and toolchain availability may differ elsewhere.

Test plan

  • zig fmt --check src/interface/ffi — exit 0
  • cd src/interface/ffi && zig build — exit 0
  • cd src/interface/ffi && zig build test — exit 0, 4/4 tests pass
  • just quality (fmt-check + lint + test) — exit 0
  • just test-all (test + e2e + aspect) — exit 0
  • just claude-md && just validate-claude-md — in sync
  • Edited workflow YAML re-parsed with python3 -c "import yaml; yaml.safe_load(...)"
  • Grepped for lingering .github/workflows/*.yml references to the deleted template-machinery scripts — none found

🤖 Generated with Claude Code

knot-rider was scaffolded from rsr-template-repo but never instantiated:
{{PLACEHOLDER}} tokens survived throughout, including in the .zig sources,
which meant the Zig FFI seam genuinely did not parse.

- Substitute RSR identity placeholders ({{PROJECT_NAME}}, {{OWNER}}, {{REPO}},
  {{AUTHOR}}, {{FORGE}}, etc.) with real values across ~80 files, leaving
  intentional generic scaffolding (docs-template/, ADR templates, K9 example
  configs, native Justfile {{recipe}} interpolation) untouched.
- Fix the .github/settings.yml probot landmine: an unsubstituted
  name: "{{REPO}}" would have made the app try to rename the repo to the
  literal string "{{REPO}}" on the next push to main.
- Fix src/interface/ffi/src/main.zig: {{project}}_* -> knot_rider_*. This
  alone doesn't make it build under Zig 0.16: also fixed `opaque` types
  carrying fields (no longer legal) and callconv(.C) -> callconv(.c).
  Rewrote build.zig (previously inert scaffolding with zero real targets)
  to actually build main.zig as a static lib and wire `zig build test` to
  the real test suites. `zig fmt --check`, `zig build`, and `zig build test`
  all now pass for real (4/4 tests).
- .machine_readable/6a2/{CLADE,ECOSYSTEM,STATE}.a2ml still described
  rsr-template-repo's own identity/purpose/95%-complete maturity claim
  (not a {{}} token — hardcoded wrong content). Fixed the identity/purpose/
  state fields feeding the CLAUDE.md arrival-pack generator, then
  regenerated CLAUDE.md for real via `just claude-md` instead of hand-
  editing the generated region.
- Rewired Justfile TODO/echo stubs to real commands backed by this repo's
  actual toolchain (zig build/test/fmt, idris2 --typecheck abi.ipkg, tests/
  e2e.sh, tests/aspect_tests.sh); deleted recipes with nothing to back them
  (run, run-verbose) instead of leaving fake "success" stubs.
- Fixed two real false positives this surfaced in tests/aspect_tests.sh
  (doc prose describing banned patterns flagged as violations; build-cache
  files scanned for SPDX headers) so `just test-all` / `just quality` are
  genuinely green, not just newly-wired-but-red.
- Removed obsolete template machinery: scripts/validate-template.sh,
  tests/e2e/template_instantiation_test.sh, benches/template_bench.sh,
  .machine_readable/ai/PLACEHOLDERS.adoc. No workflow referenced them.
- Rewrote README/EXPLAINME/AFFIRMATION honestly: this project's specific
  technical purpose is not documented anywhere in this repo or the wider
  hyperpolymath estate registry, beyond the name and GitHub's Knight-Rider-
  intro-pun description. Not invented here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 27, 2026 18:25
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit cc680a8 into main Jul 27, 2026
30 of 37 checks passed
@hyperpolymath
hyperpolymath deleted the fix/instantiate-template branch July 27, 2026 18:25
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