intent-format 0.0.0-stage → 1.2.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 (175) hide show
  1. package/.github/ISSUE_TEMPLATE/1-something-wrong.yml +18 -0
  2. package/.github/ISSUE_TEMPLATE/2-idea.yml +11 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. package/AGENTS.md +11 -0
  5. package/CHANGELOG.md +288 -0
  6. package/CLAUDE.md +1 -0
  7. package/CODE_OF_CONDUCT.md +128 -0
  8. package/CONTRIBUTING.md +19 -0
  9. package/LICENSE +21 -0
  10. package/README.md +72 -2
  11. package/SECURITY.md +10 -0
  12. package/VERSION +1 -0
  13. package/examples/example-app/AGENTS.md +19 -0
  14. package/examples/example-app/CLAUDE.md +1 -0
  15. package/examples/example-app/V1.0/apis/_index.md +14 -0
  16. package/examples/example-app/V1.0/apis/ap000001-list-items.md +20 -0
  17. package/examples/example-app/V1.0/apis/ap000002-save-item.md +28 -0
  18. package/examples/example-app/V1.0/backend/_index.md +15 -0
  19. package/examples/example-app/V1.0/backend/bn000001-app-server.md +24 -0
  20. package/examples/example-app/V1.0/backend/bn000002-main-database.md +22 -0
  21. package/examples/example-app/V1.0/backend/bn000003-file-storage.md +22 -0
  22. package/examples/example-app/V1.0/comments/_index.md +13 -0
  23. package/examples/example-app/V1.0/comments/cm000001-empty-list-message.md +15 -0
  24. package/examples/example-app/V1.0/components/_index.md +16 -0
  25. package/examples/example-app/V1.0/components/cp000001-button.md +32 -0
  26. package/examples/example-app/V1.0/components/cp000002-text-field.md +31 -0
  27. package/examples/example-app/V1.0/components/cp000003-item-row.md +34 -0
  28. package/examples/example-app/V1.0/components/cp000004-top-bar.md +26 -0
  29. package/examples/example-app/V1.0/decisions/_index.md +13 -0
  30. package/examples/example-app/V1.0/decisions/dc000001-where-do-item-images-live.md +26 -0
  31. package/examples/example-app/V1.0/edge-cases/_index.md +13 -0
  32. package/examples/example-app/V1.0/edge-cases/ec000001-save-fails.md +24 -0
  33. package/examples/example-app/V1.0/features/_index.md +17 -0
  34. package/examples/example-app/V1.0/features/ft000001-items.md +22 -0
  35. package/examples/example-app/V1.0/features/ft000002-account.md +21 -0
  36. package/examples/example-app/V1.0/features/ft000003-browse-items.md +26 -0
  37. package/examples/example-app/V1.0/features/ft000004-edit-an-item.md +33 -0
  38. package/examples/example-app/V1.0/features/ft000005-change-settings.md +21 -0
  39. package/examples/example-app/V1.0/ia/_index.md +13 -0
  40. package/examples/example-app/V1.0/ia/ia000001-main-map.md +23 -0
  41. package/examples/example-app/V1.0/intent-format.md +12 -0
  42. package/examples/example-app/V1.0/project.md +51 -0
  43. package/examples/example-app/V1.0/roles/_index.md +14 -0
  44. package/examples/example-app/V1.0/roles/ro000001-member.md +22 -0
  45. package/examples/example-app/V1.0/roles/ro000002-admin.md +19 -0
  46. package/examples/example-app/V1.0/rules/_index.md +13 -0
  47. package/examples/example-app/V1.0/rules/rl000001-item-name-is-required.md +20 -0
  48. package/examples/example-app/V1.0/screens/_index.md +17 -0
  49. package/examples/example-app/V1.0/screens/sc000001-home.md +18 -0
  50. package/examples/example-app/V1.0/screens/sc000002-item-list.md +43 -0
  51. package/examples/example-app/V1.0/screens/sc000003-item-detail.md +24 -0
  52. package/examples/example-app/V1.0/screens/sc000004-edit-item.md +35 -0
  53. package/examples/example-app/V1.0/screens/sc000005-settings.md +19 -0
  54. package/examples/example-app/V1.0/shells/_index.md +8 -0
  55. package/examples/example-app/V1.0/tech/_index.md +14 -0
  56. package/examples/example-app/V1.0/tech/tc000001-ui-framework.md +23 -0
  57. package/examples/example-app/V1.0/tech/tc000002-relational-database.md +25 -0
  58. package/examples/example-app/V1.0/userflows/_index.md +14 -0
  59. package/examples/example-app/V1.0/userflows/uf000001-create-an-item.md +66 -0
  60. package/examples/example-app/V1.0/userflows/uf000002-edit-an-item.md +47 -0
  61. package/examples/example-app/V1.1/CHANGES.md +12 -0
  62. package/examples/example-app/V1.1/apis/_index.md +14 -0
  63. package/examples/example-app/V1.1/apis/ap000001-list-items.md +20 -0
  64. package/examples/example-app/V1.1/apis/ap000002-save-item.md +28 -0
  65. package/examples/example-app/V1.1/backend/_index.md +15 -0
  66. package/examples/example-app/V1.1/backend/bn000001-app-server.md +24 -0
  67. package/examples/example-app/V1.1/backend/bn000002-main-database.md +22 -0
  68. package/examples/example-app/V1.1/backend/bn000003-file-storage.md +22 -0
  69. package/examples/example-app/V1.1/comments/_index.md +14 -0
  70. package/examples/example-app/V1.1/comments/cm000001-empty-list-message.md +15 -0
  71. package/examples/example-app/V1.1/comments/cm000002-filter-placement.md +12 -0
  72. package/examples/example-app/V1.1/components/_index.md +16 -0
  73. package/examples/example-app/V1.1/components/cp000001-button.md +32 -0
  74. package/examples/example-app/V1.1/components/cp000002-text-field.md +32 -0
  75. package/examples/example-app/V1.1/components/cp000003-item-row.md +34 -0
  76. package/examples/example-app/V1.1/components/cp000004-top-bar.md +26 -0
  77. package/examples/example-app/V1.1/decisions/_index.md +13 -0
  78. package/examples/example-app/V1.1/decisions/dc000001-where-do-item-images-live.md +26 -0
  79. package/examples/example-app/V1.1/edge-cases/_index.md +13 -0
  80. package/examples/example-app/V1.1/edge-cases/ec000001-save-fails.md +24 -0
  81. package/examples/example-app/V1.1/features/_index.md +17 -0
  82. package/examples/example-app/V1.1/features/ft000001-items.md +22 -0
  83. package/examples/example-app/V1.1/features/ft000002-account.md +21 -0
  84. package/examples/example-app/V1.1/features/ft000003-browse-items.md +26 -0
  85. package/examples/example-app/V1.1/features/ft000004-edit-an-item.md +33 -0
  86. package/examples/example-app/V1.1/features/ft000005-change-settings.md +21 -0
  87. package/examples/example-app/V1.1/ia/_index.md +13 -0
  88. package/examples/example-app/V1.1/ia/ia000001-main-map.md +23 -0
  89. package/examples/example-app/V1.1/intent-format.md +13 -0
  90. package/examples/example-app/V1.1/project.md +51 -0
  91. package/examples/example-app/V1.1/roles/_index.md +14 -0
  92. package/examples/example-app/V1.1/roles/ro000001-member.md +22 -0
  93. package/examples/example-app/V1.1/roles/ro000002-admin.md +19 -0
  94. package/examples/example-app/V1.1/rules/_index.md +13 -0
  95. package/examples/example-app/V1.1/rules/rl000001-item-name-is-required.md +20 -0
  96. package/examples/example-app/V1.1/screens/_index.md +17 -0
  97. package/examples/example-app/V1.1/screens/sc000001-home.md +18 -0
  98. package/examples/example-app/V1.1/screens/sc000002-item-list.md +44 -0
  99. package/examples/example-app/V1.1/screens/sc000003-item-detail.md +24 -0
  100. package/examples/example-app/V1.1/screens/sc000004-edit-item.md +35 -0
  101. package/examples/example-app/V1.1/screens/sc000005-settings.md +19 -0
  102. package/examples/example-app/V1.1/shells/_index.md +8 -0
  103. package/examples/example-app/V1.1/tech/_index.md +14 -0
  104. package/examples/example-app/V1.1/tech/tc000001-ui-framework.md +23 -0
  105. package/examples/example-app/V1.1/tech/tc000002-relational-database.md +25 -0
  106. package/examples/example-app/V1.1/userflows/_index.md +14 -0
  107. package/examples/example-app/V1.1/userflows/uf000001-create-an-item.md +66 -0
  108. package/examples/example-app/V1.1/userflows/uf000002-edit-an-item.md +47 -0
  109. package/examples/example-app/_ids.md +78 -0
  110. package/examples/example-app/_index.md +14 -0
  111. package/examples/example-app/inputs/brief.md +3 -0
  112. package/examples/example-app/inputs/links.md +3 -0
  113. package/kit/cli/README.md +128 -0
  114. package/kit/cli/intent-format.mjs +342 -0
  115. package/kit/cli/lib/agents.mjs +39 -0
  116. package/kit/cli/lib/check.mjs +412 -0
  117. package/kit/cli/lib/create.mjs +190 -0
  118. package/kit/cli/lib/frame.mjs +182 -0
  119. package/kit/cli/lib/generate.mjs +418 -0
  120. package/kit/cli/lib/kit.mjs +203 -0
  121. package/kit/cli/lib/migrate.mjs +97 -0
  122. package/kit/cli/lib/model.mjs +409 -0
  123. package/kit/cli/lib/next.mjs +134 -0
  124. package/kit/cli/lib/open.mjs +34 -0
  125. package/kit/cli/lib/parse.mjs +260 -0
  126. package/kit/cli/lib/project.mjs +120 -0
  127. package/kit/cli/lib/regen.mjs +112 -0
  128. package/kit/cli/lib/relations.mjs +380 -0
  129. package/kit/cli/lib/rename.mjs +23 -0
  130. package/kit/cli/lib/schema.mjs +185 -0
  131. package/kit/cli/lib/templates.mjs +41 -0
  132. package/kit/cli/lib/util.mjs +165 -0
  133. package/kit/cli/test/nav.mjs +145 -0
  134. package/kit/cli/test/roles.mjs +85 -0
  135. package/kit/cli/test/smoke.mjs +716 -0
  136. package/kit/skills/intent-format/SKILL.md +91 -0
  137. package/kit/skills/intent-format/links.md +142 -0
  138. package/kit/skills/intent-format/types/_overview.md +73 -0
  139. package/kit/skills/intent-format/types/api.md +111 -0
  140. package/kit/skills/intent-format/types/backend.md +110 -0
  141. package/kit/skills/intent-format/types/comment.md +66 -0
  142. package/kit/skills/intent-format/types/component.md +139 -0
  143. package/kit/skills/intent-format/types/decision.md +91 -0
  144. package/kit/skills/intent-format/types/edge-case.md +107 -0
  145. package/kit/skills/intent-format/types/feature.md +154 -0
  146. package/kit/skills/intent-format/types/ia.md +106 -0
  147. package/kit/skills/intent-format/types/project.md +131 -0
  148. package/kit/skills/intent-format/types/role.md +98 -0
  149. package/kit/skills/intent-format/types/rule.md +100 -0
  150. package/kit/skills/intent-format/types/screen.md +153 -0
  151. package/kit/skills/intent-format/types/shell.md +156 -0
  152. package/kit/skills/intent-format/types/tech.md +109 -0
  153. package/kit/skills/intent-format/types/userflow.md +197 -0
  154. package/kit/skills/kb-cold-start/SKILL.md +124 -0
  155. package/kit/skills/kb-cold-start/kickoff-questionnaire.md +42 -0
  156. package/kit/skills/kb-cold-start/templates.md +108 -0
  157. package/package.json +30 -4
  158. package/rationale.md +180 -0
  159. package/schema.json +5895 -0
  160. package/spec.md +1173 -0
  161. package/templates/api.md +16 -0
  162. package/templates/backend.md +15 -0
  163. package/templates/comment.md +11 -0
  164. package/templates/component.md +15 -0
  165. package/templates/decision.md +23 -0
  166. package/templates/edge-case.md +14 -0
  167. package/templates/feature.md +14 -0
  168. package/templates/ia.md +14 -0
  169. package/templates/project.md +34 -0
  170. package/templates/role.md +14 -0
  171. package/templates/rule.md +14 -0
  172. package/templates/screen.md +14 -0
  173. package/templates/shell.md +24 -0
  174. package/templates/tech.md +18 -0
  175. package/templates/userflow.md +20 -0
