Harness Intelligence Wiki
SpecsCLIIssue 11 Scaffold Wiki Fumadocs Routing

Issue 11 Scaffold Wiki Fumadocs Routing Implementation Notes

Issue 11 Scaffold Wiki Fumadocs Routing Implementation Notes

Result

The scaffolded wiki template now includes scripts/sync-content.mjs and runs it before build and check-types.

The script projects existing source material into Fumadocs-readable content/docs folders, writes recursive meta.json files for copied trees, and tolerates app-root deploys where monorepo docs/ is absent by leaving checked-in routed content in place.

The existing Harness wiki probe exposed and fixed these update-path issues:

  • Existing wiki package.json files did not receive the new sync hook.
  • Existing managed scripts/sync-content.mjs files would not update on rerun.
  • Scaffolded folder routes could collide with existing flat routed pages such as repo-guidance.mdx.
  • Sync initially overwrote existing routed pages with root source docs.
  • Projected root docs without frontmatter could pass type generation and fail production build.
  • Generated meta.json output needed to match oxfmt formatting.
  • dp update originally ignored wiki seed/projection drift because the wiki came from scaffold init, outside the setup manifest.

Files

  • apps/cli/src/content/wiki.ts
  • apps/cli/src/scaffold/stage.ts
  • apps/cli/src/scaffold/stage.test.ts
  • apps/cli/src/update/run.ts
  • apps/cli/src/update/run.test.ts
  • apps/wiki/scripts/sync-content.mjs
  • apps/wiki/package.json
  • docs/README.md
  • docs/runbooks/dp-cli-scaffolding.md
  • apps/wiki/content/docs/project/runbooks/dp-cli-scaffolding.md
  • apps/wiki/content/docs/project/tech-debt/cli/scaffold-wiki-fumadocs-routing.md

Validation

  • bun run test --filter=@punks/cli -- scaffold/stage.test.ts
  • bun run test --filter=@punks/cli -- update/run.test.ts scaffold/stage.test.ts
  • bun run check-types --filter=@punks/cli
  • bun run check-types --filter=@punks/wiki
  • bun run build --filter=@punks/wiki
  • bun run check --filter=@punks/cli --filter=@punks/wiki
  • git diff --check

On this page