@specsafe/core 0.3.6 → 0.5.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.
- package/dist/agents/adapters/base.d.ts +44 -0
- package/dist/agents/adapters/base.d.ts.map +1 -0
- package/dist/agents/adapters/base.js +164 -0
- package/dist/agents/adapters/base.js.map +1 -0
- package/dist/agents/adapters/claude-code.d.ts +14 -0
- package/dist/agents/adapters/claude-code.d.ts.map +1 -0
- package/dist/agents/adapters/claude-code.js +120 -0
- package/dist/agents/adapters/claude-code.js.map +1 -0
- package/dist/agents/adapters/copilot.d.ts +13 -0
- package/dist/agents/adapters/copilot.d.ts.map +1 -0
- package/dist/agents/adapters/copilot.js +115 -0
- package/dist/agents/adapters/copilot.js.map +1 -0
- package/dist/agents/adapters/cursor.d.ts +13 -0
- package/dist/agents/adapters/cursor.d.ts.map +1 -0
- package/dist/agents/adapters/cursor.js +105 -0
- package/dist/agents/adapters/cursor.js.map +1 -0
- package/dist/agents/adapters/gemini-cli.d.ts +13 -0
- package/dist/agents/adapters/gemini-cli.d.ts.map +1 -0
- package/dist/agents/adapters/gemini-cli.js +79 -0
- package/dist/agents/adapters/gemini-cli.js.map +1 -0
- package/dist/agents/adapters/index.d.ts +16 -0
- package/dist/agents/adapters/index.d.ts.map +1 -0
- package/dist/agents/adapters/index.js +47 -0
- package/dist/agents/adapters/index.js.map +1 -0
- package/dist/agents/adapters/opencode.d.ts +13 -0
- package/dist/agents/adapters/opencode.d.ts.map +1 -0
- package/dist/agents/adapters/opencode.js +67 -0
- package/dist/agents/adapters/opencode.js.map +1 -0
- package/dist/agents/index.d.ts +8 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +70 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +194 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/types.d.ts +71 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +6 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/delta/merger.d.ts +36 -0
- package/dist/delta/merger.d.ts.map +1 -0
- package/dist/delta/merger.js +264 -0
- package/dist/delta/merger.js.map +1 -0
- package/dist/delta/parser.d.ts +27 -0
- package/dist/delta/parser.d.ts.map +1 -0
- package/dist/delta/parser.js +196 -0
- package/dist/delta/parser.js.map +1 -0
- package/dist/delta/types.d.ts +39 -0
- package/dist/delta/types.d.ts.map +1 -0
- package/dist/delta/types.js +6 -0
- package/dist/delta/types.js.map +1 -0
- package/dist/ears/index.d.ts +11 -0
- package/dist/ears/index.d.ts.map +1 -0
- package/dist/ears/index.js +11 -0
- package/dist/ears/index.js.map +1 -0
- package/dist/ears/parser.d.ts +22 -0
- package/dist/ears/parser.d.ts.map +1 -0
- package/dist/ears/parser.js +273 -0
- package/dist/ears/parser.js.map +1 -0
- package/dist/ears/template.d.ts +20 -0
- package/dist/ears/template.d.ts.map +1 -0
- package/dist/ears/template.js +364 -0
- package/dist/ears/template.js.map +1 -0
- package/dist/ears/types.d.ts +58 -0
- package/dist/ears/types.d.ts.map +1 -0
- package/dist/ears/types.js +6 -0
- package/dist/ears/types.js.map +1 -0
- package/dist/ears/validator.d.ts +37 -0
- package/dist/ears/validator.d.ts.map +1 -0
- package/dist/ears/validator.js +234 -0
- package/dist/ears/validator.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/delta-template.d.ts +18 -0
- package/dist/templates/delta-template.d.ts.map +1 -0
- package/dist/templates/delta-template.js +191 -0
- package/dist/templates/delta-template.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Agent Adapter
|
|
3
|
+
* Abstract base class with common functionality for all agents
|
|
4
|
+
*/
|
|
5
|
+
import type { AgentAdapter, AgentDefinition, GeneratedFile, GenerateOptions } from '../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Base adapter with common functionality
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class BaseAgentAdapter implements AgentAdapter {
|
|
10
|
+
abstract agent: AgentDefinition;
|
|
11
|
+
/**
|
|
12
|
+
* Detect if agent is configured by checking for detection files
|
|
13
|
+
*/
|
|
14
|
+
detect(projectDir: string): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Generate configuration files - must be implemented by subclasses
|
|
17
|
+
*/
|
|
18
|
+
abstract generateConfig(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Generate command files - must be implemented by subclasses
|
|
21
|
+
*/
|
|
22
|
+
abstract generateCommands(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Get usage instructions - must be implemented by subclasses
|
|
25
|
+
*/
|
|
26
|
+
abstract getInstructions(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Helper: Generate SpecSafe workflow commands
|
|
29
|
+
*/
|
|
30
|
+
protected getWorkflowCommands(): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Helper: Get command description
|
|
33
|
+
*/
|
|
34
|
+
protected getCommandDescription(command: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Helper: Get command prompt
|
|
37
|
+
*/
|
|
38
|
+
protected getCommandPrompt(command: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Helper: Get the main SpecSafe context
|
|
41
|
+
*/
|
|
42
|
+
protected getMainContext(): string;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEjG;;GAEG;AACH,8BAAsB,gBAAiB,YAAW,YAAY;IAC5D,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYlD;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAEhG;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAElG;;OAEG;IACH,QAAQ,CAAC,eAAe,IAAI,MAAM;IAElC;;OAEG;IACH,SAAS,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAazC;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAcxD;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IA+EnD;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,MAAM;CA6BnC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Agent Adapter
|
|
3
|
+
* Abstract base class with common functionality for all agents
|
|
4
|
+
*/
|
|
5
|
+
import { access } from 'fs/promises';
|
|
6
|
+
import { join } from 'path';
|
|
7
|
+
/**
|
|
8
|
+
* Base adapter with common functionality
|
|
9
|
+
*/
|
|
10
|
+
export class BaseAgentAdapter {
|
|
11
|
+
/**
|
|
12
|
+
* Detect if agent is configured by checking for detection files
|
|
13
|
+
*/
|
|
14
|
+
async detect(projectDir) {
|
|
15
|
+
for (const file of this.agent.detectionFiles) {
|
|
16
|
+
try {
|
|
17
|
+
await access(join(projectDir, file));
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// File doesn't exist, continue
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Helper: Generate SpecSafe workflow commands
|
|
28
|
+
*/
|
|
29
|
+
getWorkflowCommands() {
|
|
30
|
+
return [
|
|
31
|
+
'specsafe',
|
|
32
|
+
'specsafe-explore',
|
|
33
|
+
'specsafe-new',
|
|
34
|
+
'specsafe-spec',
|
|
35
|
+
'specsafe-test-create',
|
|
36
|
+
'specsafe-test-apply',
|
|
37
|
+
'specsafe-verify',
|
|
38
|
+
'specsafe-done',
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Helper: Get command description
|
|
43
|
+
*/
|
|
44
|
+
getCommandDescription(command) {
|
|
45
|
+
const descriptions = {
|
|
46
|
+
'specsafe': 'Show SpecSafe project status',
|
|
47
|
+
'specsafe-explore': 'Pre-spec exploration and research',
|
|
48
|
+
'specsafe-new': 'Initialize spec with PRD',
|
|
49
|
+
'specsafe-spec': 'Generate detailed spec from PRD',
|
|
50
|
+
'specsafe-test-create': 'Create tests from spec scenarios',
|
|
51
|
+
'specsafe-test-apply': 'Apply tests - development mode',
|
|
52
|
+
'specsafe-verify': 'Verify implementation and iterate',
|
|
53
|
+
'specsafe-done': 'Complete and archive spec',
|
|
54
|
+
};
|
|
55
|
+
return descriptions[command] || '';
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Helper: Get command prompt
|
|
59
|
+
*/
|
|
60
|
+
getCommandPrompt(command) {
|
|
61
|
+
const prompts = {
|
|
62
|
+
'specsafe': `Read PROJECT_STATE.md and provide:
|
|
63
|
+
1. Summary of active specs and their current stages
|
|
64
|
+
2. Which specs need attention
|
|
65
|
+
3. Recommended next actions
|
|
66
|
+
4. Brief reminder of the SDD workflow`,
|
|
67
|
+
'specsafe-explore': `You are in exploration mode. Guide pre-spec research:
|
|
68
|
+
- Define problem and identify target users
|
|
69
|
+
- Research existing solutions and competitors
|
|
70
|
+
- Evaluate technology options with pros/cons
|
|
71
|
+
- Estimate effort (S/M/L/XL)
|
|
72
|
+
- Document findings in specs/exploration/FEATURE-NAME.md
|
|
73
|
+
|
|
74
|
+
Decision Gate: Recommend proceeding to spec creation or gathering more information.`,
|
|
75
|
+
'specsafe-new': `Create a new spec with Product Requirements Document:
|
|
76
|
+
1. Generate spec ID: SPEC-YYYYMMDD-NNN
|
|
77
|
+
2. Create PRD with problem statement, requirements, scenarios
|
|
78
|
+
3. Recommend tech stack and define rules
|
|
79
|
+
4. Output to specs/drafts/SPEC-ID.md
|
|
80
|
+
5. Update PROJECT_STATE.md (status: DRAFT)
|
|
81
|
+
|
|
82
|
+
Always confirm with user before writing files.`,
|
|
83
|
+
'specsafe-spec': `Convert PRD to comprehensive specification:
|
|
84
|
+
- Read PRD from specs/drafts/SPEC-ID.md
|
|
85
|
+
- Create functional requirements (FR-XXX)
|
|
86
|
+
- Create technical requirements (TR-XXX)
|
|
87
|
+
- Define scenarios (Given/When/Then)
|
|
88
|
+
- Write acceptance criteria
|
|
89
|
+
- Add architecture notes
|
|
90
|
+
|
|
91
|
+
Move to specs/active/SPEC-ID.md and update PROJECT_STATE.md (DRAFT → SPEC).`,
|
|
92
|
+
'specsafe-test-create': `Generate comprehensive test suite:
|
|
93
|
+
1. Read spec from specs/active/SPEC-ID.md
|
|
94
|
+
2. Create test files in src/__tests__/SPEC-ID/
|
|
95
|
+
3. Map Given/When/Then scenarios to test cases
|
|
96
|
+
4. Include happy path and edge cases
|
|
97
|
+
5. Update PROJECT_STATE.md (SPEC → TEST-CREATE)
|
|
98
|
+
|
|
99
|
+
Report test count and coverage expectations.`,
|
|
100
|
+
'specsafe-test-apply': `Guide implementation for active spec:
|
|
101
|
+
- Read requirements and existing tests
|
|
102
|
+
- Implement one requirement at a time
|
|
103
|
+
- Follow cycle: Plan → Implement → Test → Commit
|
|
104
|
+
- Map every change to requirement IDs
|
|
105
|
+
- Never modify tests to make them pass (fix the code)
|
|
106
|
+
- Update PROJECT_STATE.md (TEST-CREATE → TEST-APPLY)
|
|
107
|
+
|
|
108
|
+
Ask: "Which requirement should we tackle next?"`,
|
|
109
|
+
'specsafe-verify': `Verify implementation by running tests:
|
|
110
|
+
1. Execute test suite: npm test -- SPEC-ID
|
|
111
|
+
2. Analyze failures and map to requirements
|
|
112
|
+
3. Fix code (not tests) and re-run
|
|
113
|
+
4. Iterate until all tests pass
|
|
114
|
+
5. Check coverage meets requirements
|
|
115
|
+
6. Run full suite for regressions
|
|
116
|
+
|
|
117
|
+
Update PROJECT_STATE.md (TEST-APPLY → VERIFY).
|
|
118
|
+
Report: pass rate, coverage %, issues.`,
|
|
119
|
+
'specsafe-done': `Finalize spec after all tests pass:
|
|
120
|
+
- Verify completion checklist
|
|
121
|
+
- Run final test suite
|
|
122
|
+
- Move specs/active/SPEC-ID.md → specs/archive/SPEC-ID.md
|
|
123
|
+
- Update PROJECT_STATE.md (VERIFY → COMPLETE)
|
|
124
|
+
- Generate completion summary
|
|
125
|
+
- Suggest next spec from active list
|
|
126
|
+
|
|
127
|
+
Ask for confirmation before archiving.`,
|
|
128
|
+
};
|
|
129
|
+
return prompts[command] || '';
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Helper: Get the main SpecSafe context
|
|
133
|
+
*/
|
|
134
|
+
getMainContext() {
|
|
135
|
+
return `You are working on a SpecSafe project using spec-driven development (SDD).
|
|
136
|
+
|
|
137
|
+
## Project Context
|
|
138
|
+
|
|
139
|
+
Always read PROJECT_STATE.md first. It contains:
|
|
140
|
+
- Active specs and their current stages
|
|
141
|
+
- Which spec is being worked on
|
|
142
|
+
- Overall project status
|
|
143
|
+
|
|
144
|
+
## Spec-Driven Development Workflow
|
|
145
|
+
|
|
146
|
+
EXPLORE → NEW → SPEC → TEST-CREATE → TEST-APPLY → VERIFY → DONE
|
|
147
|
+
|
|
148
|
+
## Critical Rules
|
|
149
|
+
|
|
150
|
+
ALWAYS:
|
|
151
|
+
- Read PROJECT_STATE.md before making changes
|
|
152
|
+
- Ensure implementation satisfies tests
|
|
153
|
+
- Use spec ID in commit messages: type(SPEC-XXX): description
|
|
154
|
+
- Run tests before marking work complete
|
|
155
|
+
|
|
156
|
+
NEVER:
|
|
157
|
+
- Skip tests to implement faster
|
|
158
|
+
- Modify PROJECT_STATE.md directly (use CLI commands)
|
|
159
|
+
- Break verify loop by ignoring test failures
|
|
160
|
+
- Modify tests to make them pass without discussion
|
|
161
|
+
- Commit code without spec reference`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/agents/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;GAEG;AACH,MAAM,OAAgB,gBAAgB;IAGpC;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;YAC7C,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;gBACrC,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,MAAM,CAAC;gBACP,+BAA+B;YACjC,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAiBD;;OAEG;IACO,mBAAmB;QAC3B,OAAO;YACL,UAAU;YACV,kBAAkB;YAClB,cAAc;YACd,eAAe;YACf,sBAAsB;YACtB,qBAAqB;YACrB,iBAAiB;YACjB,eAAe;SAChB,CAAC;IACJ,CAAC;IAED;;OAEG;IACO,qBAAqB,CAAC,OAAe;QAC7C,MAAM,YAAY,GAA2B;YAC3C,UAAU,EAAE,8BAA8B;YAC1C,kBAAkB,EAAE,mCAAmC;YACvD,cAAc,EAAE,0BAA0B;YAC1C,eAAe,EAAE,iCAAiC;YAClD,sBAAsB,EAAE,kCAAkC;YAC1D,qBAAqB,EAAE,gCAAgC;YACvD,iBAAiB,EAAE,mCAAmC;YACtD,eAAe,EAAE,2BAA2B;SAC7C,CAAC;QACF,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACO,gBAAgB,CAAC,OAAe;QACxC,MAAM,OAAO,GAA2B;YACtC,UAAU,EAAE;;;;sCAIoB;YAEhC,kBAAkB,EAAE;;;;;;;oFAO0D;YAE9E,cAAc,EAAE;;;;;;;+CAOyB;YAEzC,eAAe,EAAE;;;;;;;;4EAQqD;YAEtE,sBAAsB,EAAE;;;;;;;6CAOe;YAEvC,qBAAqB,EAAE;;;;;;;;gDAQmB;YAE1C,iBAAiB,EAAE;;;;;;;;;uCASc;YAEjC,eAAe,EAAE;;;;;;;;uCAQgB;SAClC,CAAC;QACF,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACO,cAAc;QACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;qCA0B0B,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code Adapter
|
|
3
|
+
* Generates configuration for Claude Code (Anthropic)
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import type { AgentDefinition, GeneratedFile, GenerateOptions } from '../types.js';
|
|
7
|
+
export declare class ClaudeCodeAdapter extends BaseAgentAdapter {
|
|
8
|
+
readonly agent: AgentDefinition;
|
|
9
|
+
generateConfig(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
10
|
+
generateCommands(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
11
|
+
private generateSkillFile;
|
|
12
|
+
getInstructions(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/claude-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnF,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAA6C;IAEtE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAmDvF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAe/F,OAAO,CAAC,iBAAiB;IAgCzB,eAAe,IAAI,MAAM;CAsB1B"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code Adapter
|
|
3
|
+
* Generates configuration for Claude Code (Anthropic)
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import { getRequiredAgentDefinition } from '../registry.js';
|
|
7
|
+
export class ClaudeCodeAdapter extends BaseAgentAdapter {
|
|
8
|
+
agent = getRequiredAgentDefinition('claude-code');
|
|
9
|
+
async generateConfig(projectDir, options) {
|
|
10
|
+
const files = [];
|
|
11
|
+
// Generate CLAUDE.md
|
|
12
|
+
files.push({
|
|
13
|
+
path: 'CLAUDE.md',
|
|
14
|
+
content: `# SpecSafe Project - Claude Code Configuration
|
|
15
|
+
|
|
16
|
+
${this.getMainContext()}
|
|
17
|
+
|
|
18
|
+
## Claude Code Skills
|
|
19
|
+
|
|
20
|
+
This project includes Claude Code skills for slash commands:
|
|
21
|
+
${this.getWorkflowCommands().map((cmd) => `- /${cmd} - ${this.getCommandDescription(cmd)}`).join('\n')}
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Use slash commands to navigate the SpecSafe workflow:
|
|
26
|
+
1. \`/specsafe\` - Check project status
|
|
27
|
+
2. \`/specsafe-explore\` - Start exploration for new features
|
|
28
|
+
3. \`/specsafe-new\` - Create a new spec
|
|
29
|
+
4. Follow the workflow through test-create, test-apply, verify, and done
|
|
30
|
+
|
|
31
|
+
## File Organization
|
|
32
|
+
|
|
33
|
+
my-project/
|
|
34
|
+
├── specs/
|
|
35
|
+
│ ├── drafts/ # PRD stage specs
|
|
36
|
+
│ ├── active/ # In-progress specs
|
|
37
|
+
│ ├── archive/ # Completed specs
|
|
38
|
+
│ └── exploration/ # Research notes
|
|
39
|
+
├── src/
|
|
40
|
+
│ └── __tests__/ # Test files organized by spec
|
|
41
|
+
├── PROJECT_STATE.md # Central status tracker
|
|
42
|
+
└── CLAUDE.md # This file
|
|
43
|
+
|
|
44
|
+
## Commit Message Format
|
|
45
|
+
|
|
46
|
+
type(SPEC-ID): brief description
|
|
47
|
+
|
|
48
|
+
Types: feat, fix, test, docs, refactor, chore
|
|
49
|
+
Example: feat(SPEC-20260212-001): add user authentication
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
*Generated by SpecSafe v1.0*
|
|
53
|
+
`,
|
|
54
|
+
});
|
|
55
|
+
return files;
|
|
56
|
+
}
|
|
57
|
+
async generateCommands(projectDir, options) {
|
|
58
|
+
const files = [];
|
|
59
|
+
// Generate skill files for each command
|
|
60
|
+
for (const command of this.getWorkflowCommands()) {
|
|
61
|
+
const skillContent = this.generateSkillFile(command);
|
|
62
|
+
files.push({
|
|
63
|
+
path: `.claude/skills/${command}/SKILL.md`,
|
|
64
|
+
content: skillContent,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return files;
|
|
68
|
+
}
|
|
69
|
+
generateSkillFile(command) {
|
|
70
|
+
const description = this.getCommandDescription(command);
|
|
71
|
+
const prompt = this.getCommandPrompt(command);
|
|
72
|
+
// Special handling for specsafe (main status command)
|
|
73
|
+
if (command === 'specsafe') {
|
|
74
|
+
return `---
|
|
75
|
+
name: specsafe
|
|
76
|
+
description: ${description}
|
|
77
|
+
disable-model-invocation: true
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
${prompt}
|
|
81
|
+
|
|
82
|
+
Read PROJECT_STATE.md to determine current state and provide actionable guidance.
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
// Commands with arguments
|
|
86
|
+
const commandsWithArgs = ['specsafe-spec', 'specsafe-test-create', 'specsafe-test-apply', 'specsafe-verify', 'specsafe-done'];
|
|
87
|
+
const hasArgs = commandsWithArgs.includes(command);
|
|
88
|
+
return `---
|
|
89
|
+
name: ${command}
|
|
90
|
+
description: ${description}${hasArgs ? '\nargument-hint: "[spec-id]"' : ''}
|
|
91
|
+
disable-model-invocation: true
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
${prompt}
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
getInstructions() {
|
|
98
|
+
return `Claude Code Setup Complete!
|
|
99
|
+
|
|
100
|
+
Files created:
|
|
101
|
+
- CLAUDE.md - Main project context
|
|
102
|
+
- .claude/skills/ - Slash command skills
|
|
103
|
+
|
|
104
|
+
## Usage
|
|
105
|
+
|
|
106
|
+
1. Open your project with Claude Code
|
|
107
|
+
2. Use slash commands to navigate the workflow:
|
|
108
|
+
- /specsafe - Check status
|
|
109
|
+
- /specsafe-explore - Start exploration
|
|
110
|
+
- /specsafe-new - Create spec
|
|
111
|
+
- /specsafe-test-create - Generate tests
|
|
112
|
+
- /specsafe-test-apply - Implement
|
|
113
|
+
- /specsafe-verify - Run tests
|
|
114
|
+
- /specsafe-done - Complete spec
|
|
115
|
+
|
|
116
|
+
The skills will guide you through the entire spec-driven development workflow.
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=claude-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../../src/agents/adapters/claude-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,OAAO,iBAAkB,SAAQ,gBAAgB;IAC5C,KAAK,GAAoB,0BAA0B,CAAC,aAAa,CAAC,CAAC;IAE5E,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,OAAyB;QAChE,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,qBAAqB;QACrB,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;;EAEb,IAAI,CAAC,cAAc,EAAE;;;;;EAKrB,IAAI,CAAC,mBAAmB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCrG;SACI,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,UAAkB,EAAE,OAAyB;QAClE,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,wCAAwC;QACxC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC;YACjD,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,kBAAkB,OAAO,WAAW;gBAC1C,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,iBAAiB,CAAC,OAAe;QACvC,MAAM,WAAW,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAE9C,sDAAsD;QACtD,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO;;eAEE,WAAW;;;;EAIxB,MAAM;;;CAGP,CAAC;QACE,CAAC;QAED,0BAA0B;QAC1B,MAAM,gBAAgB,GAAG,CAAC,eAAe,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC;QAC9H,MAAM,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEnD,OAAO;QACH,OAAO;eACA,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE;;;;EAIxE,MAAM;CACP,CAAC;IACA,CAAC;IAED,eAAe;QACb,OAAO;;;;;;;;;;;;;;;;;;;CAmBV,CAAC;IACA,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot Adapter
|
|
3
|
+
* Generates .github/copilot-instructions.md for GitHub Copilot
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import type { AgentDefinition, GeneratedFile, GenerateOptions } from '../types.js';
|
|
7
|
+
export declare class CopilotAdapter extends BaseAgentAdapter {
|
|
8
|
+
readonly agent: AgentDefinition;
|
|
9
|
+
generateConfig(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
10
|
+
generateCommands(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
11
|
+
getInstructions(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=copilot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnF,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAyC;IAElE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAkFvF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAK/F,eAAe,IAAI,MAAM;CAsB1B"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot Adapter
|
|
3
|
+
* Generates .github/copilot-instructions.md for GitHub Copilot
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import { getRequiredAgentDefinition } from '../registry.js';
|
|
7
|
+
export class CopilotAdapter extends BaseAgentAdapter {
|
|
8
|
+
agent = getRequiredAgentDefinition('copilot');
|
|
9
|
+
async generateConfig(projectDir, options) {
|
|
10
|
+
const files = [];
|
|
11
|
+
files.push({
|
|
12
|
+
path: '.github/copilot-instructions.md',
|
|
13
|
+
content: `# SpecSafe - GitHub Copilot Instructions
|
|
14
|
+
|
|
15
|
+
${this.getMainContext()}
|
|
16
|
+
|
|
17
|
+
## Workflow Commands
|
|
18
|
+
|
|
19
|
+
Use \`@workspace /command\` to invoke SpecSafe workflow commands:
|
|
20
|
+
|
|
21
|
+
### @workspace /specsafe
|
|
22
|
+
${this.getCommandPrompt('specsafe')}
|
|
23
|
+
|
|
24
|
+
### @workspace /specsafe-explore
|
|
25
|
+
${this.getCommandPrompt('specsafe-explore')}
|
|
26
|
+
|
|
27
|
+
### @workspace /specsafe-new
|
|
28
|
+
${this.getCommandPrompt('specsafe-new')}
|
|
29
|
+
|
|
30
|
+
### @workspace /specsafe-spec
|
|
31
|
+
${this.getCommandPrompt('specsafe-spec')}
|
|
32
|
+
|
|
33
|
+
### @workspace /specsafe-test-create
|
|
34
|
+
${this.getCommandPrompt('specsafe-test-create')}
|
|
35
|
+
|
|
36
|
+
### @workspace /specsafe-test-apply
|
|
37
|
+
${this.getCommandPrompt('specsafe-test-apply')}
|
|
38
|
+
|
|
39
|
+
### @workspace /specsafe-verify
|
|
40
|
+
${this.getCommandPrompt('specsafe-verify')}
|
|
41
|
+
|
|
42
|
+
### @workspace /specsafe-done
|
|
43
|
+
${this.getCommandPrompt('specsafe-done')}
|
|
44
|
+
|
|
45
|
+
## Context Files
|
|
46
|
+
|
|
47
|
+
Always check these files before making changes:
|
|
48
|
+
- PROJECT_STATE.md - Current project status and active specs
|
|
49
|
+
- specs/active/*.md - Detailed specifications
|
|
50
|
+
- specsafe.config.json - Project configuration
|
|
51
|
+
|
|
52
|
+
## File Structure
|
|
53
|
+
|
|
54
|
+
\`\`\`
|
|
55
|
+
my-project/
|
|
56
|
+
├── specs/
|
|
57
|
+
│ ├── drafts/ # PRD stage specs
|
|
58
|
+
│ ├── active/ # In-progress specs
|
|
59
|
+
│ ├── archive/ # Completed specs
|
|
60
|
+
│ └── exploration/ # Research notes
|
|
61
|
+
├── src/
|
|
62
|
+
│ └── __tests__/ # Test files organized by spec
|
|
63
|
+
├── PROJECT_STATE.md # Central status tracker
|
|
64
|
+
└── .github/
|
|
65
|
+
└── copilot-instructions.md # This file
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
## Commit Messages
|
|
69
|
+
|
|
70
|
+
Always use this format:
|
|
71
|
+
\`\`\`
|
|
72
|
+
type(SPEC-ID): brief description
|
|
73
|
+
|
|
74
|
+
- Detailed change 1
|
|
75
|
+
- Detailed change 2
|
|
76
|
+
|
|
77
|
+
Refs: SPEC-ID
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
Types: feat, fix, test, docs, refactor, chore
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
*Generated by SpecSafe v1.0*
|
|
84
|
+
`,
|
|
85
|
+
});
|
|
86
|
+
return files;
|
|
87
|
+
}
|
|
88
|
+
async generateCommands(projectDir, options) {
|
|
89
|
+
// Copilot doesn't use separate command files
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
getInstructions() {
|
|
93
|
+
return `GitHub Copilot Setup Complete!
|
|
94
|
+
|
|
95
|
+
File created:
|
|
96
|
+
- .github/copilot-instructions.md - SpecSafe workspace instructions
|
|
97
|
+
|
|
98
|
+
## Usage
|
|
99
|
+
|
|
100
|
+
1. Open your project in VS Code with GitHub Copilot
|
|
101
|
+
2. Use @workspace commands:
|
|
102
|
+
- @workspace /specsafe - Check status
|
|
103
|
+
- @workspace /specsafe-explore - Start exploration
|
|
104
|
+
- @workspace /specsafe-new - Create spec
|
|
105
|
+
- @workspace /specsafe-spec - Review/refine spec
|
|
106
|
+
- @workspace /specsafe-test-create - Generate tests
|
|
107
|
+
- @workspace /specsafe-test-apply - Implement
|
|
108
|
+
- @workspace /specsafe-verify - Verify tests
|
|
109
|
+
- @workspace /specsafe-done - Complete spec
|
|
110
|
+
|
|
111
|
+
Copilot will use the instructions in .github/copilot-instructions.md to guide suggestions.
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../../src/agents/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IACzC,KAAK,GAAoB,0BAA0B,CAAC,SAAS,CAAC,CAAC;IAExE,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,OAAyB;QAChE,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,iCAAiC;YACvC,OAAO,EAAE;;EAEb,IAAI,CAAC,cAAc,EAAE;;;;;;;EAOrB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;;;EAGjC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;;;EAGzC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;;;EAGrC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;;;EAGtC,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;;;EAG7C,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC;;;EAG5C,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;;;EAGxC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCvC;SACI,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,UAAkB,EAAE,OAAyB;QAClE,6CAA6C;QAC7C,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,eAAe;QACb,OAAO;;;;;;;;;;;;;;;;;;;CAmBV,CAAC;IACA,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Adapter
|
|
3
|
+
* Generates .cursorrules for Cursor IDE
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import type { AgentDefinition, GeneratedFile, GenerateOptions } from '../types.js';
|
|
7
|
+
export declare class CursorAdapter extends BaseAgentAdapter {
|
|
8
|
+
readonly agent: AgentDefinition;
|
|
9
|
+
generateConfig(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
10
|
+
generateCommands(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
11
|
+
getInstructions(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnF,qBAAa,aAAc,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAwC;IAEjE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAyEvF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAK/F,eAAe,IAAI,MAAM;CAqB1B"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Adapter
|
|
3
|
+
* Generates .cursorrules for Cursor IDE
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import { getRequiredAgentDefinition } from '../registry.js';
|
|
7
|
+
export class CursorAdapter extends BaseAgentAdapter {
|
|
8
|
+
agent = getRequiredAgentDefinition('cursor');
|
|
9
|
+
async generateConfig(projectDir, options) {
|
|
10
|
+
const files = [];
|
|
11
|
+
files.push({
|
|
12
|
+
path: '.cursorrules',
|
|
13
|
+
content: `# SpecSafe Rules for Cursor IDE v1.0
|
|
14
|
+
# Spec-Driven Development (SDD) Workflow
|
|
15
|
+
# https://github.com/luci-efe/specsafe
|
|
16
|
+
|
|
17
|
+
${this.getMainContext()}
|
|
18
|
+
|
|
19
|
+
## The SpecSafe Workflow Commands
|
|
20
|
+
|
|
21
|
+
When working on this project, follow the SDD workflow:
|
|
22
|
+
|
|
23
|
+
### @specsafe - Show Project Status
|
|
24
|
+
${this.getCommandPrompt('specsafe')}
|
|
25
|
+
|
|
26
|
+
### @specsafe-explore - Pre-Spec Exploration
|
|
27
|
+
${this.getCommandPrompt('specsafe-explore')}
|
|
28
|
+
|
|
29
|
+
### @specsafe-new - Initialize Spec with PRD
|
|
30
|
+
${this.getCommandPrompt('specsafe-new')}
|
|
31
|
+
|
|
32
|
+
### @specsafe-spec - Generate Detailed Spec
|
|
33
|
+
${this.getCommandPrompt('specsafe-spec')}
|
|
34
|
+
|
|
35
|
+
### @specsafe-test-create - Create Tests from Spec
|
|
36
|
+
${this.getCommandPrompt('specsafe-test-create')}
|
|
37
|
+
|
|
38
|
+
### @specsafe-test-apply - Apply Tests (Development Mode)
|
|
39
|
+
${this.getCommandPrompt('specsafe-test-apply')}
|
|
40
|
+
|
|
41
|
+
### @specsafe-verify - Verify and Iterate
|
|
42
|
+
${this.getCommandPrompt('specsafe-verify')}
|
|
43
|
+
|
|
44
|
+
### @specsafe-done - Complete and Archive
|
|
45
|
+
${this.getCommandPrompt('specsafe-done')}
|
|
46
|
+
|
|
47
|
+
## File Organization
|
|
48
|
+
|
|
49
|
+
my-project/
|
|
50
|
+
├── specs/
|
|
51
|
+
│ ├── drafts/ # PRD stage specs
|
|
52
|
+
│ ├── active/ # In-progress specs
|
|
53
|
+
│ ├── archive/ # Completed specs
|
|
54
|
+
│ └── exploration/ # Research notes
|
|
55
|
+
├── src/
|
|
56
|
+
│ └── __tests__/ # Test files organized by spec
|
|
57
|
+
├── PROJECT_STATE.md # Central status tracker
|
|
58
|
+
└── .cursorrules # This file
|
|
59
|
+
|
|
60
|
+
## Commit Message Format
|
|
61
|
+
|
|
62
|
+
type(SPEC-ID): brief description
|
|
63
|
+
|
|
64
|
+
- Detailed change 1
|
|
65
|
+
- Detailed change 2
|
|
66
|
+
|
|
67
|
+
Refs: SPEC-ID
|
|
68
|
+
|
|
69
|
+
Types: feat, fix, test, docs, refactor, chore
|
|
70
|
+
Example: feat(SPEC-20260212-001): add user authentication
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
*Version: 1.0*
|
|
74
|
+
*Generated by SpecSafe*
|
|
75
|
+
`,
|
|
76
|
+
});
|
|
77
|
+
return files;
|
|
78
|
+
}
|
|
79
|
+
async generateCommands(projectDir, options) {
|
|
80
|
+
// Cursor doesn't have separate command files - everything is in .cursorrules
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
getInstructions() {
|
|
84
|
+
return `Cursor IDE Setup Complete!
|
|
85
|
+
|
|
86
|
+
File created:
|
|
87
|
+
- .cursorrules - SpecSafe workflow rules
|
|
88
|
+
|
|
89
|
+
## Usage
|
|
90
|
+
|
|
91
|
+
1. Open your project in Cursor
|
|
92
|
+
2. Use @ mentions to invoke commands:
|
|
93
|
+
- @specsafe - Check project status
|
|
94
|
+
- @specsafe-explore - Start exploration
|
|
95
|
+
- @specsafe-new - Create new spec
|
|
96
|
+
- @specsafe-test-create - Generate tests
|
|
97
|
+
- @specsafe-test-apply - Implement features
|
|
98
|
+
- @specsafe-verify - Run tests
|
|
99
|
+
- @specsafe-done - Complete spec
|
|
100
|
+
|
|
101
|
+
Cursor will follow the rules defined in .cursorrules to guide you through the workflow.
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../../src/agents/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,gBAAgB;IACxC,KAAK,GAAoB,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IAEvE,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,OAAyB;QAChE,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;;;;EAIb,IAAI,CAAC,cAAc,EAAE;;;;;;;EAOrB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;;;EAGjC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;;;EAGzC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;;;EAGrC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;;;EAGtC,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;;;EAG7C,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC;;;EAG5C,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;;;EAGxC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BvC;SACI,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,UAAkB,EAAE,OAAyB;QAClE,6EAA6E;QAC7E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,eAAe;QACb,OAAO;;;;;;;;;;;;;;;;;;CAkBV,CAAC;IACA,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini CLI Adapter
|
|
3
|
+
* Generates configuration for Gemini CLI
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAgentAdapter } from './base.js';
|
|
6
|
+
import type { AgentDefinition, GeneratedFile, GenerateOptions } from '../types.js';
|
|
7
|
+
export declare class GeminiCliAdapter extends BaseAgentAdapter {
|
|
8
|
+
readonly agent: AgentDefinition;
|
|
9
|
+
generateConfig(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
10
|
+
generateCommands(projectDir: string, options?: GenerateOptions): Promise<GeneratedFile[]>;
|
|
11
|
+
getInstructions(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=gemini-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-cli.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/gemini-cli.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnF,qBAAa,gBAAiB,SAAQ,gBAAgB;IACpD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAA4C;IAErE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA+BvF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoB/F,eAAe,IAAI,MAAM;CAwB1B"}
|