@organon-methodology/tools 0.3.0 → 0.4.1

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 (189) hide show
  1. package/dist/cli/commands/coverage.d.ts.map +1 -1
  2. package/dist/cli/commands/coverage.js +4 -3
  3. package/dist/cli/commands/coverage.js.map +1 -1
  4. package/dist/cli/commands/find.d.ts.map +1 -1
  5. package/dist/cli/commands/find.js +4 -3
  6. package/dist/cli/commands/find.js.map +1 -1
  7. package/dist/cli/commands/generate-tests.d.ts.map +1 -1
  8. package/dist/cli/commands/generate-tests.js +4 -3
  9. package/dist/cli/commands/generate-tests.js.map +1 -1
  10. package/dist/cli/commands/generate.d.ts.map +1 -1
  11. package/dist/cli/commands/generate.js +4 -3
  12. package/dist/cli/commands/generate.js.map +1 -1
  13. package/dist/cli/commands/health.d.ts.map +1 -1
  14. package/dist/cli/commands/health.js +4 -3
  15. package/dist/cli/commands/health.js.map +1 -1
  16. package/dist/cli/commands/init.d.ts.map +1 -1
  17. package/dist/cli/commands/init.js +9 -0
  18. package/dist/cli/commands/init.js.map +1 -1
  19. package/dist/cli/commands/query.d.ts.map +1 -1
  20. package/dist/cli/commands/query.js +4 -3
  21. package/dist/cli/commands/query.js.map +1 -1
  22. package/dist/cli/commands/release.d.ts +12 -0
  23. package/dist/cli/commands/release.d.ts.map +1 -0
  24. package/dist/cli/commands/release.js +118 -0
  25. package/dist/cli/commands/release.js.map +1 -0
  26. package/dist/cli/commands/suggest.d.ts +12 -0
  27. package/dist/cli/commands/suggest.d.ts.map +1 -0
  28. package/dist/cli/commands/suggest.js +58 -0
  29. package/dist/cli/commands/suggest.js.map +1 -0
  30. package/dist/cli/commands/validate.d.ts.map +1 -1
  31. package/dist/cli/commands/validate.js +4 -3
  32. package/dist/cli/commands/validate.js.map +1 -1
  33. package/dist/cli/commands/verify.d.ts.map +1 -1
  34. package/dist/cli/commands/verify.js +4 -3
  35. package/dist/cli/commands/verify.js.map +1 -1
  36. package/dist/cli/index.d.ts +2 -0
  37. package/dist/cli/index.d.ts.map +1 -1
  38. package/dist/cli/index.js +6 -0
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/core/config.d.ts +11 -0
  41. package/dist/core/config.d.ts.map +1 -1
  42. package/dist/core/config.js +41 -0
  43. package/dist/core/config.js.map +1 -1
  44. package/dist/core/config.test.js +42 -1
  45. package/dist/core/config.test.js.map +1 -1
  46. package/dist/core/detect-project-name.test.d.ts +7 -0
  47. package/dist/core/detect-project-name.test.d.ts.map +1 -0
  48. package/dist/core/detect-project-name.test.js +57 -0
  49. package/dist/core/detect-project-name.test.js.map +1 -0
  50. package/dist/core/discover.d.ts +12 -0
  51. package/dist/core/discover.d.ts.map +1 -0
  52. package/dist/core/discover.js +30 -0
  53. package/dist/core/discover.js.map +1 -0
  54. package/dist/core/discover.test.d.ts +7 -0
  55. package/dist/core/discover.test.d.ts.map +1 -0
  56. package/dist/core/discover.test.js +135 -0
  57. package/dist/core/discover.test.js.map +1 -0
  58. package/dist/core/find.d.ts.map +1 -1
  59. package/dist/core/find.js +1 -16
  60. package/dist/core/find.js.map +1 -1
  61. package/dist/core/find.test.js +1 -1
  62. package/dist/core/find.test.js.map +1 -1
  63. package/dist/core/generate-tests.d.ts.map +1 -1
  64. package/dist/core/generate-tests.js +11 -22
  65. package/dist/core/generate-tests.js.map +1 -1
  66. package/dist/core/health.d.ts.map +1 -1
  67. package/dist/core/health.js +11 -22
  68. package/dist/core/health.js.map +1 -1
  69. package/dist/core/init.d.ts +6 -0
  70. package/dist/core/init.d.ts.map +1 -1
  71. package/dist/core/init.js +104 -6
  72. package/dist/core/init.js.map +1 -1
  73. package/dist/core/init.test.js +119 -3
  74. package/dist/core/init.test.js.map +1 -1
  75. package/dist/core/invariant-coverage.d.ts.map +1 -1
  76. package/dist/core/invariant-coverage.js +12 -23
  77. package/dist/core/invariant-coverage.js.map +1 -1
  78. package/dist/core/query.d.ts.map +1 -1
  79. package/dist/core/query.js +1 -19
  80. package/dist/core/query.js.map +1 -1
  81. package/dist/core/query.test.js +1 -1
  82. package/dist/core/query.test.js.map +1 -1
  83. package/dist/core/release.d.ts +30 -0
  84. package/dist/core/release.d.ts.map +1 -0
  85. package/dist/core/release.js +59 -0
  86. package/dist/core/release.js.map +1 -0
  87. package/dist/core/release.test.d.ts +7 -0
  88. package/dist/core/release.test.d.ts.map +1 -0
  89. package/dist/core/release.test.js +54 -0
  90. package/dist/core/release.test.js.map +1 -0
  91. package/dist/core/suggest-tools.d.ts.map +1 -1
  92. package/dist/core/suggest-tools.js +1 -19
  93. package/dist/core/suggest-tools.js.map +1 -1
  94. package/dist/core/suggest-tools.test.js +3 -0
  95. package/dist/core/suggest-tools.test.js.map +1 -1
  96. package/dist/core/validate-frontmatter.d.ts.map +1 -1
  97. package/dist/core/validate-frontmatter.js +13 -23
  98. package/dist/core/validate-frontmatter.js.map +1 -1
  99. package/dist/core/validate-frontmatter.test.js +44 -3
  100. package/dist/core/validate-frontmatter.test.js.map +1 -1
  101. package/dist/core/validate-workflow.d.ts.map +1 -1
  102. package/dist/core/validate-workflow.js +22 -7
  103. package/dist/core/validate-workflow.js.map +1 -1
  104. package/dist/core/validate-workflow.test.js +76 -0
  105. package/dist/core/validate-workflow.test.js.map +1 -1
  106. package/dist/core/verify-placeholders.d.ts +28 -0
  107. package/dist/core/verify-placeholders.d.ts.map +1 -0
  108. package/dist/core/verify-placeholders.js +60 -0
  109. package/dist/core/verify-placeholders.js.map +1 -0
  110. package/dist/core/verify-placeholders.test.d.ts +7 -0
  111. package/dist/core/verify-placeholders.test.d.ts.map +1 -0
  112. package/dist/core/verify-placeholders.test.js +116 -0
  113. package/dist/core/verify-placeholders.test.js.map +1 -0
  114. package/dist/core/verify-references.d.ts +23 -0
  115. package/dist/core/verify-references.d.ts.map +1 -0
  116. package/dist/core/verify-references.js +157 -0
  117. package/dist/core/verify-references.js.map +1 -0
  118. package/dist/core/verify-references.test.d.ts +7 -0
  119. package/dist/core/verify-references.test.d.ts.map +1 -0
  120. package/dist/core/verify-references.test.js +88 -0
  121. package/dist/core/verify-references.test.js.map +1 -0
  122. package/dist/core/verify-triplets.d.ts.map +1 -1
  123. package/dist/core/verify-triplets.js +1 -16
  124. package/dist/core/verify-triplets.js.map +1 -1
  125. package/dist/core/verify-version-alignment.d.ts +20 -0
  126. package/dist/core/verify-version-alignment.d.ts.map +1 -0
  127. package/dist/core/verify-version-alignment.js +43 -0
  128. package/dist/core/verify-version-alignment.js.map +1 -0
  129. package/dist/core/verify-version-alignment.test.d.ts +7 -0
  130. package/dist/core/verify-version-alignment.test.d.ts.map +1 -0
  131. package/dist/core/verify-version-alignment.test.js +57 -0
  132. package/dist/core/verify-version-alignment.test.js.map +1 -0
  133. package/dist/core/verify.d.ts.map +1 -1
  134. package/dist/core/verify.js +33 -0
  135. package/dist/core/verify.js.map +1 -1
  136. package/dist/templates/config.d.ts +2 -2
  137. package/dist/templates/config.d.ts.map +1 -1
  138. package/dist/templates/config.js +15 -3
  139. package/dist/templates/config.js.map +1 -1
  140. package/dist/templates/index.d.ts +8 -1
  141. package/dist/templates/index.d.ts.map +1 -1
  142. package/dist/templates/index.js +11 -1
  143. package/dist/templates/index.js.map +1 -1
  144. package/dist/templates/organon/claude-md.d.ts +2 -0
  145. package/dist/templates/organon/claude-md.d.ts.map +1 -1
  146. package/dist/templates/organon/claude-md.js +42 -2
  147. package/dist/templates/organon/claude-md.js.map +1 -1
  148. package/dist/templates/organon/ethos.d.ts +3 -1
  149. package/dist/templates/organon/ethos.d.ts.map +1 -1
  150. package/dist/templates/organon/ethos.js +8 -4
  151. package/dist/templates/organon/ethos.js.map +1 -1
  152. package/dist/templates/organon/index.d.ts +4 -2
  153. package/dist/templates/organon/index.d.ts.map +1 -1
  154. package/dist/templates/organon/index.js +4 -2
  155. package/dist/templates/organon/index.js.map +1 -1
  156. package/dist/templates/organon/methodology-reference.d.ts +8 -0
  157. package/dist/templates/organon/methodology-reference.d.ts.map +1 -0
  158. package/dist/templates/organon/methodology-reference.js +265 -0
  159. package/dist/templates/organon/methodology-reference.js.map +1 -0
  160. package/dist/templates/organon/observations-readme.js +1 -1
  161. package/dist/templates/organon/observations-readme.js.map +1 -1
  162. package/dist/templates/organon/philosophy.d.ts +3 -1
  163. package/dist/templates/organon/philosophy.d.ts.map +1 -1
  164. package/dist/templates/organon/philosophy.js +7 -3
  165. package/dist/templates/organon/philosophy.js.map +1 -1
  166. package/dist/templates/organon/primer.d.ts +8 -0
  167. package/dist/templates/organon/primer.d.ts.map +1 -0
  168. package/dist/templates/organon/primer.js +131 -0
  169. package/dist/templates/organon/primer.js.map +1 -0
  170. package/dist/templates/organon/protocols.js +1 -1
  171. package/dist/templates/organon/readme.d.ts.map +1 -1
  172. package/dist/templates/organon/readme.js +8 -5
  173. package/dist/templates/organon/readme.js.map +1 -1
  174. package/dist/templates/skills/domain-feature-design.d.ts.map +1 -1
  175. package/dist/templates/skills/domain-feature-design.js +5 -1
  176. package/dist/templates/skills/domain-feature-design.js.map +1 -1
  177. package/dist/templates/skills/organon-file-creation.d.ts.map +1 -1
  178. package/dist/templates/skills/organon-file-creation.js +5 -1
  179. package/dist/templates/skills/organon-file-creation.js.map +1 -1
  180. package/dist/templates/skills/quality-review.d.ts.map +1 -1
  181. package/dist/templates/skills/quality-review.js +5 -1
  182. package/dist/templates/skills/quality-review.js.map +1 -1
  183. package/dist/templates/skills/session-compounding.d.ts.map +1 -1
  184. package/dist/templates/skills/session-compounding.js +5 -1
  185. package/dist/templates/skills/session-compounding.js.map +1 -1
  186. package/dist/templates/skills/verify-and-health.d.ts.map +1 -1
  187. package/dist/templates/skills/verify-and-health.js +12 -1
  188. package/dist/templates/skills/verify-and-health.js.map +1 -1
  189. package/package.json +2 -2