@@ -0,0 +1,24 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: screen
4
+ id: SC000003
5
+ name: Item detail
6
+ status: In design
7
+ feature: FT000003
8
+ ---
9
+ # Item detail · #SC000003
10
+ > ⚙ #SC000003V1.1 · V1.1 in-progress · based on V1.0 · unchanged
11
+
12
+ ## Description
13
+ Shows one item with all its details.
14
+
15
+ ## Components
16
+ 1. [#CP000004 Top bar](../components/cp000004-top-bar.md)
17
+ 2. [#CP000001 Button](../components/cp000001-button.md) — edits the item
18
+
19
+ ## ⚙ On maps
20
+ - [#IA000001 Main map](../ia/ia000001-main-map.md) · under: #SC000002
21
+
22
+ ## ⚙ In user flows
23
+ - [#UF000002 Edit an item](../userflows/uf000002-edit-an-item.md) · at: #FS000006
24
+ - [#UF000002 Edit an item](../userflows/uf000002-edit-an-item.md) · at: #FS000009
@@ -0,0 +1,35 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: screen
4
+ id: SC000004
5
+ name: Edit item
6
+ status: In design
7
+ feature: FT000004
8
+ opens-as: Side panel
9
+ ---
10
+ # Edit item · #SC000004
11
+ > ⚙ #SC000004V1.1 · V1.1 in-progress · based on V1.0 · unchanged
12
+
13
+ ## Description
14
+ Lets a Member change an item's name and notes.
15
+
16
+ ## Rules
17
+ - [#RL000001 Item name is required](../rules/rl000001-item-name-is-required.md)
18
+
19
+ ## Components
20
+ 1. [#CP000004 Top bar](../components/cp000004-top-bar.md)
21
+ 2. [#CP000002 Text field](../components/cp000002-text-field.md) — item name
22
+ 3. [#CP000001 Button](../components/cp000001-button.md) — saves the item
23
+
24
+ ## APIs
25
+ - [#AP000002 Save item](../apis/ap000002-save-item.md)
26
+
27
+ ## ⚙ On maps
28
+ - [#IA000001 Main map](../ia/ia000001-main-map.md) · under: #SC000003
29
+
30
+ ## ⚙ In user flows
31
+ - [#UF000001 Create an item](../userflows/uf000001-create-an-item.md) · at: #FS000002
32
+ - [#UF000002 Edit an item](../userflows/uf000002-edit-an-item.md) · at: #FS000007
33
+
34
+ ## ⚙ Edge cases
35
+ - [#EC000001 Save fails](../edge-cases/ec000001-save-fails.md) · severity: Medium
@@ -0,0 +1,19 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: screen
4
+ id: SC000005
5
+ name: Settings
6
+ status: Idea
7
+ feature: FT000005
8
+ ---
9
+ # Settings · #SC000005
10
+ > ⚙ #SC000005V1.1 · V1.1 in-progress · based on V1.0 · unchanged
11
+
12
+ ## Description
13
+ Lets a Member change how the app behaves.
14
+
15
+ ## Components
16
+ 1. [#CP000004 Top bar](../components/cp000004-top-bar.md)
17
+
18
+ ## ⚙ On maps
19
+ - [#IA000001 Main map](../ia/ia000001-main-map.md) · under: #SC000001
@@ -0,0 +1,8 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: index
4
+ name: Shells
5
+ ---
6
+ # Shells
7
+
8
+ The frame around places: what is always there, where it leads, and the rules for whatever it frames. Described once, resolved per placement.
@@ -0,0 +1,14 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: index
4
+ name: Tech
5
+ ---
6
+ # Tech
7
+
8
+ A technology the product uses or considers: what it is, why, and the alternatives.
9
+
10
+ ## ⚙ Contents
11
+ | ID | Name | Status | One-liner | Blind spots |
12
+ |---|---|---|---|---|
13
+ | [#TC000001](tc000001-ui-framework.md) | UI framework | Adopted | Renders every screen and component of the app. | 0 |
14
+ | [#TC000002](tc000002-relational-database.md) | Relational database | Adopted | Keeps items and settings in tables with transactions. | 0 |
@@ -0,0 +1,23 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: tech
4
+ id: TC000001
5
+ name: UI framework
6
+ status: Adopted
7
+ category: Frontend
8
+ ---
9
+ # UI framework · #TC000001
10
+ > ⚙ #TC000001V1.1 · V1.1 in-progress · based on V1.0 · unchanged
11
+
12
+ ## Description
13
+ Renders every screen and component of the app.
14
+
15
+ ## Why
16
+ One component model for the web and mobile screens.
17
+
18
+ ## Alternatives
19
+ none
20
+
21
+ ## ⚙ Used by
22
+ - [#PR000001 Example app](../project.md)
23
+ - [#CP000004 Top bar](../components/cp000004-top-bar.md)
@@ -0,0 +1,25 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: tech
4
+ id: TC000002
5
+ name: Relational database
6
+ status: Adopted
7
+ category: Data & storage
8
+ tech-version: "16"
9
+ license: Open source
10
+ ---
11
+ # Relational database · #TC000002
12
+ > ⚙ #TC000002V1.1 · V1.1 in-progress · based on V1.0 · unchanged
13
+
14
+ ## Description
15
+ Keeps items and settings in tables with transactions.
16
+
17
+ ## Why
18
+ Items have a fixed shape and need safe concurrent updates.
19
+
20
+ ## Alternatives
21
+ - [~ Document database]
22
+
23
+ ## ⚙ Used by
24
+ - [#PR000001 Example app](../project.md)
25
+ - [#BN000002 Main database](../backend/bn000002-main-database.md)
@@ -0,0 +1,14 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: index
4
+ name: User flows
5
+ ---
6
+ # User flows
7
+
8
+ A journey in one file: typed steps, an ordered step list per variant, and fork wiring.
9
+
10
+ ## ⚙ Contents
11
+ | ID | Name | Status | Feature | One-liner | Blind spots |
12
+ |---|---|---|---|---|---|
13
+ | [#UF000001](uf000001-create-an-item.md) | Create an item | In design | [#FT000004 Edit an item](../features/ft000004-edit-an-item.md) | A Member adds a new item from the Item list and returns to the list with the item saved. | 0 |
14
+ | [#UF000002](uf000002-edit-an-item.md) | Edit an item | In design | [#FT000004 Edit an item](../features/ft000004-edit-an-item.md) | A Member changes an existing item and returns to its details. | 0 |
@@ -0,0 +1,66 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: userflow
4
+ id: UF000001
5
+ name: Create an item
6
+ status: In design
7
+ feature: FT000004
8
+ ---
9
+ # Create an item · #UF000001
10
+ > ⚙ #UF000001V1.1 · V1.1 in-progress · based on V1.0 · unchanged
11
+
12
+ ## Description
13
+ A Member adds a new item from the Item list and returns to the list with the item saved.
14
+
15
+ ## Why
16
+ The main use case of Items: without it nothing gets into the list.
17
+
18
+ ## Step list
19
+ 1. [#FS000001 Start from the list](#fs000001)
20
+ 2. [#FS000002 Enter item details](#fs000002)
21
+ 3. [#FS000003 Name valid?](#fs000003)
22
+ 4. [#FS000004 Save the item](#fs000004)
23
+ 5. [#FS000005 Item created](#fs000005)
24
+
25
+ ### Quick add
26
+ platform: Mobile
27
+
28
+ 1. [#FS000001 Start from the list](#fs000001)
29
+ 2. [#FS000002 Enter item details](#fs000002)
30
+ 3. [#FS000004 Save the item](#fs000004)
31
+ 4. [#FS000005 Item created](#fs000005)
32
+
33
+ ## Steps
34
+ ### ○ Start from the list · #FS000001
35
+ <a id="fs000001"></a>
36
+
37
+ - Entry: the Member taps Create on the Item list.
38
+ - Screen: [#SC000002 Item list](../screens/sc000002-item-list.md)
39
+
40
+ ### □ Enter item details · #FS000002
41
+ <a id="fs000002"></a>
42
+
43
+ - Screen: [#SC000004 Edit item](../screens/sc000004-edit-item.md)
44
+ - Component: [#CP000002 Text field](../components/cp000002-text-field.md)
45
+
46
+ The Member types a name and optional notes.
47
+
48
+ ### ◇ Name valid? · #FS000003
49
+ <a id="fs000003"></a>
50
+
51
+ - Branch: Yes → [#FS000004 Save the item](#fs000004) · primary
52
+ - Branch: No → [#FS000002 Enter item details](#fs000002) · rule: #RL000001
53
+
54
+ ### ⚡ Save the item · #FS000004
55
+ <a id="fs000004"></a>
56
+
57
+ - API: [#AP000002 Save item](../apis/ap000002-save-item.md)
58
+
59
+ ### ◎ Item created · #FS000005
60
+ <a id="fs000005"></a>
61
+
62
+ - Outcome: the new item is saved and shown on the Item list.
63
+ - Screen: [#SC000002 Item list](../screens/sc000002-item-list.md)
64
+
65
+ ## ⚙ Edge cases
66
+ - [#EC000001 Save fails](../edge-cases/ec000001-save-fails.md) · at: #FS000004 · severity: Medium
@@ -0,0 +1,47 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: userflow
4
+ id: UF000002
5
+ name: Edit an item
6
+ status: In design
7
+ feature: FT000004
8
+ ---
9
+ # Edit an item · #UF000002
10
+ > ⚙ #UF000002V1.1 · V1.1 in-progress · based on V1.0 · unchanged
11
+
12
+ ## Description
13
+ A Member changes an existing item and returns to its details.
14
+
15
+ ## Why
16
+ Details change; the list must follow.
17
+
18
+ ## Step list
19
+ 1. [#FS000006 Open the item](#fs000006)
20
+ 2. [#FS000007 Change the details](#fs000007)
21
+ 3. [#FS000008 Save the changes](#fs000008)
22
+ 4. [#FS000009 Item updated](#fs000009)
23
+
24
+ ## Steps
25
+ ### ○ Open the item · #FS000006
26
+ <a id="fs000006"></a>
27
+
28
+ - Entry: the Member chooses an item on the Item list.
29
+ - Screen: [#SC000003 Item detail](../screens/sc000003-item-detail.md)
30
+
31
+ ### □ Change the details · #FS000007
32
+ <a id="fs000007"></a>
33
+
34
+ - Screen: [#SC000004 Edit item](../screens/sc000004-edit-item.md)
35
+ - Component: [#CP000002 Text field](../components/cp000002-text-field.md)
36
+
37
+ ### ⚡ Save the changes · #FS000008
38
+ <a id="fs000008"></a>
39
+
40
+ - API: [#AP000002 Save item](../apis/ap000002-save-item.md)
41
+ - Applies rule: [#RL000001 Item name is required](../rules/rl000001-item-name-is-required.md)
42
+
43
+ ### ◎ Item updated · #FS000009
44
+ <a id="fs000009"></a>
45
+
46
+ - Outcome: the changes are saved and shown on Item detail.
47
+ - Screen: [#SC000003 Item detail](../screens/sc000003-item-detail.md)
@@ -0,0 +1,78 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: index
4
+ name: ID register
5
+ ---
6
+ # ID register
7
+
8
+ ## ⚙ Resolved
9
+ | Core | Type | Name | Versions | Path |
10
+ |---|---|---|---|---|
11
+ | AP000001 | api | List items | 1.0, 1.1 | V1.1/apis/ap000001-list-items.md |
12
+ | AP000002 | api | Save item | 1.0, 1.1 | V1.1/apis/ap000002-save-item.md |
13
+ | BN000001 | backend | App server | 1.0, 1.1 | V1.1/backend/bn000001-app-server.md |
14
+ | BN000002 | backend | Main database | 1.0, 1.1 | V1.1/backend/bn000002-main-database.md |
15
+ | BN000003 | backend | File storage | 1.0, 1.1 | V1.1/backend/bn000003-file-storage.md |
16
+ | CM000001 | comment | Empty-list message | 1.0, 1.1 | V1.1/comments/cm000001-empty-list-message.md |
17
+ | CM000002 | comment | Filter placement | 1.1 | V1.1/comments/cm000002-filter-placement.md |
18
+ | CP000001 | component | Button | 1.0, 1.1 | V1.1/components/cp000001-button.md |
19
+ | CP000002 | component | Text field | 1.0, 1.1 | V1.1/components/cp000002-text-field.md |
20
+ | CP000003 | component | Item row | 1.0, 1.1 | V1.1/components/cp000003-item-row.md |
21
+ | CP000004 | component | Top bar | 1.0, 1.1 | V1.1/components/cp000004-top-bar.md |
22
+ | CV000001 | component-variant | Compact | 1.0, 1.1 | V1.1/components/cp000003-item-row.md#cv000001 |
23
+ | DC000001 | decision | Where do item images live? | 1.0, 1.1 | V1.1/decisions/dc000001-where-do-item-images-live.md |
24
+ | EC000001 | edge-case | Save fails | 1.0, 1.1 | V1.1/edge-cases/ec000001-save-fails.md |
25
+ | FS000001 | flow-step | Start from the list | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md#fs000001 |
26
+ | FS000002 | flow-step | Enter item details | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md#fs000002 |
27
+ | FS000003 | flow-step | Name valid? | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md#fs000003 |
28
+ | FS000004 | flow-step | Save the item | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md#fs000004 |
29
+ | FS000005 | flow-step | Item created | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md#fs000005 |
30
+ | FS000006 | flow-step | Open the item | 1.0, 1.1 | V1.1/userflows/uf000002-edit-an-item.md#fs000006 |
31
+ | FS000007 | flow-step | Change the details | 1.0, 1.1 | V1.1/userflows/uf000002-edit-an-item.md#fs000007 |
32
+ | FS000008 | flow-step | Save the changes | 1.0, 1.1 | V1.1/userflows/uf000002-edit-an-item.md#fs000008 |
33
+ | FS000009 | flow-step | Item updated | 1.0, 1.1 | V1.1/userflows/uf000002-edit-an-item.md#fs000009 |
34
+ | FT000001 | feature | Items | 1.0, 1.1 | V1.1/features/ft000001-items.md |
35
+ | FT000002 | feature | Account | 1.0, 1.1 | V1.1/features/ft000002-account.md |
36
+ | FT000003 | feature | Browse items | 1.0, 1.1 | V1.1/features/ft000003-browse-items.md |
37
+ | FT000004 | feature | Edit an item | 1.0, 1.1 | V1.1/features/ft000004-edit-an-item.md |
38
+ | FT000005 | feature | Change settings | 1.0, 1.1 | V1.1/features/ft000005-change-settings.md |
39
+ | IA000001 | ia | Main map | 1.0, 1.1 | V1.1/ia/ia000001-main-map.md |
40
+ | PR000001 | project | Example app | 1.0, 1.1 | V1.1/project.md |
41
+ | RL000001 | rule | Item name is required | 1.0, 1.1 | V1.1/rules/rl000001-item-name-is-required.md |
42
+ | RO000001 | role | Member | 1.0, 1.1 | V1.1/roles/ro000001-member.md |
43
+ | RO000002 | role | Admin | 1.0, 1.1 | V1.1/roles/ro000002-admin.md |
44
+ | SC000001 | screen | Home | 1.0, 1.1 | V1.1/screens/sc000001-home.md |
45
+ | SC000002 | screen | Item list | 1.0, 1.1 | V1.1/screens/sc000002-item-list.md |
46
+ | SC000003 | screen | Item detail | 1.0, 1.1 | V1.1/screens/sc000003-item-detail.md |
47
+ | SC000004 | screen | Edit item | 1.0, 1.1 | V1.1/screens/sc000004-edit-item.md |
48
+ | SC000005 | screen | Settings | 1.0, 1.1 | V1.1/screens/sc000005-settings.md |
49
+ | SV000001 | screen-variant | Picker | 1.0, 1.1 | V1.1/screens/sc000002-item-list.md#sv000001 |
50
+ | TC000001 | tech | UI framework | 1.0, 1.1 | V1.1/tech/tc000001-ui-framework.md |
51
+ | TC000002 | tech | Relational database | 1.0, 1.1 | V1.1/tech/tc000002-relational-database.md |
52
+ | UF000001 | userflow | Create an item | 1.0, 1.1 | V1.1/userflows/uf000001-create-an-item.md |
53
+ | UF000002 | userflow | Edit an item | 1.0, 1.1 | V1.1/userflows/uf000002-edit-an-item.md |
54
+
55
+ ## ⚙ Retired
56
+ | Core | Type | Name | Last version | Merged into |
57
+ |---|---|---|---|---|
58
+
59
+ ## ⚙ High-water marks
60
+ | Prefix | Highest |
61
+ |---|---|
62
+ | AP | 2 |
63
+ | BN | 3 |
64
+ | CM | 2 |
65
+ | CP | 4 |
66
+ | CV | 1 |
67
+ | DC | 1 |
68
+ | EC | 1 |
69
+ | FS | 9 |
70
+ | FT | 5 |
71
+ | IA | 1 |
72
+ | PR | 1 |
73
+ | RL | 1 |
74
+ | RO | 2 |
75
+ | SC | 5 |
76
+ | SV | 1 |
77
+ | TC | 2 |
78
+ | UF | 2 |
@@ -0,0 +1,14 @@
1
+ ---
2
+ standard: IntentFormat/1.2
3
+ type: index
4
+ name: Example app
5
+ ---
6
+ # Example app
7
+
8
+ Versions of this knowledge base: one workspace folder per version.
9
+
10
+ ## ⚙ Contents
11
+ | Version | Lifecycle | Based on |
12
+ |---|---|---|
13
+ | [V1.0](V1.0/intent-format.md) | released | — |
14
+ | [V1.1](V1.1/intent-format.md) | in-progress | V1.0 |
@@ -0,0 +1,3 @@
1
+ # Product brief
2
+
3
+ Example app: a Member keeps a personal list of items and can create, browse and change them.
@@ -0,0 +1,3 @@
1
+ # Links
2
+
3
+ - [Screen designs](https://example.com/designs) — every screen of Example app
@@ -0,0 +1,128 @@
1
+ # intent-format — the Intent Format command-line tool
2
+
3
+ Zero-dependency CLI for Intent Format 1.0 knowledge bases. Node ≥ 18; nothing to install.
4
+
5
+ ```
6
+ node <standard>/kit/cli/intent-format.mjs <command> [arguments]
7
+ node <standard>/kit/cli/intent-format.mjs --help
8
+ ```
9
+
10
+ `intent-format` reads `schema.json` two folders above this file (located via `import.meta.url`). Types,
11
+ prefixes, front-matter keys, sections, relations, step shapes, vocabularies, generated sections,
12
+ diagnostic severities and the grammar regexes all come from the schema; the code holds only the
13
+ algorithms (how to compute a generated section, how to compare versions).
14
+
15
+ ## Commands
16
+
17
+ | Command | Does |
18
+ |---|---|
19
+ | `init <root> --name "<Name>" [--kb <slug>] [--version 1.0] [--lifecycle in-progress] [--modules a,b]` | Creates the project root (`_index.md`, `_ids.md`, `inputs/links.md`), the workspace `V<version>/` with `intent-format.md` (lifecycle from `--lifecycle`, default `in-progress`), `project.md` (core minted) and the module folders, then runs `regen`. `<root>` may exist already (e.g. holding `inputs/`): nothing in `inputs/` is overwritten; `inputs/links.md` is created only when missing. Refuses when `<root>` already holds a workspace manifest. |
20
+ | `new <type> "<Name>" --root <root> [--ws V1.0] [--feature FT…] [--state <State>] [--parent FT…]` | Mints the next core (D9.2, raising the High-water mark), writes `<ws>/<folder>/<core>-<slug>.md` from the type's template (same text as `templates/<type>.md`) and prints `<core> <path>` (path relative to the root). Without `--ws`: the only workspace, else the only `in-progress` one, else it asks for `--ws`. |
21
+ | `scaffold <root> --inventory <file> [--ws V1.0]` | Reads the first markdown table whose header has **Type**, **Name** and **Core** (optional **Parent / home**) and creates a card for every row without a Core, in this order: roles, features (top-level, then Sub-features), tech, backend, api, component, shell, screen, ia, userflow, rule, edge-case, decision, comment; row order within a type. Parent / home = the parent Feature (Sub-features) or the home feature (`feature:` on screens, userflows, components), resolved by name against existing cards and cards created in the same run. Writes each new core into that row's Core cell only. Rows with a Core and `project` rows are skipped; a row whose card already exists (same type and name) just gets its core. Idempotent. Prints one line per card and a summary; exit 1 when a row had a problem (unknown type, unresolved parent/home — the card is then created without the key). |
22
+ | `mint <PREFIX> --root <root> [--count n]` | Prints `n` new cores (one per line) for any prefix — `FS`, `SV`, `CV`, `HV` for sub-documents — and raises the prefix's High-water mark in `_ids.md` (other tables untouched). |
23
+ | `check <root> [--ws V1.0] [--json]` | Prints `<severity> <code> <path>:<line> <message>`, then `Summary: E errors · W warnings · I infos` and one health line per workspace: cards · blind spots with a breakdown by kind (status · front matter · required sections · list items · requirement slots · relation targets; `--json`: `health[].blindSpotsByKind`) · unresolved placeholders · open decisions, then why (filled · inherited · none · debt), confidence (assumed · likely) and asks. `<root>` may also be a workspace folder. |
24
+ | `regen <root>` | Refuses when `check` finds errors. Otherwise writes, per non-archived workspace: card title lines, status lines (with `new / unchanged / changed: <Part>` against `based-on`), refreshed bound-reference names/paths, hand references on relation lines upgraded to bound, sub-document anchors, ordered-line numbering, `—` for forgiveness values, every `⚙` section of the schema registry (only when non-empty, after all authored sections), folder `_index.md` rosters and `CHANGES.md` (only with `based-on`); and project-wide `_index.md` and `_ids.md` (Resolved · Retired, append-only · High-water marks). No dates. Prints the files it changed. |
25
+ | `branch <root> <from> <to>` | Copies `V<from>/` to `V<to>/`, sets `version`, `lifecycle: in-progress`, `based-on: <from>` in the manifest, then runs `regen`. |
26
+ | `migrate <root>` | Brings a KB up to date with the current version, idempotently, then runs `regen`. Files whose `standard:` key holds a pre-release name (`IntentFormat/1.0-draft.2`) get `IntentFormat/1.0`, in every workspace. Each row of the deprecated `### Roles` table becomes a role card (Description, States → `state:`), one core per role name across all workspaces so a role is the same card in every version; read-only workspaces are skipped; the table is removed and the `roles` module enabled. Exit 1 if a row had a problem. |
27
+ | `next [<root>] [--ws V1.0] [--json]` | Reads the project folder and prints the one next step: during a cold start (set up · kickoff · proposal · owner review · scaffold · fill · check · report) and after it. State comes only from the project's files (`inputs/kickoff-answers.md`, `proposal/`, `report.md`, empty cards, check results), so a folder handed over half built picks up where it stopped. Fill order: project, features, shells, maps, screens, then the rest. Read-only. |
28
+ | `open <root> [--ws V1.0] [--json]` | The open list of a workspace: `[ask: …]` questions with their card and line, open decisions, `[assumed]` and `[likely]` marks on Why texts and decision Outcomes, whys still `—` (why debt), other blind spots per card (by kind). What to ask the owner next. Read-only. |
29
+ | `frame <root> <screen core or name> [--ws V1.0] [--json]` | For every placement of the screen (map nodes, flow steps, else the screen alone) and every platform: the resolved shell (S-SHELL-4), the variants that apply (they stack), the merged parts, the navigation shown there (`· platform:`, `· state:`, `· in:` applied) and the shell's `## Places inside`. Identical frames print once. Read-only. |
30
+ | `build-kit` | **Maintainer only** — regenerates the kit inside the standard from the schema: `templates/<type>.md`, `kit/skills/intent-format/types/<type>.md` (with the requirement-preset syntax), `types/_overview.md` (purpose + not-to-confuse-with per type) and `links.md`. Never run it in a KB project. |
31
+
32
+ Versions may be written `1.1` or `V1.1`.
33
+
34
+ Writing commands (`init`, `new`, `scaffold`, `mint`, `regen`, `branch`, `migrate`) hold `<root>/.intent-format.lock` while they run; a second one waits up to 30 s (a lock older than 2 min is stale). `init` and `regen` create `AGENTS.md` and `CLAUDE.md` at the root when missing and never overwrite them.
35
+
36
+ ### Exit codes
37
+
38
+ | Code | Meaning |
39
+ |---|---|
40
+ | 0 | success (`check`: no errors; warnings and infos do not fail) |
41
+ | 1 | the KB has errors (`check`, `regen`), a `scaffold` row had a problem, or the command was refused (existing manifest, unknown workspace, target exists, read-only workspace…) |
42
+ | 2 | usage error (unknown command, missing or bad argument) |
43
+
44
+ ### regen never
45
+
46
+ Mints cores, promotes placeholders, edits prose, front-matter values or relation targets, renames
47
+ files, reorders authored sections, or touches `archived` workspaces. `## x-<name>` and `## ⚙ x-<name>`
48
+ sections and `- x-<slug>:` lines are left byte-for-byte. Running it twice with no edits changes zero
49
+ bytes (the smoke test asserts this with a hash of the whole tree).
50
+
51
+ ## Diagnostics
52
+
53
+ `check` implements **72 of the 73** schema diagnostics: all 5 errors, all 43 warnings, 24 of 25 infos.
54
+
55
+ | Not checked | Why |
56
+ |---|---|
57
+ | I022 Membership key dropped on import | emitted by import; `intent-format` has no import command yet |
58
+
59
+ Partial coverage (known limits, not yet checked):
60
+
61
+ - **E005** can only fire for extension (`X*`/`Z*`) cores: E003 already ties every roster prefix to one type.
62
+ - **W006** Role values are checked in `## User stories` (reported as W037) and in User story blocks; the Roles table's States column is checked against States.
63
+ - **W021** an unquoted qualifier value containing ` · ` cannot be told apart from a second qualifier; it is reported as an unknown or malformed qualifier.
64
+ - **W028** variant pins are checked by name or core on screens/components and by flow-variant name on flows.
65
+ - **W031** loose cards outside a workspace are not checked (valid fragments, D18.1).
66
+ - **I021** ignores references, requirement markers (`**R1 · …**`, `R1`) and version labels (`V1`, `v2.0`).
67
+ - **I014** compares placeholder names with card and sub-document names exactly (whitespace collapsed).
68
+ - **I020** compares whole files with what `regen` would write; **I001** compares status lines the same way (both skip `archived` workspaces).
69
+ - Step lines: too few of a required line (and forbidden lines) → W025; too many → W022; a ⧉ step without exactly one Connected flow → W022.
70
+
71
+ Health numbers (D12.6, D19.2), with blind spots broken down by kind (`schema.health.numbers.blindSpots.kinds`):
72
+ **status** (`status: —`) · **front matter** (any other front-matter or variant-passport value `—`) ·
73
+ **required sections** (`—` as the body of a required section, a step or a comment remark; a decision's
74
+ Outcome is not counted while Open/Proposed) · **list items** (`—` as a whole variant/flow-variant list, or a
75
+ final `- —` / `N. —` item = incomplete list: more items exist but are unknown — counted in any section,
76
+ never a bad line) · **requirement slots** (preset and user-story slots) · **relation targets** (`—` as a
77
+ target or as Entry/Outcome text, in required sections and sub-documents). Forgiveness values (`-`, `–`,
78
+ `TBD`, `?`) count as `—`. Unresolved placeholders = distinct (target types, name) groups. Open decisions =
79
+ decision cards with status Open or Proposed.
80
+
81
+ ## Behaviour choices
82
+
83
+ - Generated lines: one per target + qualifiers, sorted by type roster order, then core, then
84
+ qualifier values; sources inside sub-documents carry `· at: #<core>`; `⚙ Used in` adds transitive
85
+ hosts with `· via:` and follows `· variant:` pins. `⚙ Edge cases` omits `· severity:` when the edge
86
+ case has none; `⚙ Sub-features` omits the one-liner note when it is `—`.
87
+ - Sources in disabled modules are ignored when computing generated sections.
88
+ - Change status compares fingerprints (front matter except `standard`, the name, the remark of a
89
+ comment as part `Preamble`, each authored section) with references reduced to `#CORE`, numbering,
90
+ anchors, ⚙ lines and trailing spaces normalised.
91
+ - Templates use the core `<PREFIX>000000` and the name `New <type>`; `new` replaces both.
92
+ - Not written: optional `⚙ Prev` / `⚙ Next` step lines (MAY); courtesy file renames when a name
93
+ changes (I016 reports the slug drift).
94
+
95
+ ## Tests
96
+
97
+ ```
98
+ node kit/cli/test/smoke.mjs [--save <dir>] [--keep]
99
+ ```
100
+
101
+ Runs end to end in a temp dir: `init` into a root that already has `inputs/` → `new` for every type
102
+ (features with Sub-features and `feature:` homes, tech via `Built with`, a decision with `Affects`, a
103
+ screen with a component list and a variant, flows whose `FS` cores come from `mint`) → `regen` → `check` = 0
104
+ errors / 0 warnings → second `regen` changes nothing → V1.0 released, `branch` V1.0→V1.1 → one card
105
+ edited and one created in V1.1 → `regen` → status line `changed: Components`, `CHANGES.md` lists it →
106
+ check + idempotency again; `scaffold` from an inventory (a second run creates nothing and leaves the file
107
+ unchanged), the incomplete-list marker (counted as a list blind spot, no warning) and `init --lifecycle`. It also checks every `templates/<type>.md` in a fresh workspace and
108
+ assembles every `schema.types.*.example` (plus stubs for the cards they reference) into a KB that must
109
+ pass with 0 errors / 0 warnings. `--save` copies the final KB (this is how
110
+ `examples/example-app/` is produced).
111
+
112
+ ## Files
113
+
114
+ | File | Role |
115
+ |---|---|
116
+ | `intent-format.mjs` | argument parsing and the commands |
117
+ | `lib/create.mjs` | minting, High-water marks, card creation (`new`) and `scaffold` |
118
+ | `lib/schema.mjs` | loads `schema.json`, compiles the grammar, derives lookup tables |
119
+ | `lib/parse.mjs` | front matter, card skeleton, relation lines, passports, tables |
120
+ | `lib/model.mjs` | per-file model and local diagnostics (front matter, title, sections, prose, vocabularies) |
121
+ | `lib/relations.mjs` | relation sections, variants, steps, step lists, IA trees |
122
+ | `lib/project.mjs` | project root, workspaces, core index, `_ids.md` |
123
+ | `lib/check.mjs` | cross-card, workspace and generated-file checks; health numbers |
124
+ | `lib/generate.mjs` | generated sections, status lines, fingerprints, rosters, `_ids.md`, `CHANGES.md` |
125
+ | `lib/regen.mjs` | card rewriting and the regen plan |
126
+ | `lib/templates.mjs` | blank cards from the schema |
127
+ | `lib/kit.mjs` | `build-kit`: templates, type sheets, `links.md` |
128
+ | `test/smoke.mjs` | end-to-end smoke test |