cadre-ai 3.9.1 → 4.0.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 (233) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +176 -0
  4. package/README.md +64 -17
  5. package/dist/cadre-cli.mjs +4 -6
  6. package/dist/cadre-mcp.mjs +5217 -4061
  7. package/package.json +2 -2
  8. package/skills/archive/SKILL.md +11 -11
  9. package/skills/create/SKILL.md +9 -9
  10. package/skills/implement/SKILL.md +7 -7
  11. package/skills/implement/references/resume-recovery.md +2 -0
  12. package/skills/refresh/SKILL.md +25 -18
  13. package/skills/revert/SKILL.md +29 -13
  14. package/skills/review/SKILL.md +21 -30
  15. package/skills/revise/SKILL.md +21 -11
  16. package/skills/status/SKILL.md +2 -0
  17. package/skills/track/SKILL.md +10 -6
  18. package/templates/{v5 → v6}/init/workflow.md +1 -1
  19. package/templates/v1/init/gitignore.template +0 -5
  20. package/templates/v1/init/patterns/index.md +0 -6
  21. package/templates/v1/init/project.json +0 -26
  22. package/templates/v1/init/workflow.md +0 -181
  23. package/templates/v1/project/archive-operation.json +0 -15
  24. package/templates/v1/project/refresh-operation.json +0 -14
  25. package/templates/v1/track/execution.json +0 -19
  26. package/templates/v1/track/learning.md +0 -39
  27. package/templates/v1/track/plan.md +0 -39
  28. package/templates/v1/track/revert-operation.json +0 -13
  29. package/templates/v1/track/revise-operation.json +0 -14
  30. package/templates/v1/track/state.json +0 -25
  31. package/templates/v2/init/archive/.gitkeep +0 -1
  32. package/templates/v2/init/gitignore.template +0 -8
  33. package/templates/v2/init/guidelines.md +0 -25
  34. package/templates/v2/init/operations/.gitkeep +0 -1
  35. package/templates/v2/init/patterns/index.md +0 -6
  36. package/templates/v2/init/product.md +0 -30
  37. package/templates/v2/init/project.json +0 -27
  38. package/templates/v2/init/refreshes/.gitkeep +0 -1
  39. package/templates/v2/init/styleguides/general.md +0 -14
  40. package/templates/v2/init/styleguides/language.md +0 -21
  41. package/templates/v2/init/tech-stack.md +0 -21
  42. package/templates/v2/init/tracks/.gitkeep +0 -1
  43. package/templates/v2/init/tracks.md +0 -6
  44. package/templates/v2/init/wisps/.gitkeep +0 -1
  45. package/templates/v2/init/workflow.md +0 -72
  46. package/templates/v2/project/pattern.md +0 -20
  47. package/templates/v2/project/refresh.md +0 -21
  48. package/templates/v2/styleguides/dart.md +0 -27
  49. package/templates/v2/styleguides/flutter.md +0 -27
  50. package/templates/v2/styleguides/go.md +0 -29
  51. package/templates/v2/styleguides/gradle.md +0 -28
  52. package/templates/v2/styleguides/html-css.md +0 -39
  53. package/templates/v2/styleguides/index.md +0 -27
  54. package/templates/v2/styleguides/java.md +0 -27
  55. package/templates/v2/styleguides/javascript.md +0 -27
  56. package/templates/v2/styleguides/kotlin.md +0 -26
  57. package/templates/v2/styleguides/maven.md +0 -28
  58. package/templates/v2/styleguides/python.md +0 -27
  59. package/templates/v2/styleguides/react.md +0 -28
  60. package/templates/v2/styleguides/swift.md +0 -27
  61. package/templates/v2/styleguides/swiftui.md +0 -27
  62. package/templates/v2/styleguides/typescript.md +0 -26
  63. package/templates/v2/track/bug.md +0 -14
  64. package/templates/v2/track/execution.json +0 -19
  65. package/templates/v2/track/learning.md +0 -39
  66. package/templates/v2/track/plan.md +0 -39
  67. package/templates/v2/track/revision.md +0 -36
  68. package/templates/v2/track/spec.md +0 -38
  69. package/templates/v2/track/state.json +0 -31
  70. package/templates/v3/init/archive/.gitkeep +0 -1
  71. package/templates/v3/init/gitignore.template +0 -8
  72. package/templates/v3/init/guidelines.md +0 -25
  73. package/templates/v3/init/operations/.gitkeep +0 -1
  74. package/templates/v3/init/product.md +0 -30
  75. package/templates/v3/init/project.json +0 -27
  76. package/templates/v3/init/refreshes/.gitkeep +0 -1
  77. package/templates/v3/init/styleguides/general.md +0 -14
  78. package/templates/v3/init/styleguides/language.md +0 -21
  79. package/templates/v3/init/tech-stack.md +0 -21
  80. package/templates/v3/init/tracks/.gitkeep +0 -1
  81. package/templates/v3/init/tracks.md +0 -6
  82. package/templates/v3/init/wisps/.gitkeep +0 -1
  83. package/templates/v3/init/workflow.md +0 -82
  84. package/templates/v3/project/archive-operation.json +0 -19
  85. package/templates/v3/project/pattern.md +0 -20
  86. package/templates/v3/project/refresh-operation.json +0 -18
  87. package/templates/v3/project/refresh.md +0 -21
  88. package/templates/v3/styleguides/dart.md +0 -27
  89. package/templates/v3/styleguides/flutter.md +0 -27
  90. package/templates/v3/styleguides/go.md +0 -29
  91. package/templates/v3/styleguides/gradle.md +0 -28
  92. package/templates/v3/styleguides/html-css.md +0 -39
  93. package/templates/v3/styleguides/index.md +0 -27
  94. package/templates/v3/styleguides/java.md +0 -27
  95. package/templates/v3/styleguides/javascript.md +0 -27
  96. package/templates/v3/styleguides/kotlin.md +0 -26
  97. package/templates/v3/styleguides/maven.md +0 -28
  98. package/templates/v3/styleguides/python.md +0 -27
  99. package/templates/v3/styleguides/react.md +0 -28
  100. package/templates/v3/styleguides/swift.md +0 -27
  101. package/templates/v3/styleguides/swiftui.md +0 -27
  102. package/templates/v3/styleguides/typescript.md +0 -26
  103. package/templates/v3/track/bug.md +0 -14
  104. package/templates/v3/track/execution.json +0 -19
  105. package/templates/v3/track/plan.md +0 -39
  106. package/templates/v3/track/revert-operation.json +0 -17
  107. package/templates/v3/track/revise-operation.json +0 -18
  108. package/templates/v3/track/revision.md +0 -36
  109. package/templates/v3/track/spec.md +0 -38
  110. package/templates/v3/track/state.json +0 -31
  111. package/templates/v4/init/archive/.gitkeep +0 -1
  112. package/templates/v4/init/gitignore.template +0 -8
  113. package/templates/v4/init/guidelines.md +0 -25
  114. package/templates/v4/init/operations/.gitkeep +0 -1
  115. package/templates/v4/init/patterns/index.md +0 -8
  116. package/templates/v4/init/product.md +0 -30
  117. package/templates/v4/init/project.json +0 -27
  118. package/templates/v4/init/refreshes/.gitkeep +0 -1
  119. package/templates/v4/init/styleguides/general.md +0 -14
  120. package/templates/v4/init/styleguides/language.md +0 -21
  121. package/templates/v4/init/tech-stack.md +0 -21
  122. package/templates/v4/init/tracks/.gitkeep +0 -1
  123. package/templates/v4/init/tracks.md +0 -6
  124. package/templates/v4/init/wisps/.gitkeep +0 -1
  125. package/templates/v4/init/workflow.md +0 -91
  126. package/templates/v4/project/archive-operation.json +0 -19
  127. package/templates/v4/project/pattern.md +0 -20
  128. package/templates/v4/project/refresh-operation.json +0 -18
  129. package/templates/v4/project/refresh.md +0 -21
  130. package/templates/v4/styleguides/dart.md +0 -27
  131. package/templates/v4/styleguides/flutter.md +0 -27
  132. package/templates/v4/styleguides/go.md +0 -29
  133. package/templates/v4/styleguides/gradle.md +0 -28
  134. package/templates/v4/styleguides/html-css.md +0 -39
  135. package/templates/v4/styleguides/index.md +0 -27
  136. package/templates/v4/styleguides/java.md +0 -27
  137. package/templates/v4/styleguides/javascript.md +0 -27
  138. package/templates/v4/styleguides/kotlin.md +0 -26
  139. package/templates/v4/styleguides/maven.md +0 -28
  140. package/templates/v4/styleguides/python.md +0 -27
  141. package/templates/v4/styleguides/react.md +0 -28
  142. package/templates/v4/styleguides/swift.md +0 -27
  143. package/templates/v4/styleguides/swiftui.md +0 -27
  144. package/templates/v4/styleguides/typescript.md +0 -26
  145. package/templates/v4/track/bug.md +0 -14
  146. package/templates/v4/track/execution.json +0 -20
  147. package/templates/v4/track/learning.md +0 -45
  148. package/templates/v4/track/plan.md +0 -39
  149. package/templates/v4/track/revert-operation.json +0 -17
  150. package/templates/v4/track/revise-operation.json +0 -18
  151. package/templates/v4/track/revision.md +0 -36
  152. package/templates/v4/track/spec.md +0 -38
  153. package/templates/v4/track/state.json +0 -31
  154. package/templates/v5/init/archive/.gitkeep +0 -1
  155. package/templates/v5/init/guidelines.md +0 -25
  156. package/templates/v5/init/operations/.gitkeep +0 -1
  157. package/templates/v5/init/patterns/index.md +0 -8
  158. package/templates/v5/init/product.md +0 -30
  159. package/templates/v5/init/refreshes/.gitkeep +0 -1
  160. package/templates/v5/init/styleguides/general.md +0 -14
  161. package/templates/v5/init/styleguides/language.md +0 -21
  162. package/templates/v5/init/tech-stack.md +0 -21
  163. package/templates/v5/init/tracks/.gitkeep +0 -1
  164. package/templates/v5/init/tracks.md +0 -6
  165. package/templates/v5/init/wisps/.gitkeep +0 -1
  166. package/templates/v5/project/archive-operation.json +0 -19
  167. package/templates/v5/project/pattern.md +0 -20
  168. package/templates/v5/project/refresh-operation.json +0 -18
  169. package/templates/v5/project/refresh.md +0 -21
  170. package/templates/v5/styleguides/dart.md +0 -27
  171. package/templates/v5/styleguides/flutter.md +0 -27
  172. package/templates/v5/styleguides/go.md +0 -29
  173. package/templates/v5/styleguides/gradle.md +0 -28
  174. package/templates/v5/styleguides/html-css.md +0 -39
  175. package/templates/v5/styleguides/index.md +0 -27
  176. package/templates/v5/styleguides/java.md +0 -27
  177. package/templates/v5/styleguides/javascript.md +0 -27
  178. package/templates/v5/styleguides/kotlin.md +0 -26
  179. package/templates/v5/styleguides/maven.md +0 -28
  180. package/templates/v5/styleguides/python.md +0 -27
  181. package/templates/v5/styleguides/react.md +0 -28
  182. package/templates/v5/styleguides/swift.md +0 -27
  183. package/templates/v5/styleguides/swiftui.md +0 -27
  184. package/templates/v5/styleguides/typescript.md +0 -26
  185. package/templates/v5/track/bug.md +0 -14
  186. package/templates/v5/track/learning.md +0 -45
  187. package/templates/v5/track/revert-operation.json +0 -17
  188. package/templates/v5/track/revise-operation.json +0 -18
  189. package/templates/v5/track/revision.md +0 -36
  190. package/templates/v5/track/spec.md +0 -38
  191. /package/templates/{v1 → v6}/init/archive/.gitkeep +0 -0
  192. /package/templates/{v5 → v6}/init/gitignore.template +0 -0
  193. /package/templates/{v1 → v6}/init/guidelines.md +0 -0
  194. /package/templates/{v1 → v6}/init/operations/.gitkeep +0 -0
  195. /package/templates/{v3 → v6}/init/patterns/index.md +0 -0
  196. /package/templates/{v1 → v6}/init/product.md +0 -0
  197. /package/templates/{v5 → v6}/init/project.json +0 -0
  198. /package/templates/{v1 → v6}/init/refreshes/.gitkeep +0 -0
  199. /package/templates/{v1 → v6}/init/styleguides/general.md +0 -0
  200. /package/templates/{v1 → v6}/init/styleguides/language.md +0 -0
  201. /package/templates/{v1 → v6}/init/tech-stack.md +0 -0
  202. /package/templates/{v1 → v6}/init/tracks/.gitkeep +0 -0
  203. /package/templates/{v1 → v6}/init/tracks.md +0 -0
  204. /package/templates/{v1 → v6}/init/wisps/.gitkeep +0 -0
  205. /package/templates/{v2 → v6}/project/archive-operation.json +0 -0
  206. /package/templates/{v1 → v6}/project/pattern.md +0 -0
  207. /package/templates/{v2 → v6}/project/refresh-operation.json +0 -0
  208. /package/templates/{v1 → v6}/project/refresh.md +0 -0
  209. /package/templates/{v1 → v6}/styleguides/dart.md +0 -0
  210. /package/templates/{v1 → v6}/styleguides/flutter.md +0 -0
  211. /package/templates/{v1 → v6}/styleguides/go.md +0 -0
  212. /package/templates/{v1 → v6}/styleguides/gradle.md +0 -0
  213. /package/templates/{v1 → v6}/styleguides/html-css.md +0 -0
  214. /package/templates/{v1 → v6}/styleguides/index.md +0 -0
  215. /package/templates/{v1 → v6}/styleguides/java.md +0 -0
  216. /package/templates/{v1 → v6}/styleguides/javascript.md +0 -0
  217. /package/templates/{v1 → v6}/styleguides/kotlin.md +0 -0
  218. /package/templates/{v1 → v6}/styleguides/maven.md +0 -0
  219. /package/templates/{v1 → v6}/styleguides/python.md +0 -0
  220. /package/templates/{v1 → v6}/styleguides/react.md +0 -0
  221. /package/templates/{v1 → v6}/styleguides/swift.md +0 -0
  222. /package/templates/{v1 → v6}/styleguides/swiftui.md +0 -0
  223. /package/templates/{v1 → v6}/styleguides/typescript.md +0 -0
  224. /package/templates/{v1 → v6}/track/bug.md +0 -0
  225. /package/templates/{v5 → v6}/track/dependency-context.json +0 -0
  226. /package/templates/{v5 → v6}/track/execution.json +0 -0
  227. /package/templates/{v3 → v6}/track/learning.md +0 -0
  228. /package/templates/{v5 → v6}/track/plan.md +0 -0
  229. /package/templates/{v2 → v6}/track/revert-operation.json +0 -0
  230. /package/templates/{v2 → v6}/track/revise-operation.json +0 -0
  231. /package/templates/{v1 → v6}/track/revision.md +0 -0
  232. /package/templates/{v1 → v6}/track/spec.md +0 -0
  233. /package/templates/{v5 → v6}/track/state.json +0 -0