@@ -2,7 +2,7 @@
2
2
  * organon.config.json template for organon init.
3
3
  */
4
4
  export const CONFIG_TEMPLATE = `{
5
- "methodology_version": "0.3.0",
5
+ "methodology_version": "0.4.1",
6
6
  "organonPaths": ["organon", "."],
7
7
  "organonGlobs": [
8
8
  "**/ETHOS.md",
@@ -10,6 +10,8 @@ export const CONFIG_TEMPLATE = `{
10
10
  "**/PROTOCOL.md",
11
11
  "**/PROTOCOLS.md",
12
12
  "**/README.md",
13
+ "**/PRIMER.md",
14
+ "**/methodology-reference.md",
13
15
  "**/components.md"
14
16
  ],
15
17
  "ignorePatterns": [
@@ -23,8 +25,18 @@ export const CONFIG_TEMPLATE = `{
23
25
  "cursor": ".cursor/rules",
24
26
  "generic": "organon/workflows"
25
27
  },
26
- "freshnessThresholdHours": 720
28
+ "freshnessThresholdHours": 720,
29
+ "testGlobs": [
30
+ "**/*.test.ts",
31
+ "**/*.test.js",
32
+ "**/*.spec.ts",
33
+ "**/*.spec.js"
34
+ ],
35
+ "testIgnorePatterns": [
36
+ "**/node_modules/**",
37
+ "**/dist/**"
38
+ ]
27
39
  }
28
40
  `;
29
- export const METHODOLOGY_VERSION = '0.3.0';
41
+ export const METHODOLOGY_VERSION = '0.4.1';
30
42
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB9B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC9B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC"}
@@ -2,6 +2,13 @@
2
2
  * All templates — entry point for init and upgrade commands.
3
3
  */
4
4
  export { getSkillTemplates } from './skills/index.js';
5
- export { ETHOS_TEMPLATE, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, } from './organon/index.js';
5
+ export { ethosTemplate, ETHOS_TEMPLATE, philosophyTemplate, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, PRIMER_TEMPLATE, METHODOLOGY_REFERENCE_TEMPLATE, } from './organon/index.js';
6
6
  export { CONFIG_TEMPLATE, METHODOLOGY_VERSION } from './config.js';
7
+ /**
8
+ * Get organon templates parameterized with the detected project name.
9
+ */
10
+ export declare function getOrganonTemplates(projectName: string): {
11
+ ethos: string;
12
+ philosophy: string;
13
+ };
7
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAInE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM;;;EAKtD"}
@@ -2,6 +2,16 @@
2
2
  * All templates — entry point for init and upgrade commands.
3
3
  */
4
4
  export { getSkillTemplates } from './skills/index.js';
5
- export { ETHOS_TEMPLATE, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, } from './organon/index.js';
5
+ export { ethosTemplate, ETHOS_TEMPLATE, philosophyTemplate, PHILOSOPHY_TEMPLATE, README_TEMPLATE, PROTOCOLS_TEMPLATE, CLAUDE_MD_TEMPLATE, OBSERVATIONS_README_TEMPLATE, PRIMER_TEMPLATE, METHODOLOGY_REFERENCE_TEMPLATE, } from './organon/index.js';
6
6
  export { CONFIG_TEMPLATE, METHODOLOGY_VERSION } from './config.js';
7
+ import { ethosTemplate, philosophyTemplate } from './organon/index.js';
8
+ /**
9
+ * Get organon templates parameterized with the detected project name.
10
+ */
11
+ export function getOrganonTemplates(projectName) {
12
+ return {
13
+ ethos: ethosTemplate(projectName),
14
+ philosophy: philosophyTemplate(projectName),
15
+ };
16
+ }
7
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACrD,OAAO;QACL,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC;QACjC,UAAU,EAAE,kBAAkB,CAAC,WAAW,CAAC;KAC5C,CAAC;AACJ,CAAC"}
@@ -2,6 +2,8 @@
2
2
  * CLAUDE.md scaffold template for organon init.
3
3
  *
4
4
  * This is the standard Claude Code project instructions file.
5
+ * Enriched with methodology context so agents understand
6
+ * what Organon is, not just what commands to run.
5
7
  */
6
8
  export declare const CLAUDE_MD_TEMPLATE: string;
7
9
  //# sourceMappingURL=claude-md.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,QAyBnB,CAAC"}
1
+ {"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,kBAAkB,QA+DnB,CAAC"}
@@ -2,6 +2,8 @@
2
2
  * CLAUDE.md scaffold template for organon init.
3
3
  *
4
4
  * This is the standard Claude Code project instructions file.
5
+ * Enriched with methodology context so agents understand
6
+ * what Organon is, not just what commands to run.
5
7
  */
6
8
  export const CLAUDE_MD_TEMPLATE = [
7
9
  '# Project Instructions',
@@ -10,11 +12,36 @@ export const CLAUDE_MD_TEMPLATE = [
10
12
  '',
11
13
  '---',
12
14
  '',
15
+ '## Organon Methodology',
16
+ '',
17
+ 'This project uses the [Organon methodology](https://github.com/VledicFranco/organon) for behavioral consistency in human-LLM collaboration. Organon files define constraints (ETHOS.md), design rationale (PHILOSOPHY.md), and procedures (PROTOCOLS.md) that guide development. The methodology is enforced through an automated loop:',
18
+ '',
19
+ ' Define → Bind → Execute → Verify → Compound → Evolve',
20
+ '',
21
+ '---',
22
+ '',
13
23
  '## Quick Reference',
14
24
  '',
25
+ '- Read `organon/PRIMER.md` to understand the methodology (first session)',
15
26
  '- Read `organon/ETHOS.md` before working in this codebase',
16
- '- Run `organon verify` before committing changes',
17
- '- Run `organon health` to check project integrity',
27
+ '- Run `organon verify` before committing (checks 9 gates: frontmatter, triplets, references, placeholders, freshness, invariant coverage, workflow quality, tier4 tests, version alignment)',
28
+ '- Run `organon health` for aggregate project integrity score (0-100)',
29
+ '',
30
+ '---',
31
+ '',
32
+ '## When Verify Fails',
33
+ '',
34
+ 'Each failure includes a diagnostic code. Common fixes:',
35
+ '',
36
+ '| Code | Fix |',
37
+ '|------|-----|',
38
+ '| `FRONTMATTER_MISSING` | Add YAML frontmatter (use `organon generate <path>`) |',
39
+ '| `FRONTMATTER_COUNT_MISMATCH` | Update count fields to match actual content |',
40
+ '| `WORKFLOW_MISSING_TOOLS` | Add `tools:` array to skill frontmatter |',
41
+ '| `REFERENCE_BROKEN_LOADS` | Fix file path in workflow `loads:` array |',
42
+ '| `PLACEHOLDER_DETECTED` | Replace template placeholders with real content |',
43
+ '',
44
+ 'For full diagnostic code reference: read `organon/methodology-reference.md`.',
18
45
  '',
19
46
  '---',
20
47
  '',
@@ -26,7 +53,20 @@ export const CLAUDE_MD_TEMPLATE = [
26
53
  '| Before committing | Run `organon verify` to ensure nothing is broken |',
27
54
  '| Adding a new domain | Use `/domain-feature-design` skill |',
28
55
  '| Creating organon files | Use `/organon-file-creation` skill |',
56
+ '| Reviewing organon quality | Use `/quality-review` skill |',
29
57
  '| End of work session | Use `/session-compounding` skill |',
30
58
  '',
59
+ '---',
60
+ '',
61
+ '## First Session Setup',
62
+ '',
63
+ 'If `organon/ETHOS.md` still contains template placeholders:',
64
+ '',
65
+ '1. Read `organon/PRIMER.md` to understand the methodology',
66
+ "2. Replace `organon/ETHOS.md` with your project's real constraints",
67
+ '3. Replace `organon/PHILOSOPHY.md` with real design rationale',
68
+ '4. Run `organon verify` and fix any issues',
69
+ '5. Run `organon health` — target score 80+',
70
+ '',
31
71
  ].join('\n');
32
72
  //# sourceMappingURL=claude-md.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,EAAE;IACF,yEAAyE;IACzE,EAAE;IACF,KAAK;IACL,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,2DAA2D;IAC3D,kDAAkD;IAClD,mDAAmD;IACnD,EAAE;IACF,KAAK;IACL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,wBAAwB;IACxB,wBAAwB;IACxB,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,iEAAiE;IACjE,4DAA4D;IAC5D,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/templates/organon/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,EAAE;IACF,yEAAyE;IACzE,EAAE;IACF,KAAK;IACL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,yUAAyU;IACzU,EAAE;IACF,0DAA0D;IAC1D,EAAE;IACF,KAAK;IACL,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,0EAA0E;IAC1E,2DAA2D;IAC3D,6LAA6L;IAC7L,sEAAsE;IACtE,EAAE;IACF,KAAK;IACL,EAAE;IACF,sBAAsB;IACtB,EAAE;IACF,wDAAwD;IACxD,EAAE;IACF,gBAAgB;IAChB,gBAAgB;IAChB,kFAAkF;IAClF,gFAAgF;IAChF,wEAAwE;IACxE,yEAAyE;IACzE,8EAA8E;IAC9E,EAAE;IACF,8EAA8E;IAC9E,EAAE;IACF,KAAK;IACL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,wBAAwB;IACxB,wBAAwB;IACxB,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,iEAAiE;IACjE,6DAA6D;IAC7D,4DAA4D;IAC5D,EAAE;IACF,KAAK;IACL,EAAE;IACF,wBAAwB;IACxB,EAAE;IACF,6DAA6D;IAC7D,EAAE;IACF,2DAA2D;IAC3D,oEAAoE;IACpE,+DAA+D;IAC/D,4CAA4C;IAC5C,4CAA4C;IAC5C,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * ETHOS.md scaffold template for organon init.
3
3
  */
4
- export declare const ETHOS_TEMPLATE = "---\ntype: constraints\nscope: product\nname: my-project\nversion: \"1.0\"\nsummary: Behavioral constraints for this project \u2014 edit this to define your product's identity and invariants\ntoken_estimate: 850\ninvariants_count: 3\nprinciples_count: 3\nheuristics_count: 3\ninherits_from: []\nload_priority: high\naudience: [llm, human]\n---\n\n# Project Ethos\n\n> Behavioral constraints for agents working on this project. Edit this file to define your product's identity and rules.\n\n---\n\n## Identity\n\n### What This Project IS\n\n- [Describe what your project does \u2014 be specific]\n- [What problem does it solve?]\n- [What technology does it use?]\n\n### What This Project IS NOT\n\n- [What does it explicitly NOT do?]\n- [What is out of scope?]\n- [What should developers NOT build here?]\n\n---\n\n## Invariants\n\n1. **[Invariant name].** [Describe a hard constraint that must always hold. What breaks if this is violated?]\n\n2. **[Invariant name].** [Another constraint. Each invariant should be testable and enforceable.]\n\n3. **[Invariant name].** [A third constraint. Enforced by: specify how (tests, gates, reviews).]\n\n---\n\n## Principles (Prioritized)\n\n1. **[Priority 1] over [alternative].** [One-line explanation. This wins when principles conflict.]\n\n2. **[Priority 2] over [alternative].** [Second priority. Yields to principle 1 in conflicts.]\n\n3. **[Priority 3] over [alternative].** [Third priority.]\n\n---\n\n## Decision Heuristics\n\n| Situation | Action |\n|-----------|--------|\n| [Common decision 1] | [What to do] |\n| [Common decision 2] | [What to do] |\n| [Common decision 3] | [What to do] |\n";
4
+ export declare function ethosTemplate(projectName: string): string;
5
+ /** @deprecated Use ethosTemplate(projectName) instead. */
6
+ export declare const ETHOS_TEMPLATE: string;
5
7
  //# sourceMappingURL=ethos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ethos.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc,mnDAgE1B,CAAC"}
1
+ {"version":3,"file":"ethos.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkEzD;AAED,0DAA0D;AAC1D,eAAO,MAAM,cAAc,QAA8B,CAAC"}
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * ETHOS.md scaffold template for organon init.
3
3
  */
4
- export const ETHOS_TEMPLATE = `---
4
+ export function ethosTemplate(projectName) {
5
+ return `---
5
6
  type: constraints
6
7
  scope: product
7
- name: my-project
8
+ name: ${projectName}
8
9
  version: "1.0"
9
- summary: Behavioral constraints for this project — edit this to define your product's identity and invariants
10
- token_estimate: 850
10
+ summary: Behavioral constraints for ${projectName} — edit this to define your product's identity and invariants
11
+ token_estimate: 450
11
12
  invariants_count: 3
12
13
  principles_count: 3
13
14
  heuristics_count: 3
@@ -66,4 +67,7 @@ audience: [llm, human]
66
67
  | [Common decision 2] | [What to do] |
67
68
  | [Common decision 3] | [What to do] |
68
69
  `;
70
+ }
71
+ /** @deprecated Use ethosTemplate(projectName) instead. */
72
+ export const ETHOS_TEMPLATE = ethosTemplate('my-project');
69
73
  //# sourceMappingURL=ethos.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ethos.js","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE7B,CAAC"}
1
+ {"version":3,"file":"ethos.js","sourceRoot":"","sources":["../../../src/templates/organon/ethos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,aAAa,CAAC,WAAmB;IAC/C,OAAO;;;QAGD,WAAW;;sCAEmB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DhD,CAAC;AACF,CAAC;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC"}
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * Organon scaffold templates index.
3
3
  */
4
- export { ETHOS_TEMPLATE } from './ethos.js';
5
- export { PHILOSOPHY_TEMPLATE } from './philosophy.js';
4
+ export { ethosTemplate, ETHOS_TEMPLATE } from './ethos.js';
5
+ export { philosophyTemplate, PHILOSOPHY_TEMPLATE } from './philosophy.js';
6
6
  export { README_TEMPLATE } from './readme.js';
7
7
  export { PROTOCOLS_TEMPLATE } from './protocols.js';
8
8
  export { CLAUDE_MD_TEMPLATE } from './claude-md.js';
9
9
  export { OBSERVATIONS_README_TEMPLATE } from './observations-readme.js';
10
+ export { PRIMER_TEMPLATE } from './primer.js';
11
+ export { METHODOLOGY_REFERENCE_TEMPLATE } from './methodology-reference.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * Organon scaffold templates index.
3
3
  */
4
- export { ETHOS_TEMPLATE } from './ethos.js';
5
- export { PHILOSOPHY_TEMPLATE } from './philosophy.js';
4
+ export { ethosTemplate, ETHOS_TEMPLATE } from './ethos.js';
5
+ export { philosophyTemplate, PHILOSOPHY_TEMPLATE } from './philosophy.js';
6
6
  export { README_TEMPLATE } from './readme.js';
7
7
  export { PROTOCOLS_TEMPLATE } from './protocols.js';
8
8
  export { CLAUDE_MD_TEMPLATE } from './claude-md.js';
9
9
  export { OBSERVATIONS_README_TEMPLATE } from './observations-readme.js';
10
+ export { PRIMER_TEMPLATE } from './primer.js';
11
+ export { METHODOLOGY_REFERENCE_TEMPLATE } from './methodology-reference.js';
10
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/organon/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * methodology-reference.md template — detailed condensed reference for agent onboarding.
3
+ *
4
+ * Generated by `organon init`. Provides deep methodology understanding (~3000 tokens)
5
+ * for when agents need to create/modify organon artifacts.
6
+ */
7
+ export declare const METHODOLOGY_REFERENCE_TEMPLATE: string;
8
+ //# sourceMappingURL=methodology-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methodology-reference.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/methodology-reference.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,8BAA8B,QAiQ/B,CAAC"}
@@ -0,0 +1,265 @@
1
+ /**
2
+ * methodology-reference.md template — detailed condensed reference for agent onboarding.
3
+ *
4
+ * Generated by `organon init`. Provides deep methodology understanding (~3000 tokens)
5
+ * for when agents need to create/modify organon artifacts.
6
+ */
7
+ export const METHODOLOGY_REFERENCE_TEMPLATE = [
8
+ '---',
9
+ 'type: rationale',
10
+ 'scope: methodology',
11
+ 'name: methodology-reference',
12
+ 'version: "1.0"',
13
+ 'summary: Detailed Organon methodology reference — frontmatter schema, scope rules, workflow quality, invariant tracking, verification gates, and patterns',
14
+ 'token_estimate: 3600',
15
+ 'audience: [llm]',
16
+ 'load_priority: medium',
17
+ '---',
18
+ '',
19
+ '# Organon Methodology Reference',
20
+ '',
21
+ '> Detailed reference for creating and modifying organon artifacts. Load when you need to understand a specific aspect of the methodology.',
22
+ '',
23
+ '---',
24
+ '',
25
+ '## Frontmatter Schema',
26
+ '',
27
+ '### Required Fields (all files)',
28
+ '',
29
+ '| Field | Type | Description |',
30
+ '|-------|------|-------------|',
31
+ '| `type` | enum | `navigation` \\| `constraints` \\| `rationale` \\| `procedures` \\| `mapping` |',
32
+ '| `scope` | enum | `product` \\| `domain` \\| `feature` \\| `component` \\| `meta` \\| `methodology` |',
33
+ '| `name` | string | Unique kebab-case identifier |',
34
+ '| `version` | string | Semantic version `"X.Y"` (e.g., `"1.0"`, `"2.3"`) |',
35
+ '| `summary` | string | One-sentence description, max 200 characters |',
36
+ '| `token_estimate` | number | Approximate token cost (~12 tokens/line) |',
37
+ '',
38
+ '### Type-Specific Fields',
39
+ '',
40
+ '| Type | Additional Fields |',
41
+ '|------|-------------------|',
42
+ '| `constraints` (ETHOS) | `invariants_count`, `principles_count`, `heuristics_count` |',
43
+ '| `rationale` (PHILOSOPHY) | `decision_count` |',
44
+ '| `procedures` (PROTOCOL) | `protocols` array with `id`, `name`, `automation_tier`, `tools`, `workflow` |',
45
+ '| `navigation` (README) | `provides` array |',
46
+ '| `mapping` | `component_count` or similar |',
47
+ '',
48
+ '### Relationship Fields',
49
+ '',
50
+ '| Field | Purpose |',
51
+ '|-------|---------|',
52
+ '| `inherits_from` | Parent scope names (child inherits all parent constraints) |',
53
+ '| `related_domains` | Other domains this file relates to |',
54
+ '| `related_features` | Features this file relates to |',
55
+ '| `primary_rfcs` | RFCs that created this artifact |',
56
+ '| `load_priority` | `high` \\| `medium` \\| `low` — agent loading guidance |',
57
+ '| `required_for` | Task categories this file is needed for |',
58
+ '| `audience` | `[llm]`, `[human]`, `[tooling]`, or combinations |',
59
+ '',
60
+ '---',
61
+ '',
62
+ '## Scope Hierarchy',
63
+ '',
64
+ '### Definitions',
65
+ '',
66
+ '| Scope | Question Answered | When to Use |',
67
+ '|-------|-------------------|-------------|',
68
+ '| **Product** | "What is this project?" | Repo-wide constraints, one per project |',
69
+ '| **Domain** | "What business concepts exist?" | Bounded context with ≥3 unique concepts + lifecycle |',
70
+ '| **Feature** | "What can users do?" | Cross-cutting capability spanning domains |',
71
+ '| **Component** | "Where is the code?" | Code module with dependency relationships |',
72
+ '| **Meta** | "What are the rules for organons?" | Meta-organon (organon about organons) |',
73
+ '| **Methodology** | "How do we build?" | Process documentation, separate from product |',
74
+ '',
75
+ '### Inheritance Rules',
76
+ '',
77
+ '1. Child inherits ALL parent constraints — never contradicts',
78
+ '2. More specific scope wins on ambiguity',
79
+ '3. Child can add constraints, not relax them',
80
+ '4. Always load product ethos first, then domain, then feature',
81
+ '',
82
+ '### Decision Heuristic',
83
+ '',
84
+ '- Has ≥3 unique concepts + own lifecycle → **Domain**',
85
+ '- Crosses multiple domains → **Feature**',
86
+ '- Describes code structure → **Component**',
87
+ '- Describes process (how to build) → **Methodology**',
88
+ '',
89
+ '---',
90
+ '',
91
+ '## Three-Layer Architecture',
92
+ '',
93
+ '### Layers',
94
+ '',
95
+ '| Layer | Role | Example |',
96
+ '|-------|------|---------|',
97
+ '| **Protocols** | What must happen (knowledge) | "Verify frontmatter before committing" |',
98
+ '| **Workflows** | How to orchestrate (agent bindings) | Claude skill, Cursor rule, CI pipeline |',
99
+ '| **Tools** | How to execute (atomic operations) | `organon verify`, `organon validate` |',
100
+ '',
101
+ '### Automation Tiers',
102
+ '',
103
+ '| Tier | When | What to Create |',
104
+ '|------|------|----------------|',
105
+ '| **Automated** | ≥5 steps, cross-domain, error-prone, frequent | Protocol + Workflow + Tools |',
106
+ '| **Semi-automated** | 1-2 steps, single tool | Protocol + Tool only |',
107
+ '| **Manual** | Judgment required, rare | Protocol only |',
108
+ '',
109
+ '### Bidirectional References (Hard Invariant)',
110
+ '',
111
+ 'When a protocol declares `automation_tier: automated`:',
112
+ '- Protocol MUST list `workflow: <workflow-name>`',
113
+ '- Workflow MUST have `protocol_id: <PROTO-ID>` and `protocol_file: <path>` in frontmatter',
114
+ '- Verified by `organon verify --gate triplets`',
115
+ '',
116
+ '---',
117
+ '',
118
+ '## Verification Gates',
119
+ '',
120
+ '| Gate | Blocking? | What It Checks |',
121
+ '|------|-----------|----------------|',
122
+ '| `frontmatter` | Yes | YAML present, valid, counts match content |',
123
+ '| `triplets` | Yes | Protocol↔workflow bindings are bidirectional |',
124
+ '| `references` | Yes | `inherits_from`, `loads:`, `protocol_file` resolve |',
125
+ '| `placeholder-detection` | No | Template placeholders like `[Describe...]` remain |',
126
+ '| `freshness` | No | Files reviewed within configured threshold |',
127
+ '| `invariant-coverage` | Yes | Every non-judgment invariant has ≥1 test |',
128
+ '| `workflow-quality` | Yes | Workflows have protocol_id, tools, loads, error recovery |',
129
+ '| `tier4-tests` | No | Test files use `@organon-invariant` annotations |',
130
+ '| `version-alignment` | No | Config methodology_version matches CLI version |',
131
+ '',
132
+ '### Common Diagnostic Codes',
133
+ '',
134
+ '| Code | Fix |',
135
+ '|------|-----|',
136
+ '| `FRONTMATTER_MISSING` | Add YAML frontmatter (use `organon generate`) |',
137
+ '| `FRONTMATTER_COUNT_MISMATCH` | Update count fields to match content |',
138
+ '| `TRIPLET_ORPHANED_WORKFLOW` | Add `protocol_id` to workflow frontmatter |',
139
+ '| `TRIPLET_PHANTOM_AUTOMATION` | Create workflow or change protocol to manual |',
140
+ '| `REFERENCE_BROKEN_INHERIT` | Fix `inherits_from` to reference existing names |',
141
+ '| `REFERENCE_BROKEN_LOADS` | Fix path in workflow `loads:` array |',
142
+ '| `WORKFLOW_MISSING_PROTOCOL_ID` | Add `protocol_id: PROTO-SCOPE-N` |',
143
+ '| `WORKFLOW_MISSING_TOOLS` | Add `tools:` array to workflow frontmatter |',
144
+ '| `WORKFLOW_NO_ERROR_RECOVERY` | Add `## Error Recovery` section |',
145
+ '| `PLACEHOLDER_DETECTED` | Replace template placeholders with real content |',
146
+ '',
147
+ '---',
148
+ '',
149
+ '## Invariant Tracking',
150
+ '',
151
+ '### Invariant ID Format',
152
+ '',
153
+ ' INV-{SCOPE}-{N} (e.g., INV-AUTH-1, INV-TOOLS-3)',
154
+ '',
155
+ '- IDs are declared in ETHOS.md `invariants` frontmatter array',
156
+ '- IDs are never reused — retired IDs leave gaps',
157
+ '',
158
+ '### Test-to-Invariant Binding',
159
+ '',
160
+ 'Tests reference invariant IDs via annotations:',
161
+ '',
162
+ ' // @organon-invariant INV-AUTH-1',
163
+ ' test(\'passwords must be hashed\', () => { ... });',
164
+ '',
165
+ 'The `organon coverage` command scans test files for `@organon-invariant` annotations and reports which invariants have tests.',
166
+ '',
167
+ '### Judgment-Call Invariants',
168
+ '',
169
+ 'Mark invariants that cannot be automated with `judgment_call: true` in frontmatter. These are excluded from automated coverage checks and reviewed via PR reviews.',
170
+ '',
171
+ '---',
172
+ '',
173
+ '## Workflow Quality Attributes',
174
+ '',
175
+ '| Attribute | Requirement |',
176
+ '|-----------|-------------|',
177
+ '| **Completeness** | All protocol steps have workflow steps or documented skip-with-rationale |',
178
+ '| **Traceability** | Bidirectional protocol↔workflow binding via frontmatter |',
179
+ '| **Context sufficiency** | `loads:` array lists all required organon files |',
180
+ '| **Error recoverability** | `## Error Recovery` section with failure/recovery table |',
181
+ '| **Idempotency awareness** | Each tool annotated as idempotent or not |',
182
+ '| **Scope alignment** | Workflow scope matches protocol scope |',
183
+ '',
184
+ '### Workflow Archetypes',
185
+ '',
186
+ '| Archetype | Characteristics |',
187
+ '|-----------|----------------|',
188
+ '| **Verification** | Idempotent, pass/fail checks (e.g., verify-and-health) |',
189
+ '| **Generation** | Creates artifacts, idempotent output (e.g., organon-file-creation) |',
190
+ '| **Implementation** | Non-idempotent phases, longest (e.g., domain-feature-design) |',
191
+ '| **Migration** | Batch transform, partial success OK |',
192
+ '| **Diagnostic** | Read-only, advisory (e.g., session-compounding) |',
193
+ '',
194
+ '### Error Handling Patterns',
195
+ '',
196
+ '| Pattern | When to Use |',
197
+ '|---------|-------------|',
198
+ '| **Fail-Fast Gate** | Stop if step fails, remaining steps meaningless |',
199
+ '| **Accumulate-and-Report** | Run all steps, aggregate errors at end |',
200
+ '| **Checkpoint-and-Resume** | Save after each phase, resume from last success |',
201
+ '',
202
+ '---',
203
+ '',
204
+ '## Key Patterns',
205
+ '',
206
+ '### Ethos-First Development',
207
+ '',
208
+ 'Write ETHOS.md before implementing. Define constraints, then build to satisfy them.',
209
+ '',
210
+ '### RFC-Driven Evolution',
211
+ '',
212
+ ' Organon ("should be") ←cites→ RFC ("will be") →implements→ Code ("what is")',
213
+ '',
214
+ 'RFCs declare organon impact upfront. Organon changes land in the same PR as implementation.',
215
+ '',
216
+ '### Recursive Collaboration',
217
+ '',
218
+ ' PLAN (10-20%) → WORK (60-70%) → REVIEW (10-20%) → COMPOUND (5-10%)',
219
+ '',
220
+ 'The COMPOUND phase is where methodology improves. Without explicit time allocation, improvement never happens.',
221
+ '',
222
+ '### Context Loading Strategy',
223
+ '',
224
+ '1. Always load product ETHOS first (foundational)',
225
+ '2. Use frontmatter to filter — check `scope`, `required_for`, `token_estimate`',
226
+ '3. Load domain/feature ETHOS on-demand when entering that scope',
227
+ '4. Reserve 8-15K tokens for organon context in your budget',
228
+ '',
229
+ '---',
230
+ '',
231
+ '## Anti-Patterns',
232
+ '',
233
+ '| Anti-Pattern | Symptom | Fix |',
234
+ '|-------------|---------|-----|',
235
+ '| Phantom enforcement | Invariant says "enforced by X" but X doesn\'t exist | Create the enforcement mechanism |',
236
+ '| Aspiration as invariant | "Should be" language in invariant | Rewrite as "must be" with gate |',
237
+ '| Context overload | Workflow loads >10 files | Reduce to essential files only |',
238
+ '| Missing error recovery | No failure/recovery table in workflow | Add `## Error Recovery` section |',
239
+ '| Scope creep | IS NOT section doesn\'t define boundaries | Add specific IS NOT statements |',
240
+ '| Open enforcement loop | Protocol exists but no workflow or tool | Close the loop or change tier to manual |',
241
+ '| Deferred organon | "We\'ll write ETHOS later" | Write ETHOS before implementing |',
242
+ '| Unprioritized principles | Principles listed without ordering | Number by priority (lower = higher) |',
243
+ '| File splitting for size | Files split just because they\'re long | Use progressive disclosure instead |',
244
+ '| Protocol drift | Workflow steps don\'t match protocol | Sync workflow with protocol |',
245
+ '',
246
+ '---',
247
+ '',
248
+ '## Further Reading',
249
+ '',
250
+ 'The authoritative methodology specification lives in `book-llms/` (if available):',
251
+ '',
252
+ '| File | Contains |',
253
+ '|------|----------|',
254
+ '| `overview.md` | 12 challenges solved, 6 pillars |',
255
+ '| `ETHOS.md` | 10 invariants, 9 principles, 25 heuristics |',
256
+ '| `PHILOSOPHY.md` | 13 design decisions with trade-offs |',
257
+ '| `patterns.md` | 23 concrete patterns |',
258
+ '| `three-layer-architecture.md` | Enforcement loop, automation tiers |',
259
+ '| `frontmatter-system.md` | Full YAML schema |',
260
+ '| `scopes.md` | Scope hierarchy and inheritance |',
261
+ '| `workflow-authoring.md` | Quality attributes, archetypes |',
262
+ '| `invariant-tracking.md` | INV-ID scheme, coverage |',
263
+ '',
264
+ ].join('\n');
265
+ //# sourceMappingURL=methodology-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methodology-reference.js","sourceRoot":"","sources":["../../../src/templates/organon/methodology-reference.ts"],"names":[],"mappings":"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"}
@@ -8,7 +8,7 @@ export const OBSERVATIONS_README_TEMPLATE = [
8
8
  'name: observations',
9
9
  'version: "1.0"',
10
10
  'summary: Index of empirical observations from work sessions',
11
- 'token_estimate: 50',
11
+ 'token_estimate: 110',
12
12
  'provides: [observation-index]',
13
13
  'audience: [llm, human]',
14
14
  '---',
@@ -1 +1 @@
1
- {"version":3,"file":"observations-readme.js","sourceRoot":"","sources":["../../../src/templates/organon/observations-readme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,KAAK;IACL,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,6DAA6D;IAC7D,oBAAoB;IACpB,+BAA+B;IAC/B,wBAAwB;IACxB,KAAK;IACL,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,8GAA8G;IAC9G,EAAE;IACF,UAAU;IACV,EAAE;IACF,gCAAgC;IAChC,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"observations-readme.js","sourceRoot":"","sources":["../../../src/templates/organon/observations-readme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,KAAK;IACL,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,6DAA6D;IAC7D,qBAAqB;IACrB,+BAA+B;IAC/B,wBAAwB;IACxB,KAAK;IACL,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,8GAA8G;IAC9G,EAAE;IACF,UAAU;IACV,EAAE;IACF,gCAAgC;IAChC,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * PHILOSOPHY.md scaffold template for organon init.
3
3
  */
4
- export declare const PHILOSOPHY_TEMPLATE = "---\ntype: rationale\nscope: product\nname: my-project\nversion: \"1.0\"\nsummary: Design rationale for this project \u2014 edit this to explain WHY your project is designed the way it is\ntoken_estimate: 400\ndecision_count: 3\ninherits_from: []\nload_priority: medium\naudience: [llm, human]\n---\n\n# Project Philosophy\n\n> Explains WHY this project is designed the way it is. Constraints go in ETHOS.md; reasoning goes here.\n\n---\n\n## The Problem\n\n[Describe the problem your project solves. Why does it exist? What pain point does it address?]\n\n---\n\n## The Bet\n\n**Bet:** [State the core assumption your design rests on. This should be falsifiable.]\n\n**Why this works:**\n- [Evidence point 1]\n- [Evidence point 2]\n\n---\n\n## Design Decisions\n\n### 1. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n### 2. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n### 3. [Decision Name]\n\n**Choice:** [What you decided]\n\n**Rationale:** [Why you chose this]\n\n**Trade-off:** [What you gave up]\n\n---\n\n## Trade-offs\n\n| Decision | Benefit | Cost |\n|----------|---------|------|\n| [Choice 1] | [What you gain] | [What you give up] |\n| [Choice 2] | [What you gain] | [What you give up] |\n| [Choice 3] | [What you gain] | [What you give up] |\n";
4
+ export declare function philosophyTemplate(projectName: string): string;
5
+ /** @deprecated Use philosophyTemplate(projectName) instead. */
6
+ export declare const PHILOSOPHY_TEMPLATE: string;
5
7
  //# sourceMappingURL=philosophy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"philosophy.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,mBAAmB,q5CAsE/B,CAAC"}
1
+ {"version":3,"file":"philosophy.d.ts","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAwE9D;AAED,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,QAAmC,CAAC"}
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * PHILOSOPHY.md scaffold template for organon init.
3
3
  */
4
- export const PHILOSOPHY_TEMPLATE = `---
4
+ export function philosophyTemplate(projectName) {
5
+ return `---
5
6
  type: rationale
6
7
  scope: product
7
- name: my-project
8
+ name: ${projectName}
8
9
  version: "1.0"
9
- summary: Design rationale for this project — edit this to explain WHY your project is designed the way it is
10
+ summary: Design rationale for ${projectName} — edit this to explain WHY your project is designed the way it is
10
11
  token_estimate: 400
11
12
  decision_count: 3
12
13
  inherits_from: []
@@ -72,4 +73,7 @@ audience: [llm, human]
72
73
  | [Choice 2] | [What you gain] | [What you give up] |
73
74
  | [Choice 3] | [What you gain] | [What you give up] |
74
75
  `;
76
+ }
77
+ /** @deprecated Use philosophyTemplate(projectName) instead. */
78
+ export const PHILOSOPHY_TEMPLATE = philosophyTemplate('my-project');
75
79
  //# sourceMappingURL=philosophy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"philosophy.js","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElC,CAAC"}
1
+ {"version":3,"file":"philosophy.js","sourceRoot":"","sources":["../../../src/templates/organon/philosophy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACpD,OAAO;;;QAGD,WAAW;;gCAEa,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiE1C,CAAC;AACF,CAAC;AAED,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC"}