@geraldmaron/construct 1.0.5 → 1.0.6
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/README.md +8 -4
- package/agents/prompts/cx-accessibility.md +3 -3
- package/agents/prompts/cx-ai-engineer.md +7 -7
- package/agents/prompts/cx-architect.md +6 -6
- package/agents/prompts/cx-business-strategist.md +6 -6
- package/agents/prompts/cx-data-analyst.md +7 -7
- package/agents/prompts/cx-data-engineer.md +3 -3
- package/agents/prompts/cx-debugger.md +6 -6
- package/agents/prompts/cx-designer.md +5 -5
- package/agents/prompts/cx-devil-advocate.md +4 -4
- package/agents/prompts/cx-docs-keeper.md +5 -5
- package/agents/prompts/cx-engineer.md +5 -5
- package/agents/prompts/cx-evaluator.md +2 -2
- package/agents/prompts/cx-explorer.md +8 -8
- package/agents/prompts/cx-legal-compliance.md +2 -2
- package/agents/prompts/cx-operations.md +5 -5
- package/agents/prompts/cx-orchestrator.md +10 -10
- package/agents/prompts/cx-platform-engineer.md +5 -5
- package/agents/prompts/cx-product-manager.md +4 -4
- package/agents/prompts/cx-qa.md +8 -8
- package/agents/prompts/cx-rd-lead.md +9 -9
- package/agents/prompts/cx-release-manager.md +5 -5
- package/agents/prompts/cx-researcher.md +22 -22
- package/agents/prompts/cx-reviewer.md +7 -7
- package/agents/prompts/cx-security.md +10 -10
- package/agents/prompts/cx-sre.md +7 -7
- package/agents/prompts/cx-test-automation.md +3 -3
- package/agents/prompts/cx-trace-reviewer.md +8 -8
- package/agents/prompts/cx-ux-researcher.md +3 -3
- package/bin/construct +235 -21
- package/commands/build/feature.md +4 -4
- package/commands/build/fix.md +8 -8
- package/commands/design/access.md +3 -3
- package/commands/design/flow.md +3 -3
- package/commands/design/ui.md +4 -4
- package/commands/measure/experiment.md +5 -5
- package/commands/measure/metrics.md +3 -3
- package/commands/measure/results.md +4 -4
- package/commands/plan/api.md +3 -3
- package/commands/plan/challenge.md +3 -3
- package/commands/plan/decide.md +3 -3
- package/commands/plan/feature.md +7 -7
- package/commands/plan/requirements.md +3 -3
- package/commands/remember/context.md +5 -5
- package/commands/remember/handoff.md +3 -3
- package/commands/remember/runbook.md +3 -3
- package/commands/review/code.md +8 -8
- package/commands/review/quality.md +4 -4
- package/commands/review/security.md +3 -3
- package/commands/ship/ready.md +3 -3
- package/commands/ship/release.md +3 -3
- package/commands/ship/status.md +4 -4
- package/commands/understand/docs.md +3 -3
- package/commands/understand/this.md +4 -4
- package/commands/understand/why.md +8 -8
- package/commands/work/clean.md +14 -14
- package/commands/work/drive.md +10 -10
- package/commands/work/optimize-prompts.md +9 -9
- package/commands/work/parallel-review.md +8 -8
- package/db/schema/006_graph.sql +24 -0
- package/examples/provider-plugin/README.md +7 -7
- package/examples/seed-observations/README.md +6 -6
- package/examples/seed-observations/anti-patterns.md +14 -14
- package/examples/seed-observations/decisions.md +4 -4
- package/examples/seed-observations/patterns.md +14 -14
- package/lib/auto-docs.mjs +8 -3
- package/lib/cli-commands.mjs +2 -2
- package/lib/flavors/loader.mjs +1 -1
- package/lib/knowledge/graph.mjs +213 -0
- package/lib/mcp/server.mjs +187 -1
- package/lib/mcp/tools/profile.mjs +270 -0
- package/package.json +1 -1
- package/platforms/claude/CLAUDE.md +6 -6
- package/rules/common/agents.md +2 -2
- package/rules/common/beads-hygiene.md +11 -11
- package/rules/common/code-review.md +1 -1
- package/rules/common/coding-style.md +1 -1
- package/rules/common/comments.md +8 -8
- package/rules/common/commit-approval.md +4 -4
- package/rules/common/cx-agent-routing.md +2 -2
- package/rules/common/cx-skill-routing.md +2 -2
- package/rules/common/development-workflow.md +1 -1
- package/rules/common/doc-ownership.md +2 -2
- package/rules/common/efficiency.md +3 -3
- package/rules/common/framing.md +1 -1
- package/rules/common/git-workflow.md +1 -1
- package/rules/common/patterns.md +1 -1
- package/rules/common/performance.md +1 -1
- package/rules/common/release-gates.md +7 -7
- package/rules/common/research.md +4 -4
- package/rules/common/security.md +1 -1
- package/rules/common/skill-composition.md +8 -8
- package/rules/common/testing.md +1 -1
- package/rules/golang/coding-style.md +2 -2
- package/rules/golang/hooks.md +1 -1
- package/rules/golang/patterns.md +1 -1
- package/rules/golang/security.md +1 -1
- package/rules/golang/testing.md +1 -1
- package/rules/python/coding-style.md +1 -1
- package/rules/python/hooks.md +1 -1
- package/rules/python/patterns.md +1 -1
- package/rules/python/security.md +1 -1
- package/rules/python/testing.md +1 -1
- package/rules/swift/coding-style.md +3 -3
- package/rules/swift/hooks.md +2 -2
- package/rules/swift/patterns.md +2 -2
- package/rules/swift/security.md +4 -4
- package/rules/swift/testing.md +2 -2
- package/rules/typescript/coding-style.md +1 -1
- package/rules/typescript/hooks.md +1 -1
- package/rules/typescript/patterns.md +1 -1
- package/rules/typescript/security.md +1 -1
- package/rules/typescript/testing.md +1 -1
- package/rules/web/coding-style.md +1 -1
- package/rules/web/design-quality.md +1 -1
- package/rules/web/hooks.md +1 -1
- package/rules/web/patterns.md +1 -1
- package/rules/web/performance.md +1 -1
- package/rules/web/security.md +1 -1
- package/rules/web/testing.md +1 -1
- package/skills/ai/agent-dev.md +1 -1
- package/skills/ai/llm-security.md +1 -1
- package/skills/ai/ml-ops.md +6 -6
- package/skills/ai/orchestration-workflow.md +1 -1
- package/skills/ai/prompt-and-eval.md +1 -1
- package/skills/ai/prompt-optimizer.md +13 -13
- package/skills/ai/rag-system.md +1 -1
- package/skills/architecture/api-design.md +1 -1
- package/skills/architecture/caching.md +1 -1
- package/skills/architecture/cloud-native.md +1 -1
- package/skills/architecture/message-queue.md +1 -1
- package/skills/architecture/security-arch.md +1 -1
- package/skills/compliance/ai-disclosure.md +1 -1
- package/skills/compliance/data-privacy.md +1 -1
- package/skills/compliance/license-audit.md +2 -2
- package/skills/compliance/regulatory-review.md +1 -1
- package/skills/development/cpp.md +1 -1
- package/skills/development/go.md +1 -1
- package/skills/development/java.md +1 -1
- package/skills/development/kotlin.md +9 -9
- package/skills/development/mobile-crossplatform.md +13 -13
- package/skills/development/python.md +1 -1
- package/skills/development/rust.md +1 -1
- package/skills/development/shell.md +1 -1
- package/skills/development/swift.md +6 -6
- package/skills/development/typescript.md +1 -1
- package/skills/devops/ci-cd.md +5 -5
- package/skills/devops/containerization.md +9 -9
- package/skills/devops/cost-optimization.md +1 -1
- package/skills/devops/data-engineering.md +2 -2
- package/skills/devops/database.md +1 -1
- package/skills/devops/dependency-management.md +3 -3
- package/skills/devops/devsecops.md +1 -1
- package/skills/devops/git-workflow.md +1 -1
- package/skills/devops/incident-response.md +18 -18
- package/skills/devops/monorepo.md +5 -5
- package/skills/devops/observability.md +1 -1
- package/skills/devops/performance.md +1 -1
- package/skills/devops/testing.md +1 -1
- package/skills/docs/adr-workflow.md +2 -2
- package/skills/docs/backlog-proposal-workflow.md +1 -1
- package/skills/docs/customer-profile-workflow.md +1 -1
- package/skills/docs/document-ingest-workflow.md +1 -1
- package/skills/docs/evidence-ingest-workflow.md +1 -1
- package/skills/docs/init-docs.md +15 -15
- package/skills/docs/init-project.md +1 -1
- package/skills/docs/prd-workflow.md +3 -3
- package/skills/docs/prfaq-workflow.md +1 -1
- package/skills/docs/product-intelligence-review.md +1 -1
- package/skills/docs/product-intelligence-workflow.md +1 -1
- package/skills/docs/product-signal-workflow.md +9 -9
- package/skills/docs/research-workflow.md +10 -10
- package/skills/docs/runbook-workflow.md +2 -2
- package/skills/docs/strategy-workflow.md +3 -3
- package/skills/exploration/repo-map.md +11 -11
- package/skills/frameworks/django.md +15 -15
- package/skills/frameworks/nextjs.md +16 -16
- package/skills/frameworks/react.md +12 -12
- package/skills/frameworks/spring-boot.md +12 -12
- package/skills/frontend-design/accessibility.md +6 -6
- package/skills/frontend-design/component-patterns.md +1 -1
- package/skills/frontend-design/engineering.md +1 -1
- package/skills/frontend-design/state-management.md +1 -1
- package/skills/frontend-design/ui-aesthetics.md +1 -1
- package/skills/frontend-design/ux-principles.md +1 -1
- package/skills/operating/orchestration-reference.md +27 -27
- package/skills/quality-gates/review-work.md +3 -3
- package/skills/quality-gates/verify-change.md +1 -1
- package/skills/quality-gates/verify-module.md +1 -1
- package/skills/quality-gates/verify-quality.md +1 -1
- package/skills/quality-gates/verify-security.md +1 -1
- package/skills/routing.md +14 -14
- package/skills/security/blue-team.md +1 -1
- package/skills/security/code-audit.md +1 -1
- package/skills/security/pentest.md +1 -1
- package/skills/security/red-team.md +1 -1
- package/skills/security/threat-intel.md +1 -1
- package/skills/security/vuln-research.md +1 -1
- package/skills/utility/clean-code.md +2 -2
- package/templates/docs/changelog-entry.md +1 -1
- package/templates/docs/construct_guide.md +13 -13
- package/templates/docs/meta-prd.md +16 -16
- package/templates/docs/one-pager.md +1 -1
- package/templates/docs/prd-business.md +1 -1
- package/templates/docs/prd-platform.md +1 -1
- package/templates/docs/prd.md +17 -17
- package/templates/docs/research-brief.md +8 -8
- package/templates/docs/rfc.md +1 -1
- package/templates/docs/strategy.md +1 -1
package/skills/docs/init-docs.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/init-docs.md
|
|
2
|
+
skills/docs/init-docs.md (Skill: init-docs) Initialize Project Documentation Structure: `init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `documentation init`
|
|
3
3
|
|
|
4
4
|
## Trigger keywords `init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `documentation init`
|
|
5
5
|
-->
|
|
6
|
-
# Skill: init-docs
|
|
6
|
+
# Skill: init-docs: Initialize Project Documentation Structure
|
|
7
7
|
|
|
8
8
|
## Trigger keywords
|
|
9
9
|
`init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `documentation init`
|
|
10
10
|
|
|
11
11
|
## What this skill does
|
|
12
12
|
|
|
13
|
-
When invoked, gather the user's intent and create a tailored documentation directory structure. The structure serves as both human reference and **required operational project state
|
|
13
|
+
When invoked, gather the user's intent and create a tailored documentation directory structure. The structure serves as both human reference and **required operational project state**: all LLMs working in this project, including Construct, should read these docs to understand purpose, decisions, constraints, and active reality before acting.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## Step 1
|
|
17
|
+
## Step 1: Gather intent (ask these questions)
|
|
18
18
|
|
|
19
19
|
Ask the user **all at once** (single message, not one at a time):
|
|
20
20
|
|
|
@@ -26,9 +26,9 @@ Ask the user **all at once** (single message, not one at a time):
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
## Step 2
|
|
29
|
+
## Step 2: Generate the structure
|
|
30
30
|
|
|
31
|
-
Based on answers, create the `docs/` directory and appropriate subdirectories. Use this as a base
|
|
31
|
+
Based on answers, create the `docs/` directory and appropriate subdirectories. Use this as a base: add or remove sections based on the user's answers.
|
|
32
32
|
|
|
33
33
|
### Core structure (always include)
|
|
34
34
|
|
|
@@ -45,12 +45,12 @@ docs/
|
|
|
45
45
|
|
|
46
46
|
## Interactive UX (TTY)
|
|
47
47
|
|
|
48
|
-
When run interactively, `construct init-docs` renders a keyboard-driven **full-screen checkbox picker
|
|
48
|
+
When run interactively, `construct init-docs` renders a keyboard-driven **full-screen checkbox picker**: all available lanes listed with the default set pre-checked and context-suggested lanes highlighted in the UI. No typing required.
|
|
49
49
|
|
|
50
|
-
- **↑ /
|
|
51
|
-
- **Space
|
|
52
|
-
- **a
|
|
53
|
-
- **Enter
|
|
50
|
+
- **↑ / ↓**: move cursor (details shown in a dedicated panel)
|
|
51
|
+
- **Space**: toggle lane on/off
|
|
52
|
+
- **a**: toggle all on/off
|
|
53
|
+
- **Enter**: confirm and scaffold
|
|
54
54
|
- Follow-up choices use the same menu pattern instead of free-text answers
|
|
55
55
|
|
|
56
56
|
If the user selects the `intake` lane, `construct init-docs` should also create `.cx/inbox/`. Both `.cx/inbox/` and `docs/intake/` act as drop zones for ingestable files, while `docs/intake/` also serves as the durable paper trail lane.
|
|
@@ -90,7 +90,7 @@ When run non-interactively (`--yes` or piped stdin), the lean default set is use
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
## Step 3
|
|
93
|
+
## Step 3: Make the core docs explicit project state
|
|
94
94
|
|
|
95
95
|
The required core documents are the operational state surface for the repo. All LLMs working here should read and maintain them:
|
|
96
96
|
|
|
@@ -104,9 +104,9 @@ Fill these in based on the user's answers and the actual repo shape. Treat them
|
|
|
104
104
|
|
|
105
105
|
---
|
|
106
106
|
|
|
107
|
-
## Step 4
|
|
107
|
+
## Step 4: Create skeleton files
|
|
108
108
|
|
|
109
|
-
Each created file should have a minimal, useful skeleton
|
|
109
|
+
Each created file should have a minimal, useful skeleton: not just a title. Skeletons should include:
|
|
110
110
|
- A one-line description of what goes in this file
|
|
111
111
|
- Section headings relevant to the doc type
|
|
112
112
|
- A note at the top that the file is required project state and all LLMs should keep it current.
|
|
@@ -156,7 +156,7 @@ Link to `docs/adr/` or the canonical project decision log used in this repo.
|
|
|
156
156
|
|
|
157
157
|
---
|
|
158
158
|
|
|
159
|
-
## Step 5
|
|
159
|
+
## Step 5: Tell the repo how upkeep works
|
|
160
160
|
|
|
161
161
|
After creating the files, instruct the user:
|
|
162
162
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/init-project.md
|
|
2
|
+
skills/docs/init-project.md (Project Initialization) Use when: starting work on a new project or joining an existing one without doc
|
|
3
3
|
|
|
4
4
|
Use when: starting work on a new project or joining an existing one without doc structure. ## Command
|
|
5
5
|
-->
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/prd-workflow.md
|
|
2
|
+
skills/docs/prd-workflow.md: Workflow for producing a PRD and connecting it to workflow task packets.
|
|
3
3
|
|
|
4
4
|
Guides cx-product-manager through requirements gathering, user research, and writing a PRD
|
|
5
5
|
to docs/prd/. Once approved, the PRD feeds /plan feature to create bead packets in
|
|
6
|
-
.cx/workflow.json
|
|
6
|
+
.cx/workflow.json: closing the loop from discovery to execution.
|
|
7
7
|
-->
|
|
8
8
|
# PRD Workflow
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ Choose the document type before drafting:
|
|
|
17
17
|
| `prd-platform` | Internal platform, APIs, SDKs, developer tooling, operational infrastructure, shared services |
|
|
18
18
|
| `prd-business` | Strategic bets, market positioning, business model changes, make-vs-buy, pricing strategy |
|
|
19
19
|
| `meta-prd` | Requirements about the product operating system itself: agent workflows, evidence pipelines, templates, evaluation loops, governance |
|
|
20
|
-
| `rfc` | Technical or architectural proposals that need structured review before implementation
|
|
20
|
+
| `rfc` | Technical or architectural proposals that need structured review before implementation: no contract changes |
|
|
21
21
|
| `rfc-platform` | Proposals that change an external contract: API, SDK, schema, event payload, permission model, protocol |
|
|
22
22
|
|
|
23
23
|
Style constraint: do not produce a wall of bullets. Use paragraphs for reasoning and narrative, tables for comparison, and bullets only where scanability helps. Keep em dashes rare.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/product-intelligence-review.md
|
|
2
|
+
skills/docs/product-intelligence-review.md: Evaluate Product Intelligence artifacts before they become docs of record.
|
|
3
3
|
-->
|
|
4
4
|
# Product Intelligence Review
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/product-intelligence-workflow.md
|
|
2
|
+
skills/docs/product-intelligence-workflow.md: Native Construct workflow for product evidence, synthesis, and product docs.
|
|
3
3
|
|
|
4
4
|
Use this to move from raw product evidence to PRDs, Meta PRDs, PRFAQs, signal briefs,
|
|
5
5
|
customer profiles, and backlog proposals without creating a separate sidecar system.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/product-signal-workflow.md
|
|
2
|
+
skills/docs/product-signal-workflow.md: Synthesize product signals from evidence into the right artifact.
|
|
3
3
|
Confidence rubric, contradiction resolution, artifact decision tree, and storage are all defined here.
|
|
4
4
|
Follow rules/common/research.md for source-handling policy.
|
|
5
5
|
-->
|
|
@@ -18,10 +18,10 @@ Use when: the user asks what customers are asking for, what themes are emerging,
|
|
|
18
18
|
## Contradiction Resolution
|
|
19
19
|
|
|
20
20
|
When two signals conflict:
|
|
21
|
-
1. Name both signals explicitly
|
|
21
|
+
1. Name both signals explicitly: do not average them away.
|
|
22
22
|
2. Weight by customer tier (enterprise > growth > SMB) and recency (weight decays after 90 days).
|
|
23
23
|
3. Record the contradiction in the signal brief as an open question.
|
|
24
|
-
4. Never let a minority signal disappear
|
|
24
|
+
4. Never let a minority signal disappear: it may be the leading indicator.
|
|
25
25
|
|
|
26
26
|
## Artifact Decision Tree
|
|
27
27
|
|
|
@@ -43,11 +43,11 @@ After grouping evidence, check `.cx/knowledge/decisions/strategy/` for any decla
|
|
|
43
43
|
|
|
44
44
|
## Steps
|
|
45
45
|
|
|
46
|
-
1. **Gather
|
|
47
|
-
2. **Group
|
|
48
|
-
3. **Assign confidence
|
|
49
|
-
4. **Check strategy
|
|
50
|
-
5. **Select artifact
|
|
46
|
+
1. **Gather**: collect evidence briefs, customer profiles, field notes, tickets, and research from `.cx/knowledge/` and linked sources.
|
|
47
|
+
2. **Group**: cluster by theme, ask, pain point, affected persona, product area, and counter-signal.
|
|
48
|
+
3. **Assign confidence**: apply the rubric above; separate observation from inference.
|
|
49
|
+
4. **Check strategy**: check `.cx/knowledge/decisions/strategy/`; flag alignment or conflict with Bets and Non-bets if documents exist.
|
|
50
|
+
5. **Select artifact**: apply the decision tree; write the artifact; store to the path below.
|
|
51
51
|
|
|
52
52
|
## Storage
|
|
53
53
|
|
|
@@ -58,4 +58,4 @@ After grouping evidence, check `.cx/knowledge/decisions/strategy/` for any decla
|
|
|
58
58
|
| PRD | `docs/prd/` |
|
|
59
59
|
| PRFAQ | `docs/prfaq/` |
|
|
60
60
|
| Meta PRD | `docs/meta-prd/` |
|
|
61
|
-
| Backlog proposal | pending approval gate
|
|
61
|
+
| Backlog proposal | pending approval gate: do not file until explicit user approval |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/research-workflow.md
|
|
2
|
+
skills/docs/research-workflow.md (Research Workflow) Use when: the user asks to research a topic, investigate a question, or gather e
|
|
3
3
|
|
|
4
4
|
Use when: the user asks to research a topic, investigate a question, or gather evidence for a decision. ## Steps
|
|
5
5
|
-->
|
|
@@ -11,9 +11,9 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
|
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
14
|
-
1. **Clarify the question
|
|
15
|
-
2. **Apply recency discipline
|
|
16
|
-
3. **Check internal evidence first
|
|
14
|
+
1. **Clarify the question**: one specific, falsifiable question the research must answer.
|
|
15
|
+
2. **Apply recency discipline**: always search from the most recent year backward. For fast-moving domains (AI tools, security, market data), treat anything older than 12 months as presumptively stale unless a newer source confirms it is still accurate.
|
|
16
|
+
3. **Check internal evidence first**: search `.cx/research/`, `.cx/knowledge/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts before going external.
|
|
17
17
|
4. **Choose the research path and starting point** by domain:
|
|
18
18
|
|
|
19
19
|
| Domain | Authoritative starting points |
|
|
@@ -28,10 +28,10 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
|
|
|
28
28
|
5. **Use a source hierarchy**:
|
|
29
29
|
- Primary: official docs, exact-version API references, standards, source code, peer-reviewed papers
|
|
30
30
|
- Secondary: changelogs, migration guides, maintainer issue comments, release notes
|
|
31
|
-
- Tertiary: blogs/forums/Q&A only to locate primaries
|
|
32
|
-
6. **Verify every URL
|
|
33
|
-
7. **Structure findings** using the template from `get_template("research-brief")
|
|
34
|
-
8. **Write to `.cx/research/{topic-slug}.md
|
|
31
|
+
- Tertiary: blogs/forums/Q&A only to locate primaries: never cite tertiary alone for a load-bearing claim
|
|
32
|
+
6. **Verify every URL**: fetch each URL cited and confirm it resolves and matches the cited claim. Mark unconfirmed URLs as `[unverified]`.
|
|
33
|
+
7. **Structure findings** using the template from `get_template("research-brief")`: resolves `.cx/templates/docs/research-brief.md` (override) then `templates/docs/research-brief.md` (shipped)
|
|
34
|
+
8. **Write to `.cx/research/{topic-slug}.md`**: cx-docs-keeper owns this
|
|
35
35
|
9. **Reference the research doc** in the requesting agent's output (link by path)
|
|
36
36
|
|
|
37
37
|
## Verification bar
|
|
@@ -39,13 +39,13 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
|
|
|
39
39
|
- Every load-bearing claim must cite a verified source path, URL, or document reference.
|
|
40
40
|
- Record publication date, version, or access date for each source. If no date is available, state `[undated]` and treat confidence as `low`.
|
|
41
41
|
- Fetch and confirm every URL before including it in a committed document.
|
|
42
|
-
- Separate observation from inference
|
|
42
|
+
- Separate observation from inference: label each finding's confidence as `high`, `medium`, or `low`.
|
|
43
43
|
- Name contradictions and unresolved gaps.
|
|
44
44
|
- Prefer two independent sources per load-bearing claim unless one authoritative primary source is sufficient.
|
|
45
45
|
- State the strongest counter-evidence when one exists.
|
|
46
46
|
|
|
47
47
|
## File naming
|
|
48
|
-
- Topic slug: lowercase, hyphens, no spaces
|
|
48
|
+
- Topic slug: lowercase, hyphens, no spaces: e.g., `firebase-auth-v9-migration.md`
|
|
49
49
|
- Date prefix for time-sensitive research: `2026-04-release-comparison.md`
|
|
50
50
|
|
|
51
51
|
## When research feeds a decision
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/runbook-workflow.md
|
|
2
|
+
skills/docs/runbook-workflow.md (Runbook Workflow) Use when: creating operational procedures for services, alerts, or recurring ope
|
|
3
3
|
|
|
4
4
|
Use when: creating operational procedures for services, alerts, or recurring operations. ## Steps
|
|
5
5
|
-->
|
|
@@ -10,7 +10,7 @@ Use when: creating operational procedures for services, alerts, or recurring ope
|
|
|
10
10
|
## Steps
|
|
11
11
|
|
|
12
12
|
1. **cx-sre** or **cx-release-manager** identifies the need
|
|
13
|
-
2. **Write to `docs/runbooks/{service}-{operation}.md`** using the template from `get_template("runbook")
|
|
13
|
+
2. **Write to `docs/runbooks/{service}-{operation}.md`** using the template from `get_template("runbook")`: resolves `.cx/templates/docs/runbook.md` (override) then `templates/docs/runbook.md` (shipped)
|
|
14
14
|
3. **Link from the relevant alert** or monitoring dashboard
|
|
15
15
|
4. **cx-docs-keeper** adds to `.cx/context.md` if it's a critical path runbook
|
|
16
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/docs/strategy-workflow.md
|
|
2
|
+
skills/docs/strategy-workflow.md: Read, update, and reason about the product strategy.
|
|
3
3
|
Canonical store: ~/.cx/strategy.md (user-global) or .cx/strategy.md (project-local, committed).
|
|
4
4
|
Template: templates/docs/strategy.md.
|
|
5
5
|
-->
|
|
@@ -32,5 +32,5 @@ Given a product signal or PRD, check:
|
|
|
32
32
|
|
|
33
33
|
| Scope | Path | Committed? |
|
|
34
34
|
|---|---|---|
|
|
35
|
-
| User-global | `~/.cx/strategy.md` | No
|
|
36
|
-
| Project-local | `.cx/strategy.md` | Yes
|
|
35
|
+
| User-global | `~/.cx/strategy.md` | No: local only |
|
|
36
|
+
| Project-local | `.cx/strategy.md` | Yes: source of truth for this repo |
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/exploration/repo-map.md
|
|
2
|
+
skills/exploration/repo-map.md (Repo Exploration) Codebase Mapping Playbook: Use this skill when entering an unfamiliar codebase, doing deep investigation wo
|
|
3
3
|
|
|
4
4
|
Use this skill when entering an unfamiliar codebase, doing deep investigation work, or producing a `.cx/codebase-map.md` artifact for future sessions. Agents: `
|
|
5
5
|
-->
|
|
6
|
-
# Repo Exploration
|
|
6
|
+
# Repo Exploration: Codebase Mapping Playbook
|
|
7
7
|
|
|
8
8
|
Use this skill when entering an unfamiliar codebase, doing deep investigation work, or producing a `.cx/codebase-map.md` artifact for future sessions.
|
|
9
9
|
|
|
@@ -51,14 +51,14 @@ find . -maxdepth 2 -type d \
|
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Classify each top-level directory as one of:
|
|
54
|
-
- **entry
|
|
55
|
-
- **lib
|
|
56
|
-
- **ui
|
|
57
|
-
- **config
|
|
58
|
-
- **infra
|
|
59
|
-
- **test
|
|
60
|
-
- **docs
|
|
61
|
-
- **generated
|
|
54
|
+
- **entry**: main executables, CLIs, servers (cmd/, bin/, app/, main.*)
|
|
55
|
+
- **lib**: shared library code (lib/, pkg/, src/, internal/)
|
|
56
|
+
- **ui**: frontend/views (web/, frontend/, views/, components/)
|
|
57
|
+
- **config**: configuration, env templates (.env.example, config/, etc/)
|
|
58
|
+
- **infra**: deployment, CI/CD, Docker (deploy/, k8s/, .github/, terraform/)
|
|
59
|
+
- **test**: test-only code (test/, tests/, __tests__/, spec/)
|
|
60
|
+
- **docs**: documentation (docs/, .cx/)
|
|
61
|
+
- **generated**: auto-generated, do not read (dist/, build/, .next/, vendor/)
|
|
62
62
|
|
|
63
63
|
### 2b. Entry points
|
|
64
64
|
|
|
@@ -254,7 +254,7 @@ If you're about to {do Y}, start with: {file or path}
|
|
|
254
254
|
|
|
255
255
|
---
|
|
256
256
|
|
|
257
|
-
## Quick Reference
|
|
257
|
+
## Quick Reference: Useful One-Liners
|
|
258
258
|
|
|
259
259
|
```bash
|
|
260
260
|
# File count by extension
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frameworks/django.md
|
|
2
|
+
skills/frameworks/django.md (Django) ```
|
|
3
3
|
|
|
4
4
|
## Project Structure ```
|
|
5
5
|
-->
|
|
@@ -37,10 +37,10 @@ Keep apps small and feature-bounded. Do not put everything in one app.
|
|
|
37
37
|
|
|
38
38
|
### Field choices
|
|
39
39
|
|
|
40
|
-
- `CharField` / `TextField
|
|
41
|
-
- `UUIDField(default=uuid.uuid4, primary_key=True)
|
|
42
|
-
- `JSONField
|
|
43
|
-
- `select_related` for FK, `prefetch_related` for M2M
|
|
40
|
+
- `CharField` / `TextField`: strings; always set `blank=False` unless optional
|
|
41
|
+
- `UUIDField(default=uuid.uuid4, primary_key=True)`: preferred over auto-increment for external-facing IDs
|
|
42
|
+
- `JSONField`: use sparingly; prefer normalized columns for queryable data
|
|
43
|
+
- `select_related` for FK, `prefetch_related` for M2M: avoid N+1 queries
|
|
44
44
|
|
|
45
45
|
### Migrations
|
|
46
46
|
|
|
@@ -115,13 +115,13 @@ class ItemSerializer(serializers.ModelSerializer):
|
|
|
115
115
|
|
|
116
116
|
## Security
|
|
117
117
|
|
|
118
|
-
- `SECRET_KEY` from env
|
|
118
|
+
- `SECRET_KEY` from env: never commit
|
|
119
119
|
- `ALLOWED_HOSTS` locked down in production
|
|
120
120
|
- `DEBUG = False` in production (template errors expose internals)
|
|
121
121
|
- CSRF: enabled by default for form views; DRF uses `SessionAuthentication` + CSRF for browser clients
|
|
122
122
|
- `django-environ` or `python-decouple` for settings from environment variables
|
|
123
123
|
- Content security policy: `django-csp` middleware
|
|
124
|
-
- SQL: always use ORM or parameterized `raw()
|
|
124
|
+
- SQL: always use ORM or parameterized `raw()`: never string-format user input into queries
|
|
125
125
|
|
|
126
126
|
## Testing
|
|
127
127
|
|
|
@@ -137,8 +137,8 @@ class ItemAPITest(APITestCase):
|
|
|
137
137
|
self.assertEqual(Item.objects.count(), 1)
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
- Use `APITestCase` (DRF) for API tests
|
|
141
|
-
- `factory_boy` for fixtures
|
|
140
|
+
- Use `APITestCase` (DRF) for API tests: wraps each test in a transaction that rolls back
|
|
141
|
+
- `factory_boy` for fixtures: more maintainable than raw `create()`
|
|
142
142
|
- `pytest-django` with `@pytest.mark.django_db` for pytest-style tests
|
|
143
143
|
- `django-silk` or `django-debug-toolbar` for query profiling in development
|
|
144
144
|
|
|
@@ -146,14 +146,14 @@ class ItemAPITest(APITestCase):
|
|
|
146
146
|
|
|
147
147
|
- Database: add `db_index=True` for filtered columns; `select_related`/`prefetch_related` to eliminate N+1
|
|
148
148
|
- Caching: `django.core.cache` with Redis backend (`django-redis`)
|
|
149
|
-
- Async views: `async def` views supported in Django 4.1
|
|
149
|
+
- Async views: `async def` views supported in Django 4.1+: use for I/O-bound operations with `asyncio`
|
|
150
150
|
- Task queues: `Celery` + Redis/RabbitMQ for background jobs; `django-celery-beat` for scheduling
|
|
151
151
|
- `gunicorn` + `uvicorn` workers for async support in production
|
|
152
152
|
|
|
153
153
|
## Common Pitfalls
|
|
154
154
|
|
|
155
|
-
- `objects.all()` in views without pagination
|
|
156
|
-
- Accessing related objects in a loop without `select_related
|
|
157
|
-
- `settings.DEBUG` checks in production-like environments
|
|
158
|
-
- File uploads to local storage in production
|
|
159
|
-
- Signals for business logic
|
|
155
|
+
- `objects.all()` in views without pagination: always use `Paginator` or DRF `pagination_class`
|
|
156
|
+
- Accessing related objects in a loop without `select_related`: profile with `django-debug-toolbar`
|
|
157
|
+
- `settings.DEBUG` checks in production-like environments: use environment-specific settings modules
|
|
158
|
+
- File uploads to local storage in production: use `django-storages` with S3/GCS
|
|
159
|
+
- Signals for business logic: prefer explicit service functions; signals are invisible and hard to test
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frameworks/nextjs.md
|
|
2
|
+
skills/frameworks/nextjs.md (Next.js (App Router)) ```
|
|
3
3
|
|
|
4
4
|
## App Router Mental Model ```
|
|
5
5
|
-->
|
|
@@ -46,9 +46,9 @@ Caching behaviors:
|
|
|
46
46
|
|
|
47
47
|
| Option | Behavior |
|
|
48
48
|
|---|---|
|
|
49
|
-
| `cache: 'force-cache'` | Static
|
|
50
|
-
| `next: { revalidate: N }` | ISR
|
|
51
|
-
| `cache: 'no-store'` | Dynamic
|
|
49
|
+
| `cache: 'force-cache'` | Static: cache forever (default) |
|
|
50
|
+
| `next: { revalidate: N }` | ISR: revalidate after N seconds |
|
|
51
|
+
| `cache: 'no-store'` | Dynamic: always fresh |
|
|
52
52
|
| `next: { tags: ['items'] }` | Tag for on-demand revalidation |
|
|
53
53
|
|
|
54
54
|
### On-demand revalidation
|
|
@@ -91,15 +91,15 @@ export async function createItem(formData: FormData) {
|
|
|
91
91
|
</form>
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
Validate Server Action inputs
|
|
94
|
+
Validate Server Action inputs: they are network endpoints.
|
|
95
95
|
|
|
96
96
|
## Rendering Strategies
|
|
97
97
|
|
|
98
98
|
| Strategy | When |
|
|
99
99
|
|---|---|
|
|
100
|
-
| Static (SSG) | Marketing pages, docs
|
|
101
|
-
| ISR | Listings, product pages
|
|
102
|
-
| Dynamic (SSR) | Dashboards, auth-gated pages
|
|
100
|
+
| Static (SSG) | Marketing pages, docs: no user-specific data |
|
|
101
|
+
| ISR | Listings, product pages: stale-ok, periodic refresh |
|
|
102
|
+
| Dynamic (SSR) | Dashboards, auth-gated pages: always fresh |
|
|
103
103
|
| Client | Highly interactive UIs, real-time, after-hydration only |
|
|
104
104
|
|
|
105
105
|
Prefer static/ISR by default; reach for dynamic only when the data must be per-request.
|
|
@@ -129,20 +129,20 @@ export function middleware(req: NextRequest) {
|
|
|
129
129
|
export const config = { matcher: ['/dashboard/:path*'] };
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
Middleware runs on the Edge Runtime
|
|
132
|
+
Middleware runs on the Edge Runtime: no Node.js APIs. Keep it fast; no DB calls.
|
|
133
133
|
|
|
134
134
|
## Performance
|
|
135
135
|
|
|
136
136
|
- Enable Partial Prerendering (PPR) in Next.js 15 for shell + streaming content
|
|
137
|
-
- Use `next/image` for all images
|
|
138
|
-
- Use `next/font` for self-hosted fonts
|
|
137
|
+
- Use `next/image` for all images: automatic WebP, lazy loading, CLS prevention
|
|
138
|
+
- Use `next/font` for self-hosted fonts: eliminates FOUT and external requests
|
|
139
139
|
- Bundle analysis: `ANALYZE=true next build`
|
|
140
140
|
- Streaming: wrap slow data-dependent sections in `<Suspense>`
|
|
141
141
|
|
|
142
142
|
## Common Pitfalls
|
|
143
143
|
|
|
144
|
-
- Importing client-only code (browser APIs, hooks) in Server Components
|
|
145
|
-
- Large `layout.tsx` re-renders
|
|
146
|
-
- Fetching the same data in multiple components
|
|
147
|
-
- Dynamic routes missing `generateStaticParams` for static builds
|
|
148
|
-
- Server Actions called without input validation
|
|
144
|
+
- Importing client-only code (browser APIs, hooks) in Server Components: add `'use client'`
|
|
145
|
+
- Large `layout.tsx` re-renders: use `memo` on stable child subtrees
|
|
146
|
+
- Fetching the same data in multiple components: hoist to the nearest shared ancestor Server Component (fetch is deduplicated within a request)
|
|
147
|
+
- Dynamic routes missing `generateStaticParams` for static builds: causes runtime 404
|
|
148
|
+
- Server Actions called without input validation: treat as untrusted user input
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frameworks/react.md
|
|
2
|
+
skills/frameworks/react.md (React) By default, components are **Server Components**: they run on the server, have
|
|
3
3
|
|
|
4
4
|
## Component Design ### Server vs Client Components (React 19 / Next.js App Router)
|
|
5
5
|
-->
|
|
@@ -9,7 +9,7 @@ skills/frameworks/react.md — React — By default, components are **Server Com
|
|
|
9
9
|
|
|
10
10
|
### Server vs Client Components (React 19 / Next.js App Router)
|
|
11
11
|
|
|
12
|
-
By default, components are **Server Components
|
|
12
|
+
By default, components are **Server Components**: they run on the server, have no state, and can fetch data directly. Add `'use client'` only when you need interactivity, browser APIs, or hooks.
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
15
|
// Server Component — no directive needed
|
|
@@ -53,7 +53,7 @@ See decision matrix:
|
|
|
53
53
|
| URL state | `useSearchParams` / router |
|
|
54
54
|
| Component-local state | `useState` / `useReducer` |
|
|
55
55
|
|
|
56
|
-
Do not put server data in a client store
|
|
56
|
+
Do not put server data in a client store: TanStack Query is the cache. Derive don't duplicate.
|
|
57
57
|
|
|
58
58
|
## Performance
|
|
59
59
|
|
|
@@ -95,8 +95,8 @@ export function useItems() {
|
|
|
95
95
|
|
|
96
96
|
### Controlled vs uncontrolled
|
|
97
97
|
|
|
98
|
-
- Controlled: React owns value via `state
|
|
99
|
-
- Uncontrolled: DOM owns value via `ref
|
|
98
|
+
- Controlled: React owns value via `state`: use for forms with validation, derived fields
|
|
99
|
+
- Uncontrolled: DOM owns value via `ref`: use for file inputs and simple browser-owned fields
|
|
100
100
|
|
|
101
101
|
## Testing
|
|
102
102
|
|
|
@@ -113,20 +113,20 @@ test('submits search query', async () => {
|
|
|
113
113
|
});
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
- Use `@testing-library/react
|
|
117
|
-
- `userEvent` over `fireEvent
|
|
116
|
+
- Use `@testing-library/react`: test behavior, not implementation
|
|
117
|
+
- `userEvent` over `fireEvent`: simulates real user interactions
|
|
118
118
|
- Mock at the network boundary (`msw`) not the component boundary
|
|
119
119
|
|
|
120
120
|
## Tooling
|
|
121
121
|
|
|
122
122
|
- **Vite** for non-Next apps; fast HMR, native ESM
|
|
123
123
|
- **Biome** for lint + format in a single fast tool (replaces ESLint + Prettier)
|
|
124
|
-
- **TypeScript strict mode
|
|
124
|
+
- **TypeScript strict mode**: enables `noUncheckedIndexedAccess`, `strictNullChecks`, etc.
|
|
125
125
|
- React DevTools Profiler for recomposition analysis
|
|
126
126
|
|
|
127
127
|
## Common Pitfalls
|
|
128
128
|
|
|
129
|
-
- Stale closures in `useEffect
|
|
130
|
-
- `useEffect` for data fetching
|
|
131
|
-
- Direct DOM mutation inside render
|
|
132
|
-
- Key prop as array index
|
|
129
|
+
- Stale closures in `useEffect`: include all reactive values in the dependency array or use `useEffectEvent` (React 19)
|
|
130
|
+
- `useEffect` for data fetching: use TanStack Query instead
|
|
131
|
+
- Direct DOM mutation inside render: causes tearing with concurrent mode
|
|
132
|
+
- Key prop as array index: breaks reconciliation on reorder/insert
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frameworks/spring-boot.md
|
|
2
|
+
skills/frameworks/spring-boot.md (Spring Boot) ```
|
|
3
3
|
|
|
4
4
|
## Project Structure ```
|
|
5
5
|
-->
|
|
@@ -80,9 +80,9 @@ interface ItemRepository : JpaRepository<Item, UUID> {
|
|
|
80
80
|
}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
- Default `FetchType.LAZY` for associations
|
|
83
|
+
- Default `FetchType.LAZY` for associations: never `EAGER`
|
|
84
84
|
- Use `JOIN FETCH` in queries when you need the association
|
|
85
|
-
- Enable `spring.jpa.open-in-view=false
|
|
85
|
+
- Enable `spring.jpa.open-in-view=false`: prevents lazy-loading in the web layer
|
|
86
86
|
- Use Flyway or Liquibase for schema migrations; never `ddl-auto=update` in production
|
|
87
87
|
|
|
88
88
|
## Transactions
|
|
@@ -101,8 +101,8 @@ class ItemService(private val repo: ItemRepository) {
|
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
- `@Transactional` on service layer, not repository or controller
|
|
104
|
-
- `readOnly = true` as class-level default; override on writes
|
|
105
|
-
- Do not call `@Transactional` methods via `this
|
|
104
|
+
- `readOnly = true` as class-level default; override on writes: signals no dirty-check needed
|
|
105
|
+
- Do not call `@Transactional` methods via `this`: Spring proxy won't intercept it
|
|
106
106
|
|
|
107
107
|
## Security (Spring Security 6)
|
|
108
108
|
|
|
@@ -145,12 +145,12 @@ class ItemControllerIT(@Autowired val restTemplate: TestRestTemplate) {
|
|
|
145
145
|
|
|
146
146
|
- `@WebMvcTest` for controller-only tests (fast, no DB)
|
|
147
147
|
- `@DataJpaTest` for repository tests against a real embedded or Testcontainers DB
|
|
148
|
-
- `@SpringBootTest` for integration tests
|
|
148
|
+
- `@SpringBootTest` for integration tests: use Testcontainers for realistic DB
|
|
149
149
|
- `MockMvc` + `@AutoConfigureMockMvc` for HTTP-layer testing without a real port
|
|
150
150
|
|
|
151
151
|
## Performance
|
|
152
152
|
|
|
153
|
-
- Connection pool: `HikariCP` (default)
|
|
153
|
+
- Connection pool: `HikariCP` (default): tune `maximumPoolSize` based on load testing
|
|
154
154
|
- N+1 queries: use `JOIN FETCH` or `@EntityGraph`; verify with `spring.jpa.show-sql=true` in dev
|
|
155
155
|
- Caching: `@Cacheable` + Spring Cache with Redis (`spring-boot-starter-data-redis`)
|
|
156
156
|
- Async: `@EnableAsync` + `@Async` on service methods for fire-and-forget; use `CompletableFuture<T>` return type
|
|
@@ -158,8 +158,8 @@ class ItemControllerIT(@Autowired val restTemplate: TestRestTemplate) {
|
|
|
158
158
|
|
|
159
159
|
## Common Pitfalls
|
|
160
160
|
|
|
161
|
-
- `LazyInitializationException` after transaction closes
|
|
162
|
-
- `@Transactional` on private methods
|
|
163
|
-
- Bean cycle injection
|
|
164
|
-
- Returning JPA entities directly from controllers
|
|
165
|
-
- `findAll()` without pagination on large tables
|
|
161
|
+
- `LazyInitializationException` after transaction closes: resolve with `JOIN FETCH` or DTO projection
|
|
162
|
+
- `@Transactional` on private methods: Spring AOP proxy can't intercept; move to public
|
|
163
|
+
- Bean cycle injection: restructure or use `@Lazy`
|
|
164
|
+
- Returning JPA entities directly from controllers: exposes internal model; always map to DTOs
|
|
165
|
+
- `findAll()` without pagination on large tables: always use `Pageable`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frontend-design/accessibility.md
|
|
2
|
+
skills/frontend-design/accessibility.md (Accessibility (WCAG 2.2 / Inclusive Design)) Target **WCAG 2.1 AA** as the minimum for any public-facing product. WCAG 2.2 AA
|
|
3
3
|
|
|
4
4
|
## Compliance Baseline Target **WCAG 2.1 AA** as the minimum for any public-facing product. WCAG 2.2 AA is the current standard (published October 2023) and req
|
|
5
5
|
-->
|
|
@@ -25,7 +25,7 @@ ARIA augments semantics it can't add natively; it cannot fix broken semantics.
|
|
|
25
25
|
|
|
26
26
|
## ARIA Rules
|
|
27
27
|
|
|
28
|
-
1. If a native HTML element provides the required semantics, use it
|
|
28
|
+
1. If a native HTML element provides the required semantics, use it: do not add ARIA to a `<div>` when `<button>` exists.
|
|
29
29
|
2. Do not change native semantics: `<h2 role="button">` is invalid.
|
|
30
30
|
3. All interactive ARIA widgets must be keyboard-operable.
|
|
31
31
|
4. Do not hide focusable elements with `aria-hidden="true"`.
|
|
@@ -84,11 +84,11 @@ function trapFocus(modal: HTMLElement) {
|
|
|
84
84
|
|---|---|---|
|
|
85
85
|
| Normal text (< 18pt / 14pt bold) | 4.5:1 | 7:1 |
|
|
86
86
|
| Large text (≥ 18pt / 14pt bold) | 3:1 | 4.5:1 |
|
|
87
|
-
| UI components / graphical objects | 3:1
|
|
87
|
+
| UI components / graphical objects | 3:1 |: |
|
|
88
88
|
|
|
89
89
|
Tools: Figma Contrast plugin, axe DevTools, APCA calculator for sophisticated use cases.
|
|
90
90
|
|
|
91
|
-
Do not convey information by color alone
|
|
91
|
+
Do not convey information by color alone: add shape, pattern, or text.
|
|
92
92
|
|
|
93
93
|
## Motion
|
|
94
94
|
|
|
@@ -136,11 +136,11 @@ if (!prefersReduced) gsap.to(el, { y: -20, duration: 0.3 });
|
|
|
136
136
|
|
|
137
137
|
## Testing Checklist
|
|
138
138
|
|
|
139
|
-
- [ ] Run `axe` or `Lighthouse Accessibility
|
|
139
|
+
- [ ] Run `axe` or `Lighthouse Accessibility`: fix all violations
|
|
140
140
|
- [ ] Navigate entire flow with keyboard only
|
|
141
141
|
- [ ] Test with VoiceOver (macOS/iOS) or NVDA/JAWS (Windows)
|
|
142
142
|
- [ ] Verify color contrast meets 4.5:1 for body text
|
|
143
|
-
- [ ] Test with browser zoom at 200
|
|
143
|
+
- [ ] Test with browser zoom at 200%: no horizontal scroll, no content loss
|
|
144
144
|
- [ ] Test with `prefers-reduced-motion: reduce` enabled
|
|
145
145
|
- [ ] All form errors are announced by screen reader
|
|
146
146
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frontend-design/component-patterns.md
|
|
2
|
+
skills/frontend-design/component-patterns.md (Component Patterns) Use this skill when designing component architecture, building design systems, o
|
|
3
3
|
|
|
4
4
|
Use this skill when designing component architecture, building design systems, or structuring reusable UI. ## Component Hierarchy
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/frontend-design/engineering.md
|
|
2
|
+
skills/frontend-design/engineering.md (Frontend Engineering) Use this skill when working on build tooling, bundling, rendering strategies, or
|
|
3
3
|
|
|
4
4
|
Use this skill when working on build tooling, bundling, rendering strategies, or frontend infrastructure. ## Build Tools
|
|
5
5
|
-->
|