Align docs domain frontmatter with Google's Open Knowledge Format#30
Conversation
Replace the user-overridable docs.metadata config with a fixed six-field frontmatter schema (type/title/description/resource/tags/ timestamp) matching OKF's concept-document shape. type/title/ description/timestamp are required and non-empty; resource/tags must be present but may be empty. read_when/agent_cant are dropped. Reserve log.md alongside index.md so an agent-maintained OKF change log doesn't get scanned or re-trigger the watcher. Move the authoring conventions out of the unused doc-rules.md template (confirmed dead: never read by any code path) into two discoverable skills: doc-authoring, and doc-authoring-with-logs which adds prose log.md maintenance (OKF log entries are prose, not generated output, so this is instruction-based rather than a CLI command). Drop the docs domain's templates/ directory entirely (content.md, index.md, doc-rules.md, and their unused slot-injection markers were all dead code) and update the build's copy-templates script accordingly. Migrate the repo's own .docs/ to the new shape.
PR Summary by QodoAlign docs frontmatter schema with Open Knowledge Format (OKF)
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
Prettier requires a blank line between a heading and the list that follows it in Markdown. compileDocsIndex generated headings directly adjacent to their list items, which failed the CI format check on the regenerated .docs/index.md. Fix the generator so future runs produce prettier-compliant output instead of one-off reformatting the checked-in file.
Code Review by Qodo
Context used✅ Compliance rules (platform):
41 rules 1. JSDoc restates metadataShape()
|
| return lines.join("\n").trimEnd(); | ||
| } | ||
|
|
||
| /** The fixed frontmatter shape rendered as `key: <hint>` lines, in schema order. */ |
There was a problem hiding this comment.
2. Jsdoc restates metadatashape() 📘 Rule violation ⚙ Maintainability
The new JSDoc comment above metadataShape() mostly repeats what the function does rather than explaining intent/rationale. This adds noise and can make it harder to spot comments that contain important design context.
Agent Prompt
## Issue description
A newly added comment restates the immediate behavior of `metadataShape()` instead of documenting intent/rationale.
## Issue Context
Compliance requires comments to add intent/constraints/trade-offs, not narrate code. Either remove the comment or rewrite it to capture *why* schema order / this formatting is required (e.g., determinism for stable output, user-facing diagnostics format).
## Fix Focus Areas
- src/domains/docs/compile.ts[67-72]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| type: PRD | ||
| # title: PRD — @luxia/agnos v0.1 | ||
| description: Product requirements document for collapsing the 8-package monorepo into a single `@luxia/agnos` package and redesigning the domain model around config writers and a single config reader (agents). |
There was a problem hiding this comment.
3. Prd missing required title 🐞 Bug ≡ Correctness
.docs/plans/prd.md comments out the required title frontmatter field, so it will always fail docFrontmatterSchema validation and be reported as incomplete. The generated docs index will also fall back to the filename (prd) instead of the intended human title.
Agent Prompt
### Issue description
The migrated `.docs/plans/prd.md` does not include a required, non-empty `title` in YAML frontmatter (it is commented out). This causes `compileDocsIndex()` to report the doc as incomplete on every run and to render an index entry title derived from the filename instead of the document’s intended title.
### Issue Context
- `docFrontmatterSchema` requires `title` to be present and non-empty.
- `compileDocsIndex()` warns on schema failures and uses a filename fallback when `title` is missing.
### Fix Focus Areas
- .docs/plans/prd.md[1-8]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
docs.metadataconfig with a fixed six-field OKF-aligned frontmatter schema (type/title/description/resource/tags/timestamp).type/title/description/timestampare required and non-empty;resource/tagsmust be present but may be empty. Dropsread_when/agent_cant.log.mdalongsideindex.md(excluded from the scan and the watcher) so an agent can maintain an OKF-style prose change log without triggering recompilation.doc-rules.mdtemplate (confirmed unreferenced by any code path) into two discoverable skills:doc-authoringanddoc-authoring-with-logs(adds proselog.mdmaintenance — instruction-based, since OKF log entries are prose, not generated output).templates/directory (all three files and their slot-injection markers were dead code) and updatecopy-templates.mjs+schema.jsonaccordingly..docs/to the new frontmatter shape.Test plan
pnpm lint && pnpm typecheck && pnpm test && pnpm buildall pass (241 tests)dist: the migrated.docs/plans/*.mdvalidate against the new schema, and both new skills are discovered viafindSkillsInRepoDate(caught during manual verification —timestampnow acceptsstring | Date)