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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +176 -0
- package/README.md +64 -17
- package/dist/cadre-cli.mjs +4 -6
- package/dist/cadre-mcp.mjs +5217 -4061
- package/package.json +2 -2
- package/skills/archive/SKILL.md +11 -11
- package/skills/create/SKILL.md +9 -9
- package/skills/implement/SKILL.md +7 -7
- package/skills/implement/references/resume-recovery.md +2 -0
- package/skills/refresh/SKILL.md +25 -18
- package/skills/revert/SKILL.md +29 -13
- package/skills/review/SKILL.md +21 -30
- package/skills/revise/SKILL.md +21 -11
- package/skills/status/SKILL.md +2 -0
- package/skills/track/SKILL.md +10 -6
- 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,15 +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
|
-
"artifactProgress": [],
|
|
13
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
14
|
-
"archiveCommit": null
|
|
15
|
-
}
|
|
@@ -1,14 +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
|
-
"artifactProgress": [],
|
|
12
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
13
|
-
"refreshCommit": null
|
|
14
|
-
}
|
|
@@ -1,19 +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
|
-
"approvalMode": "{{governed|phase|autonomous}}",
|
|
10
|
-
"maxWorkers": 3,
|
|
11
|
-
"planRevision": 1,
|
|
12
|
-
"planCommit": "{{PLAN_COMMIT}}",
|
|
13
|
-
"graphDigest": "{{GRAPH_DIGEST}}",
|
|
14
|
-
"baseCommit": "{{BASE_COMMIT}}",
|
|
15
|
-
"startedAt": "{{APPROVED_AT}}",
|
|
16
|
-
"completedAt": null,
|
|
17
|
-
"headCommit": null,
|
|
18
|
-
"nodes": {}
|
|
19
|
-
}
|
|
@@ -1,39 +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
|
-
- Spec revision: 1
|
|
9
|
-
- Plan revision: 1
|
|
10
|
-
|
|
11
|
-
| Pattern | Relevance to this track | Constraints to carry forward |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| `{{PATTERN_PATH}}` | {{RELEVANCE}} | {{CONSTRAINTS}} |
|
|
14
|
-
|
|
15
|
-
If no existing pattern is relevant, state that explicitly rather than inventing guidance.
|
|
16
|
-
<!-- cadre:pattern-seed:end -->
|
|
17
|
-
|
|
18
|
-
## Phase 1: {{PHASE_NAME}}
|
|
19
|
-
|
|
20
|
-
### Inputs read
|
|
21
|
-
|
|
22
|
-
{{FILES_PATTERNS_DEPENDENCY_PHASE_LEARNING}}
|
|
23
|
-
|
|
24
|
-
### Task observations
|
|
25
|
-
|
|
26
|
-
{{OBSERVATIONS_WITH_TASK_AND_COMMIT}}
|
|
27
|
-
|
|
28
|
-
### Decisions and corrections
|
|
29
|
-
|
|
30
|
-
{{DECISIONS_AND_CORRECTIONS}}
|
|
31
|
-
|
|
32
|
-
### Reusable pattern candidates
|
|
33
|
-
|
|
34
|
-
{{CANDIDATES_OR_NONE}}
|
|
35
|
-
|
|
36
|
-
### Phase completion
|
|
37
|
-
|
|
38
|
-
- Commit: {{PHASE_COMPLETION_COMMIT}}
|
|
39
|
-
- 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,13 +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
|
-
"artifactProgress": [],
|
|
8
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
9
|
-
"targetKind": "{{task|phase|track}}",
|
|
10
|
-
"targetId": "{{TARGET_ID}}",
|
|
11
|
-
"commits": ["{{COMMIT_SHA}}"],
|
|
12
|
-
"revertCommits": []
|
|
13
|
-
}
|
|
@@ -1,14 +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
|
-
"artifactProgress": [],
|
|
8
|
-
"approvedAt": "{{APPROVED_AT}}",
|
|
9
|
-
"sourceStatus": "{{SOURCE_STATUS}}",
|
|
10
|
-
"targetStatus": "{{TARGET_STATUS}}",
|
|
11
|
-
"revisionPath": "{{REVISION_PATH}}",
|
|
12
|
-
"previousRevision": 1,
|
|
13
|
-
"newRevision": 2
|
|
14
|
-
}
|
|
@@ -1,25 +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
|
-
"approvedAt": "{{APPROVED_AT}}"
|
|
21
|
-
},
|
|
22
|
-
"lastExecution": null,
|
|
23
|
-
"reviewCycles": [],
|
|
24
|
-
"history": []
|
|
25
|
-
}
|
|
@@ -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,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,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"runtimeVersion": "{{RUNTIME_VERSION}}",
|
|
4
|
-
"templateSetVersion": "{{TEMPLATE_SET_VERSION}}",
|
|
5
|
-
"project": {
|
|
6
|
-
"name": "{{PROJECT_NAME}}",
|
|
7
|
-
"context": "{{greenfield|brownfield}}"
|
|
8
|
-
},
|
|
9
|
-
"setup": {
|
|
10
|
-
"status": "in_progress",
|
|
11
|
-
"checkpoint": "approved",
|
|
12
|
-
"commit": null,
|
|
13
|
-
"artifactProgress": [],
|
|
14
|
-
"operation": {
|
|
15
|
-
"action": "create",
|
|
16
|
-
"baseCommit": "{{BASE_COMMIT_OR_NULL}}",
|
|
17
|
-
"expectedCommit": "cadre(create): initialize project harness",
|
|
18
|
-
"repositoryRoot": "{{PROJECT_ROOT}}",
|
|
19
|
-
"gitDisposition": "{{existing|initialize}}",
|
|
20
|
-
"approvedArtifacts": [],
|
|
21
|
-
"approvedArtifactHashes": [],
|
|
22
|
-
"approvedAt": "{{APPROVED_AT}}"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"lastRefresh": null,
|
|
26
|
-
"history": []
|
|
27
|
-
}
|
|
@@ -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,72 +0,0 @@
|
|
|
1
|
-
# Cadre Workflow
|
|
2
|
-
|
|
3
|
-
This is the durable project-level Cadre contract. Installed skills supply command procedure; stop and present any conflict with this file.
|
|
4
|
-
|
|
5
|
-
## Authority and project boundaries
|
|
6
|
-
|
|
7
|
-
- The installed Cadre MCP server is the authoritative runtime and immutable template provider.
|
|
8
|
-
- `.cadre/` contains approved mutable context, lifecycle state, and history only. Runtime code and template catalogs stay in the installed plugin.
|
|
9
|
-
- Read every existing artifact and its relevant repository context before editing it. Never reconstruct state or file content from memory.
|
|
10
|
-
- Resolve the exact repository root before mutation. Never create a nested repository or operate outside the approved root.
|
|
11
|
-
- A missing required MCP capability blocks stateful work; do not recreate it with shell or filesystem logic.
|
|
12
|
-
|
|
13
|
-
## Human governance
|
|
14
|
-
|
|
15
|
-
- Semantic content, scope, selection, and material consequences remain proposals until the human explicitly approves them.
|
|
16
|
-
- Combine related decisions into one complete authorization envelope when their exact artifacts, focused diffs, consequences, and verification evidence are available together.
|
|
17
|
-
- Named deterministic consequences—validation, indexes, transitions, commits, and provenance—need no additional approval.
|
|
18
|
-
- Changed content, scope, selection, digest, or material consequences require a corrected proposal and approval.
|
|
19
|
-
- An MCP `approval_required` result is not approval. Call its adaptive command again in `apply` mode only after the human approves the unchanged digest-bound proposal.
|
|
20
|
-
- Host security permission is separate from Cadre approval and never approves product content, commits, merges, or lifecycle state.
|
|
21
|
-
|
|
22
|
-
## Candidate artifacts
|
|
23
|
-
|
|
24
|
-
- Write unapproved artifact bodies only beneath `<project-root>/.cadre/stage/<candidate-id>/` at their eventual `.cadre/`-relative paths.
|
|
25
|
-
- Never place unapproved files in canonical `.cadre/` and never transport candidate bodies through MCP when a candidate command exists.
|
|
26
|
-
- Inspect the complete exact candidate set before approval. Approval binds its paths and SHA-256 hashes to one digest.
|
|
27
|
-
- Candidate paths must be relative and traversal-free. Stages reject symbolic links, unexpected files, and size-limit violations.
|
|
28
|
-
- After approval, journal the digest and manifest, promote only matching bytes, verify hashes, and retain the stage through commit recording.
|
|
29
|
-
- `.cadre/stage/` is never committed. A changed candidate requires fresh inspection and approval.
|
|
30
|
-
|
|
31
|
-
## Resumability and Git safety
|
|
32
|
-
|
|
33
|
-
- Every multi-step mutation records an operation journal after approval and before canonical writes or Git mutation.
|
|
34
|
-
- On resume, reconcile the journal, candidate hashes, canonical files, Git status, expected commit, and recorded checkpoint. Continue only the first incomplete deterministic step.
|
|
35
|
-
- If an expected commit already exists with the correct base relationship and content, record it instead of repeating it.
|
|
36
|
-
- Stop on any journal, hash, path, worktree, branch, or history mismatch. Never reset, discard, force-delete, rewrite public history, or guess a repair.
|
|
37
|
-
- Use additive Git history and focused Conventional Commits. Do not include unrelated files or runtime-only worktrees.
|
|
38
|
-
- Reuse passing verification while product files, test inputs, and verification policy are unchanged. Cadre-only bookkeeping does not invalidate product verification.
|
|
39
|
-
|
|
40
|
-
## Sources of truth
|
|
41
|
-
|
|
42
|
-
- `spec.md` defines approved scope, requirements, and acceptance criteria.
|
|
43
|
-
- `plan.md` defines phase/task identity, dependencies, verification barriers, completion markers, and commit provenance.
|
|
44
|
-
- Track `state.json` defines identity, lifecycle status, dependencies, revision, checkpoints, active operation, execution pointer, review cycles, and history.
|
|
45
|
-
- Execution journals define live scheduling and provenance; do not duplicate active node state.
|
|
46
|
-
- `project.json` defines project identity plus setup and refresh history; it does not duplicate track records.
|
|
47
|
-
- `tracks.md` is a generated summary. Never hand-edit it or use it as dependency state.
|
|
48
|
-
- Git is implementation history. Completion claims require reachable recorded commits.
|
|
49
|
-
|
|
50
|
-
## Lifecycle and mutation rules
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
drafting-spec -> drafting-plan -> planned -> in_progress -> ready_for_review
|
|
54
|
-
| | | |
|
|
55
|
-
+-- revise ---+-------------+ +-- revise --> in_progress/planned
|
|
56
|
-
| | +-- approved bugs --> in_progress
|
|
57
|
-
+-------------+ +-- clean review --> completed --> archived
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
- Only `review` may mark a track `completed`; only `archive` may mark it `archived`.
|
|
61
|
-
- Completed or archived intent changes create successor work rather than rewriting terminal history.
|
|
62
|
-
- Track dependencies are read from track state and must be completed or archived before dependent execution.
|
|
63
|
-
- Every delivery phase ends in a derived `User Manual Verification` barrier. The final phase is the track-level manual-verification barrier.
|
|
64
|
-
- An `implement` invocation authorizes the approved plan under its persisted approval mode. `phase` is the default; `governed` adds regular-task and integration decisions; `autonomous` still requires track-level manual verification.
|
|
65
|
-
- Deterministic MCP operations use one call. Approval-aware operations use `prepare`, pause for the human, then `apply` with the unchanged token.
|
|
66
|
-
|
|
67
|
-
## Context reuse
|
|
68
|
-
|
|
69
|
-
- Inspect project status once at command entry using the narrowest applicable view. Use separate full validation only for final mutation gates or diagnostics.
|
|
70
|
-
- Read each required file once and reuse unchanged content by path and Git hash. Continue truncated reads from the first unread line.
|
|
71
|
-
- Fetch known immutable templates in one bundle and retain them through the decision. Do not rediscover known IDs through the catalog.
|
|
72
|
-
- Present concise status and focused diffs. Identify large unchanged defaults by version, path, and hash unless requested.
|
|
@@ -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,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/)
|