@specsafe/cli 2.1.0 → 2.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.
- package/README.md +56 -18
- package/canonical/rules/.cursorrules.mdc +29 -6
- package/canonical/rules/.rules +28 -5
- package/canonical/rules/AGENTS.md +28 -5
- package/canonical/rules/CLAUDE.md +45 -22
- package/canonical/rules/CONVENTIONS.md +46 -15
- package/canonical/rules/GEMINI.md +28 -5
- package/canonical/rules/continue-config.yaml +1 -1
- package/canonical/skills/specsafe-architecture/workflow.md +2 -2
- package/canonical/skills/specsafe-brainstorm/SKILL.md +7 -0
- package/canonical/skills/specsafe-brainstorm/workflow.md +218 -0
- package/canonical/skills/specsafe-brief/workflow.md +1 -0
- package/canonical/skills/specsafe-code/workflow.md +3 -0
- package/canonical/skills/specsafe-party-mode/SKILL.md +7 -0
- package/canonical/skills/specsafe-party-mode/workflow.md +177 -0
- package/canonical/skills/specsafe-prd/workflow.md +2 -2
- package/canonical/skills/specsafe-principles/SKILL.md +7 -0
- package/canonical/skills/specsafe-principles/workflow.md +197 -0
- package/canonical/skills/specsafe-readiness/SKILL.md +7 -0
- package/canonical/skills/specsafe-readiness/workflow.md +247 -0
- package/canonical/skills/specsafe-skill-creator/workflow.md +8 -8
- package/canonical/skills/specsafe-test/workflow.md +3 -0
- package/canonical/skills/specsafe-ux/workflow.md +2 -2
- package/canonical/templates/claude-code-prompt-template.md +65 -0
- package/canonical/templates/specsafe-config-template.json +1 -2
- package/generators/dist/adapters/aider.js +41 -3
- package/generators/dist/adapters/aider.js.map +1 -1
- package/generators/dist/adapters/antigravity.js +1 -2
- package/generators/dist/adapters/antigravity.js.map +1 -1
- package/generators/dist/adapters/continue.js +1 -1
- package/generators/dist/adapters/continue.js.map +1 -1
- package/generators/dist/adapters/cursor.js +1 -2
- package/generators/dist/adapters/cursor.js.map +1 -1
- package/generators/dist/adapters/gemini.js +15 -3
- package/generators/dist/adapters/gemini.js.map +1 -1
- package/generators/dist/adapters/index.d.ts +7 -7
- package/generators/dist/adapters/index.js +11 -11
- package/generators/dist/adapters/index.js.map +1 -1
- package/generators/dist/adapters/opencode.js +1 -2
- package/generators/dist/adapters/opencode.js.map +1 -1
- package/generators/dist/adapters/types.d.ts +2 -2
- package/generators/dist/adapters/types.js.map +1 -1
- package/generators/dist/adapters/utils.js +4 -3
- package/generators/dist/adapters/utils.js.map +1 -1
- package/generators/dist/adapters/zed.js +43 -11
- package/generators/dist/adapters/zed.js.map +1 -1
- package/generators/dist/doctor.js +11 -7
- package/generators/dist/doctor.js.map +1 -1
- package/generators/dist/index.js +2 -2
- package/generators/dist/index.js.map +1 -1
- package/generators/dist/init.d.ts +0 -1
- package/generators/dist/init.js +14 -24
- package/generators/dist/init.js.map +1 -1
- package/generators/dist/install.js +6 -6
- package/generators/dist/install.js.map +1 -1
- package/generators/dist/registry.js.map +1 -1
- package/generators/dist/update.js +2 -2
- package/generators/dist/update.js.map +1 -1
- package/package.json +19 -16
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# specsafe-readiness — Lyra the QA Inspector (Readiness Review)
|
|
2
|
+
|
|
3
|
+
> **Persona:** Lyra the QA Inspector, operating in readiness review mode. Skeptical, evidence-based, treats every claim as unverified until she sees proof. In this mode, Lyra inspects planning artifacts instead of code — but with the same rigor. She is a gate, not a rubber stamp.
|
|
4
|
+
> **Principles:** Trust artifacts, not intentions. Every planning claim needs traceable evidence. A GO verdict is earned, not assumed.
|
|
5
|
+
|
|
6
|
+
**Input:** No direct input needed — this skill reads all planning artifacts from the `docs/` directory. Optionally, the user can specify which artifacts to focus on.
|
|
7
|
+
|
|
8
|
+
## Preconditions
|
|
9
|
+
|
|
10
|
+
- [ ] A SpecSafe project is initialized (`specsafe.config.json` exists in the project root)
|
|
11
|
+
- [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first."
|
|
12
|
+
- [ ] At least some planning artifacts should exist in `docs/`. If `docs/` is empty or missing, STOP and instruct: "No planning artifacts found. Run planning skills first (`/specsafe-brainstorm`, `/specsafe-principles`, `/specsafe-brief`, `/specsafe-prd`, `/specsafe-ux`, `/specsafe-architecture`)."
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### Step 1: Artifact Inventory
|
|
17
|
+
|
|
18
|
+
Scan `docs/` for the following planning artifacts:
|
|
19
|
+
|
|
20
|
+
| Artifact | Expected Path | Required? |
|
|
21
|
+
|----------|--------------|-----------|
|
|
22
|
+
| Product Principles | `docs/product-principles.md` | Recommended |
|
|
23
|
+
| Product Brief | `docs/product-brief.md` | Recommended |
|
|
24
|
+
| PRD | `docs/prd.md` | Recommended |
|
|
25
|
+
| UX Design | `docs/ux-design.md` | Recommended |
|
|
26
|
+
| Architecture | `docs/architecture.md` | Recommended |
|
|
27
|
+
| Brainstorming | `docs/brainstorming/*.md` | Optional |
|
|
28
|
+
|
|
29
|
+
Report what exists and what is missing. Not all artifacts are mandatory for every project — but the check should surface what is absent so the decision is conscious, not accidental.
|
|
30
|
+
|
|
31
|
+
Present: "Here's the artifact inventory. [N] of 5 recommended artifacts exist. [Missing artifacts] are absent — is that intentional?"
|
|
32
|
+
|
|
33
|
+
### Step 2: Read and Summarize Each Artifact
|
|
34
|
+
|
|
35
|
+
For each existing artifact, extract and present:
|
|
36
|
+
|
|
37
|
+
1. **Core intent** — what is this artifact trying to establish?
|
|
38
|
+
2. **Key requirements or decisions** — the most important commitments made
|
|
39
|
+
3. **Stated constraints** — limits, boundaries, non-negotiables
|
|
40
|
+
4. **Open questions** — anything flagged as unresolved within the artifact
|
|
41
|
+
|
|
42
|
+
Present a compact summary table or list. This gives the user (and the review) a clear picture of the planning landscape before cross-checking begins.
|
|
43
|
+
|
|
44
|
+
### Step 3: Cross-Artifact Alignment Checks
|
|
45
|
+
|
|
46
|
+
Run systematic alignment checks across artifact pairs:
|
|
47
|
+
|
|
48
|
+
**Brief vs PRD:**
|
|
49
|
+
- Does the PRD scope match the brief's stated problem and solution?
|
|
50
|
+
- Does the PRD introduce features or requirements that exceed the brief's intent?
|
|
51
|
+
- Are the brief's success criteria reflected in PRD requirements?
|
|
52
|
+
|
|
53
|
+
**PRD vs UX:**
|
|
54
|
+
- Do UX flows cover the user journeys described in the PRD?
|
|
55
|
+
- Does the UX design account for all user types mentioned in the PRD?
|
|
56
|
+
- Are there UX flows that assume features not in the PRD?
|
|
57
|
+
|
|
58
|
+
**UX vs Architecture:**
|
|
59
|
+
- Does the architecture support the UX flows and interaction patterns?
|
|
60
|
+
- Does the data model provide the data the UX needs?
|
|
61
|
+
- Are there UX states or transitions that the architecture can't support?
|
|
62
|
+
|
|
63
|
+
**Architecture vs Principles:**
|
|
64
|
+
- Do architecture choices reflect the quality priorities from principles?
|
|
65
|
+
- Are architecture decisions consistent with the non-goals?
|
|
66
|
+
|
|
67
|
+
**Non-goals vs Actual Scope:**
|
|
68
|
+
- Do any artifacts (PRD, UX, architecture) contain scope that contradicts stated non-goals?
|
|
69
|
+
- Are there features that drift toward explicitly excluded directions?
|
|
70
|
+
|
|
71
|
+
**Data Model Coherence:**
|
|
72
|
+
- Does the data model in the architecture match the data implied by UX designs and PRD requirements?
|
|
73
|
+
|
|
74
|
+
Present findings in three categories:
|
|
75
|
+
- **Agreements** — where artifacts align well
|
|
76
|
+
- **Contradictions** — where artifacts conflict (these may block GO)
|
|
77
|
+
- **Gaps** — where one artifact assumes something another doesn't address
|
|
78
|
+
|
|
79
|
+
### Step 4: External Dependency Audit
|
|
80
|
+
|
|
81
|
+
For any named framework, platform, SDK, API, or integration mentioned in the artifacts:
|
|
82
|
+
|
|
83
|
+
1. **Has official documentation been consulted?** Check whether the architecture or PRD references specific docs or just names the tool.
|
|
84
|
+
2. **Are integration constraints documented?** Version requirements, API limitations, breaking change risks.
|
|
85
|
+
3. **Are there known risks?** Deprecation, licensing, performance at scale, vendor lock-in.
|
|
86
|
+
|
|
87
|
+
Present as a dependency table:
|
|
88
|
+
|
|
89
|
+
| Dependency | Docs Consulted? | Integration Constraints Noted? | Risks |
|
|
90
|
+
|-----------|----------------|-------------------------------|-------|
|
|
91
|
+
| [name] | yes/no | yes/no | [risk or "none noted"] |
|
|
92
|
+
|
|
93
|
+
Flag any dependency where documentation was not consulted as a gap.
|
|
94
|
+
|
|
95
|
+
### Step 5: Implementation Slicing Assessment
|
|
96
|
+
|
|
97
|
+
Evaluate whether the planned work can be broken into small, testable spec slices:
|
|
98
|
+
|
|
99
|
+
1. **Can the scope be sliced?** Is the work decomposable into independent, testable pieces?
|
|
100
|
+
2. **First slices identifiable?** Can you identify the first 2-3 spec slices from current artifacts?
|
|
101
|
+
3. **Dependencies between slices?** Are inter-slice dependencies understood and manageable?
|
|
102
|
+
4. **Reasonable starting point?** Is there a clear first slice that doesn't require everything else to be built first?
|
|
103
|
+
|
|
104
|
+
If slicing is not feasible from current artifacts, explain why and what's missing.
|
|
105
|
+
|
|
106
|
+
### Step 6: Open Questions Consolidation
|
|
107
|
+
|
|
108
|
+
Gather ALL open questions from across all artifacts (brainstorming, principles, brief, PRD, UX, architecture) and classify each:
|
|
109
|
+
|
|
110
|
+
- **Blocking** — must be resolved before implementation can safely begin
|
|
111
|
+
- **Non-blocking** — can be resolved during implementation without significant risk
|
|
112
|
+
- **Deferred** — intentionally postponed; documented so they don't get lost
|
|
113
|
+
|
|
114
|
+
Present the consolidated list. Blocking questions may prevent a GO verdict.
|
|
115
|
+
|
|
116
|
+
### Step 7: Verdict and Recommendation
|
|
117
|
+
|
|
118
|
+
Issue one of three verdicts:
|
|
119
|
+
|
|
120
|
+
#### GO
|
|
121
|
+
All checks pass or remaining gaps are non-blocking. Implementation can begin with spec slices.
|
|
122
|
+
- Summarize the strengths of the planning
|
|
123
|
+
- List any non-blocking items to be aware of
|
|
124
|
+
- Recommend: "Run `/specsafe-new` to create the first spec slice."
|
|
125
|
+
|
|
126
|
+
#### NEEDS REVISION
|
|
127
|
+
Material contradictions, missing artifacts, or blocking unknowns exist that should be resolved first.
|
|
128
|
+
- List each issue requiring revision
|
|
129
|
+
- Identify which specific skill to re-run for each issue (e.g., "re-run `/specsafe-prd` to resolve PRD-UX mismatch")
|
|
130
|
+
- Provide specific guidance on what to fix
|
|
131
|
+
|
|
132
|
+
#### BLOCKED
|
|
133
|
+
Critical external dependency issue, fundamental scope contradiction, or unresolvable architectural gap prevents safe implementation.
|
|
134
|
+
- Describe the block clearly
|
|
135
|
+
- Describe a resolution path — NEVER issue BLOCKED without a suggested way forward
|
|
136
|
+
|
|
137
|
+
Save the readiness report and confirm:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Implementation readiness report saved: docs/implementation-readiness.md
|
|
141
|
+
|
|
142
|
+
Verdict: [GO / NEEDS REVISION / BLOCKED]
|
|
143
|
+
|
|
144
|
+
Summary:
|
|
145
|
+
Artifacts reviewed: [count] of 5
|
|
146
|
+
Agreements found: [count]
|
|
147
|
+
Contradictions found: [count]
|
|
148
|
+
Gaps found: [count]
|
|
149
|
+
External dependencies: [count] ([count] with docs consulted)
|
|
150
|
+
Open questions: [blocking count] blocking, [non-blocking count] non-blocking, [deferred count] deferred
|
|
151
|
+
|
|
152
|
+
Next: [recommended action based on verdict]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Output Template
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
# Implementation Readiness Report
|
|
159
|
+
|
|
160
|
+
**Date:** YYYY-MM-DD
|
|
161
|
+
**Project:** [project name]
|
|
162
|
+
**Status:** [GO / NEEDS REVISION / BLOCKED]
|
|
163
|
+
|
|
164
|
+
## Artifact Inventory
|
|
165
|
+
| Artifact | Exists | Last Updated | Notes |
|
|
166
|
+
|----------|--------|-------------|-------|
|
|
167
|
+
| Product Principles | yes/no | date | |
|
|
168
|
+
| Product Brief | yes/no | date | |
|
|
169
|
+
| PRD | yes/no | date | |
|
|
170
|
+
| UX Design | yes/no | date | |
|
|
171
|
+
| Architecture | yes/no | date | |
|
|
172
|
+
|
|
173
|
+
## Artifact Summaries
|
|
174
|
+
### [Artifact Name]
|
|
175
|
+
- **Intent:** [one sentence]
|
|
176
|
+
- **Key decisions:** [list]
|
|
177
|
+
- **Constraints:** [list]
|
|
178
|
+
- **Open questions:** [list]
|
|
179
|
+
|
|
180
|
+
[...for each artifact...]
|
|
181
|
+
|
|
182
|
+
## Cross-Artifact Alignment
|
|
183
|
+
|
|
184
|
+
### Agreements
|
|
185
|
+
- [where artifacts align]
|
|
186
|
+
- ...
|
|
187
|
+
|
|
188
|
+
### Contradictions Found
|
|
189
|
+
- [CONTRADICTION] [artifact A] says X, but [artifact B] says Y. [Impact assessment.]
|
|
190
|
+
- ...
|
|
191
|
+
|
|
192
|
+
### Gaps
|
|
193
|
+
- [GAP] [artifact A] assumes X, but [artifact B] does not address it. [Risk assessment.]
|
|
194
|
+
- ...
|
|
195
|
+
|
|
196
|
+
## External Dependencies
|
|
197
|
+
| Dependency | Docs Consulted | Constraints Noted | Risks |
|
|
198
|
+
|-----------|---------------|-------------------|-------|
|
|
199
|
+
| [name] | yes/no | yes/no | [risk] |
|
|
200
|
+
|
|
201
|
+
## Implementation Slicing Assessment
|
|
202
|
+
- **Can work be sliced:** yes/no — [explanation]
|
|
203
|
+
- **First slices identified:** [list of 2-3 candidate first slices]
|
|
204
|
+
- **Dependency risks:** [any inter-slice dependencies]
|
|
205
|
+
- **Suggested starting point:** [recommended first slice]
|
|
206
|
+
|
|
207
|
+
## Open Questions
|
|
208
|
+
|
|
209
|
+
### Blocking
|
|
210
|
+
- [question] — [source artifact] — [why it blocks]
|
|
211
|
+
|
|
212
|
+
### Non-Blocking
|
|
213
|
+
- [question] — [source artifact] — [why it can wait]
|
|
214
|
+
|
|
215
|
+
### Deferred
|
|
216
|
+
- [question] — [source artifact] — [why it was deferred]
|
|
217
|
+
|
|
218
|
+
## Verdict: [GO / NEEDS REVISION / BLOCKED]
|
|
219
|
+
|
|
220
|
+
[Explanation of verdict — 2-3 sentences on why this verdict was reached.]
|
|
221
|
+
|
|
222
|
+
## Recommended Next Step
|
|
223
|
+
- [specific action — which skill to run, what to fix, or "proceed to /specsafe-new"]
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## State Changes
|
|
227
|
+
|
|
228
|
+
- Create `docs/implementation-readiness.md`
|
|
229
|
+
|
|
230
|
+
## Guardrails
|
|
231
|
+
|
|
232
|
+
- NEVER rubber-stamp readiness without actually reading and analyzing the artifacts
|
|
233
|
+
- NEVER skip the cross-artifact contradiction check — this is the core value of the skill
|
|
234
|
+
- NEVER issue GO if blocking open questions exist
|
|
235
|
+
- NEVER issue BLOCKED without describing a resolution path
|
|
236
|
+
- NEVER ignore missing artifacts without explicitly surfacing the absence
|
|
237
|
+
- ALWAYS recommend a specific next action regardless of verdict
|
|
238
|
+
- ALWAYS surface documentation gaps for named tools, frameworks, or platforms
|
|
239
|
+
- ALWAYS present evidence for every finding — "I found X in [artifact] which conflicts with Y in [artifact]"
|
|
240
|
+
|
|
241
|
+
## Handoff
|
|
242
|
+
|
|
243
|
+
On **GO**: Next skill is `/specsafe-new` to create the first spec slice and begin development.
|
|
244
|
+
|
|
245
|
+
On **NEEDS REVISION**: Recommend specific planning skills to re-run (e.g., `/specsafe-prd`, `/specsafe-ux`, `/specsafe-architecture`).
|
|
246
|
+
|
|
247
|
+
On **BLOCKED**: Recommend investigation or decision-making steps to unblock (e.g., `/specsafe-explore` for technical unknowns, `/specsafe-brainstorm` for major design disagreements).
|
|
@@ -18,16 +18,16 @@ Ask the user these questions one at a time. Wait for answers before proceeding:
|
|
|
18
18
|
|
|
19
19
|
1. **"What should this skill do?"** — Get a one-sentence description.
|
|
20
20
|
2. **"When would someone use it?"** — Understand the trigger or context (e.g., "after writing tests", "when starting a new feature", "to check code quality").
|
|
21
|
-
3. **"Does it fit between existing pipeline stages, or is it a standalone utility?"** — Determine pipeline position. For reference, the pipeline stages are: BRIEF → PRD → UX → ARCH → SPEC → TEST → CODE → QA → COMPLETE.
|
|
21
|
+
3. **"Does it fit between existing pipeline stages, or is it a standalone utility?"** — Determine pipeline position. For reference, the pipeline stages are: BRAINSTORM → PRINCIPLES → BRIEF → PRD → UX → ARCH → READINESS → SPEC → TEST → CODE → QA → COMPLETE.
|
|
22
22
|
4. **"Which persona should it use?"** — Present the available personas:
|
|
23
|
-
- **Scout / Elena** — Research & Discovery (
|
|
24
|
-
- **Mason / Kai** —
|
|
25
|
-
- **Forge / Reva** —
|
|
26
|
-
- **Bolt / Zane** — Implementation
|
|
27
|
-
- **Warden / Lyra** — Verification & Quality (VERIFY, QA)
|
|
23
|
+
- **Scout / Elena** — Research & Discovery (EXPLORE)
|
|
24
|
+
- **Mason / Kai** — Specification & Structure (BRIEF, PRD, SPEC, NEW)
|
|
25
|
+
- **Forge / Reva** — Test Engineering (TEST)
|
|
26
|
+
- **Bolt / Zane** — Implementation (CODE)
|
|
27
|
+
- **Warden / Lyra** — Verification & Quality (VERIFY, QA, READINESS)
|
|
28
28
|
- **Herald / Cass** — Lifecycle & Ceremony (COMPLETE, STATUS, ARCHIVE, INIT, DOCTOR)
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
29
|
+
- **Prism / Aria** — UX Design (UX)
|
|
30
|
+
- **Sage / Nolan** — System Architecture (ARCH)
|
|
31
31
|
- Or: **"I need a new persona"** — we'll create one in Step 4.
|
|
32
32
|
|
|
33
33
|
### Step 2: Classify
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
- [ ] Verify `specsafe.config.json` exists in the project root
|
|
11
11
|
- [ ] Read `specsafe.config.json` and extract: `testFramework`, `language`, `testCommand`
|
|
12
|
+
- [ ] Check whether the spec names any frameworks, SDKs, platforms, tools, or MCPs that shape the expected tests
|
|
13
|
+
- [ ] If named tools exist, note that current official documentation should be consulted before or during test design
|
|
14
|
+
- [ ] This is a reminder, not a blocker — continue even if documentation review has not happened yet
|
|
12
15
|
- [ ] Verify the spec file exists at `specs/active/<SPEC-ID>.md`
|
|
13
16
|
- [ ] Verify the spec's `Stage` field is `SPEC`
|
|
14
17
|
- [ ] Verify the spec has requirements with acceptance criteria (GIVEN/WHEN/THEN format)
|
|
@@ -260,7 +260,7 @@ Summary:
|
|
|
260
260
|
User flows mapped: [count]
|
|
261
261
|
Accessibility target: [WCAG level]
|
|
262
262
|
|
|
263
|
-
Next: Run /specsafe-
|
|
263
|
+
Next: Run /specsafe-architecture to design the system architecture informed by the UX design.
|
|
264
264
|
```
|
|
265
265
|
|
|
266
266
|
## State Changes
|
|
@@ -280,4 +280,4 @@ Next: Run /specsafe-new to start creating feature specs informed by the UX desig
|
|
|
280
280
|
|
|
281
281
|
## Handoff
|
|
282
282
|
|
|
283
|
-
Next skill: `/specsafe-
|
|
283
|
+
Next skill: `/specsafe-architecture` to design the system architecture. Architecture is downstream of UX in the canonical workflow — it should support the intended experience.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Claude Code Prompt Template
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
- What should Claude Code accomplish?
|
|
6
|
+
- What should exist or be true when the task is complete?
|
|
7
|
+
|
|
8
|
+
## Current Phase
|
|
9
|
+
|
|
10
|
+
- Phase: `<planning | development>`
|
|
11
|
+
- Stage / skill context: `<brainstorm | principles | brief | prd | ux | architecture | readiness | spec | test | code | qa | verify | complete>`
|
|
12
|
+
|
|
13
|
+
## Spec Slice
|
|
14
|
+
|
|
15
|
+
- Slice name or ID: `<fill in>`
|
|
16
|
+
- Scope: `<the exact unit of work>`
|
|
17
|
+
- Acceptance criteria:
|
|
18
|
+
- `<criterion 1>`
|
|
19
|
+
- `<criterion 2>`
|
|
20
|
+
- `<criterion 3>`
|
|
21
|
+
|
|
22
|
+
## Constraints from Planning
|
|
23
|
+
|
|
24
|
+
- Product principles: `<relevant principles>`
|
|
25
|
+
- UX rules: `<relevant flows, states, accessibility expectations>`
|
|
26
|
+
- Architecture decisions: `<relevant boundaries, patterns, interfaces, data-model constraints>`
|
|
27
|
+
- Non-goals / scope exclusions: `<what Claude Code must not expand into>`
|
|
28
|
+
|
|
29
|
+
## Documentation References
|
|
30
|
+
|
|
31
|
+
- Official docs for named frameworks / SDKs / platforms / tools:
|
|
32
|
+
- `<name>`: `<link or reference>`
|
|
33
|
+
- `<name>`: `<link or reference>`
|
|
34
|
+
- MCP references or tool-specific docs:
|
|
35
|
+
- `<MCP or tool>`: `<reference>`
|
|
36
|
+
|
|
37
|
+
## Testing Requirements
|
|
38
|
+
|
|
39
|
+
- Tests to write: `<unit / integration / e2e / contract / other>`
|
|
40
|
+
- Commands to run:
|
|
41
|
+
- `pnpm test`
|
|
42
|
+
- `<project-specific command>`
|
|
43
|
+
- Coverage expectations: `<threshold or expectation>`
|
|
44
|
+
|
|
45
|
+
## Edge Cases
|
|
46
|
+
|
|
47
|
+
- `<edge case 1>`
|
|
48
|
+
- `<edge case 2>`
|
|
49
|
+
- `<failure mode or empty state>`
|
|
50
|
+
|
|
51
|
+
## Security Considerations
|
|
52
|
+
|
|
53
|
+
- `<auth / permissions / secrets / input validation / tenancy / data exposure concerns>`
|
|
54
|
+
- `<or write "None specific" if not applicable>`
|
|
55
|
+
|
|
56
|
+
## Quality Bar
|
|
57
|
+
|
|
58
|
+
Do not mark this task complete unless:
|
|
59
|
+
|
|
60
|
+
- all tests pass
|
|
61
|
+
- lint/typecheck clean
|
|
62
|
+
- implementation matches spec
|
|
63
|
+
- architecture alignment verified
|
|
64
|
+
- edge cases handled
|
|
65
|
+
- documentation consulted for named tools
|
|
@@ -1,17 +1,55 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { readCanonicalRule } from './utils.js';
|
|
4
|
+
const SPECSAFE_READ_ENTRIES = ['CONVENTIONS.md', 'PROJECT_STATE.md'];
|
|
4
5
|
export const aiderAdapter = {
|
|
5
6
|
name: 'aider',
|
|
6
7
|
displayName: 'Aider',
|
|
7
8
|
async detect(projectRoot) {
|
|
8
9
|
return existsSync(join(projectRoot, '.aider.conf.yml'));
|
|
9
10
|
},
|
|
10
|
-
async generate(_skills, canonicalDir) {
|
|
11
|
+
async generate(_skills, canonicalDir, projectRoot) {
|
|
11
12
|
const files = [];
|
|
13
|
+
const readEntries = [...SPECSAFE_READ_ENTRIES];
|
|
14
|
+
let otherLines = [];
|
|
15
|
+
if (projectRoot) {
|
|
16
|
+
const confPath = join(projectRoot, '.aider.conf.yml');
|
|
17
|
+
if (existsSync(confPath)) {
|
|
18
|
+
try {
|
|
19
|
+
const existing = readFileSync(confPath, 'utf-8');
|
|
20
|
+
// Separate "read:" block from all other config lines
|
|
21
|
+
const lines = existing.split('\n');
|
|
22
|
+
let inReadBlock = false;
|
|
23
|
+
for (const line of lines) {
|
|
24
|
+
if (/^read:\s*$/.test(line)) {
|
|
25
|
+
inReadBlock = true;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (inReadBlock && /^\s+-\s+/.test(line)) {
|
|
29
|
+
// Read entry — merge with dedup
|
|
30
|
+
const entry = line.replace(/^\s+-\s+/, '').trim();
|
|
31
|
+
if (entry && !readEntries.includes(entry)) {
|
|
32
|
+
readEntries.push(entry);
|
|
33
|
+
}
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
// Any non-read line ends the read block
|
|
37
|
+
inReadBlock = false;
|
|
38
|
+
if (line.trim() !== '') {
|
|
39
|
+
otherLines.push(line);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Can't read — use defaults
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const readYaml = readEntries.map((e) => ` - ${e}`).join('\n');
|
|
49
|
+
const otherYaml = otherLines.length > 0 ? `\n${otherLines.join('\n')}\n` : '';
|
|
12
50
|
files.push({
|
|
13
51
|
path: '.aider.conf.yml',
|
|
14
|
-
content:
|
|
52
|
+
content: `read:\n${readYaml}\n${otherYaml}`,
|
|
15
53
|
});
|
|
16
54
|
const conventions = readCanonicalRule(canonicalDir, 'CONVENTIONS.md');
|
|
17
55
|
if (conventions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/adapters/aider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/adapters/aider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,qBAAqB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,OAAO;IAEpB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAyB,EACzB,YAAoB,EACpB,WAAoB;QAEpB,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,MAAM,WAAW,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;QAC/C,IAAI,UAAU,GAAa,EAAE,CAAC;QAC9B,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;YACtD,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC;oBACH,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;oBACjD,qDAAqD;oBACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,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KAAK,SAAS,EAAE;SAC5C,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QACtE,IAAI,WAAW,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"}
|
|
@@ -5,8 +5,7 @@ export const antigravityAdapter = {
|
|
|
5
5
|
name: 'antigravity',
|
|
6
6
|
displayName: 'Antigravity',
|
|
7
7
|
async detect(projectRoot) {
|
|
8
|
-
return
|
|
9
|
-
existsSync(join(projectRoot, 'AGENTS.md')));
|
|
8
|
+
return existsSync(join(projectRoot, '.agent')) || existsSync(join(projectRoot, 'AGENTS.md'));
|
|
10
9
|
},
|
|
11
10
|
async generate(skills, canonicalDir) {
|
|
12
11
|
const files = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/adapters/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,kBAAkB,GAAgB;IAC7C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAE1B,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/adapters/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAA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;
|
|
14
14
|
if (skill.workflowContent) {
|
|
15
|
-
body +=
|
|
15
|
+
body += `\n${skill.workflowContent}`;
|
|
16
16
|
}
|
|
17
17
|
const displayName = skill.name
|
|
18
18
|
.split('-')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continue.js","sourceRoot":"","sources":["../../src/adapters/continue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;YACzB,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"continue.js","sourceRoot":"","sources":["../../src/adapters/continue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CA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(join(projectRoot, '.cursorrules')));
|
|
8
|
+
return (existsSync(join(projectRoot, '.cursor')) || existsSync(join(projectRoot, '.cursorrules')));
|
|
10
9
|
},
|
|
11
10
|
async generate(skills, canonicalDir) {
|
|
12
11
|
const files = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/adapters/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IAErB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/adapters/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IAErB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAC1F,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,kBAAkB,KAAK,CAAC,SAAS,WAAW;gBAClD,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,kBAAkB,KAAK,CAAC,SAAS,cAAc;oBACrD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;QACxE,IAAI,WAAW,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3E,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { readCanonicalRule, reconstructSkillMd } from './utils.js';
|
|
4
|
+
/** Escape a string for use inside a TOML double-quoted value */
|
|
5
|
+
function escapeToml(value) {
|
|
6
|
+
return (value
|
|
7
|
+
.replace(/\\/g, '\\\\')
|
|
8
|
+
.replace(/"/g, '\\"')
|
|
9
|
+
.replace(/\n/g, '\\n')
|
|
10
|
+
.replace(/\r/g, '\\r')
|
|
11
|
+
.replace(/\t/g, '\\t')
|
|
12
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: intentional backspace/form-feed escaping for TOML
|
|
13
|
+
.replace(/\x08/g, '\\b')
|
|
14
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: intentional backspace/form-feed escaping for TOML
|
|
15
|
+
.replace(/\x0c/g, '\\f'));
|
|
16
|
+
}
|
|
4
17
|
export const geminiAdapter = {
|
|
5
18
|
name: 'gemini',
|
|
6
19
|
displayName: 'Gemini',
|
|
7
20
|
async detect(projectRoot) {
|
|
8
|
-
return
|
|
9
|
-
existsSync(join(projectRoot, 'GEMINI.md')));
|
|
21
|
+
return existsSync(join(projectRoot, '.gemini')) || existsSync(join(projectRoot, 'GEMINI.md'));
|
|
10
22
|
},
|
|
11
23
|
async generate(skills, canonicalDir) {
|
|
12
24
|
const files = [];
|
|
@@ -23,7 +35,7 @@ export const geminiAdapter = {
|
|
|
23
35
|
}
|
|
24
36
|
files.push({
|
|
25
37
|
path: `.gemini/commands/${skill.directory}.toml`,
|
|
26
|
-
content: `description = "${skill.description}"\nprompt = "Activate the ${skill.name} skill. {{args}}"\n`,
|
|
38
|
+
content: `description = "${escapeToml(skill.description)}"\nprompt = "Activate the ${escapeToml(skill.name)} skill. {{args}}"\n`,
|
|
27
39
|
});
|
|
28
40
|
}
|
|
29
41
|
const geminiMd = readCanonicalRule(canonicalDir, 'GEMINI.md');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/adapters/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IAErB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/adapters/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,O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CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,oBAAoB,KAAK,CAAC,SAAS,OAAO;gBAChD,OAAO,EAAE,kBAAkB,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB;aACjI,CAAC,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,iBAAiB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
export { aiderAdapter } from './aider.js';
|
|
2
|
+
export { antigravityAdapter } from './antigravity.js';
|
|
1
3
|
export { claudeCodeAdapter } from './claude-code.js';
|
|
2
|
-
export { opencodeAdapter } from './opencode.js';
|
|
3
|
-
export { cursorAdapter } from './cursor.js';
|
|
4
4
|
export { continueAdapter } from './continue.js';
|
|
5
|
-
export {
|
|
6
|
-
export { zedAdapter } from './zed.js';
|
|
5
|
+
export { cursorAdapter } from './cursor.js';
|
|
7
6
|
export { geminiAdapter } from './gemini.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export type { ToolAdapter, CanonicalSkill, GeneratedFile, SpecSafeConfig, ToolName } from './types.js';
|
|
7
|
+
export { opencodeAdapter } from './opencode.js';
|
|
8
|
+
export type { CanonicalSkill, GeneratedFile, SpecSafeConfig, ToolAdapter, ToolName, } from './types.js';
|
|
11
9
|
export { TOOL_NAMES } from './types.js';
|
|
10
|
+
export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd, } from './utils.js';
|
|
11
|
+
export { zedAdapter } from './zed.js';
|
|
12
12
|
import type { ToolAdapter } from './types.js';
|
|
13
13
|
export declare const adapters: Record<string, ToolAdapter>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
export { aiderAdapter } from './aider.js';
|
|
2
|
+
export { antigravityAdapter } from './antigravity.js';
|
|
1
3
|
export { claudeCodeAdapter } from './claude-code.js';
|
|
2
|
-
export { opencodeAdapter } from './opencode.js';
|
|
3
|
-
export { cursorAdapter } from './cursor.js';
|
|
4
4
|
export { continueAdapter } from './continue.js';
|
|
5
|
-
export {
|
|
6
|
-
export { zedAdapter } from './zed.js';
|
|
5
|
+
export { cursorAdapter } from './cursor.js';
|
|
7
6
|
export { geminiAdapter } from './gemini.js';
|
|
8
|
-
export {
|
|
9
|
-
export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd } from './utils.js';
|
|
7
|
+
export { opencodeAdapter } from './opencode.js';
|
|
10
8
|
export { TOOL_NAMES } from './types.js';
|
|
9
|
+
export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd, } from './utils.js';
|
|
10
|
+
export { zedAdapter } from './zed.js';
|
|
11
|
+
import { aiderAdapter } from './aider.js';
|
|
12
|
+
import { antigravityAdapter } from './antigravity.js';
|
|
11
13
|
import { claudeCodeAdapter } from './claude-code.js';
|
|
12
|
-
import { opencodeAdapter } from './opencode.js';
|
|
13
|
-
import { cursorAdapter } from './cursor.js';
|
|
14
14
|
import { continueAdapter } from './continue.js';
|
|
15
|
-
import {
|
|
16
|
-
import { zedAdapter } from './zed.js';
|
|
15
|
+
import { cursorAdapter } from './cursor.js';
|
|
17
16
|
import { geminiAdapter } from './gemini.js';
|
|
18
|
-
import {
|
|
17
|
+
import { opencodeAdapter } from './opencode.js';
|
|
18
|
+
import { zedAdapter } from './zed.js';
|
|
19
19
|
export const adapters = {
|
|
20
20
|
'claude-code': claudeCodeAdapter,
|
|
21
21
|
opencode: opencodeAdapter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[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IACf,MAAM,EAAE,aAAa;IACrB,WAAW,EAAE,kBAAkB;CAChC,CAAC"}
|
|
@@ -5,8 +5,7 @@ export const opencodeAdapter = {
|
|
|
5
5
|
name: 'opencode',
|
|
6
6
|
displayName: 'OpenCode',
|
|
7
7
|
async detect(projectRoot) {
|
|
8
|
-
return (existsSync(join(projectRoot, '.opencode')) ||
|
|
9
|
-
existsSync(join(projectRoot, 'OPENCODE.md')));
|
|
8
|
+
return (existsSync(join(projectRoot, '.opencode')) || existsSync(join(projectRoot, 'OPENCODE.md')));
|
|
10
9
|
},
|
|
11
10
|
async generate(skills, _canonicalDir) {
|
|
12
11
|
const files = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,C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