@@ -1,31 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "trackId": "{{TRACK_ID}}",
4
- "title": "{{TRACK_TITLE}}",
5
- "type": "{{feature|bug}}",
6
- "status": "drafting-plan",
7
- "checkpoint": "spec-approved",
8
- "revision": 1,
9
- "dependencies": [],
10
- "commits": {
11
- "spec": null,
12
- "plan": null
13
- },
14
- "artifactProgress": [],
15
- "operation": {
16
- "action": "specify",
17
- "baseCommit": "{{BASE_COMMIT_OR_NULL}}",
18
- "expectedCommit": "cadre(track): specify {{TRACK_ID}}",
19
- "approvedArtifacts": ["spec.md", "plan.md", "learning.md"],
20
- "approvalDigest": "{{APPROVAL_DIGEST}}",
21
- "approvedArtifactHashes": [
22
- { "path": "spec.md", "sha256": "{{SPEC_SHA256}}" },
23
- { "path": "plan.md", "sha256": "{{PLAN_SHA256}}" },
24
- { "path": "learning.md", "sha256": "{{LEARNING_SHA256}}" }
25
- ],
26
- "approvedAt": "{{APPROVED_AT}}"
27
- },
28
- "lastExecution": null,
29
- "reviewCycles": [],
30
- "history": []
31
- }
@@ -1 +0,0 @@
1
-
@@ -1,25 +0,0 @@
1
- # Engineering Guidelines
2
-
3
- ## Architecture
4
-
5
- {{ARCHITECTURE_GUIDANCE}}
6
-
7
- ## Testing strategy
8
-
9
- {{TEST_STRATEGY}}
10
-
11
- ## Security and privacy
12
-
13
- {{SECURITY_PRIVACY}}
14
-
15
- ## Reliability and observability
16
-
17
- {{RELIABILITY_OBSERVABILITY}}
18
-
19
- ## Documentation and compatibility
20
-
21
- {{DOCUMENTATION_COMPATIBILITY}}
22
-
23
- ## Repository-specific commands
24
-
25
- {{REPOSITORY_COMMANDS}}
@@ -1 +0,0 @@
1
-
@@ -1,8 +0,0 @@
1
- # Pattern Catalog
2
-
3
- Patterns are created only by distilling completed, cleanly reviewed tracks during archival.
4
-
5
- | Pattern | Summary and applicability | Provenance | Supersedes |
6
- | --- | --- | --- | --- |
7
-
8
- Keep applicability and supersession explicit. Missing or ambiguous summaries require inspecting the full pattern; a keyword mismatch never proves irrelevance.
@@ -1,30 +0,0 @@
1
- # Product
2
-
3
- ## Project context
4
-
5
- - Classification: `{{greenfield|brownfield}}`
6
- - Evidence: {{CLASSIFICATION_EVIDENCE}}
7
-
8
- ## Name and summary
9
-
10
- {{PROJECT_NAME_AND_SUMMARY}}
11
-
12
- ## Users and problems
13
-
14
- {{USERS_AND_PROBLEMS}}
15
-
16
- ## Outcomes and success measures
17
-
18
- {{OUTCOMES_AND_MEASURES}}
19
-
20
- ## Scope boundaries
21
-
22
- {{SCOPE_BOUNDARIES}}
23
-
24
- ## Domain language
25
-
26
- {{DOMAIN_LANGUAGE}}
27
-
28
- ## Open questions
29
-
30
- {{OPEN_QUESTIONS}}
@@ -1 +0,0 @@
1
-
@@ -1,14 +0,0 @@
1
- # General Coding Styleguide
2
-
3
- - Read every existing file and directly relevant context before editing it.
4
- - Prefer the smallest cohesive change that satisfies the approved plan task.
5
- - Preserve established repository conventions unless an approved revision changes them.
6
- - Make invalid states difficult to represent; validate at boundaries.
7
- - Handle errors deliberately and keep failure messages actionable.
8
- - Test externally visible behavior, failure paths, and meaningful edge cases.
9
- - Keep comments focused on intent and tradeoffs rather than restating code.
10
- - Avoid unrelated cleanup in delivery commits.
11
-
12
- ## Project-specific additions
13
-
14
- {{GENERAL_STYLE_ADDITIONS}}
@@ -1,21 +0,0 @@
1
- # {{LANGUAGE_OR_FRAMEWORK}} Styleguide
2
-
3
- ## Versions and conventions
4
-
5
- {{VERSIONS_AND_CONVENTIONS}}
6
-
7
- ## Structure and naming
8
-
9
- {{STRUCTURE_AND_NAMING}}
10
-
11
- ## Error handling and safety
12
-
13
- {{ERROR_HANDLING_AND_SAFETY}}
14
-
15
- ## Testing and tooling
16
-
17
- {{TESTING_AND_TOOLING}}
18
-
19
- ## Avoid
20
-
21
- {{PROJECT_SPECIFIC_ANTI_PATTERNS}}
@@ -1,21 +0,0 @@
1
- # Technology Stack
2
-
3
- ## Runtime and languages
4
-
5
- {{RUNTIMES_AND_LANGUAGES}}
6
-
7
- ## Frameworks and libraries
8
-
9
- {{FRAMEWORKS_AND_LIBRARIES}}
10
-
11
- ## Data and infrastructure
12
-
13
- {{DATA_AND_INFRASTRUCTURE}}
14
-
15
- ## Tooling
16
-
17
- {{BUILD_TEST_FORMAT_TOOLS}}
18
-
19
- ## Version constraints
20
-
21
- {{VERSION_CONSTRAINTS}}
@@ -1 +0,0 @@
1
-
@@ -1,6 +0,0 @@
1
- # Tracks
2
-
3
- Generated from track-local `state.json` files by the Cadre MCP server.
4
-
5
- | Track | Type | Status | Revision |
6
- | --- | --- | --- | ---: |
@@ -1 +0,0 @@
1
-
@@ -1,19 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "action": "archive",
4
- "batchId": "archive-{{ARCHIVE_TS}}",
5
- "status": "in_progress",
6
- "checkpoint": "approved",
7
- "baseCommit": "{{BASE_COMMIT}}",
8
- "expectedCommit": "{{EXPECTED_COMMIT}}",
9
- "selectedTracks": ["{{TRACK_ID}}"],
10
- "completedTracks": [],
11
- "approvedArtifacts": ["{{APPROVED_ARTIFACT}}"],
12
- "approvalDigest": "{{APPROVAL_DIGEST}}",
13
- "approvedArtifactHashes": [
14
- { "path": "{{APPROVED_ARTIFACT}}", "sha256": "{{ARTIFACT_SHA256}}" }
15
- ],
16
- "artifactProgress": [],
17
- "approvedAt": "{{APPROVED_AT}}",
18
- "archiveCommit": null
19
- }
@@ -1,20 +0,0 @@
1
- # Pattern: {{PATTERN_NAME}}
2
-
3
- ## Use when
4
-
5
- {{APPLICABILITY}}
6
-
7
- ## Guidance
8
-
9
- {{GUIDANCE}}
10
-
11
- ## Tradeoffs and limits
12
-
13
- {{TRADEOFFS}}
14
-
15
- ## Provenance
16
-
17
- - Track: `{{TRACK_ID}}`
18
- - Phase/task: `{{PHASE_TASK}}`
19
- - Commits: {{COMMITS}}
20
- - Archived at: {{TIMESTAMP}}
@@ -1,18 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "action": "refresh",
4
- "operationId": "refresh-{{REFRESH_TS}}",
5
- "status": "in_progress",
6
- "checkpoint": "approved",
7
- "baseCommit": "{{BASE_COMMIT}}",
8
- "expectedCommit": "cadre(refresh): update project context",
9
- "refreshPath": "refreshes/refresh-{{REFRESH_TS}}.md",
10
- "approvedArtifacts": ["refreshes/refresh-{{REFRESH_TS}}.md"],
11
- "approvalDigest": "{{APPROVAL_DIGEST}}",
12
- "approvedArtifactHashes": [
13
- { "path": "{{APPROVED_ARTIFACT}}", "sha256": "{{ARTIFACT_SHA256}}" }
14
- ],
15
- "artifactProgress": [],
16
- "approvedAt": "{{APPROVED_AT}}",
17
- "refreshCommit": null
18
- }
@@ -1,21 +0,0 @@
1
- # Refresh {{REFRESH_TS}}
2
-
3
- - Status: proposed
4
- - Previous refresh/setup commit: `{{BASE_COMMIT}}`
5
- - Refresh commit: pending
6
-
7
- ## Inputs and evidence
8
-
9
- {{INPUTS_AND_COMMIT_RANGE}}
10
-
11
- ## Proposed context changes
12
-
13
- {{PROPOSED_CHANGES}}
14
-
15
- ## Active-track impact
16
-
17
- {{TRACK_IMPACT}}
18
-
19
- ## Approval
20
-
21
- {{APPROVAL_RECORD}}
@@ -1,27 +0,0 @@
1
- # Dart Styleguide
2
-
3
- Apply `general.md` first and use Effective Dart as the language baseline.
4
-
5
- ## Idiomatic defaults
6
-
7
- - Format with `dart format`; do not hand-align code against formatter output.
8
- - Use `UpperCamelCase` for types/extensions, `lowerCamelCase` for other identifiers, and `lowercase_with_underscores` for files/directories/packages.
9
- - Order `dart:` imports before `package:` imports and relative imports; keep exports in their own section.
10
- - Prefer concise, readable language features without compressing multiple responsibilities together.
11
- - Use sound null safety; model absence explicitly and avoid `!` unless an invariant is proven.
12
- - Choose one consistent local-variable policy for `final`/`var`; favor immutable fields and top-level values.
13
- - Avoid storing derivable state and expose one source of truth.
14
- - Use `async`/`await` deliberately; return/await futures, handle stream subscriptions, and propagate useful errors.
15
- - Design public APIs for clear call sites, consistent terminology, and minimal surprising behavior.
16
- - Document public APIs with `///` comments and keep implementation comments focused on intent.
17
-
18
- ## Verification
19
-
20
- - Run `dart format --output=none --set-exit-if-changed .`, `dart analyze`, and `dart test` or project equivalents.
21
- - Test null/error/async paths and public package APIs.
22
-
23
- ## Sources
24
-
25
- - [Effective Dart](https://dart.dev/effective-dart)
26
- - [Effective Dart: Usage](https://dart.dev/effective-dart/usage)
27
- - [Effective Dart: Design](https://dart.dev/effective-dart/design)
@@ -1,27 +0,0 @@
1
- # Flutter Styleguide
2
-
3
- Apply `general.md` and `dart.md` first. Adapt architecture recommendations to the approved app size and existing brownfield structure.
4
-
5
- ## Flutter defaults
6
-
7
- - Separate UI and data responsibilities. Keep business/data logic out of widget build methods.
8
- - Give views/widgets presentation responsibility; place UI state/transformation in an approved state-holder or ViewModel pattern.
9
- - Isolate external data access behind repositories/services with clear interfaces and dependency injection.
10
- - Use unidirectional data flow and immutable models where practical.
11
- - Keep widgets small and composable; use `const` constructors whenever inputs are compile-time constants.
12
- - Keep transient UI state local and lift/share it only when multiple consumers need the same source of truth.
13
- - Use stable keys where widget identity matters; do not use keys indiscriminately.
14
- - Model loading, empty, error, offline, and success states explicitly.
15
- - Build responsive/adaptive layouts from constraints and platform behavior, not device-name checks.
16
- - Include semantics, keyboard/focus behavior, text scaling, and contrast in Definition of Done.
17
-
18
- ## Verification
19
-
20
- - Run `dart format`, `flutter analyze`, unit tests for services/repositories/state holders, widget tests for views, and targeted integration tests.
21
- - Test lifecycle/disposal, navigation, dependency injection, platform differences, golden output when appropriate, and accessibility.
22
-
23
- ## Sources
24
-
25
- - [Flutter architecture recommendations](https://docs.flutter.dev/app-architecture/recommendations)
26
- - [Flutter app architecture guide](https://docs.flutter.dev/app-architecture/guide)
27
- - [Flutter testing](https://docs.flutter.dev/testing/overview)
@@ -1,29 +0,0 @@
1
- # Go Styleguide
2
-
3
- Apply `general.md` first. Repository formatter/linter configuration takes precedence when explicitly approved.
4
-
5
- ## Idiomatic defaults
6
-
7
- - Format all source with `gofmt`; use `goimports` when the project adopts it.
8
- - Use short, lowercase, single-word package names. Avoid catch-all packages such as `util`, `common`, or `misc`.
9
- - Keep exported names purposeful; avoid repeating the package name in identifiers.
10
- - Write doc comments for exported packages, types, functions, methods, and variables. Begin declaration comments with the declared name when natural.
11
- - Accept interfaces at the consumer boundary and return concrete types unless abstraction is required.
12
- - Keep interfaces small and define them near their consumers.
13
- - Handle every error deliberately. Add useful context without obscuring the original error; use `errors.Is`/`errors.As` for semantic checks.
14
- - Reserve `panic` for unrecoverable programmer/invariant failures, not routine error handling.
15
- - Pass `context.Context` explicitly as the first parameter for request-scoped cancellation/deadlines; do not store it in structs.
16
- - Make goroutine ownership, cancellation, and shutdown explicit. Avoid goroutine/channel leaks.
17
- - Prefer simple control flow, early returns, and zero-value-useful types.
18
-
19
- ## Verification
20
-
21
- - Run `gofmt`/`goimports`, `go vet ./...`, and `go test ./...`.
22
- - Prefer table-driven tests for repeated behavior and include failure/edge cases.
23
- - Run the race detector for concurrency-sensitive changes when practical.
24
-
25
- ## Sources
26
-
27
- - [Effective Go](https://go.dev/doc/effective_go)
28
- - [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)
29
- - [Go Doc Comments](https://go.dev/doc/comment)
@@ -1,28 +0,0 @@
1
- # Gradle Build Styleguide
2
-
3
- Apply `general.md` and the applicable JVM/Android language guide first.
4
-
5
- ## Build defaults
6
-
7
- - Use the Gradle Wrapper and run builds through `./gradlew`.
8
- - Prefer Kotlin DSL for new builds; preserve an established Groovy DSL unless migration is explicitly approved.
9
- - Declare plugins with the `plugins` block and name the root project in `settings.gradle(.kts)`.
10
- - Keep production source out of the root project; split modules along cohesive product/build boundaries.
11
- - Encapsulate shared build logic in convention plugins, preferably in an included `build-logic` build.
12
- - Avoid broad `allprojects`/`subprojects`, `afterEvaluate`, internal APIs, and configuration-time I/O.
13
- - Register/configure tasks lazily and declare inputs/outputs so caching and incremental execution remain correct.
14
- - Centralize dependency coordinates/versions with version catalogs or approved dependency-management mechanisms.
15
- - Keep repositories centralized and intentional; never embed credentials in build scripts.
16
- - Preserve configuration-cache/build-cache compatibility where the project enables them.
17
-
18
- ## Verification
19
-
20
- - Run the relevant `./gradlew check`/build tasks with the project warning policy.
21
- - For build-logic changes, test representative modules plus configuration-cache behavior when enabled.
22
- - Review dependency insight, verification/locking, and generated artifacts for dependency changes.
23
-
24
- ## Sources
25
-
26
- - [Gradle general best practices](https://docs.gradle.org/current/userguide/best_practices_general.html)
27
- - [Gradle build-structure best practices](https://docs.gradle.org/current/userguide/best_practices_structuring_builds.html)
28
- - [Organizing Gradle projects](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html)
@@ -1,39 +0,0 @@
1
- # HTML and CSS Styleguide
2
-
3
- Apply `general.md` first. Preserve the repository's approved formatter, CSS architecture, design tokens, component conventions, and supported-browser policy.
4
-
5
- ## HTML defaults
6
-
7
- - Produce conforming HTML with `<!doctype html>`, UTF-8, a document language, and the responsive viewport metadata for complete documents.
8
- - Use the native element that matches the content or interaction. Prefer semantic landmarks, headings, links, buttons, lists, forms, and tables over generic containers or custom roles.
9
- - Keep heading levels and DOM/source order logical. Do not use CSS to disguise an incorrect content hierarchy.
10
- - Give controls programmatic labels, images appropriate text alternatives, links descriptive text, and data tables scoped headers.
11
- - Preserve native keyboard behavior. Use links for navigation and buttons for actions; do not make a `div` or `span` imitate either.
12
- - Use ARIA only when native HTML cannot express the required semantics, and keep names, roles, values, and states accurate.
13
- - Keep structure in HTML and presentation in CSS. Avoid presentational elements, inline style attributes, and duplicated markup used only for layout.
14
- - Treat untrusted markup as hostile; never insert it without an approved sanitization boundary.
15
-
16
- ## CSS defaults
17
-
18
- - Build layouts from content outward using normal flow, Flexbox, and Grid. Prefer fluid sizing and intentional breakpoints over fixed device-specific dimensions.
19
- - Use the cascade deliberately: keep selectors simple and specificity low, scope component rules predictably, and avoid `!important` except for an approved, documented override layer.
20
- - Use classes for reusable styling and semantic, consistently named hooks. Do not couple styles to fragile DOM depth or use IDs for routine styling.
21
- - Centralize repeated design decisions as custom properties or approved design tokens. Name tokens by purpose when their meaning is shared.
22
- - Prefer relative and logical sizing/spacing where it improves zoom, localization, writing-mode, and responsive behavior; follow the supported-browser policy.
23
- - Preserve visible focus, sufficient contrast, legible text, and usable target sizes. Do not communicate meaning through color alone.
24
- - Keep motion purposeful and honor `prefers-reduced-motion`; never make essential information depend only on animation.
25
- - Organize declarations and files according to the repository formatter and architecture. Remove obsolete rules and avoid unexplained magic numbers.
26
-
27
- ## Verification
28
-
29
- - Run the repository HTML/CSS formatter, HTML conformance checks, Stylelint or the approved linter, tests, and production build.
30
- - Check supported viewport widths, zoom/text resizing, overflow, long/localized content, print or forced-colors modes when applicable, and the supported browser matrix.
31
- - Exercise the page with a keyboard and project accessibility tooling; verify focus order, accessible names, landmarks, contrast, and reduced-motion behavior.
32
-
33
- ## Sources
34
-
35
- - [WHATWG HTML Living Standard](https://html.spec.whatwg.org/)
36
- - [MDN: Semantic HTML](https://developer.mozilla.org/en-US/curriculum/core/semantic-html/)
37
- - [MDN: HTML accessibility](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Accessibility/HTML)
38
- - [MDN: CSS and JavaScript accessibility best practices](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Accessibility/CSS_and_JavaScript)
39
- - [W3C: How to Meet WCAG](https://www.w3.org/WAI/WCAG22/quickref/)
@@ -1,27 +0,0 @@
1
- # Default Styleguide Catalog
2
-
3
- Use this catalog during `create`. Always propose the project template's `styleguides/general.md`, then select defaults from the approved technology stack. Present every selected guide for human approval; copy a default only when the human accepts it. The human may amend a default or provide a complete replacement.
4
-
5
- | Tech-stack evidence | Default guides to propose |
6
- | --- | --- |
7
- | Go | `go.md` |
8
- | Java | `java.md`, plus `maven.md` or `gradle.md` when used |
9
- | Kotlin | `kotlin.md`, plus `gradle.md` or `maven.md` when used |
10
- | Maven | `maven.md` |
11
- | Gradle | `gradle.md` |
12
- | HTML, CSS, or HTML/CSS | `html-css.md` |
13
- | JavaScript | `javascript.md` |
14
- | TypeScript | `javascript.md` and `typescript.md` |
15
- | Browser JavaScript | `html-css.md` and `javascript.md` |
16
- | Browser TypeScript | `html-css.md`, `javascript.md`, and `typescript.md` |
17
- | React for the web with JavaScript | `html-css.md`, `javascript.md`, and `react.md` |
18
- | React for the web with TypeScript | `html-css.md`, `javascript.md`, `typescript.md`, and `react.md` |
19
- | Dart | `dart.md` |
20
- | Flutter | `dart.md` and `flutter.md` |
21
- | Swift | `swift.md` |
22
- | SwiftUI | `swift.md` and `swiftui.md` |
23
- | Python | `python.md` |
24
-
25
- If the stack is not represented, derive a project guide from `styleguides/language.md`, official ecosystem guidance, repository evidence, and user input. Do not invent conventions when a material choice is unclear.
26
-
27
- For brownfield projects, inspect formatter/linter/build configuration and representative source before proposing defaults. Existing automated conventions win unless the human explicitly approves a change.
@@ -1,27 +0,0 @@
1
- # Java Styleguide
2
-
3
- Apply `general.md` first. Use the repository's formatter if configured; otherwise propose `google-java-format` and Google Java Style.
4
-
5
- ## Idiomatic defaults
6
-
7
- - Encode source as UTF-8. Keep one top-level type per ordinary source file and match its file name.
8
- - Use `UpperCamelCase` for types, `lowerCamelCase` for methods/fields/locals, and `UPPER_SNAKE_CASE` for constants.
9
- - Use lowercase package names organized by stable domain ownership.
10
- - Do not use wildcard imports. Remove unused imports and keep deterministic ordering.
11
- - Prefer immutable state, constructor-injected required dependencies, and narrow visibility.
12
- - Program to focused abstractions where multiple implementations or test seams are real; avoid interface-per-class ceremony.
13
- - Validate public-boundary inputs and model invalid states explicitly.
14
- - Do not swallow caught exceptions. Preserve causes and add actionable domain context.
15
- - Use try-with-resources for `AutoCloseable` values.
16
- - Use `@Override` whenever legal and document public APIs where intent/contracts are not obvious.
17
- - Avoid finalizers and hidden global mutable state.
18
-
19
- ## Verification
20
-
21
- - Run the approved formatter, compiler warnings/static analysis, and the repository's unit/integration tests.
22
- - Test public behavior, exceptions, boundary values, concurrency, and resource cleanup where relevant.
23
-
24
- ## Sources
25
-
26
- - [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
27
- - [Java language documentation](https://docs.oracle.com/en/java/)
@@ -1,27 +0,0 @@
1
- # JavaScript Styleguide
2
-
3
- Apply `general.md` first. Preserve the repository's approved formatter, semicolon, quote, and module settings.
4
-
5
- ## Idiomatic defaults
6
-
7
- - Use ECMAScript modules for new code when the runtime/toolchain supports them; keep imports at the top and dependencies explicit.
8
- - Declare with `const` by default and `let` only when reassignment is required. Do not use `var` in modern targets.
9
- - Use strict equality (`===`/`!==`) except for an intentional, documented nullish check.
10
- - Keep functions focused, minimize shared mutable state, and prefer data transformations with clear ownership.
11
- - Use `async`/`await` or deliberate Promise composition; always handle rejection and preserve useful error context.
12
- - Use braces for control flow and avoid implicit behavior that reduces readability.
13
- - Validate untrusted values at external boundaries before use.
14
- - Do not use `eval`, dynamic `Function`, or unsafe DOM injection.
15
- - Prefer standard platform APIs and explicit feature/runtime compatibility over non-standard behavior.
16
- - Write comments/JSDoc for contracts and intent, not restatements of syntax.
17
-
18
- ## Verification
19
-
20
- - Run the repository formatter, ESLint (or approved linter), tests, and target-specific build/type checks.
21
- - Test asynchronous failure paths, cleanup/cancellation behavior, serialization boundaries, and supported runtimes.
22
-
23
- ## Sources
24
-
25
- - [MDN JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide)
26
- - [MDN JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
27
- - [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)
@@ -1,26 +0,0 @@
1
- # Kotlin Styleguide
2
-
3
- Apply `general.md` first. Use the official Kotlin coding conventions and the repository's configured formatter/linter.
4
-
5
- ## Idiomatic defaults
6
-
7
- - Use four spaces, no tabs, Kotlin brace style, and omit semicolons.
8
- - Use lowercase package names, `UpperCamelCase` for classes/objects, and `lowerCamelCase` for functions/properties/locals.
9
- - Name files for their primary declaration or cohesive purpose; avoid catch-all `Util` files.
10
- - Prefer `val` and immutable collection interfaces. Use mutation only when it makes ownership and behavior clearer.
11
- - Use nullable types deliberately, safe calls, Elvis operators, and early validation; avoid `!!` except for proven invariants with explanation.
12
- - Prefer expression-oriented constructs and exhaustive `when` expressions when they improve clarity.
13
- - Use data classes for data semantics, sealed hierarchies for closed variants, and extension functions near their domain/consumer.
14
- - Keep visibility as narrow as practical. Specify public API return/property types and document public library APIs with KDoc.
15
- - Use structured concurrency; make coroutine scope, dispatcher choice, cancellation, and exception ownership explicit.
16
- - Avoid translating Java patterns mechanically when Kotlin provides a clearer language construct.
17
-
18
- ## Verification
19
-
20
- - Run the approved formatter/linter, compiler with project warnings policy, and all relevant tests.
21
- - Test coroutine cancellation/error paths and Java interoperability boundaries when applicable.
22
-
23
- ## Sources
24
-
25
- - [Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html)
26
- - [Kotlin code-quality tools](https://kotlinlang.org/docs/jvm-code-analysis.html)
@@ -1,28 +0,0 @@
1
- # Maven Build Styleguide
2
-
3
- Apply `general.md` and the applicable JVM language guide first.
4
-
5
- ## Build defaults
6
-
7
- - Follow Maven's standard directory layout; override it only for an evidenced project constraint.
8
- - Use the Maven Wrapper when the project adopts it and run builds through `./mvnw`.
9
- - Keep `pom.xml` declarative and readable. Prefer lifecycle/plugin configuration over shell-driven build steps.
10
- - Pin plugin versions and define shared versions once in properties, `dependencyManagement`, or an imported BOM.
11
- - Declare direct dependencies explicitly with the narrowest correct scope. Do not rely accidentally on transitive dependencies.
12
- - Keep parent POM and multi-module relationships shallow and purposeful; modules follow the same standard layout.
13
- - Put reusable build policy in parent/plugin management rather than duplicating it across modules.
14
- - Avoid system-scoped dependencies, version ranges, hidden local-repository assumptions, and secrets in POMs/settings committed to Git.
15
- - Configure reproducible outputs when publishing artifacts, including `project.build.outputTimestamp` and compatible plugin versions.
16
- - Use profiles only for real environment/build variants; keep the default build deterministic.
17
-
18
- ## Verification
19
-
20
- - Run `./mvnw verify` (or the approved Maven command) from a clean checkout.
21
- - Inspect dependency convergence/tree and plugin validation for dependency/build changes.
22
- - Ensure generated output stays under `target/` and is not committed unless explicitly required.
23
-
24
- ## Sources
25
-
26
- - [Maven standard directory layout](https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)
27
- - [Maven dependency mechanism](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html)
28
- - [Maven reproducible builds](https://maven.apache.org/guides/mini/guide-reproducible-builds.html)
@@ -1,27 +0,0 @@
1
- # Python Styleguide
2
-
3
- Apply `general.md` first. Follow repository formatter/linter/type-checker configuration; otherwise use PEP 8 as the baseline.
4
-
5
- ## Pythonic defaults
6
-
7
- - Use four spaces, UTF-8, and automatic formatting. Keep imports at the top in standard-library, third-party, and local groups.
8
- - Use `snake_case` for functions/variables/modules, `CapWords` for classes, and `UPPER_SNAKE_CASE` for constants.
9
- - Prefer clear, direct Python constructs: comprehensions only when readable, context managers for resources, and iteration over manual indexing.
10
- - Compare singleton sentinels such as `None` with `is`/`is not`.
11
- - Use type annotations on public boundaries and non-obvious values; keep runtime validation at untrusted boundaries.
12
- - Raise specific exceptions, preserve causes with `raise ... from ...`, and never use bare `except` for routine handling.
13
- - Use immutable values/defaults where practical; never use a mutable object as a function default.
14
- - Keep modules cohesive and public interfaces explicit. Use dataclasses/value objects where they clarify data semantics.
15
- - Write docstrings for public modules, classes, functions, and methods; keep comments synchronized with behavior.
16
- - Avoid hidden import-time side effects and global mutable state.
17
-
18
- ## Verification
19
-
20
- - Run the approved formatter, linter, type checker, and test suite.
21
- - Test exceptions, boundary values, resource cleanup, async cancellation, and supported Python versions as applicable.
22
-
23
- ## Sources
24
-
25
- - [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/)
26
- - [PEP 257 – Docstring Conventions](https://peps.python.org/pep-0257/)
27
- - [Python documentation](https://docs.python.org/3/)
@@ -1,28 +0,0 @@
1
- # React Styleguide
2
-
3
- Apply `general.md` plus `javascript.md` or `typescript.md` first.
4
-
5
- ## React defaults
6
-
7
- - Write components and Hooks as pure functions: the same inputs produce the same render output.
8
- - Treat props, state, context, and Hook arguments/return values as immutable snapshots.
9
- - Call Hooks only at the top level of React components or custom Hooks; never conditionally or in ordinary functions.
10
- - Use Effects only to synchronize with external systems. Derive render data during render instead of mirroring it into state.
11
- - Keep state as local as practical and maintain one source of truth; lift it only to the closest common owner.
12
- - Prefer composition and focused components over inheritance or large configurable components.
13
- - Give list items stable domain keys, not array indexes when order/identity can change.
14
- - Keep event-driven work in event handlers and render-driven synchronization in Effects; include complete dependencies.
15
- - Make loading, empty, error, and success states explicit.
16
- - Use semantic HTML, accessible names, keyboard behavior, and focus management.
17
-
18
- ## Verification
19
-
20
- - Enable the official React Hooks lint rules and the repository's formatter/linter.
21
- - Test behavior through user-visible interactions; cover state transitions, errors, accessibility, and cleanup.
22
- - Profile before adding memoization; treat `useMemo`/`useCallback` as optimizations, not correctness tools.
23
-
24
- ## Sources
25
-
26
- - [Rules of React](https://react.dev/reference/rules)
27
- - [Keeping Components Pure](https://react.dev/learn/keeping-components-pure)
28
- - [React documentation](https://react.dev/learn)