ctx-cc 2.1.0 → 2.3.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.
@@ -0,0 +1,163 @@
1
+ # Design Brief - {{component_name}}
2
+
3
+ ## Component: {{component_name}}
4
+ **Story:** {{story_id}}
5
+ **Created:** {{timestamp}}
6
+ **Approved:** {{approval_date}}
7
+ **WCAG Level:** 2.2 AA
8
+ **EAA 2025:** {{eaa_compliant}}
9
+
10
+ ---
11
+
12
+ ## Visual Direction
13
+
14
+ ### Brand Reference
15
+ - Brand Kit: BRAND_KIT.md v{{brand_version}}
16
+ - Mood board: .ctx/phases/{{story_id}}/MOOD_BOARD.md
17
+ - Selected: Option {{selected_option}} {{modifications}}
18
+
19
+ ### Design Constraints
20
+ | Constraint | Value |
21
+ |------------|-------|
22
+ | Primary Colors | {{color_palette}} |
23
+ | Typography | {{typography}} |
24
+ | Spacing | {{spacing_tokens}} |
25
+ | Border Radius | {{radius_tokens}} |
26
+
27
+ ---
28
+
29
+ ## Design Decisions
30
+
31
+ | Decision | Choice | Rationale |
32
+ |----------|--------|-----------|
33
+ | Layout | {{layout_choice}} | {{layout_why}} |
34
+ | Colors | {{color_choice}} | {{color_why}} |
35
+ | Typography | {{type_choice}} | {{type_why}} |
36
+ | Spacing | {{spacing_choice}} | {{spacing_why}} |
37
+ | Motion | {{motion_choice}} | {{motion_why}} |
38
+
39
+ ---
40
+
41
+ ## Component States
42
+
43
+ | State | Description | Visual Treatment |
44
+ |-------|-------------|------------------|
45
+ | Default | Normal state | {{default_treatment}} |
46
+ | Hover | Mouse over | {{hover_treatment}} |
47
+ | Focus | Keyboard focus | {{focus_treatment}} |
48
+ | Active | Being pressed | {{active_treatment}} |
49
+ | Disabled | Not interactive | {{disabled_treatment}} |
50
+ | Loading | Async operation | {{loading_treatment}} |
51
+ | Error | Invalid state | {{error_treatment}} |
52
+
53
+ ---
54
+
55
+ ## Responsive Behavior
56
+
57
+ | Breakpoint | Width | Behavior |
58
+ |------------|-------|----------|
59
+ | Mobile | < 768px | {{mobile_behavior}} |
60
+ | Tablet | 768-1024px | {{tablet_behavior}} |
61
+ | Desktop | > 1024px | {{desktop_behavior}} |
62
+
63
+ ---
64
+
65
+ ## Accessibility Implementation
66
+
67
+ ### WCAG 2.2 Compliance
68
+
69
+ | Criterion | Requirement | Implementation |
70
+ |-----------|-------------|----------------|
71
+ | 2.4.7 Focus Visible | Focus indicator visible | {{focus_impl}} |
72
+ | 2.4.11 Focus Not Obscured | Focused element visible | {{obscured_impl}} |
73
+ | 2.5.7 Dragging | Click alternative | {{drag_impl}} |
74
+ | 2.5.8 Target Size | 24x24px minimum | {{target_impl}} |
75
+ | 3.3.8 Authentication | No cognitive tests | {{auth_impl}} |
76
+
77
+ ### Keyboard Navigation
78
+
79
+ | Key | Action |
80
+ |-----|--------|
81
+ | Tab | {{tab_action}} |
82
+ | Enter | {{enter_action}} |
83
+ | Space | {{space_action}} |
84
+ | Escape | {{escape_action}} |
85
+ | Arrow Keys | {{arrow_action}} |
86
+
87
+ ### Screen Reader
88
+
89
+ | Element | ARIA | Announcement |
90
+ |---------|------|--------------|
91
+ | {{element_1}} | {{aria_1}} | {{announce_1}} |
92
+ | {{element_2}} | {{aria_2}} | {{announce_2}} |
93
+
94
+ ---
95
+
96
+ ## Approval History
97
+
98
+ | Stage | Date | Approved | Notes |
99
+ |-------|------|----------|-------|
100
+ | Mood board | {{mood_date}} | {{mood_approved}} | {{mood_notes}} |
101
+ | Direction (A/B/C) | {{dir_date}} | Option {{dir_choice}} | {{dir_notes}} |
102
+ | Prototype | {{proto_date}} | {{proto_approved}} | {{proto_notes}} |
103
+ | Final | {{final_date}} | {{final_approved}} | {{final_notes}} |
104
+
105
+ ---
106
+
107
+ ## Implementation Files
108
+
109
+ | Artifact | Path |
110
+ |----------|------|
111
+ | Component | {{component_path}} |
112
+ | Styles | {{styles_path}} |
113
+ | Story | {{story_path}} |
114
+ | Tests | {{tests_path}} |
115
+
116
+ ---
117
+
118
+ ## Figma Reference
119
+
120
+ {{#if figma_link}}
121
+ - File: {{figma_link}}
122
+ - Node: {{figma_node}}
123
+ {{else}}
124
+ No Figma file linked.
125
+ {{/if}}
126
+
127
+ ---
128
+
129
+ ## Screenshots
130
+
131
+ | Viewport | Screenshot |
132
+ |----------|------------|
133
+ | Mobile | .ctx/phases/{{story_id}}/mobile.png |
134
+ | Tablet | .ctx/phases/{{story_id}}/tablet.png |
135
+ | Desktop | .ctx/phases/{{story_id}}/desktop.png |
136
+
137
+ ---
138
+
139
+ ## Verification Checklist
140
+
141
+ ### Visual
142
+ - [ ] Matches approved prototype
143
+ - [ ] All states implemented
144
+ - [ ] Responsive at all breakpoints
145
+ - [ ] Uses brand tokens (no hardcoded values)
146
+
147
+ ### Accessibility
148
+ - [ ] Focus visible (2px ring, 3:1 contrast)
149
+ - [ ] Target size >= 24x24px
150
+ - [ ] Keyboard navigable
151
+ - [ ] Screen reader tested
152
+ - [ ] No color-only information
153
+
154
+ ### Technical
155
+ - [ ] No console errors
156
+ - [ ] Tests pass
157
+ - [ ] Storybook story created
158
+ - [ ] No TODO comments
159
+
160
+ ---
161
+
162
+ **This brief documents all design decisions for {{component_name}}.**
163
+ **Any deviations require approval update.**
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://ctx.dev/schemas/prd.json",
3
+ "version": "2.1",
4
+ "project": {
5
+ "name": "{{project_name}}",
6
+ "description": "{{project_description}}",
7
+ "stack": "{{tech_stack}}",
8
+ "created": "{{timestamp}}"
9
+ },
10
+ "context": {
11
+ "problem": "{{what_problem_are_we_solving}}",
12
+ "targetUser": "{{who_is_this_for}}",
13
+ "successLooksLike": "{{how_will_we_know_its_done}}",
14
+ "outOfScope": [
15
+ "{{what_we_are_NOT_building}}"
16
+ ],
17
+ "assumptions": [
18
+ "{{assumption_1}}",
19
+ "{{assumption_2}}"
20
+ ],
21
+ "risks": [
22
+ "{{risk_1}}"
23
+ ]
24
+ },
25
+ "brand": {
26
+ "hasBrandKit": false,
27
+ "personality": [],
28
+ "visualMood": "",
29
+ "inspirations": [],
30
+ "antiInspirations": [],
31
+ "existingAssets": [],
32
+ "darkModeRequired": false,
33
+ "euMarket": false
34
+ },
35
+ "design": {
36
+ "wcagLevel": "AA",
37
+ "eaaCompliance": false,
38
+ "tokenFormat": "w3c",
39
+ "figmaFileKey": null,
40
+ "designSystem": null,
41
+ "breakpoints": {
42
+ "mobile": 375,
43
+ "tablet": 768,
44
+ "desktop": 1440
45
+ }
46
+ },
47
+ "constitution": {
48
+ "principles": [
49
+ "Code quality over speed",
50
+ "Test before ship",
51
+ "No secrets in code"
52
+ ],
53
+ "always": [
54
+ "Run tests before committing",
55
+ "Use TypeScript strict mode",
56
+ "Handle errors explicitly"
57
+ ],
58
+ "never": [
59
+ "Commit secrets or credentials",
60
+ "Skip error handling",
61
+ "Leave TODO comments in production"
62
+ ],
63
+ "askFirst": [
64
+ "Database schema changes",
65
+ "New dependencies",
66
+ "API contract changes"
67
+ ]
68
+ },
69
+ "testing": {
70
+ "requiresBrowser": false,
71
+ "requiresLogin": false,
72
+ "requiresAdmin": false,
73
+ "requiresAPI": false,
74
+ "notes": "{{testing_notes}}"
75
+ },
76
+ "storyTypes": {
77
+ "feature": "Standard implementation story",
78
+ "brand": "Brand kit establishment (BRAND_KIT.md + tokens)",
79
+ "design": "UI component/page design with approval gates",
80
+ "fix": "Bug fix or correction",
81
+ "refactor": "Code improvement without behavior change"
82
+ },
83
+ "stories": [
84
+ {
85
+ "id": "S001",
86
+ "type": "feature",
87
+ "title": "{{story_title}}",
88
+ "description": "{{story_description}}",
89
+ "acceptanceCriteria": [
90
+ "{{criterion_1}}",
91
+ "{{criterion_2}}",
92
+ "{{criterion_3}}"
93
+ ],
94
+ "priority": 1,
95
+ "phase": 1,
96
+ "passes": false,
97
+ "verifiedAt": null,
98
+ "notes": "",
99
+ "design": null
100
+ }
101
+ ],
102
+ "metadata": {
103
+ "totalStories": 0,
104
+ "passedStories": 0,
105
+ "currentStory": null,
106
+ "lastUpdated": "{{timestamp}}"
107
+ }
108
+ }
@@ -8,11 +8,21 @@
8
8
  - **Stack**: {{tech_stack}}
9
9
  - **Status**: {{status}} <!-- initializing | planning | executing | debugging | verifying | paused -->
10
10
 
11
+ ## PRD Progress
12
+ - **Stories**: {{passed_stories}}/{{total_stories}} ({{percent}}%)
13
+ - **Current Story**: {{story_id}} - {{story_title}}
14
+
11
15
  ## Current Phase
12
- - **ID**: {{phase_id}}
13
- - **Goal**: {{phase_goal}}
16
+ - **ID**: {{phase_id}} (maps to story {{story_id}})
17
+ - **Goal**: {{story_title}}
14
18
  - **Progress**: {{completed_tasks}}/{{total_tasks}} tasks
15
19
 
20
+ ## Acceptance Criteria (from PRD)
21
+ <!-- Current story's acceptance criteria -->
22
+ - [ ] {{criterion_1}}
23
+ - [ ] {{criterion_2}}
24
+ - [ ] {{criterion_3}}
25
+
16
26
  ## Active Task
17
27
  - **Task**: {{current_task}}
18
28
  - **Status**: {{task_status}} <!-- pending | in_progress | blocked | debugging | done -->
@@ -0,0 +1,19 @@
1
+ # CTX Secrets - NEVER COMMIT
2
+ .env
3
+ *.env
4
+ .env.*
5
+ !.env.example
6
+
7
+ # Credential files
8
+ credentials.json
9
+ secrets.json
10
+ *.secrets
11
+ *.pem
12
+ *.key
13
+
14
+ # Debug screenshots may contain sensitive data
15
+ debug/*.png
16
+ debug/*.jpg
17
+
18
+ # Checkpoint data may contain state
19
+ checkpoints/*.json
@@ -0,0 +1,61 @@
1
+ # CTX Test Credentials
2
+ # Generated by /ctx init
3
+ # WARNING: DO NOT COMMIT THIS FILE
4
+
5
+ # ===========================================
6
+ # APP CONFIGURATION
7
+ # ===========================================
8
+
9
+ # Local development URL
10
+ APP_URL=http://localhost:3000
11
+
12
+ # Staging/preview URL (optional)
13
+ STAGING_URL=
14
+
15
+ # Production URL (optional - for smoke tests)
16
+ PRODUCTION_URL=
17
+
18
+ # ===========================================
19
+ # TEST USER CREDENTIALS
20
+ # ===========================================
21
+
22
+ # Primary test user (for normal user flows)
23
+ TEST_USER_EMAIL=
24
+ TEST_USER_PASSWORD=
25
+
26
+ # Admin user (for admin features)
27
+ ADMIN_EMAIL=
28
+ ADMIN_PASSWORD=
29
+
30
+ # Secondary test user (for multi-user tests)
31
+ TEST_USER_2_EMAIL=
32
+ TEST_USER_2_PASSWORD=
33
+
34
+ # ===========================================
35
+ # API KEYS & TOKENS
36
+ # ===========================================
37
+
38
+ # Primary API key (if applicable)
39
+ API_KEY=
40
+
41
+ # OAuth tokens (if applicable)
42
+ OAUTH_CLIENT_ID=
43
+ OAUTH_CLIENT_SECRET=
44
+
45
+ # Third-party service keys
46
+ # STRIPE_TEST_KEY=
47
+ # SENDGRID_API_KEY=
48
+ # AWS_ACCESS_KEY_ID=
49
+ # AWS_SECRET_ACCESS_KEY=
50
+
51
+ # ===========================================
52
+ # DATABASE (if direct DB testing needed)
53
+ # ===========================================
54
+
55
+ DATABASE_URL=
56
+
57
+ # ===========================================
58
+ # CUSTOM SECRETS
59
+ # Add project-specific secrets below
60
+ # ===========================================
61
+