ctx-cc 3.4.2 → 3.4.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-cc",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "description": "CTX 3.3 (Continuous Task eXecution) - AI that learns your preferences. Learning system, predictive planning, self-healing deployments (Sentry/LogRocket), voice control for hands-free development.",
5
5
  "keywords": [
6
6
  "claude",
@@ -74,17 +74,116 @@ Execute /ctx:init inline (don't tell user to run it separately).
74
74
  Output:
75
75
  ```
76
76
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
- CTX ► ANALYZING CODEBASE
77
+ CTX ► DEEP STUDY
78
78
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
79
 
80
80
  I understood: "{{user_request}}"
81
81
 
82
- Let me analyze this codebase with 4 specialized mappers.
82
+ Before I analyze, let me understand the scope.
83
+
84
+ ───────────────────────────────────────────────────────
85
+ ```
86
+
87
+ **Step 0: Gather context with AskUserQuestion**
88
+
89
+ Use the AskUserQuestion tool to ask:
90
+
91
+ ```
92
+ AskUserQuestion({
93
+ questions: [
94
+ {
95
+ question: "What type of analysis do you need?",
96
+ header: "Scope",
97
+ options: [
98
+ { label: "Code only", description: "Analyze codebase structure, patterns, and quality" },
99
+ { label: "Code + Running app", description: "Also browse the running application in browser" },
100
+ { label: "Full system", description: "Code + App + API testing + Database inspection" }
101
+ ],
102
+ multiSelect: false
103
+ },
104
+ {
105
+ question: "Is the application running locally?",
106
+ header: "Environment",
107
+ options: [
108
+ { label: "Yes, running", description: "App is running at localhost or local URL" },
109
+ { label: "Not yet", description: "I'll start it or you can help me start it" },
110
+ { label: "Remote/Staging", description: "App is deployed to a remote environment" }
111
+ ],
112
+ multiSelect: false
113
+ }
114
+ ]
115
+ })
116
+ ```
117
+
118
+ **If user selects "Code + Running app" or "Full system":**
119
+
120
+ Ask for credentials:
121
+ ```
122
+ AskUserQuestion({
123
+ questions: [
124
+ {
125
+ question: "Do you have login credentials for the app?",
126
+ header: "Access",
127
+ options: [
128
+ { label: "Yes, I'll provide them", description: "I have username/password or API keys" },
129
+ { label: "No auth needed", description: "The app doesn't require login" },
130
+ { label: "OAuth/SSO only", description: "Login requires external provider" }
131
+ ],
132
+ multiSelect: false
133
+ }
134
+ ]
135
+ })
136
+ ```
137
+
138
+ **If user will provide credentials:**
139
+
140
+ Output:
141
+ ```
142
+ ╔═══════════════════════════════════════════════════════╗
143
+ ║ LOGIN CREDENTIALS ║
144
+ ╚═══════════════════════════════════════════════════════╝
145
+
146
+ I'll detect the app URL from your config files.
147
+ Please provide login credentials for browser testing:
148
+
149
+ • Username/Email: _______________
150
+ • Password: _______________
151
+
152
+ ───────────────────────────────────────────────────────
153
+ → Paste credentials or type "skip" to analyze code only
154
+ ───────────────────────────────────────────────────────
155
+ ```
156
+
157
+ Store credentials in memory for browser testing (never write to files).
158
+
159
+ **Detect app URL from codebase:**
160
+
161
+ ```bash
162
+ # Check common locations for app URL
163
+ grep -r "localhost\|127.0.0.1" .env* package.json 2>/dev/null | head -5
164
+ grep -r "PORT\|port" .env* package.json 2>/dev/null | head -5
165
+ ```
166
+
167
+ Extract URL like `http://localhost:3000` from config.
168
+
169
+ **Step 1: Show analysis plan**
170
+
171
+ Output:
172
+ ```
173
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
+ CTX ► ANALYZING CODEBASE
175
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
176
+
177
+ Analysis scope: {{selected_scope}}
178
+ Environment: {{selected_environment}}
179
+ Access: {{access_level}}
180
+
181
+ Starting analysis with 4 specialized mappers...
83
182
 
84
183
  ───────────────────────────────────────────────────────
85
184
  ```
86
185
 
87
- **Step 1: Create structure**
186
+ **Step 2: Create structure**
88
187
 
89
188
  ```bash
90
189
  mkdir -p .ctx/codebase
@@ -150,7 +249,69 @@ cat .ctx/codebase/CONCERNS.md
150
249
 
151
250
  Write `.ctx/codebase/SUMMARY.md` with key findings from each document.
152
251
 
153
- **Step 7: Show completion banner**
252
+ **Step 7: Browser testing (if scope includes running app)**
253
+
254
+ If user selected "Code + Running app" or "Full system":
255
+
256
+ Output:
257
+ ```
258
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
259
+ CTX ► BROWSER TESTING
260
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
261
+
262
+ Now testing the running application...
263
+
264
+ ───────────────────────────────────────────────────────
265
+ ```
266
+
267
+ Use Playwright MCP tools to:
268
+
269
+ 1. Navigate to app URL:
270
+ ```
271
+ mcp__playwright__browser_navigate({ url: "{{app_url}}" })
272
+ ```
273
+
274
+ 2. Take snapshot of initial state:
275
+ ```
276
+ mcp__playwright__browser_snapshot({})
277
+ ```
278
+
279
+ 3. If credentials provided, log in:
280
+ ```
281
+ mcp__playwright__browser_type({ element: "email/username field", ref: "{{ref}}", text: "{{username}}" })
282
+ mcp__playwright__browser_type({ element: "password field", ref: "{{ref}}", text: "{{password}}" })
283
+ mcp__playwright__browser_click({ element: "login button", ref: "{{ref}}" })
284
+ ```
285
+
286
+ 4. Take snapshot after login:
287
+ ```
288
+ mcp__playwright__browser_snapshot({})
289
+ ```
290
+
291
+ 5. Explore key pages based on codebase analysis:
292
+ - Navigate to pages identified in ARCH.md
293
+ - Take screenshots of main flows
294
+ - Check for console errors
295
+
296
+ 6. Write browser findings to `.ctx/codebase/BROWSER.md`:
297
+ - Pages tested
298
+ - UI issues found
299
+ - Console errors
300
+ - Accessibility observations
301
+ - Screenshots taken
302
+
303
+ Output progress:
304
+ ```
305
+ ◆ Testing application...
306
+ → Navigating to {{app_url}}
307
+ → Logging in as {{username}}
308
+ → Exploring dashboard
309
+ → Checking user flows
310
+
311
+ ✓ Browser testing complete: BROWSER.md ({{N}} lines)
312
+ ```
313
+
314
+ **Step 8: Show completion banner**
154
315
 
155
316
  Output:
156
317
  ```