fito-tui 0.2.0

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 (179) hide show
  1. package/README.md +88 -0
  2. package/agents/fito-case-source-planner.md +265 -0
  3. package/agents/fito-performance-reviewer.md +231 -0
  4. package/agents/fito-practice-concept-content-generator.md +318 -0
  5. package/agents/fito-practice-concept-identifier.md +482 -0
  6. package/agents/fito-practice-execution-fact-content-generator.md +299 -0
  7. package/agents/fito-practice-execution-fact-identifier.md +367 -0
  8. package/agents/fito-practice-usage-scenario-content-generator.md +331 -0
  9. package/agents/fito-practice-usage-scenario-identifier.md +397 -0
  10. package/agents/fito-subagent-selftest.md +27 -0
  11. package/agents/fito-technology-generator.md +207 -0
  12. package/agents/fito-tool-concept-content-generator.md +282 -0
  13. package/agents/fito-tool-concept-identifier.md +384 -0
  14. package/agents/fito-tool-execution-fact-content-generator.md +382 -0
  15. package/agents/fito-tool-execution-fact-identifier.md +360 -0
  16. package/agents/fito-tool-usage-scenario-content-generator.md +381 -0
  17. package/agents/fito-tool-usage-scenario-identifier.md +432 -0
  18. package/agents/fito-tutor.md +185 -0
  19. package/extensions/fito-delegate.js +539 -0
  20. package/extensions/fito-delegate.ts +691 -0
  21. package/extensions/fito-fetch-tools.js +380 -0
  22. package/extensions/fito-fetch-tools.ts +419 -0
  23. package/extensions/fito-startup.js +166 -0
  24. package/extensions/fito-startup.ts +188 -0
  25. package/package.json +56 -0
  26. package/prompts/fito-auth-refresh.md +15 -0
  27. package/prompts/fito-case-design.md +506 -0
  28. package/prompts/fito-case-edit.md +91 -0
  29. package/prompts/fito-case-generate.md +222 -0
  30. package/prompts/fito-case-open.md +124 -0
  31. package/prompts/fito-case-plan-source.md +114 -0
  32. package/prompts/fito-create-or-update-competence.md +261 -0
  33. package/prompts/fito-create-or-update-technology.md +199 -0
  34. package/prompts/fito-delete-competence.md +147 -0
  35. package/prompts/fito-evaluate.md +148 -0
  36. package/prompts/fito-fetch-urls-content.md +35 -0
  37. package/prompts/fito-generate-domain-concepts.md +85 -0
  38. package/prompts/fito-generate-execution-facts.md +85 -0
  39. package/prompts/fito-generate-usage-scenarios.md +85 -0
  40. package/prompts/fito-identify-domain-concepts.md +49 -0
  41. package/prompts/fito-identify-execution-facts.md +49 -0
  42. package/prompts/fito-identify-usage-scenarios.md +49 -0
  43. package/prompts/fito-login.md +21 -0
  44. package/prompts/fito-logout.md +14 -0
  45. package/prompts/fito-publish-case.md +266 -0
  46. package/prompts/fito-push-knowledge.md +84 -0
  47. package/prompts/fito-submit.md +208 -0
  48. package/prompts/fito-tutor.md +120 -0
  49. package/shared/case-briefing/briefing.js +221 -0
  50. package/shared/case-briefing/briefing.ts +261 -0
  51. package/shared/case-quiz/scoring.js +16 -0
  52. package/shared/case-quiz/scoring.ts +61 -0
  53. package/shared/case-validation/case-loader.js +88 -0
  54. package/shared/case-validation/case-loader.ts +106 -0
  55. package/shared/case-validation/case-schema.js +716 -0
  56. package/shared/case-validation/case-schema.ts +895 -0
  57. package/shared/competences/competence-list.js +29 -0
  58. package/shared/competences/competence-list.ts +32 -0
  59. package/shared/fito-api/README.md +192 -0
  60. package/shared/fito-api/client.js +731 -0
  61. package/shared/fito-api/client.ts +1426 -0
  62. package/shared/fito-session/credentials.js +79 -0
  63. package/shared/fito-session/credentials.ts +88 -0
  64. package/shared/fito-session/session.js +16 -0
  65. package/shared/fito-session/session.ts +35 -0
  66. package/shared/github-url/parse.js +26 -0
  67. package/shared/github-url/parse.ts +35 -0
  68. package/shared/knowledge-components/component-names.js +35 -0
  69. package/shared/knowledge-components/component-names.ts +39 -0
  70. package/shared/knowledge-components/knowledge-fetch.js +46 -0
  71. package/shared/knowledge-components/knowledge-fetch.ts +57 -0
  72. package/shared/knowledge-components/knowledge-search.js +101 -0
  73. package/shared/knowledge-components/knowledge-search.ts +144 -0
  74. package/shared/knowledge-components/push-payload.js +104 -0
  75. package/shared/knowledge-components/push-payload.ts +129 -0
  76. package/shared/knowledge-components/reference.js +24 -0
  77. package/shared/knowledge-components/reference.ts +43 -0
  78. package/shared/knowledge-components/technology-fetch.js +30 -0
  79. package/shared/knowledge-components/technology-fetch.ts +38 -0
  80. package/shared/shell-exec/exec.js +22 -0
  81. package/shared/shell-exec/exec.ts +46 -0
  82. package/skills/fito-auth/SKILL.md +68 -0
  83. package/skills/fito-auth/auth-refresh.js +23 -0
  84. package/skills/fito-auth/auth-refresh.ts +25 -0
  85. package/skills/fito-auth/browser.js +35 -0
  86. package/skills/fito-auth/browser.ts +57 -0
  87. package/skills/fito-auth/callback-server.js +152 -0
  88. package/skills/fito-auth/callback-server.ts +189 -0
  89. package/skills/fito-auth/login.js +37 -0
  90. package/skills/fito-auth/login.ts +42 -0
  91. package/skills/fito-auth/logout.js +24 -0
  92. package/skills/fito-auth/logout.ts +25 -0
  93. package/skills/fito-case-author/SKILL.md +179 -0
  94. package/skills/fito-case-author/checkout.js +222 -0
  95. package/skills/fito-case-author/checkout.ts +281 -0
  96. package/skills/fito-case-author/github-publish.js +218 -0
  97. package/skills/fito-case-author/github-publish.ts +251 -0
  98. package/skills/fito-case-author/publish-payload.js +108 -0
  99. package/skills/fito-case-author/publish-payload.ts +186 -0
  100. package/skills/fito-case-author/publish-state.js +72 -0
  101. package/skills/fito-case-author/publish-state.ts +87 -0
  102. package/skills/fito-case-author/publish-version.js +364 -0
  103. package/skills/fito-case-author/publish-version.ts +495 -0
  104. package/skills/fito-case-author/publish.js +284 -0
  105. package/skills/fito-case-author/publish.ts +394 -0
  106. package/skills/fito-case-author/semver.js +55 -0
  107. package/skills/fito-case-author/semver.ts +63 -0
  108. package/skills/fito-case-author/status-gate.js +34 -0
  109. package/skills/fito-case-author/status-gate.ts +54 -0
  110. package/skills/fito-case-author/validate.js +62 -0
  111. package/skills/fito-case-author/validate.ts +64 -0
  112. package/skills/fito-case-runner/SKILL.md +119 -0
  113. package/skills/fito-case-runner/case-component-names.js +45 -0
  114. package/skills/fito-case-runner/case-component-names.ts +65 -0
  115. package/skills/fito-case-runner/case-detail.js +20 -0
  116. package/skills/fito-case-runner/case-detail.ts +20 -0
  117. package/skills/fito-case-runner/github.js +234 -0
  118. package/skills/fito-case-runner/github.ts +287 -0
  119. package/skills/fito-case-runner/manifest.js +56 -0
  120. package/skills/fito-case-runner/manifest.ts +73 -0
  121. package/skills/fito-case-runner/open.js +175 -0
  122. package/skills/fito-case-runner/open.ts +241 -0
  123. package/skills/fito-case-runner/report.js +22 -0
  124. package/skills/fito-case-runner/report.ts +24 -0
  125. package/skills/fito-case-runner/runner.js +158 -0
  126. package/skills/fito-case-runner/runner.ts +304 -0
  127. package/skills/fito-case-runner/score-quiz-mc.js +85 -0
  128. package/skills/fito-case-runner/score-quiz-mc.ts +99 -0
  129. package/skills/fito-case-runner/submit-evaluation.js +73 -0
  130. package/skills/fito-case-runner/submit-evaluation.ts +98 -0
  131. package/skills/fito-case-runner/submit-quiz-result.js +75 -0
  132. package/skills/fito-case-runner/submit-quiz-result.ts +100 -0
  133. package/skills/fito-case-runner/submit.js +85 -0
  134. package/skills/fito-case-runner/submit.ts +111 -0
  135. package/skills/fito-case-runner/workdir.js +10 -0
  136. package/skills/fito-case-runner/workdir.ts +11 -0
  137. package/skills/fito-competence-write/SKILL.md +155 -0
  138. package/skills/fito-competence-write/create.js +64 -0
  139. package/skills/fito-competence-write/create.ts +80 -0
  140. package/skills/fito-competence-write/delete.js +136 -0
  141. package/skills/fito-competence-write/delete.ts +166 -0
  142. package/skills/fito-competence-write/display.js +20 -0
  143. package/skills/fito-competence-write/display.ts +21 -0
  144. package/skills/fito-competence-write/payload.js +96 -0
  145. package/skills/fito-competence-write/payload.ts +115 -0
  146. package/skills/fito-competence-write/update.js +155 -0
  147. package/skills/fito-competence-write/update.ts +206 -0
  148. package/skills/fito-evaluator/SKILL.md +73 -0
  149. package/skills/fito-evaluator/criterion-exec.js +64 -0
  150. package/skills/fito-evaluator/criterion-exec.ts +73 -0
  151. package/skills/fito-evaluator/evaluate-automated.js +57 -0
  152. package/skills/fito-evaluator/evaluate-automated.ts +84 -0
  153. package/skills/fito-evaluator/evaluate.js +28 -0
  154. package/skills/fito-evaluator/evaluate.ts +86 -0
  155. package/skills/fito-evaluator/report.js +112 -0
  156. package/skills/fito-evaluator/report.ts +128 -0
  157. package/skills/fito-evaluator/rubric.js +90 -0
  158. package/skills/fito-evaluator/rubric.ts +170 -0
  159. package/skills/fito-knowledge-push/SKILL.md +114 -0
  160. package/skills/fito-knowledge-push/push.js +282 -0
  161. package/skills/fito-knowledge-push/push.ts +360 -0
  162. package/skills/fito-source-ingestion/SKILL.md +77 -0
  163. package/skills/fito-source-ingestion/authoring-check.js +128 -0
  164. package/skills/fito-source-ingestion/authoring-check.ts +155 -0
  165. package/skills/fito-source-ingestion/bundle.js +198 -0
  166. package/skills/fito-source-ingestion/bundle.ts +246 -0
  167. package/skills/fito-technology-write/SKILL.md +108 -0
  168. package/skills/fito-technology-write/create.js +134 -0
  169. package/skills/fito-technology-write/create.ts +161 -0
  170. package/skills/fito-technology-write/payload.js +64 -0
  171. package/skills/fito-technology-write/payload.ts +70 -0
  172. package/skills/fito-technology-write/update.js +122 -0
  173. package/skills/fito-technology-write/update.ts +171 -0
  174. package/skills/fito-url-content-fetcher/SKILL.md +213 -0
  175. package/templates/concept-practice-content-template.md +281 -0
  176. package/templates/concept-tool-content-template.md +207 -0
  177. package/templates/execution-fact-practice-content-template.md +372 -0
  178. package/templates/execution-fact-tool-content-template.md +307 -0
  179. package/templates/usage-scenario-content-template.md +248 -0
