@panaversity/ksor 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/NOTICE +8 -0
  3. package/README.md +29 -1307
  4. package/dist/cli.d.mts +1 -0
  5. package/dist/cli.mjs +384 -0
  6. package/dist/index.d.mts +34 -0
  7. package/dist/index.mjs +37 -0
  8. package/docs/index.md +53 -0
  9. package/package.json +52 -23
  10. package/templates/LICENSE +23 -0
  11. package/templates/scaffold/.agents/skills/add-sources/SKILL.md +43 -0
  12. package/templates/scaffold/.agents/skills/format-checker/SKILL.md +39 -0
  13. package/templates/scaffold/.agents/skills/format-checker/check.mjs +782 -0
  14. package/templates/scaffold/.agents/skills/intake-interview/SKILL.md +46 -0
  15. package/templates/scaffold/.claude/skills/add-sources/SKILL.md +43 -0
  16. package/templates/scaffold/.claude/skills/format-checker/SKILL.md +39 -0
  17. package/templates/scaffold/.claude/skills/format-checker/check.mjs +782 -0
  18. package/templates/scaffold/.claude/skills/intake-interview/SKILL.md +46 -0
  19. package/templates/scaffold/.gemini/settings.json +5 -0
  20. package/templates/scaffold/.gitattributes +5 -0
  21. package/templates/scaffold/.github/workflows/validate.yml +23 -0
  22. package/templates/scaffold/AGENTS.md +104 -0
  23. package/templates/scaffold/CLAUDE.md +1 -0
  24. package/templates/scaffold/README.md +63 -0
  25. package/templates/scaffold/gitignore +13 -0
  26. package/templates/scaffold/instance.md +26 -0
  27. package/templates/scaffold/knowledge/example.md +23 -0
  28. package/templates/scaffold/package.json +15 -0
  29. package/templates/scaffold/pnpm-lock.yaml +4041 -0
  30. package/templates/scaffold/pnpm-workspace.yaml +19 -0
  31. package/templates/scaffold/system/site/app/(home)/layout.tsx +6 -0
  32. package/templates/scaffold/system/site/app/(home)/page.tsx +83 -0
  33. package/templates/scaffold/system/site/app/api/search/route.ts +11 -0
  34. package/templates/scaffold/system/site/app/docs/[[...slug]]/page.tsx +53 -0
  35. package/templates/scaffold/system/site/app/docs/layout.tsx +24 -0
  36. package/templates/scaffold/system/site/app/global.css +26 -0
  37. package/templates/scaffold/system/site/app/icon.png +0 -0
  38. package/templates/scaffold/system/site/app/layout.tsx +41 -0
  39. package/templates/scaffold/system/site/app/llms-full.txt/route.ts +10 -0
  40. package/templates/scaffold/system/site/app/llms.txt/route.ts +15 -0
  41. package/templates/scaffold/system/site/components/built-with.tsx +18 -0
  42. package/templates/scaffold/system/site/components/mdx.tsx +15 -0
  43. package/templates/scaffold/system/site/lib/layout.shared.tsx +17 -0
  44. package/templates/scaffold/system/site/lib/shared.ts +51 -0
  45. package/templates/scaffold/system/site/lib/source.ts +119 -0
  46. package/templates/scaffold/system/site/next-env.d.ts +6 -0
  47. package/templates/scaffold/system/site/next.config.mjs +32 -0
  48. package/templates/scaffold/system/site/package.json +29 -0
  49. package/templates/scaffold/system/site/postcss.config.mjs +7 -0
  50. package/templates/scaffold/system/site/source.config.ts +35 -0
  51. package/templates/scaffold/system/site/tsconfig.json +35 -0
  52. package/bin/ksor.js +0 -22
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: format-checker
3
+ description: The record's format rules as a runnable check — frontmatter, filenames, links, structure. Use before handing off any change to knowledge/, when a check fails and you need to fix it, or when unsure whether a document is well-formed. Run with `pnpm check` (or node .agents/skills/format-checker/check.mjs).
4
+ metadata:
5
+ version: "1.1.0"
6
+ ---
7
+
8
+ # Format checker
9
+
10
+ `pnpm check` runs `check.mjs` — dependency-free Node, owned by this repo. It
11
+ enforces what AGENTS.md states in prose:
12
+
13
+ - `knowledge/` holds CommonMark `.md` and images only — no `.mdx`, no
14
+ `meta.json`, no other file types — and it is never empty; a record with no
15
+ documents stands behind nothing.
16
+ - Every document carries `title` + `status` (level-0 requirement); the full
17
+ allowed key set is closed; a `superseded` document names a `superseded_by`
18
+ that resolves to a document that exists.
19
+ - Filenames are portable identities: lowercase, Windows-safe, no spaces, no
20
+ case-collisions, no `foo.md` + `foo/index.md` pairs, no parentheses.
21
+ (`.DS_Store` and friends are skipped, never reported.)
22
+ - Relative links resolve and never leave `knowledge/` — inline,
23
+ `<angle-bracketed>`, and reference-style (`[text][label]` with its
24
+ `[label]: target` definition) alike. Links inside code spans and fenced
25
+ blocks are code, not links, and are ignored.
26
+ - `instance.md` exists, is `format: 1`, and carries only the keys the format
27
+ defines — an unknown key is named, never ignored.
28
+ - `CLAUDE.md` stays a one-line pointer; `.agents/skills/` and
29
+ `.claude/skills/` hold the same files byte for byte **in both directions**
30
+ (a file only one tree carries is a rule nobody reviewed); the site contains
31
+ no content files.
32
+
33
+ Every failure prints what is wrong, why the rule exists, and the fix — obey
34
+ the printed fix literally; if it doesn't resolve the problem, that is a bug
35
+ worth reporting to ksor.
36
+
37
+ When you edit any skill under `.agents/skills/`, re-copy it to
38
+ `.claude/skills/` — the checker holds the two trees identical, and it now
39
+ notices a file added on either side.