cadre-ai 3.9.0 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +213 -0
- package/README.md +68 -21
- package/dist/cadre-cli.mjs +4 -6
- package/dist/cadre-mcp.mjs +5397 -3973
- package/package.json +2 -2
- package/skills/archive/SKILL.md +12 -10
- package/skills/create/SKILL.md +9 -9
- package/skills/implement/SKILL.md +10 -8
- package/skills/implement/references/governed-mode.md +1 -1
- package/skills/implement/references/resume-recovery.md +2 -0
- package/skills/refresh/SKILL.md +25 -18
- package/skills/revert/SKILL.md +33 -13
- package/skills/review/SKILL.md +27 -34
- package/skills/revise/SKILL.md +21 -11
- package/skills/status/SKILL.md +2 -0
- package/skills/track/SKILL.md +11 -7
- package/templates/{v5 → v6}/init/workflow.md +1 -1
- package/templates/v1/init/gitignore.template +0 -5
- package/templates/v1/init/patterns/index.md +0 -6
- package/templates/v1/init/project.json +0 -26
- package/templates/v1/init/workflow.md +0 -181
- package/templates/v1/project/archive-operation.json +0 -15
- package/templates/v1/project/refresh-operation.json +0 -14
- package/templates/v1/track/execution.json +0 -19
- package/templates/v1/track/learning.md +0 -39
- package/templates/v1/track/plan.md +0 -39
- package/templates/v1/track/revert-operation.json +0 -13
- package/templates/v1/track/revise-operation.json +0 -14
- package/templates/v1/track/state.json +0 -25
- package/templates/v2/init/archive/.gitkeep +0 -1
- package/templates/v2/init/gitignore.template +0 -8
- package/templates/v2/init/guidelines.md +0 -25
- package/templates/v2/init/operations/.gitkeep +0 -1
- package/templates/v2/init/patterns/index.md +0 -6
- package/templates/v2/init/product.md +0 -30
- package/templates/v2/init/project.json +0 -27
- package/templates/v2/init/refreshes/.gitkeep +0 -1
- package/templates/v2/init/styleguides/general.md +0 -14
- package/templates/v2/init/styleguides/language.md +0 -21
- package/templates/v2/init/tech-stack.md +0 -21
- package/templates/v2/init/tracks/.gitkeep +0 -1
- package/templates/v2/init/tracks.md +0 -6
- package/templates/v2/init/wisps/.gitkeep +0 -1
- package/templates/v2/init/workflow.md +0 -72
- package/templates/v2/project/pattern.md +0 -20
- package/templates/v2/project/refresh.md +0 -21
- package/templates/v2/styleguides/dart.md +0 -27
- package/templates/v2/styleguides/flutter.md +0 -27
- package/templates/v2/styleguides/go.md +0 -29
- package/templates/v2/styleguides/gradle.md +0 -28
- package/templates/v2/styleguides/html-css.md +0 -39
- package/templates/v2/styleguides/index.md +0 -27
- package/templates/v2/styleguides/java.md +0 -27
- package/templates/v2/styleguides/javascript.md +0 -27
- package/templates/v2/styleguides/kotlin.md +0 -26
- package/templates/v2/styleguides/maven.md +0 -28
- package/templates/v2/styleguides/python.md +0 -27
- package/templates/v2/styleguides/react.md +0 -28
- package/templates/v2/styleguides/swift.md +0 -27
- package/templates/v2/styleguides/swiftui.md +0 -27
- package/templates/v2/styleguides/typescript.md +0 -26
- package/templates/v2/track/bug.md +0 -14
- package/templates/v2/track/execution.json +0 -19
- package/templates/v2/track/learning.md +0 -39
- package/templates/v2/track/plan.md +0 -39
- package/templates/v2/track/revision.md +0 -36
- package/templates/v2/track/spec.md +0 -38
- package/templates/v2/track/state.json +0 -31
- package/templates/v3/init/archive/.gitkeep +0 -1
- package/templates/v3/init/gitignore.template +0 -8
- package/templates/v3/init/guidelines.md +0 -25
- package/templates/v3/init/operations/.gitkeep +0 -1
- package/templates/v3/init/product.md +0 -30
- package/templates/v3/init/project.json +0 -27
- package/templates/v3/init/refreshes/.gitkeep +0 -1
- package/templates/v3/init/styleguides/general.md +0 -14
- package/templates/v3/init/styleguides/language.md +0 -21
- package/templates/v3/init/tech-stack.md +0 -21
- package/templates/v3/init/tracks/.gitkeep +0 -1
- package/templates/v3/init/tracks.md +0 -6
- package/templates/v3/init/wisps/.gitkeep +0 -1
- package/templates/v3/init/workflow.md +0 -82
- package/templates/v3/project/archive-operation.json +0 -19
- package/templates/v3/project/pattern.md +0 -20
- package/templates/v3/project/refresh-operation.json +0 -18
- package/templates/v3/project/refresh.md +0 -21
- package/templates/v3/styleguides/dart.md +0 -27
- package/templates/v3/styleguides/flutter.md +0 -27
- package/templates/v3/styleguides/go.md +0 -29
- package/templates/v3/styleguides/gradle.md +0 -28
- package/templates/v3/styleguides/html-css.md +0 -39
- package/templates/v3/styleguides/index.md +0 -27
- package/templates/v3/styleguides/java.md +0 -27
- package/templates/v3/styleguides/javascript.md +0 -27
- package/templates/v3/styleguides/kotlin.md +0 -26
- package/templates/v3/styleguides/maven.md +0 -28
- package/templates/v3/styleguides/python.md +0 -27
- package/templates/v3/styleguides/react.md +0 -28
- package/templates/v3/styleguides/swift.md +0 -27
- package/templates/v3/styleguides/swiftui.md +0 -27
- package/templates/v3/styleguides/typescript.md +0 -26
- package/templates/v3/track/bug.md +0 -14
- package/templates/v3/track/execution.json +0 -19
- package/templates/v3/track/plan.md +0 -39
- package/templates/v3/track/revert-operation.json +0 -17
- package/templates/v3/track/revise-operation.json +0 -18
- package/templates/v3/track/revision.md +0 -36
- package/templates/v3/track/spec.md +0 -38
- package/templates/v3/track/state.json +0 -31
- package/templates/v4/init/archive/.gitkeep +0 -1
- package/templates/v4/init/gitignore.template +0 -8
- package/templates/v4/init/guidelines.md +0 -25
- package/templates/v4/init/operations/.gitkeep +0 -1
- package/templates/v4/init/patterns/index.md +0 -8
- package/templates/v4/init/product.md +0 -30
- package/templates/v4/init/project.json +0 -27
- package/templates/v4/init/refreshes/.gitkeep +0 -1
- package/templates/v4/init/styleguides/general.md +0 -14
- package/templates/v4/init/styleguides/language.md +0 -21
- package/templates/v4/init/tech-stack.md +0 -21
- package/templates/v4/init/tracks/.gitkeep +0 -1
- package/templates/v4/init/tracks.md +0 -6
- package/templates/v4/init/wisps/.gitkeep +0 -1
- package/templates/v4/init/workflow.md +0 -91
- package/templates/v4/project/archive-operation.json +0 -19
- package/templates/v4/project/pattern.md +0 -20
- package/templates/v4/project/refresh-operation.json +0 -18
- package/templates/v4/project/refresh.md +0 -21
- package/templates/v4/styleguides/dart.md +0 -27
- package/templates/v4/styleguides/flutter.md +0 -27
- package/templates/v4/styleguides/go.md +0 -29
- package/templates/v4/styleguides/gradle.md +0 -28
- package/templates/v4/styleguides/html-css.md +0 -39
- package/templates/v4/styleguides/index.md +0 -27
- package/templates/v4/styleguides/java.md +0 -27
- package/templates/v4/styleguides/javascript.md +0 -27
- package/templates/v4/styleguides/kotlin.md +0 -26
- package/templates/v4/styleguides/maven.md +0 -28
- package/templates/v4/styleguides/python.md +0 -27
- package/templates/v4/styleguides/react.md +0 -28
- package/templates/v4/styleguides/swift.md +0 -27
- package/templates/v4/styleguides/swiftui.md +0 -27
- package/templates/v4/styleguides/typescript.md +0 -26
- package/templates/v4/track/bug.md +0 -14
- package/templates/v4/track/execution.json +0 -20
- package/templates/v4/track/learning.md +0 -45
- package/templates/v4/track/plan.md +0 -39
- package/templates/v4/track/revert-operation.json +0 -17
- package/templates/v4/track/revise-operation.json +0 -18
- package/templates/v4/track/revision.md +0 -36
- package/templates/v4/track/spec.md +0 -38
- package/templates/v4/track/state.json +0 -31
- package/templates/v5/init/archive/.gitkeep +0 -1
- package/templates/v5/init/guidelines.md +0 -25
- package/templates/v5/init/operations/.gitkeep +0 -1
- package/templates/v5/init/patterns/index.md +0 -8
- package/templates/v5/init/product.md +0 -30
- package/templates/v5/init/refreshes/.gitkeep +0 -1
- package/templates/v5/init/styleguides/general.md +0 -14
- package/templates/v5/init/styleguides/language.md +0 -21
- package/templates/v5/init/tech-stack.md +0 -21
- package/templates/v5/init/tracks/.gitkeep +0 -1
- package/templates/v5/init/tracks.md +0 -6
- package/templates/v5/init/wisps/.gitkeep +0 -1
- package/templates/v5/project/archive-operation.json +0 -19
- package/templates/v5/project/pattern.md +0 -20
- package/templates/v5/project/refresh-operation.json +0 -18
- package/templates/v5/project/refresh.md +0 -21
- package/templates/v5/styleguides/dart.md +0 -27
- package/templates/v5/styleguides/flutter.md +0 -27
- package/templates/v5/styleguides/go.md +0 -29
- package/templates/v5/styleguides/gradle.md +0 -28
- package/templates/v5/styleguides/html-css.md +0 -39
- package/templates/v5/styleguides/index.md +0 -27
- package/templates/v5/styleguides/java.md +0 -27
- package/templates/v5/styleguides/javascript.md +0 -27
- package/templates/v5/styleguides/kotlin.md +0 -26
- package/templates/v5/styleguides/maven.md +0 -28
- package/templates/v5/styleguides/python.md +0 -27
- package/templates/v5/styleguides/react.md +0 -28
- package/templates/v5/styleguides/swift.md +0 -27
- package/templates/v5/styleguides/swiftui.md +0 -27
- package/templates/v5/styleguides/typescript.md +0 -26
- package/templates/v5/track/bug.md +0 -14
- package/templates/v5/track/learning.md +0 -45
- package/templates/v5/track/revert-operation.json +0 -17
- package/templates/v5/track/revise-operation.json +0 -18
- package/templates/v5/track/revision.md +0 -36
- package/templates/v5/track/spec.md +0 -38
- /package/templates/{v1 → v6}/init/archive/.gitkeep +0 -0
- /package/templates/{v5 → v6}/init/gitignore.template +0 -0
- /package/templates/{v1 → v6}/init/guidelines.md +0 -0
- /package/templates/{v1 → v6}/init/operations/.gitkeep +0 -0
- /package/templates/{v3 → v6}/init/patterns/index.md +0 -0
- /package/templates/{v1 → v6}/init/product.md +0 -0
- /package/templates/{v5 → v6}/init/project.json +0 -0
- /package/templates/{v1 → v6}/init/refreshes/.gitkeep +0 -0
- /package/templates/{v1 → v6}/init/styleguides/general.md +0 -0
- /package/templates/{v1 → v6}/init/styleguides/language.md +0 -0
- /package/templates/{v1 → v6}/init/tech-stack.md +0 -0
- /package/templates/{v1 → v6}/init/tracks/.gitkeep +0 -0
- /package/templates/{v1 → v6}/init/tracks.md +0 -0
- /package/templates/{v1 → v6}/init/wisps/.gitkeep +0 -0
- /package/templates/{v2 → v6}/project/archive-operation.json +0 -0
- /package/templates/{v1 → v6}/project/pattern.md +0 -0
- /package/templates/{v2 → v6}/project/refresh-operation.json +0 -0
- /package/templates/{v1 → v6}/project/refresh.md +0 -0
- /package/templates/{v1 → v6}/styleguides/dart.md +0 -0
- /package/templates/{v1 → v6}/styleguides/flutter.md +0 -0
- /package/templates/{v1 → v6}/styleguides/go.md +0 -0
- /package/templates/{v1 → v6}/styleguides/gradle.md +0 -0
- /package/templates/{v1 → v6}/styleguides/html-css.md +0 -0
- /package/templates/{v1 → v6}/styleguides/index.md +0 -0
- /package/templates/{v1 → v6}/styleguides/java.md +0 -0
- /package/templates/{v1 → v6}/styleguides/javascript.md +0 -0
- /package/templates/{v1 → v6}/styleguides/kotlin.md +0 -0
- /package/templates/{v1 → v6}/styleguides/maven.md +0 -0
- /package/templates/{v1 → v6}/styleguides/python.md +0 -0
- /package/templates/{v1 → v6}/styleguides/react.md +0 -0
- /package/templates/{v1 → v6}/styleguides/swift.md +0 -0
- /package/templates/{v1 → v6}/styleguides/swiftui.md +0 -0
- /package/templates/{v1 → v6}/styleguides/typescript.md +0 -0
- /package/templates/{v1 → v6}/track/bug.md +0 -0
- /package/templates/{v5 → v6}/track/dependency-context.json +0 -0
- /package/templates/{v5 → v6}/track/execution.json +0 -0
- /package/templates/{v3 → v6}/track/learning.md +0 -0
- /package/templates/{v5 → v6}/track/plan.md +0 -0
- /package/templates/{v2 → v6}/track/revert-operation.json +0 -0
- /package/templates/{v2 → v6}/track/revise-operation.json +0 -0
- /package/templates/{v1 → v6}/track/revision.md +0 -0
- /package/templates/{v1 → v6}/track/spec.md +0 -0
- /package/templates/{v5 → v6}/track/state.json +0 -0
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# SwiftUI Styleguide
|
|
2
|
-
|
|
3
|
-
Apply `general.md` and `swift.md` first.
|
|
4
|
-
|
|
5
|
-
## SwiftUI defaults
|
|
6
|
-
|
|
7
|
-
- Keep `body` declarative, deterministic, and free of side effects.
|
|
8
|
-
- Compose small views around cohesive UI responsibilities; extract subviews when it clarifies data flow or identity.
|
|
9
|
-
- Maintain one source of truth for each value. Use local `@State` for view-owned transient state and `@Binding` for borrowed mutable state.
|
|
10
|
-
- Use Observation/observable models for reference model state and inject shared dependencies through explicit initializers or the environment as approved.
|
|
11
|
-
- Do not copy derived/model data into local state. Derive presentation values from source state.
|
|
12
|
-
- Trigger asynchronous lifecycle work with `.task` and respect cancellation; trigger user work from actions.
|
|
13
|
-
- Keep domain/business logic outside views and model transitions explicitly.
|
|
14
|
-
- Use stable identity in `ForEach` and navigation; do not use indexes when domain identity can change.
|
|
15
|
-
- Prefer semantic controls and modifiers over gesture-only replicas; support accessibility labels, Dynamic Type, focus, and platform conventions.
|
|
16
|
-
- Keep previews/examples deterministic and provide representative states when the project uses previews.
|
|
17
|
-
|
|
18
|
-
## Verification
|
|
19
|
-
|
|
20
|
-
- Test model/view-model behavior independently and cover critical UI flows with the approved UI-testing strategy.
|
|
21
|
-
- Verify state restoration, navigation, task cancellation, accessibility, localization, Dynamic Type, and relevant device/platform layouts.
|
|
22
|
-
|
|
23
|
-
## Sources
|
|
24
|
-
|
|
25
|
-
- [SwiftUI documentation](https://developer.apple.com/documentation/swiftui)
|
|
26
|
-
- [SwiftUI model data](https://developer.apple.com/documentation/swiftui/model-data)
|
|
27
|
-
- [SwiftUI apps overview](https://developer.apple.com/documentation/technologyoverviews/swiftui)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# TypeScript Styleguide
|
|
2
|
-
|
|
3
|
-
Apply `general.md` and `javascript.md` first. Preserve approved compiler/linter settings; enable strictness for greenfield code.
|
|
4
|
-
|
|
5
|
-
## Idiomatic defaults
|
|
6
|
-
|
|
7
|
-
- Enable `strict` and the strongest practical project checks; do not weaken global settings to bypass a local issue.
|
|
8
|
-
- Use primitive types (`string`, `number`, `boolean`) rather than boxed types.
|
|
9
|
-
- Prefer `unknown` over `any`; narrow values through validation, type guards, or schema parsing.
|
|
10
|
-
- Model alternatives with discriminated unions and make switches exhaustive with `never` checks where useful.
|
|
11
|
-
- Prefer inference for obvious local values and explicit types for public boundaries, serialized data, and complex returns.
|
|
12
|
-
- Keep type assertions rare and local; never use assertion chains to silence an unresolved mismatch.
|
|
13
|
-
- Avoid non-null assertions unless an invariant is proven and documented.
|
|
14
|
-
- Use generics only when the type parameter expresses a real relationship.
|
|
15
|
-
- Keep runtime validation distinct from compile-time typing at network, storage, environment, and user-input boundaries.
|
|
16
|
-
- Use `satisfies` when validating a value's shape while retaining useful inference.
|
|
17
|
-
|
|
18
|
-
## Verification
|
|
19
|
-
|
|
20
|
-
- Run the formatter, ESLint/type-aware lint rules, `tsc --noEmit`, tests, and the production build.
|
|
21
|
-
- Add compile-time tests for public generic/type utilities when their behavior is non-trivial.
|
|
22
|
-
|
|
23
|
-
## Sources
|
|
24
|
-
|
|
25
|
-
- [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
|
|
26
|
-
- [TypeScript Do's and Don'ts](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Review Bugs: {{TRACK_ID}} @ {{REVIEW_TS}}
|
|
2
|
-
|
|
3
|
-
- Review cycle: {{CYCLE}}
|
|
4
|
-
- Status: approved
|
|
5
|
-
- Reviewed commit range: `{{COMMIT_RANGE}}`
|
|
6
|
-
|
|
7
|
-
## BUG-001: {{TITLE}}
|
|
8
|
-
|
|
9
|
-
- Severity: {{SEVERITY}}
|
|
10
|
-
- Evidence: {{FILE_LINE_OR_TEST}}
|
|
11
|
-
- Impact: {{IMPACT}}
|
|
12
|
-
- Reproduction: {{REPRODUCTION}}
|
|
13
|
-
- Approved remediation acceptance criteria: {{CRITERIA}}
|
|
14
|
-
- Human approval: {{APPROVAL_RECORD}}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"executionId": "{{EXECUTION_ID}}",
|
|
4
|
-
"trackId": "{{TRACK_ID}}",
|
|
5
|
-
"status": "in_progress",
|
|
6
|
-
"checkpoint": "approved",
|
|
7
|
-
"requestedMode": "{{parallel|sequential}}",
|
|
8
|
-
"effectiveMode": "{{parallel|sequential}}",
|
|
9
|
-
"approvalPolicyVersion": 2,
|
|
10
|
-
"approvalMode": "{{governed|phase|track|autonomous}}",
|
|
11
|
-
"maxWorkers": 3,
|
|
12
|
-
"planRevision": 1,
|
|
13
|
-
"planCommit": "{{PLAN_COMMIT}}",
|
|
14
|
-
"graphDigest": "{{GRAPH_DIGEST}}",
|
|
15
|
-
"baseCommit": "{{BASE_COMMIT}}",
|
|
16
|
-
"startedAt": "{{APPROVED_AT}}",
|
|
17
|
-
"completedAt": null,
|
|
18
|
-
"headCommit": null,
|
|
19
|
-
"nodes": {}
|
|
20
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Incremental Learning: {{TRACK_TITLE}}
|
|
2
|
-
|
|
3
|
-
Never overwrite an earlier phase. Each phase begins by reading the learning of every declared dependency phase. A root phase reads the marked Pattern Seed section below. Parallel sibling phases do not assume or consume each other's learning.
|
|
4
|
-
|
|
5
|
-
<!-- cadre:pattern-seed:start -->
|
|
6
|
-
## Pattern Seed
|
|
7
|
-
|
|
8
|
-
<!-- cadre:memory:start -->
|
|
9
|
-
{"schemaVersion":1,"specRevision":1,"planRevision":1,"patterns":[]}
|
|
10
|
-
<!-- cadre:memory:end -->
|
|
11
|
-
|
|
12
|
-
Record every applicable pattern as {"path":"patterns/<slug>.md","sha256":"<SHA-256 of exact approved bytes>"} in the patterns array. Keep the human-readable relevance and constraints below synchronized. An empty array means no existing pattern applies, never missing research.
|
|
13
|
-
|
|
14
|
-
- Spec revision: 1
|
|
15
|
-
- Plan revision: 1
|
|
16
|
-
|
|
17
|
-
| Pattern | Relevance to this track | Constraints to carry forward |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| `{{PATTERN_PATH}}` | {{RELEVANCE}} | {{CONSTRAINTS}} |
|
|
20
|
-
|
|
21
|
-
If no existing pattern is relevant, state that explicitly rather than inventing guidance.
|
|
22
|
-
<!-- cadre:pattern-seed:end -->
|
|
23
|
-
|
|
24
|
-
## Phase 1: {{PHASE_NAME}}
|
|
25
|
-
|
|
26
|
-
### Inputs read
|
|
27
|
-
|
|
28
|
-
{{FILES_PATTERNS_DEPENDENCY_PHASE_LEARNING}}
|
|
29
|
-
|
|
30
|
-
### Task observations
|
|
31
|
-
|
|
32
|
-
{{OBSERVATIONS_WITH_TASK_AND_COMMIT}}
|
|
33
|
-
|
|
34
|
-
### Decisions and corrections
|
|
35
|
-
|
|
36
|
-
{{DECISIONS_AND_CORRECTIONS}}
|
|
37
|
-
|
|
38
|
-
### Reusable pattern candidates
|
|
39
|
-
|
|
40
|
-
{{CANDIDATES_OR_NONE}}
|
|
41
|
-
|
|
42
|
-
### Phase completion
|
|
43
|
-
|
|
44
|
-
- Commit: {{PHASE_COMPLETION_COMMIT}}
|
|
45
|
-
- Human verification: {{APPROVAL_RECORD}}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Plan: {{TRACK_TITLE}}
|
|
2
|
-
|
|
3
|
-
- Track: `{{TRACK_ID}}`
|
|
4
|
-
- Spec revision: 1
|
|
5
|
-
- Plan revision: 1
|
|
6
|
-
- Status: proposed
|
|
7
|
-
|
|
8
|
-
## Phase 1: {{DELIVERY_PHASE_NAME}}
|
|
9
|
-
|
|
10
|
-
- Phase dependencies: none
|
|
11
|
-
|
|
12
|
-
### Outcome
|
|
13
|
-
|
|
14
|
-
{{PHASE_OUTCOME}}
|
|
15
|
-
|
|
16
|
-
- [ ] T1.1 {{IMPLEMENTATION_OR_VERIFICATION_TASK}}
|
|
17
|
-
- Task dependencies: none
|
|
18
|
-
- [ ] T1.2 User Manual Verification
|
|
19
|
-
|
|
20
|
-
- Phase completion commit: pending
|
|
21
|
-
|
|
22
|
-
## Phase 2: Track-level User Manual Verification
|
|
23
|
-
|
|
24
|
-
### Outcome
|
|
25
|
-
|
|
26
|
-
The human verifies the complete track against the approved specification and acceptance criteria.
|
|
27
|
-
|
|
28
|
-
- [ ] T2.1 User Manual Verification
|
|
29
|
-
|
|
30
|
-
- Phase completion commit: pending
|
|
31
|
-
|
|
32
|
-
## Approval
|
|
33
|
-
|
|
34
|
-
{{APPROVAL_RECORD}}
|
|
35
|
-
|
|
36
|
-
<!-- Regular phases declare dependencies explicitly. Regular tasks declare same-phase dependencies explicitly. -->
|
|
37
|
-
<!-- Phase User Manual Verification implicitly depends on every sibling task. -->
|
|
38
|
-
<!-- Track-level User Manual Verification implicitly depends on every preceding phase. -->
|
|
39
|
-
<!-- For a completed task, append a commit marker containing the full hexadecimal SHA. -->
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"action": "revert",
|
|
3
|
-
"checkpoint": "approved",
|
|
4
|
-
"baseCommit": "{{BASE_COMMIT}}",
|
|
5
|
-
"expectedCommit": "cadre(revert): reconcile {{TRACK_ID}}",
|
|
6
|
-
"approvedArtifacts": ["plan.md", "learning.md", "state.json"],
|
|
7
|
-
"approvalDigest": "{{APPROVAL_DIGEST}}",
|
|
8
|
-
"approvedArtifactHashes": [
|
|
9
|
-
{ "path": "{{APPROVED_ARTIFACT}}", "sha256": "{{ARTIFACT_SHA256}}" }
|
|
10
|
-
],
|
|
11
|
-
"artifactProgress": [],
|
|
12
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
13
|
-
"targetKind": "{{task|phase|track}}",
|
|
14
|
-
"targetId": "{{TARGET_ID}}",
|
|
15
|
-
"commits": ["{{COMMIT_SHA}}"],
|
|
16
|
-
"revertCommits": []
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"action": "revise",
|
|
3
|
-
"checkpoint": "approved",
|
|
4
|
-
"baseCommit": "{{BASE_COMMIT}}",
|
|
5
|
-
"expectedCommit": "cadre(revise): update {{TRACK_ID}}",
|
|
6
|
-
"approvedArtifacts": ["{{REVISION_PATH}}"],
|
|
7
|
-
"approvalDigest": "{{APPROVAL_DIGEST}}",
|
|
8
|
-
"approvedArtifactHashes": [
|
|
9
|
-
{ "path": "{{APPROVED_ARTIFACT}}", "sha256": "{{ARTIFACT_SHA256}}" }
|
|
10
|
-
],
|
|
11
|
-
"artifactProgress": [],
|
|
12
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
13
|
-
"sourceStatus": "{{SOURCE_STATUS}}",
|
|
14
|
-
"targetStatus": "{{TARGET_STATUS}}",
|
|
15
|
-
"revisionPath": "{{REVISION_PATH}}",
|
|
16
|
-
"previousRevision": 1,
|
|
17
|
-
"newRevision": 2
|
|
18
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Revision {{REVISION_TS}}: {{TRACK_ID}}
|
|
2
|
-
|
|
3
|
-
- Source status: {{SOURCE_STATUS}}
|
|
4
|
-
- Target status: {{TARGET_STATUS}}
|
|
5
|
-
- Base commit: {{BASE_COMMIT}}
|
|
6
|
-
- Previous track revision: {{OLD_TRACK_REVISION}}
|
|
7
|
-
- New track revision: {{NEW_TRACK_REVISION}}
|
|
8
|
-
- Previous spec revision: {{OLD_SPEC_REVISION}}
|
|
9
|
-
- New spec revision: {{NEW_SPEC_REVISION}}
|
|
10
|
-
- Previous plan revision: {{OLD_PLAN_REVISION}}
|
|
11
|
-
- New plan revision: {{NEW_PLAN_REVISION}}
|
|
12
|
-
- Revision commit: pending
|
|
13
|
-
|
|
14
|
-
## Requested change
|
|
15
|
-
|
|
16
|
-
{{REQUEST}}
|
|
17
|
-
|
|
18
|
-
## Proposed artifact changes
|
|
19
|
-
|
|
20
|
-
{{DIFF_SUMMARY}}
|
|
21
|
-
|
|
22
|
-
## Affected work and provenance
|
|
23
|
-
|
|
24
|
-
{{AFFECTED_PHASES_TASKS_AND_COMMIT_DISPOSITION}}
|
|
25
|
-
|
|
26
|
-
## Review and verification impact
|
|
27
|
-
|
|
28
|
-
{{REVIEW_READINESS_AND_MANUAL_VERIFICATION_IMPACT}}
|
|
29
|
-
|
|
30
|
-
## Cascading dependency impact
|
|
31
|
-
|
|
32
|
-
{{TRANSITIVE_IMPACT}}
|
|
33
|
-
|
|
34
|
-
## Approval
|
|
35
|
-
|
|
36
|
-
{{APPROVAL_RECORD}}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Specification: {{TRACK_TITLE}}
|
|
2
|
-
|
|
3
|
-
- Track: `{{TRACK_ID}}`
|
|
4
|
-
- Type: `{{feature|bug}}`
|
|
5
|
-
- Revision: 1
|
|
6
|
-
- Status: proposed
|
|
7
|
-
|
|
8
|
-
## Goal and scope
|
|
9
|
-
|
|
10
|
-
{{GOAL_SCOPE}}
|
|
11
|
-
|
|
12
|
-
## Functional Requirements
|
|
13
|
-
|
|
14
|
-
- FR-001: {{REQUIREMENT}}
|
|
15
|
-
|
|
16
|
-
## Non-Functional Requirements
|
|
17
|
-
|
|
18
|
-
- NFR-001: {{REQUIREMENT_AND_MEASURE}}
|
|
19
|
-
|
|
20
|
-
## Acceptance Criteria
|
|
21
|
-
|
|
22
|
-
- AC-001: {{OBSERVABLE_ACCEPTANCE_CRITERION}}
|
|
23
|
-
|
|
24
|
-
## Dependencies
|
|
25
|
-
|
|
26
|
-
{{TRACK_DEPENDENCIES_OR_NONE}}
|
|
27
|
-
|
|
28
|
-
## Additional Information
|
|
29
|
-
|
|
30
|
-
{{CONSTRAINTS_RISKS_ASSUMPTIONS_REFERENCES}}
|
|
31
|
-
|
|
32
|
-
## Dependent-track impact
|
|
33
|
-
|
|
34
|
-
{{KNOWN_OR_POTENTIAL_IMPACT}}
|
|
35
|
-
|
|
36
|
-
## Approval
|
|
37
|
-
|
|
38
|
-
{{APPROVAL_RECORD}}
|
|
@@ -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 +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)
|