@@ -0,0 +1,207 @@
1
+ # Concept Tool Content Template
2
+
3
+ This template is the per-field authoring guidance the `fito-tool-concept-content-generator`
4
+ agent follows when producing a Concept knowledge component's `content`. It mirrors the
5
+ **registered `ConceptTemplate` field-schema** (v1.0.0) in the backend Knowledge
6
+ Repository — the authoritative structure the generated `content` map must conform to.
7
+ Each section below corresponds to one registered field; if this file and the registered
8
+ schema ever disagree on structure, the registered schema wins.
9
+
10
+ Two levels of structure must not be conflated:
11
+
12
+ - **Field structure (Level A)** — `content` is a map of the named fields below, each
13
+ with a type (`TEXT` or `LIST`) and a requirement. It is **not** markdown.
14
+ - **Field value (Level B)** — each `TEXT` field's value is a **markdown fragment**;
15
+ each `LIST` field's value is a list of markdown fragments. Markdown is the rich-text
16
+ format *inside* a field — it never defines the field structure.
17
+
18
+ Markdown rules for every field value: fenced code blocks always carry a language
19
+ info-string; **no in-field H1** (the component's `name` is the H1 — internal headings
20
+ demote to H3 or below); no raw/inline HTML; component cross-references stay plain
21
+ markdown text (e.g. `concept:spring-boot.inversion-of-control`), not links.
22
+
23
+ All nine fields are REQUIRED and must be non-blank, in the order listed below.
24
+
25
+ ## Fields
26
+
27
+ ### 1. `tl_dr` (TEXT) — TL;DR
28
+
29
+ A 2–3 sentence standalone summary that lets a developer decide in seconds whether
30
+ this content is relevant. It should convey: what the concept is, why it matters
31
+ when working with the tool, and the single most important takeaway.
32
+
33
+ Write it as a plain paragraph — no bullet points, no headings, no cross-references
34
+ to other fields. A reader who reads only this field should walk away with a
35
+ useful mental model of the concept.
36
+
37
+ **Quality gate**: If the TL;DR could apply to a different concept with only minor
38
+ word changes, it is too generic. Rewrite it.
39
+
40
+ ### 2. `definition` (TEXT) — Definition
41
+
42
+ A precise, formal definition of the concept as it exists in its originating domain.
43
+ This is the authoritative statement of what the concept IS. Write in 2–3 paragraphs:
44
+
45
+ - **Paragraph 1 — Core definition**: the essential nature of the concept, stated
46
+ precisely. Domain-grounded, not tool-grounded. Self-contained. A reader should
47
+ be able to grasp what the concept is from this paragraph alone.
48
+ - **Paragraph 2 — Elaboration**: deepen the definition by addressing scope,
49
+ boundaries, and essential properties. What does the concept include and exclude?
50
+ What properties must always be true of it? What distinguishes it from adjacent
51
+ concepts at the definitional level (not at the level of usage or context)?
52
+ - **Paragraph 3 — Variants (optional)**: include only when the concept has
53
+ well-established variants or forms that are part of what it *is* (e.g., synchronous
54
+ vs. asynchronous forms of the same mechanism). Omit entirely if no meaningful
55
+ variants exist — do not pad this paragraph.
56
+
57
+ Requirements that apply across all paragraphs:
58
+
59
+ - **Domain-grounded**: define the concept in terms of the domain it comes from
60
+ (mathematics, networking, software architecture, etc.), NOT in terms of the tool.
61
+ The tool-specific perspective belongs in the `terminology_mapping` field.
62
+ - **Self-contained**: the definition should stand alone. Do not rely on
63
+ `contextualization` to complete the meaning.
64
+ - **Accurate**: correct according to the originating domain's literature.
65
+
66
+ Example (Dependency Injection):
67
+
68
+ > Dependency injection is a design technique in which an object receives its
69
+ > dependencies from an external source rather than creating them itself, thereby
70
+ > decoupling the object from the concrete implementations it depends on.
71
+ >
72
+ > The essential property of dependency injection is inversion of responsibility:
73
+ > the object declares what it needs, but has no knowledge of how those needs are
74
+ > fulfilled. This means the object's behavior is fully determined by what is
75
+ > injected into it, and the same object can operate correctly with different
76
+ > implementations of its dependencies without any internal change. Dependency
77
+ > injection is distinct from simple parameterization in that the injected
78
+ > dependencies are typically collaborators — objects the receiving object delegates
79
+ > work to — not just configuration values.
80
+ >
81
+ > Dependency injection takes two primary forms: constructor injection, where
82
+ > dependencies are provided at object creation time, and setter injection, where
83
+ > they are assigned after construction. Constructor injection is generally preferred
84
+ > because it guarantees the object is fully initialized before use.
85
+
86
+ ### 3. `contextualization` (TEXT) — Contextualization
87
+
88
+ Where this concept sits within its broader domain. Help the reader understand the
89
+ bigger picture — the problem space, the field of knowledge, and why this concept
90
+ was formalized. Address:
91
+
92
+ - Which domain or sub-domain does this concept belong to?
93
+ - What broader problem or need does it address?
94
+ - Why was it created or formalized?
95
+ - At what level of abstraction does it sit? (fundamental primitive, specialization,
96
+ composite principle, etc.)
97
+
98
+ 1–2 paragraphs. The goal is orientation, not a textbook chapter.
99
+
100
+ ### 4. `terminology_mapping` (TEXT) — Terminology Mapping
101
+
102
+ How the tool names and represents this concept. This field bridges the gap between
103
+ the standard domain terminology and the tool's own vocabulary.
104
+
105
+ - What is the standard/academic term?
106
+ - What does the tool call it? (class name, annotation, method, configuration key, etc.)
107
+ - If the naming differs, explain the relationship and why.
108
+ - If the tool uses the standard term directly, state this explicitly — do NOT leave
109
+ the field thin. Example: "Spring Boot uses the standard term 'dependency injection'
110
+ directly in its documentation and API."
111
+
112
+ This field may be brief (1–2 sentences) when tool and standard terms align, or
113
+ longer when the mapping involves multiple constructs or is non-obvious.
114
+
115
+ ### 5. `code_example` (TEXT) — Code Example
116
+
117
+ One markdown fragment: the smallest possible source code snippet that demonstrates
118
+ the concept in practice using the tool, in a **language-tagged fenced code block**,
119
+ followed by 2–4 sentences of explanation. Requirements:
120
+
121
+ - **Runnable when feasible**: include imports, class declarations, and an entry point
122
+ so the developer can copy-paste and execute. When a fully runnable example is not
123
+ feasible (requires a database, external service, complex project setup), provide a
124
+ minimal but representative fragment and add a one-line prerequisites note at the end
125
+ of the fragment (e.g. `*Prerequisites: a running PostgreSQL instance.*`).
126
+ - **Minimal**: include only what is necessary to illustrate the concept. Strip away
127
+ everything unrelated.
128
+ - **Annotated**: brief inline comments that explain *why* (connect the code to the
129
+ concept), not *what* (do not narrate obvious syntax).
130
+ - **Version-consistent**: the code must compile/run with the tool version specified
131
+ in the metadata.
132
+
133
+ The explanation after the code block covers what the code demonstrates and how it
134
+ connects to the concept. Do not restate what the comments already say — focus on
135
+ the overall picture.
136
+
137
+ ### 6. `practical_relevance` (TEXT) — Practical Relevance
138
+
139
+ When and why a developer encounters this concept while using the tool. This field
140
+ answers: "Why should I care about this in my day-to-day work?" Address:
141
+
142
+ - In which concrete situations does this concept come into play?
143
+ - What decisions does understanding it help a developer make?
144
+ - What goes wrong if a developer ignores or misunderstands it?
145
+
146
+ Frame this from the developer's working perspective, not from an academic one.
147
+
148
+ ### 7. `misconceptions_and_pitfalls` (TEXT) — Common Misconceptions and Pitfalls
149
+
150
+ Things developers frequently get wrong about this concept. One markdown fragment
151
+ holding every entry, each under an **H3 title**, following the pattern:
152
+
153
+ - **Misconception**: what people commonly believe or assume
154
+ - **Reality**: what is actually true
155
+ - **Why it matters**: what goes wrong in practice if the misconception is not corrected
156
+ (bugs, performance problems, incorrect mental models, wasted debugging time, etc.)
157
+
158
+ This field is required. Include only misconceptions that are practically significant.
159
+ If no meaningful misconceptions exist for a concept, the field's value is the single
160
+ statement: "No significant misconceptions identified for this concept." Do not invent
161
+ weak entries to fill it.
162
+
163
+ ### 8. `key_characteristics` (LIST) — Key Characteristics
164
+
165
+ The essential attributes that distinguish this concept from similar or adjacent ones.
166
+ A LIST field: **one markdown fragment per characteristic**, each shaped
167
+ `**Characteristic**: description`. Each characteristic should be:
168
+
169
+ - **Distinctive**: helps differentiate this concept from related ones
170
+ - **Observable**: a developer can see, test, or verify this property
171
+ - **Relevant**: it matters for practical use of the concept within the tool
172
+
173
+ Do not exhaustively enumerate every property. Focus on what makes this concept
174
+ *this concept* rather than a neighboring one, and what practically affects how
175
+ a developer works with it.
176
+
177
+ ### 9. `related_concepts` (TEXT) — Related Concepts
178
+
179
+ A narrative — not a flat list — that explains how this concept relates to others
180
+ in its conceptual neighborhood. For each related concept, state the nature of the
181
+ relationship:
182
+
183
+ - Parent/child (specialization/generalization)
184
+ - Sibling (alternative approach or complement)
185
+ - Prerequisite (must understand X to grasp Y)
186
+ - Dependency (X uses or relies on Y internally)
187
+ - Commonly confused (X and Y look similar but differ in a key way)
188
+
189
+ Where a related concept exists as a live component in the backend Knowledge
190
+ Repository, reference it by its canonical id as plain markdown text (e.g.
191
+ "…specializes `concept:spring-boot.inversion-of-control`…"). Concepts not (yet) in
192
+ the repository are named in prose. Never reference identify-pipeline numeric ids —
193
+ the component must stand alone in the Knowledge Repository.
194
+
195
+ ## Field Order
196
+
197
+ Fields appear in this fixed order in the `content` map:
198
+
199
+ 1. `tl_dr`
200
+ 2. `definition`
201
+ 3. `contextualization`
202
+ 4. `terminology_mapping`
203
+ 5. `code_example`
204
+ 6. `practical_relevance`
205
+ 7. `misconceptions_and_pitfalls`
206
+ 8. `key_characteristics`
207
+ 9. `related_concepts`
@@ -0,0 +1,372 @@
1
+ # Execution Fact Practice Content Template
2
+
3
+ This template is the per-field authoring guidance the `fito-practice-execution-fact-content-generator`
4
+ agent follows when producing an ExecutionFact knowledge component's `content` for a technology of
5
+ kind **practice**. It mirrors the **registered practice `ExecutionFactTemplate` field-schema**
6
+ (v1.0.0) in the backend Knowledge Repository — the authoritative structure the generated `content`
7
+ map must conform to. Each section below corresponds to one registered field; if this file and the
8
+ registered schema ever disagree on structure, the registered schema wins.
9
+
10
+ A practice execution fact is a **declarative claim about what following the practice requires,
11
+ produces, or makes impossible** — a constraint ranging over the practice's **structural elements**
12
+ and the **forces** between them, checkable in an application (a codebase or process that claims
13
+ the practice shows the claim honored or violated). The fields below exist to carry exactly that:
14
+ the claim, the elements it ranges over, the forces it exerts on them, and the checkability that
15
+ makes it a fact.
16
+
17
+ Two levels of structure must not be conflated:
18
+
19
+ - **Field structure (Level A)** — `content` is a map of the named fields below, each
20
+ with a type (`TEXT` or `LIST`) and a requirement. It is **not** markdown.
21
+ - **Field value (Level B)** — each `TEXT` field's value is a **markdown fragment**;
22
+ each `LIST` field's value is a list of markdown fragments. Markdown is the rich-text
23
+ format *inside* a field — it never defines the field structure.
24
+
25
+ Markdown rules for every field value: fenced code blocks always carry a language
26
+ info-string; **no in-field H1** (the component's `name` is the H1 — internal headings
27
+ demote to H3 or below); no raw/inline HTML; component cross-references stay plain
28
+ markdown text (e.g. `execution-fact:hexagonal-architecture.core-compiles-without-adapters`),
29
+ not links.
30
+
31
+ Every field must be present and non-blank, in the order listed below. This schema has
32
+ **no trigger-controlled fields** and no `optional_sections_included` control field —
33
+ unlike the tool variant, a fragment is produced for every field, every time.
34
+
35
+ ## The Component Name
36
+
37
+ The component's `name` (metadata — rendered as the page H1, never repeated inside a
38
+ field value) must be a **proper, readable English sentence** stating the constraint.
39
+ It is NOT a slug conversion and NOT a copy of the fact statement.
40
+
41
+ A good name exposes both the elements it constrains and the force between them, so a
42
+ developer scanning a list of names sees immediately what each one rules out:
43
+
44
+ - "A Driven Adapter Is Bound to Its Port at Composition Time"
45
+ - "The Application Core Compiles With No Adapter on Its Classpath"
46
+ - "No Production Code Is Written Before a Failing Test Demands It"
47
+
48
+ **FORBIDDEN**:
49
+ - Do NOT convert a slug ("Driven Adapter Bound Composition Time", "Core No Adapter
50
+ Classpath"). Write the sentence.
51
+ - Do NOT name a benefit ("Hexagonal Architecture Improves Testability"). A benefit
52
+ names no arrangement and nothing could violate it.
53
+ - Do NOT write a procedural imperative ("Bind the Adapter in the Entry Point"). That
54
+ is a usage scenario's step; state what holds, not what to do.
55
+ - Do NOT state a truth that survives striking the practice from it ("Interfaces Allow
56
+ Substituting Implementations"). That belongs to programming, not to this practice.
57
+
58
+ ## Mandatory Fields
59
+
60
+ ### 1. `tl_dr` (TEXT) — TL;DR
61
+
62
+ A 2–3 sentence standalone summary that lets a developer decide in seconds whether
63
+ this execution fact is relevant. It should convey: what the constraint is, which
64
+ structural elements it ranges over, and the single most important takeaway.
65
+
66
+ Write it as a plain paragraph — no bullet points, no headings, no cross-references
67
+ to other fields. Write it **last**, after every other field is settled, so it
68
+ synthesizes rather than guesses.
69
+
70
+ **Quality gate**: If the TL;DR could apply to a different execution fact of the same
71
+ practice with only minor word changes, it is too generic. Rewrite it.
72
+
73
+ **FORBIDDEN**:
74
+ - Do NOT end the TL;DR with "Key elements: X, Y" or any similar element list.
75
+ - Do NOT simply restate the fact statement verbatim. Synthesize and expand.
76
+ - Do NOT write a generic filler sentence like "Understanding this fact is critical
77
+ for applying the practice correctly."
78
+
79
+ ### 2. `definition` (TEXT) — Definition
80
+
81
+ A precise, declarative explanation of the execution fact in narrative form. Write
82
+ in exactly two paragraphs:
83
+
84
+ - **Paragraph 1 — What holds**: State the constraint as authoritative reference
85
+ documentation: "under the practice, X holds", "X must happen at [time]", "X never
86
+ depends on Y". This paragraph must reference ALL the structural elements the claim
87
+ ranges over — the parts, roles, and artifacts the practice names — woven naturally
88
+ into the explanation, and must state the mechanism: *why* conforming produces the
89
+ constraint. Do NOT copy the fact statement verbatim; expand it with precision.
90
+ This is the claim in narrative form — the `forces` field names and classifies the
91
+ constraints it exerts, so state them here as prose rather than as a labeled list.
92
+
93
+ - **Paragraph 2 — When it applies and what it produces**: Elaborate on the conditions
94
+ under which the constraint holds. If it holds only under the declared formulation or
95
+ a named variant of the practice, say so here. Address preconditions, and connect the
96
+ constraint to its consequence: what conforming produces, and what it makes impossible.
97
+
98
+ **Quality gate — the strike test**: Remove the practice from the paragraph and ask
99
+ whether what remains is still true. If it survives — if the paragraph states a general
100
+ software-engineering truth rather than this practice's own rule — re-anchor it in the
101
+ roles only this practice defines.
102
+
103
+ **FORBIDDEN in this field**:
104
+ - Do NOT write "The structural elements involved are X, Y, Z." Elements must be
105
+ woven into the narrative, not announced in a list.
106
+ - Do NOT copy the fact statement as Paragraph 1. The statement is your starting
107
+ point; expand it with precision and mechanism.
108
+ - Do NOT write benefit prose ("this improves testability", "this makes the code
109
+ cleaner"). State the constraint that earns the benefit; the benefit itself is
110
+ not a fact.
111
+ - Do NOT write "Understanding this execution fact is critical for properly applying
112
+ the practice..." or any similar generic filler. Every sentence must carry specific
113
+ information about this specific constraint.
114
+
115
+ ### 3. `structural_elements` (LIST) — Structural Elements
116
+
117
+ A concise definition/explanation of each structural element this fact ranges over —
118
+ the parts, roles, and artifacts the practice names (a port, an adapter, the
119
+ application core, a test, a backlog item). Use the formulation's own terminology.
120
+
121
+ The binding is bidirectional: every element listed here must be named or directly
122
+ implied by the claim the `definition` states, and every element that claim names must
123
+ appear here. Do not pad the list with the practice's full vocabulary.
124
+
125
+ A LIST field: **one markdown fragment per element**, ordered by importance to the
126
+ execution fact (not alphabetically), each shaped:
127
+
128
+ ```markdown
129
+ **element name** (*kind*) — Definition: what this part, role, or artifact IS in the
130
+ practice, as its formulation defines it — a genuine, informative definition, the one
131
+ a reader needs before they can check the claim against their own codebase or process.
132
+
133
+ **Role in this fact**: how this element participates in the constraint being
134
+ documented. Be specific: what does the constraint require of, or guarantee about,
135
+ this element?
136
+ ```
137
+
138
+ The *kind* is one of: `part` (a structural piece of the codebase the practice names),
139
+ `role` (a responsibility the practice assigns), `artifact` (a thing the practice
140
+ produces or consumes — a test, a commit, a backlog item), or `other`.
141
+
142
+ **FORBIDDEN in element definitions**:
143
+ - Do NOT write "[Element] is the element central to the execution fact described
144
+ above." That is a self-reference to the component, not a definition.
145
+ - Do NOT open the definition with "In this execution fact, [Element]..." — the role
146
+ line handles the fact-specific context.
147
+ - Do NOT list a demonstrating tool's constructs as elements. The sources demonstrate
148
+ the practice with concrete tools, but the fact ranges over the practice's own
149
+ elements: a specific framework's annotation is that tool's construct, not a
150
+ structural element of the practice.
151
+ - Do NOT define the element as a general dictionary word when the formulation gives
152
+ it a specific meaning ("an adapter is a design pattern" says nothing about what an
153
+ adapter is *in this practice*).
154
+
155
+ Good examples:
156
+ - `port`: "An interface owned by the application core that names an interaction the
157
+ core needs from the outside world (driven) or offers to it (driving). Ports are
158
+ declared in the core's own source, in the core's own vocabulary — they mention no
159
+ transport, no framework, and no adapter."
160
+ - `composition root`: "The entry point where the running application is assembled:
161
+ the one place that instantiates adapters and hands them to the core through its
162
+ ports. In a test harness, the harness itself plays this role."
163
+
164
+ ### 4. `forces` (LIST) — Forces
165
+
166
+ The constraints this fact places on the elements listed above — the *how* to their
167
+ *what*. Where the tool variant carries a callable's formal signature, a practice fact
168
+ is carried by how its elements are constrained, so this field replaces it.
169
+
170
+ Use the identifying pipeline's own category vocabulary as each entry's label, so the
171
+ classification the fact was identified under survives into the published component:
172
+ `dependency-direction`, `binding-time`, `ordering-constraint`, `placement-ownership`,
173
+ `visibility-boundary`, `substitutability`, `structural-consequence`,
174
+ `process-consequence`, `prerequisite`, `violation-consequence`, `scope-limit`.
175
+
176
+ A LIST field: **one markdown fragment per force the fact carries**, ordered with the
177
+ force the claim turns on first, each shaped:
178
+
179
+ ```markdown
180
+ **category-token** — The concrete relation this force imposes, stated over the
181
+ elements listed in `structural_elements`: which one, in what direction, at what time,
182
+ in whose ownership.
183
+
184
+ **Elements bound**: the elements this force relates.
185
+ ```
186
+
187
+ Each entry must name a **distinct** constraint. A fact carrying several forces states
188
+ a different relation under each label — the same sentence under two labels is one
189
+ force wearing two names, and only the one that fits belongs.
190
+
191
+ Match the entry to the category's defining characteristic: `ordering-constraint`
192
+ names a sequence, `prerequisite` names what must already hold, `scope-limit` names
193
+ territory the formulation deliberately declines. A gap in the sources is not a scope
194
+ limit.
195
+
196
+ **FORBIDDEN in force entries**:
197
+ - Do NOT invent a label outside the vocabulary above ("relationship", "behavior",
198
+ "general concern"). If no category fits, the candidate is likely not a fact.
199
+ - Do NOT restate the category's generic description without binding this fact's own
200
+ elements — "dependency-direction: dependencies point the right way" says nothing.
201
+ - Do NOT list every force the practice exerts anywhere. Only the ones this atomic
202
+ fact carries, grounded in the sources.
203
+ - Do NOT describe how to check the constraint here; that is the `violation` field's
204
+ job, and splitting it across both leaves a reader two half-answers.
205
+
206
+ ### 5. `violation` (TEXT) — Recognizing a Violation
207
+
208
+ What breaching this constraint looks like in a concrete application — the checkable
209
+ half of the fact, made inspectable. A developer who has read this field can look at
210
+ a codebase or process that claims the practice and say whether this claim is honored
211
+ or violated.
212
+
213
+ One markdown fragment. For each concrete breach form (bold breach title, then a
214
+ short bullet list):
215
+
216
+ - **What breaks the claim**: the concrete arrangement — an import, a declaration in
217
+ the wrong place, a commit shape, a skipped step — that shows the constraint breached
218
+ - **Where to look**: where the breach is visible — import lists, build files, type
219
+ signatures, the commit history, the test run's transcript, the backlog
220
+ - **What it forfeits**: what conforming would have bought, stated concretely — the
221
+ property that stops being true once the breach exists
222
+
223
+ Keep it inspection-oriented: a reviewer, a linter, or an architecture test could run
224
+ the check. If the fact's footprint is the process, the inspection targets process
225
+ records (history, CI runs, review notes), not code.
226
+
227
+ **FORBIDDEN in this field**:
228
+ - Do NOT describe a "violation" no concrete application could exhibit. If nothing
229
+ could breach the claim, the claim is a benefit statement, not an execution fact —
230
+ and the defect is in the fact, not in this field.
231
+ - Do NOT write "the team is not following the practice properly" or any restatement
232
+ that names no concrete arrangement.
233
+ - Do NOT appeal to "code smells" or "bad design" without naming the specific
234
+ observable form the breach takes.
235
+
236
+ ### 6. `application_example` (TEXT) — Example in an Application
237
+
238
+ One markdown fragment: the smallest possible demonstration of the constraint in an
239
+ application of the practice — a codebase or a development process that follows it.
240
+ The goal is to make the claim **observable**.
241
+
242
+ **Rules by `footprint`** — the identify record's value for **this fact** governs, and it
243
+ fixes what is available to you. It is the identifier's reading of the evidence it cited,
244
+ not a judgment to revisit while writing, and it is not the practice's overall footprint
245
+ from `metadata`:
246
+ - **Code-footprint facts**: Real, minimal code in a language-tagged fenced code block,
247
+ showing the constraint honored. A contrasting violating arrangement may follow when
248
+ the contrast is what makes the constraint visible.
249
+ - **Process-footprint facts**: The process artifact that exhibits the constraint — a
250
+ commit sequence, a test-run transcript, a backlog snapshot — in a fenced block
251
+ (```` ```text ```` or the artifact's own format), with the constraint's trace
252
+ pointed out.
253
+ - **Facts with both footprints**: Pick the footprint where the constraint is most
254
+ directly observable.
255
+
256
+ Requirements:
257
+ - **Minimal**: Only what is necessary to exhibit the constraint.
258
+ - **Annotated**: *Why* comments, not *what* comments.
259
+ - **Practice-level takeaway**: A demonstrating tool in the example is scaffolding.
260
+ After the fenced block, 2–4 sentences on how the example exhibits the claim, stated
261
+ over the practice's structural elements — never over the scaffolding's API. Do not
262
+ restate the inline comments.
263
+
264
+ **FORBIDDEN in this field**:
265
+ - Do NOT fabricate code for a fact whose footprint is the process. Forcing code where
266
+ the constraint does not land on code invents what the sources never showed; show the
267
+ process artifact instead.
268
+ - Do NOT fabricate a process artifact for a code-footprint fact either. The rule runs
269
+ both ways; the artifact must be the one the practice actually produces.
270
+ - Do NOT re-label the fact's footprint to suit the example you would rather write. A
271
+ value the record contradicts is **reported**, never quietly changed: re-labelling
272
+ `process` to `code` is how invented code gets licensed rather than committed, and no
273
+ later check catches it.
274
+ - Do NOT let the example demonstrate the scaffolding tool's behavior instead of the
275
+ practice's constraint.
276
+ - Do NOT restate the definition in prose with no observable artifact — this field
277
+ exists to show the claim, not to repeat it.
278
+
279
+ ### 7. `related_execution_facts` (TEXT) — Related Execution Facts
280
+
281
+ A narrative — not a flat list — discussing related execution facts and how they
282
+ compose with or differ from this one.
283
+
284
+ For each related fact, state the **specific relationship type**:
285
+ - **Prerequisite**: Must hold before this fact applies
286
+ - **Consequence**: Follows from or is produced by this fact
287
+ - **Alternative**: A different constraint achieving a similar effect (e.g. under a
288
+ variant reading of the practice)
289
+ - **Commonly confused**: Appears similar but differs in a key way
290
+ - **Complementary**: Works together with this fact wherever the practice is applied
291
+ - **Overrides**: Supersedes this fact under certain conditions
292
+
293
+ Where a related fact exists as a live component in the backend Knowledge Repository,
294
+ reference it by its canonical id as plain markdown text; otherwise describe the
295
+ constraint in prose. Never reference identify-pipeline ids — the component must stand
296
+ alone in the Knowledge Repository.
297
+
298
+ **FORBIDDEN in this field**:
299
+ - Do NOT use "related" as a relationship type — every relationship must be one of
300
+ the specific types listed above.
301
+ - Do NOT write the narrative as a bulleted list of truncated statements. Write real
302
+ prose that explains HOW the constraints connect.
303
+ - Do NOT end with generic filler like "Understanding how these facts compose helps
304
+ in applying the practice." — every sentence must carry specific content.
305
+ - Do NOT write "Other execution facts address related aspects..." as a substitute
306
+ for actual references.
307
+
308
+ Good example of a `related_execution_facts` narrative:
309
+ "A direct prerequisite is that ports are declared in and owned by the application
310
+ core (`execution-fact:hexagonal-architecture.ports-owned-by-the-core`) — binding an
311
+ adapter at the composition root only decouples the core if the interface being bound
312
+ to is the core's own. The downstream consequence is compilation independence: because
313
+ every adapter binding lives outside the core, the core compiles with no adapter on
314
+ its classpath, which is the whole-codebase form of the same force."
315
+
316
+ If no related fact is grounded — none in the analyzed sources and none live in the
317
+ Knowledge Repository — the field's value is the single statement: "No directly
318
+ related execution facts identified for this constraint." The field is required
319
+ regardless.
320
+
321
+ This is the narrow case, not the easy one. **A fact identified in the same run is a
322
+ grounded candidate**, so a practice whose sources yielded a dozen facts almost never
323
+ reaches it: the first fact pushed for a brand-new practice has no siblings *in the
324
+ repository*, and its siblings in the same identify output are what this field is for.
325
+ Reach the escape only when the constraint genuinely stands alone.
326
+
327
+ ### 8. `misconceptions_and_pitfalls` (TEXT) — Common Misconceptions and Pitfalls
328
+
329
+ Things developers frequently get wrong about this execution fact. One markdown
330
+ fragment holding every entry, each under an **H3 title**, following the pattern:
331
+
332
+ - **Misconception**: What developers commonly believe or assume
333
+ - **Reality**: What is actually true under the practice's declared formulation
334
+ - **Why it matters**: What goes wrong in practice
335
+
336
+ The highest-value entries are the **cargo-cult conformances**: arrangements that keep
337
+ the practice's vocabulary while breaking this fact's constraint — things called ports
338
+ and adapters with dependencies pointing the wrong way. A codebase can use every word
339
+ the practice defines and still violate the claim; that gap is exactly what this field
340
+ documents. Contested readings mistaken for the declared formulation's rule belong
341
+ here too.
342
+
343
+ **FORBIDDEN in this field**:
344
+ - Do NOT include complaints about the sources ("the formulation is ambiguous",
345
+ "accounts differ across books") as a misconception. A genuinely contested reading
346
+ is stated as one: what the declared formulation says, and what the rival reading
347
+ says instead.
348
+ - Do NOT invent generic filler misconceptions. Only include ones that are
349
+ practically significant — wrong dependency graphs, hollow test suites, process
350
+ theater.
351
+ - Do NOT write entries about the practice in general. Every entry is about *this*
352
+ constraint.
353
+
354
+ If no significant misconceptions exist, the field's value is the single statement:
355
+ "No significant misconceptions identified for this execution fact." The field is
356
+ required regardless.
357
+
358
+ ## Field Order
359
+
360
+ Fields appear in this fixed order in the `content` map:
361
+
362
+ 1. `tl_dr` *(written last, once every other field is settled)*
363
+ 2. `definition`
364
+ 3. `structural_elements`
365
+ 4. `forces`
366
+ 5. `violation`
367
+ 6. `application_example`
368
+ 7. `related_execution_facts`
369
+ 8. `misconceptions_and_pitfalls`
370
+
371
+ Every field is mandatory and always present — this schema has no trigger-controlled
372
+ fields and no control field.