@kylindc/ccxray 1.2.0 → 1.2.1

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,288 @@
1
+ ---
2
+ name: openspec-explore
3
+ description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.2.0"
10
+ ---
11
+
12
+ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
13
+
14
+ **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
15
+
16
+ **This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
17
+
18
+ ---
19
+
20
+ ## The Stance
21
+
22
+ - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
23
+ - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
24
+ - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
25
+ - **Adaptive** - Follow interesting threads, pivot when new information emerges
26
+ - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
27
+ - **Grounded** - Explore the actual codebase when relevant, don't just theorize
28
+
29
+ ---
30
+
31
+ ## What You Might Do
32
+
33
+ Depending on what the user brings, you might:
34
+
35
+ **Explore the problem space**
36
+ - Ask clarifying questions that emerge from what they said
37
+ - Challenge assumptions
38
+ - Reframe the problem
39
+ - Find analogies
40
+
41
+ **Investigate the codebase**
42
+ - Map existing architecture relevant to the discussion
43
+ - Find integration points
44
+ - Identify patterns already in use
45
+ - Surface hidden complexity
46
+
47
+ **Compare options**
48
+ - Brainstorm multiple approaches
49
+ - Build comparison tables
50
+ - Sketch tradeoffs
51
+ - Recommend a path (if asked)
52
+
53
+ **Visualize**
54
+ ```
55
+ ┌─────────────────────────────────────────┐
56
+ │ Use ASCII diagrams liberally │
57
+ ├─────────────────────────────────────────┤
58
+ │ │
59
+ │ ┌────────┐ ┌────────┐ │
60
+ │ │ State │────────▶│ State │ │
61
+ │ │ A │ │ B │ │
62
+ │ └────────┘ └────────┘ │
63
+ │ │
64
+ │ System diagrams, state machines, │
65
+ │ data flows, architecture sketches, │
66
+ │ dependency graphs, comparison tables │
67
+ │ │
68
+ └─────────────────────────────────────────┘
69
+ ```
70
+
71
+ **Surface risks and unknowns**
72
+ - Identify what could go wrong
73
+ - Find gaps in understanding
74
+ - Suggest spikes or investigations
75
+
76
+ ---
77
+
78
+ ## OpenSpec Awareness
79
+
80
+ You have full context of the OpenSpec system. Use it naturally, don't force it.
81
+
82
+ ### Check for context
83
+
84
+ At the start, quickly check what exists:
85
+ ```bash
86
+ openspec list --json
87
+ ```
88
+
89
+ This tells you:
90
+ - If there are active changes
91
+ - Their names, schemas, and status
92
+ - What the user might be working on
93
+
94
+ ### When no change exists
95
+
96
+ Think freely. When insights crystallize, you might offer:
97
+
98
+ - "This feels solid enough to start a change. Want me to create a proposal?"
99
+ - Or keep exploring - no pressure to formalize
100
+
101
+ ### When a change exists
102
+
103
+ If the user mentions a change or you detect one is relevant:
104
+
105
+ 1. **Read existing artifacts for context**
106
+ - `openspec/changes/<name>/proposal.md`
107
+ - `openspec/changes/<name>/design.md`
108
+ - `openspec/changes/<name>/tasks.md`
109
+ - etc.
110
+
111
+ 2. **Reference them naturally in conversation**
112
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
113
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
114
+
115
+ 3. **Offer to capture when decisions are made**
116
+
117
+ | Insight Type | Where to Capture |
118
+ |--------------|------------------|
119
+ | New requirement discovered | `specs/<capability>/spec.md` |
120
+ | Requirement changed | `specs/<capability>/spec.md` |
121
+ | Design decision made | `design.md` |
122
+ | Scope changed | `proposal.md` |
123
+ | New work identified | `tasks.md` |
124
+ | Assumption invalidated | Relevant artifact |
125
+
126
+ Example offers:
127
+ - "That's a design decision. Capture it in design.md?"
128
+ - "This is a new requirement. Add it to specs?"
129
+ - "This changes scope. Update the proposal?"
130
+
131
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
132
+
133
+ ---
134
+
135
+ ## What You Don't Have To Do
136
+
137
+ - Follow a script
138
+ - Ask the same questions every time
139
+ - Produce a specific artifact
140
+ - Reach a conclusion
141
+ - Stay on topic if a tangent is valuable
142
+ - Be brief (this is thinking time)
143
+
144
+ ---
145
+
146
+ ## Handling Different Entry Points
147
+
148
+ **User brings a vague idea:**
149
+ ```
150
+ User: I'm thinking about adding real-time collaboration
151
+
152
+ You: Real-time collab is a big space. Let me think about this...
153
+
154
+ COLLABORATION SPECTRUM
155
+ ════════════════════════════════════════════
156
+
157
+ Awareness Coordination Sync
158
+ │ │ │
159
+ ▼ ▼ ▼
160
+ ┌────────┐ ┌────────┐ ┌────────┐
161
+ │Presence│ │Cursors │ │ CRDT │
162
+ │ "3 │ │ Multi │ │Conflict│
163
+ │online" │ │ select │ │ free │
164
+ └────────┘ └────────┘ └────────┘
165
+ │ │ │
166
+ trivial moderate complex
167
+
168
+ Where's your head at?
169
+ ```
170
+
171
+ **User brings a specific problem:**
172
+ ```
173
+ User: The auth system is a mess
174
+
175
+ You: [reads codebase]
176
+
177
+ ┌─────────────────────────────────────────────┐
178
+ │ CURRENT AUTH FLOW │
179
+ └─────────────────────────────────────────────┘
180
+
181
+ ┌─────────────┼─────────────┐
182
+ ▼ ▼ ▼
183
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
184
+ │ Google │ │ GitHub │ │ Email │
185
+ │ OAuth │ │ OAuth │ │ Magic │
186
+ └────┬────┘ └────┬────┘ └────┬────┘
187
+ │ │ │
188
+ └─────────────┼─────────────┘
189
+
190
+ ┌───────────┐
191
+ │ Session │
192
+ └─────┬─────┘
193
+
194
+
195
+ ┌───────────┐
196
+ │ Perms │
197
+ └───────────┘
198
+
199
+ I see three tangles. Which one's burning?
200
+ ```
201
+
202
+ **User is stuck mid-implementation:**
203
+ ```
204
+ User: /opsx:explore add-auth-system
205
+ The OAuth integration is more complex than expected
206
+
207
+ You: [reads change artifacts]
208
+
209
+ You're on task 4: "Implement OAuth flow"
210
+
211
+ Let me trace what's involved...
212
+
213
+ [draws diagram, explores options, suggests paths]
214
+
215
+ Want to update the design to reflect this?
216
+ Or add a spike task to investigate?
217
+ ```
218
+
219
+ **User wants to compare options:**
220
+ ```
221
+ User: Should we use Postgres or SQLite?
222
+
223
+ You: Generic answer is boring. What's the context?
224
+
225
+ User: A CLI tool that tracks local dev environments
226
+
227
+ You: That changes everything.
228
+
229
+ ┌─────────────────────────────────────────────────┐
230
+ │ CLI TOOL DATA STORAGE │
231
+ └─────────────────────────────────────────────────┘
232
+
233
+ Key constraints:
234
+ • No daemon running
235
+ • Must work offline
236
+ • Single user
237
+
238
+ SQLite Postgres
239
+ Deployment embedded ✓ needs server ✗
240
+ Offline yes ✓ no ✗
241
+ Single file yes ✓ no ✗
242
+
243
+ SQLite. Not even close.
244
+
245
+ Unless... is there a sync component?
246
+ ```
247
+
248
+ ---
249
+
250
+ ## Ending Discovery
251
+
252
+ There's no required ending. Discovery might:
253
+
254
+ - **Flow into a proposal**: "Ready to start? I can create a change proposal."
255
+ - **Result in artifact updates**: "Updated design.md with these decisions"
256
+ - **Just provide clarity**: User has what they need, moves on
257
+ - **Continue later**: "We can pick this up anytime"
258
+
259
+ When it feels like things are crystallizing, you might summarize:
260
+
261
+ ```
262
+ ## What We Figured Out
263
+
264
+ **The problem**: [crystallized understanding]
265
+
266
+ **The approach**: [if one emerged]
267
+
268
+ **Open questions**: [if any remain]
269
+
270
+ **Next steps** (if ready):
271
+ - Create a change proposal
272
+ - Keep exploring: just keep talking
273
+ ```
274
+
275
+ But this summary is optional. Sometimes the thinking IS the value.
276
+
277
+ ---
278
+
279
+ ## Guardrails
280
+
281
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
282
+ - **Don't fake understanding** - If something is unclear, dig deeper
283
+ - **Don't rush** - Discovery is thinking time, not task time
284
+ - **Don't force structure** - Let patterns emerge naturally
285
+ - **Don't auto-capture** - Offer to save insights, don't just do it
286
+ - **Do visualize** - A good diagram is worth many paragraphs
287
+ - **Do explore the codebase** - Ground discussions in reality
288
+ - **Do question assumptions** - Including the user's and your own
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: openspec-propose
3
+ description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.2.0"
10
+ ---
11
+
12
+ Propose a new change - create the change and generate all artifacts in one step.
13
+
14
+ I'll create a change with artifacts:
15
+ - proposal.md (what & why)
16
+ - design.md (how)
17
+ - tasks.md (implementation steps)
18
+
19
+ When ready to implement, run /opsx:apply
20
+
21
+ ---
22
+
23
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
24
+
25
+ **Steps**
26
+
27
+ 1. **If no clear input provided, ask what they want to build**
28
+
29
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
30
+ > "What change do you want to work on? Describe what you want to build or fix."
31
+
32
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
33
+
34
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
35
+
36
+ 2. **Create the change directory**
37
+ ```bash
38
+ openspec new change "<name>"
39
+ ```
40
+ This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
41
+
42
+ 3. **Get the artifact build order**
43
+ ```bash
44
+ openspec status --change "<name>" --json
45
+ ```
46
+ Parse the JSON to get:
47
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
48
+ - `artifacts`: list of all artifacts with their status and dependencies
49
+
50
+ 4. **Create artifacts in sequence until apply-ready**
51
+
52
+ Use the **TodoWrite tool** to track progress through the artifacts.
53
+
54
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
55
+
56
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
57
+ - Get instructions:
58
+ ```bash
59
+ openspec instructions <artifact-id> --change "<name>" --json
60
+ ```
61
+ - The instructions JSON includes:
62
+ - `context`: Project background (constraints for you - do NOT include in output)
63
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
64
+ - `template`: The structure to use for your output file
65
+ - `instruction`: Schema-specific guidance for this artifact type
66
+ - `outputPath`: Where to write the artifact
67
+ - `dependencies`: Completed artifacts to read for context
68
+ - Read any completed dependency files for context
69
+ - Create the artifact file using `template` as the structure
70
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
71
+ - Show brief progress: "Created <artifact-id>"
72
+
73
+ b. **Continue until all `applyRequires` artifacts are complete**
74
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
75
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
76
+ - Stop when all `applyRequires` artifacts are done
77
+
78
+ c. **If an artifact requires user input** (unclear context):
79
+ - Use **AskUserQuestion tool** to clarify
80
+ - Then continue with creation
81
+
82
+ 5. **Show final status**
83
+ ```bash
84
+ openspec status --change "<name>"
85
+ ```
86
+
87
+ **Output**
88
+
89
+ After completing all artifacts, summarize:
90
+ - Change name and location
91
+ - List of artifacts created with brief descriptions
92
+ - What's ready: "All artifacts created! Ready for implementation."
93
+ - Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
94
+
95
+ **Artifact Creation Guidelines**
96
+
97
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
98
+ - The schema defines what each artifact should contain - follow it
99
+ - Read dependency artifacts for context before creating new ones
100
+ - Use `template` as the structure for your output file - fill in its sections
101
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
102
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
103
+ - These guide what you write, but should never appear in the output
104
+
105
+ **Guardrails**
106
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
107
+ - Always read dependency artifacts before creating a new one
108
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
109
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
110
+ - Verify each artifact file exists after writing before proceeding to next
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: openspec-sync-specs
3
+ description: Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.2.0"
10
+ ---
11
+
12
+ Sync delta specs from a change to main specs.
13
+
14
+ This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
15
+
16
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
17
+
18
+ **Steps**
19
+
20
+ 1. **If no change name provided, prompt for selection**
21
+
22
+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
23
+
24
+ Show changes that have delta specs (under `specs/` directory).
25
+
26
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
27
+
28
+ 2. **Find delta specs**
29
+
30
+ Look for delta spec files in `openspec/changes/<name>/specs/*/spec.md`.
31
+
32
+ Each delta spec file contains sections like:
33
+ - `## ADDED Requirements` - New requirements to add
34
+ - `## MODIFIED Requirements` - Changes to existing requirements
35
+ - `## REMOVED Requirements` - Requirements to remove
36
+ - `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
37
+
38
+ If no delta specs found, inform user and stop.
39
+
40
+ 3. **For each delta spec, apply changes to main specs**
41
+
42
+ For each capability with a delta spec at `openspec/changes/<name>/specs/<capability>/spec.md`:
43
+
44
+ a. **Read the delta spec** to understand the intended changes
45
+
46
+ b. **Read the main spec** at `openspec/specs/<capability>/spec.md` (may not exist yet)
47
+
48
+ c. **Apply changes intelligently**:
49
+
50
+ **ADDED Requirements:**
51
+ - If requirement doesn't exist in main spec → add it
52
+ - If requirement already exists → update it to match (treat as implicit MODIFIED)
53
+
54
+ **MODIFIED Requirements:**
55
+ - Find the requirement in main spec
56
+ - Apply the changes - this can be:
57
+ - Adding new scenarios (don't need to copy existing ones)
58
+ - Modifying existing scenarios
59
+ - Changing the requirement description
60
+ - Preserve scenarios/content not mentioned in the delta
61
+
62
+ **REMOVED Requirements:**
63
+ - Remove the entire requirement block from main spec
64
+
65
+ **RENAMED Requirements:**
66
+ - Find the FROM requirement, rename to TO
67
+
68
+ d. **Create new main spec** if capability doesn't exist yet:
69
+ - Create `openspec/specs/<capability>/spec.md`
70
+ - Add Purpose section (can be brief, mark as TBD)
71
+ - Add Requirements section with the ADDED requirements
72
+
73
+ 4. **Show summary**
74
+
75
+ After applying all changes, summarize:
76
+ - Which capabilities were updated
77
+ - What changes were made (requirements added/modified/removed/renamed)
78
+
79
+ **Delta Spec Format Reference**
80
+
81
+ ```markdown
82
+ ## ADDED Requirements
83
+
84
+ ### Requirement: New Feature
85
+ The system SHALL do something new.
86
+
87
+ #### Scenario: Basic case
88
+ - **WHEN** user does X
89
+ - **THEN** system does Y
90
+
91
+ ## MODIFIED Requirements
92
+
93
+ ### Requirement: Existing Feature
94
+ #### Scenario: New scenario to add
95
+ - **WHEN** user does A
96
+ - **THEN** system does B
97
+
98
+ ## REMOVED Requirements
99
+
100
+ ### Requirement: Deprecated Feature
101
+
102
+ ## RENAMED Requirements
103
+
104
+ - FROM: `### Requirement: Old Name`
105
+ - TO: `### Requirement: New Name`
106
+ ```
107
+
108
+ **Key Principle: Intelligent Merging**
109
+
110
+ Unlike programmatic merging, you can apply **partial updates**:
111
+ - To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
112
+ - The delta represents *intent*, not a wholesale replacement
113
+ - Use your judgment to merge changes sensibly
114
+
115
+ **Output On Success**
116
+
117
+ ```
118
+ ## Specs Synced: <change-name>
119
+
120
+ Updated main specs:
121
+
122
+ **<capability-1>**:
123
+ - Added requirement: "New Feature"
124
+ - Modified requirement: "Existing Feature" (added 1 scenario)
125
+
126
+ **<capability-2>**:
127
+ - Created new spec file
128
+ - Added requirement: "Another Feature"
129
+
130
+ Main specs are now updated. The change remains active - archive when implementation is complete.
131
+ ```
132
+
133
+ **Guardrails**
134
+ - Read both delta and main specs before making changes
135
+ - Preserve existing content not mentioned in delta
136
+ - If something is unclear, ask for clarification
137
+ - Show what you're changing as you go
138
+ - The operation should be idempotent - running twice should give same result
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GoImports">
4
+ <option name="excludedPackages">
5
+ <array>
6
+ <option value="github.com/pkg/errors" />
7
+ <option value="golang.org/x/net/context" />
8
+ </array>
9
+ </option>
10
+ </component>
11
+ </project>
package/.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GHAISettings"><![CDATA[{}]]></component>
4
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="temurin-21 (mise)" project-jdk-type="JavaSDK">
5
+ <output url="file://$PROJECT_DIR$/out" />
6
+ </component>
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/ccxray.iml" filepath="$PROJECT_DIR$/.idea/ccxray.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kylindc/ccxray",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "X-ray vision for AI agent sessions — a transparent HTTP proxy and dashboard for Claude Code",
5
5
  "main": "server/index.js",
6
6
  "bin": {
package/server/config.js CHANGED
@@ -18,7 +18,7 @@ const RESTORE_DAYS = parseInt(process.env.RESTORE_DAYS || '3', 10);
18
18
  const BEDROCK_REGION = process.env.BEDROCK_REGION || '';
19
19
  const BEDROCK_PROFILE_ARN = process.env.BEDROCK_PROFILE_ARN || '';
20
20
  const BEDROCK_MODEL_ID = process.env.BEDROCK_MODEL_ID || '';
21
- const BEDROCK_BEARER_TOKEN = process.env.BEDROCK_BEARER_TOKEN || '';
21
+ const AWS_BEARER_TOKEN_BEDROCK = process.env.AWS_BEARER_TOKEN_BEDROCK || '';
22
22
  const _CLAUDE_CODE_USE_BEDROCK = process.env.CLAUDE_CODE_USE_BEDROCK || '';
23
23
 
24
24
  // IS_BEDROCK_MODE is true when any activation trigger is set.
@@ -178,7 +178,7 @@ module.exports = {
178
178
  BEDROCK_ACTIVATION_SOURCE,
179
179
  BEDROCK_PROFILE_ARN,
180
180
  BEDROCK_MODEL_ID,
181
- BEDROCK_BEARER_TOKEN,
181
+ AWS_BEARER_TOKEN_BEDROCK,
182
182
  BEDROCK_TEST_HOST,
183
183
  BEDROCK_TEST_PORT,
184
184
  BEDROCK_TEST_PROTOCOL,