@eskoubar95/spec 0.1.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/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +55 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/copy-template.d.ts +9 -0
- package/dist/lib/copy-template.d.ts.map +1 -0
- package/dist/lib/copy-template.js +51 -0
- package/dist/lib/copy-template.js.map +1 -0
- package/dist/lib/git.d.ts +5 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js +16 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/prompts.d.ts +10 -0
- package/dist/lib/prompts.d.ts.map +1 -0
- package/dist/lib/prompts.js +41 -0
- package/dist/lib/prompts.js.map +1 -0
- package/package.json +30 -0
- package/template/.cursor/MCP-SETUP.md +34 -0
- package/template/.cursor/commands/spec/init.md +51 -0
- package/template/.cursor/commands/spec/plan.md +61 -0
- package/template/.cursor/commands/spec/refine.md +70 -0
- package/template/.cursor/commands/task/start.md +64 -0
- package/template/.cursor/commands/task/validate.md +64 -0
- package/template/.cursor/rules/00-pos.mdc +48 -0
- package/template/.cursor/rules/01-sdd.mdc +61 -0
- package/template/.cursor/rules/02-work-mode.mdc +65 -0
- package/template/.cursor/rules/openmemory.mdc +204 -0
- package/template/README.md +29 -0
- package/template/spec/00-root-spec.md +29 -0
- package/template/spec/03-risks.md +0 -0
- package/template/spec/04-open-questions.md +0 -0
- package/template/work/backlog/milestones.md +0 -0
- package/template/work/backlog/tasks.local.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAmD7C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { copyTemplate, createLinearConfig } from '../lib/copy-template.js';
|
|
3
|
+
import { initGit } from '../lib/git.js';
|
|
4
|
+
import { promptInit } from '../lib/prompts.js';
|
|
5
|
+
import fs from 'fs-extra';
|
|
6
|
+
/**
|
|
7
|
+
* Initializes a new SDD project
|
|
8
|
+
*/
|
|
9
|
+
export async function runInit() {
|
|
10
|
+
console.log('š Spec-Driven Development Project Initializer\n');
|
|
11
|
+
// Get current working directory
|
|
12
|
+
const cwd = process.cwd();
|
|
13
|
+
// Prompt for project details
|
|
14
|
+
const answers = await promptInit();
|
|
15
|
+
// Resolve destination path
|
|
16
|
+
const destPath = path.resolve(cwd, answers.projectName);
|
|
17
|
+
// Check if destination exists
|
|
18
|
+
if (await fs.pathExists(destPath)) {
|
|
19
|
+
console.error(`\nā Error: Directory "${answers.projectName}" already exists.`);
|
|
20
|
+
console.error(' Please choose a different name or remove the existing directory.\n');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
// Copy template
|
|
25
|
+
console.log(`\nš¦ Copying template to "${answers.projectName}"...`);
|
|
26
|
+
await copyTemplate(destPath);
|
|
27
|
+
// Create linear config if needed
|
|
28
|
+
if (answers.taskMode === 'linear') {
|
|
29
|
+
console.log('š Creating Linear sync configuration...');
|
|
30
|
+
await createLinearConfig(destPath);
|
|
31
|
+
}
|
|
32
|
+
// Initialize git if requested
|
|
33
|
+
if (answers.gitInit) {
|
|
34
|
+
console.log('š§ Initializing git repository...');
|
|
35
|
+
initGit(destPath);
|
|
36
|
+
}
|
|
37
|
+
// Success message
|
|
38
|
+
console.log('\nā
Project initialized successfully!\n');
|
|
39
|
+
console.log('Next steps:');
|
|
40
|
+
console.log(` 1. cd ${answers.projectName}`);
|
|
41
|
+
console.log(' 2. Open the project in Cursor');
|
|
42
|
+
if (answers.taskMode === 'linear') {
|
|
43
|
+
console.log(' 3. Configure Linear MCP in Cursor (see .cursor/MCP-SETUP.md if needed)');
|
|
44
|
+
console.log(' 4. Run `/spec/init` to begin defining your project specification\n');
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
console.log(' 3. Run `/spec/init` to begin defining your project specification\n');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.error(`\nā Error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO;IAC3B,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;IAEhE,gCAAgC;IAChC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,6BAA6B;IAC7B,MAAM,OAAO,GAAG,MAAM,UAAU,EAAE,CAAC;IAEnC,2BAA2B;IAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAExD,8BAA8B;IAC9B,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,yBAAyB,OAAO,CAAC,WAAW,mBAAmB,CAAC,CAAC;QAC/E,OAAO,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACH,gBAAgB;QAChB,OAAO,CAAC,GAAG,CAAC,6BAA6B,OAAO,CAAC,WAAW,MAAM,CAAC,CAAC;QACpE,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE7B,iCAAiC;QACjC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;YACxD,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;QAED,8BAA8B;QAC9B,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YACjD,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpB,CAAC;QAED,kBAAkB;QAClB,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QAC/C,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,0EAA0E,CAAC,CAAC;YACxF,OAAO,CAAC,GAAG,CAAC,sEAAsE,CAAC,CAAC;QACtF,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,sEAAsE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,cAAc,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { runInit } from './commands/init.js';
|
|
3
|
+
const args = process.argv.slice(2);
|
|
4
|
+
if (args.length === 0 || args[0] !== 'init') {
|
|
5
|
+
console.log('Spec-Driven Development CLI\n');
|
|
6
|
+
console.log('Usage:');
|
|
7
|
+
console.log(' spec init Initialize a new SDD project\n');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
if (args[0] === 'init') {
|
|
11
|
+
runInit().catch((error) => {
|
|
12
|
+
console.error('Fatal error:', error);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copies the template directory to the destination
|
|
3
|
+
*/
|
|
4
|
+
export declare function copyTemplate(destPath: string): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Creates the linear sync config file if mode is linear
|
|
7
|
+
*/
|
|
8
|
+
export declare function createLinearConfig(projectPath: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=copy-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-template.d.ts","sourceRoot":"","sources":["../../src/lib/copy-template.ts"],"names":[],"mappings":"AA+BA;;GAEG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAclE;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM3E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
/**
|
|
7
|
+
* Gets the template directory path
|
|
8
|
+
* Works in both development (template at repo root) and published (template at package root)
|
|
9
|
+
*/
|
|
10
|
+
async function getTemplateDir() {
|
|
11
|
+
// Try package root first (for published package)
|
|
12
|
+
const packageRoot = path.resolve(__dirname, '../..');
|
|
13
|
+
const templateInPackage = path.join(packageRoot, 'template');
|
|
14
|
+
// Try repo root (for development)
|
|
15
|
+
const repoRoot = path.resolve(__dirname, '../../../..');
|
|
16
|
+
const templateInRepo = path.join(repoRoot, 'template');
|
|
17
|
+
// Return the first path that exists
|
|
18
|
+
if (await fs.pathExists(templateInPackage)) {
|
|
19
|
+
return templateInPackage;
|
|
20
|
+
}
|
|
21
|
+
if (await fs.pathExists(templateInRepo)) {
|
|
22
|
+
return templateInRepo;
|
|
23
|
+
}
|
|
24
|
+
// Fallback to package root (will fail with clear error in copyTemplate)
|
|
25
|
+
return templateInPackage;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Copies the template directory to the destination
|
|
29
|
+
*/
|
|
30
|
+
export async function copyTemplate(destPath) {
|
|
31
|
+
const templateDir = await getTemplateDir();
|
|
32
|
+
if (!(await fs.pathExists(templateDir))) {
|
|
33
|
+
throw new Error(`Template directory not found: ${templateDir}`);
|
|
34
|
+
}
|
|
35
|
+
// Check if destination exists
|
|
36
|
+
if (await fs.pathExists(destPath)) {
|
|
37
|
+
throw new Error(`Destination already exists: ${destPath}`);
|
|
38
|
+
}
|
|
39
|
+
// Copy template to destination
|
|
40
|
+
await fs.copy(templateDir, destPath);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates the linear sync config file if mode is linear
|
|
44
|
+
*/
|
|
45
|
+
export async function createLinearConfig(projectPath) {
|
|
46
|
+
const linearDir = path.join(projectPath, 'work', 'linear');
|
|
47
|
+
const configPath = path.join(linearDir, 'sync-config.md');
|
|
48
|
+
await fs.ensureDir(linearDir);
|
|
49
|
+
await fs.writeFile(configPath, 'MODE=linear\n', 'utf-8');
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=copy-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-template.js","sourceRoot":"","sources":["../../src/lib/copy-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,UAAU,cAAc;IAC3B,iDAAiD;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAE7D,kCAAkC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACxD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEvD,oCAAoC;IACpC,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC3C,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACxC,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,wEAAwE;IACxE,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;IAE3C,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,8BAA8B;IAC9B,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,+BAA+B;IAC/B,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAE1D,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/lib/git.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CASjD"}
|
package/dist/lib/git.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
/**
|
|
3
|
+
* Initializes a git repository in the specified directory
|
|
4
|
+
*/
|
|
5
|
+
export function initGit(projectPath) {
|
|
6
|
+
try {
|
|
7
|
+
execSync('git init', {
|
|
8
|
+
cwd: projectPath,
|
|
9
|
+
stdio: 'inherit',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
throw new Error(`Failed to initialize git repository: ${error}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=git.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/lib/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,WAAmB;IACzC,IAAI,CAAC;QACH,QAAQ,CAAC,UAAU,EAAE;YACnB,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,wCAAwC,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface InitAnswers {
|
|
2
|
+
projectName: string;
|
|
3
|
+
taskMode: 'local' | 'linear';
|
|
4
|
+
gitInit: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Prompts the user for project initialization options
|
|
8
|
+
*/
|
|
9
|
+
export declare function promptInit(): Promise<InitAnswers>;
|
|
10
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/lib/prompts.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,CAoCvD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
/**
|
|
3
|
+
* Prompts the user for project initialization options
|
|
4
|
+
*/
|
|
5
|
+
export async function promptInit() {
|
|
6
|
+
const answers = await inquirer.prompt([
|
|
7
|
+
{
|
|
8
|
+
type: 'input',
|
|
9
|
+
name: 'projectName',
|
|
10
|
+
message: 'Project name (folder name):',
|
|
11
|
+
validate: (input) => {
|
|
12
|
+
if (!input.trim()) {
|
|
13
|
+
return 'Project name cannot be empty';
|
|
14
|
+
}
|
|
15
|
+
// Basic validation for folder names
|
|
16
|
+
if (/[<>:"/\\|?*]/.test(input)) {
|
|
17
|
+
return 'Project name contains invalid characters';
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'list',
|
|
24
|
+
name: 'taskMode',
|
|
25
|
+
message: 'Task mode:',
|
|
26
|
+
choices: [
|
|
27
|
+
{ name: 'local', value: 'local' },
|
|
28
|
+
{ name: 'linear', value: 'linear' },
|
|
29
|
+
],
|
|
30
|
+
default: 'local',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'confirm',
|
|
34
|
+
name: 'gitInit',
|
|
35
|
+
message: 'Initialize git repository?',
|
|
36
|
+
default: true,
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
return answers;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/lib/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAQhC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAc;QACjD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,6BAA6B;YACtC,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;oBAClB,OAAO,8BAA8B,CAAC;gBACxC,CAAC;gBACD,oCAAoC;gBACpC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC/B,OAAO,0CAA0C,CAAC;gBACpD,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBACjC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;aACpC;YACD,OAAO,EAAE,OAAO;SACjB;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,4BAA4B;YACrC,OAAO,EAAE,IAAI;SACd;KACF,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eskoubar95/spec",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"bin": {
|
|
6
|
+
"spec": "dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"template"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch",
|
|
17
|
+
"start": "node dist/index.js",
|
|
18
|
+
"prepublishOnly": "cp -r ../template . || true"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"inquirer": "^9.2.0",
|
|
22
|
+
"fs-extra": "^11.2.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/fs-extra": "^11.0.4",
|
|
26
|
+
"@types/inquirer": "^9.0.7",
|
|
27
|
+
"@types/node": "^20.11.0",
|
|
28
|
+
"typescript": "^5.3.3"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Linear MCP Setup (Optional)
|
|
2
|
+
|
|
3
|
+
If you're using Linear task mode, you may want to configure the Linear MCP server in Cursor to enable Linear integration.
|
|
4
|
+
|
|
5
|
+
## Quick Setup
|
|
6
|
+
|
|
7
|
+
1. Get your Linear API key from https://linear.app/settings/api
|
|
8
|
+
2. Configure MCP in Cursor Settings ā Features ā Model Context Protocol
|
|
9
|
+
3. Add Linear MCP server configuration with your API key
|
|
10
|
+
4. Restart Cursor
|
|
11
|
+
|
|
12
|
+
## Settings File Location
|
|
13
|
+
|
|
14
|
+
- **macOS**: `~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json`
|
|
15
|
+
- **Windows**: `%APPDATA%\Cursor\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json`
|
|
16
|
+
- **Linux**: `~/.config/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json`
|
|
17
|
+
|
|
18
|
+
## Example Configuration
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"linear": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "@modelcontextprotocol/server-linear"],
|
|
26
|
+
"env": {
|
|
27
|
+
"LINEAR_API_KEY": "your-api-key-here"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For more details, see [MCP Documentation](https://modelcontextprotocol.io).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
You are initiating a new project using Spec-Driven Development (SDD).
|
|
2
|
+
|
|
3
|
+
MODE: Research / Ideation
|
|
4
|
+
GOAL: Turn an unstructured idea into a clear, high-level root specification.
|
|
5
|
+
|
|
6
|
+
Step 1 ā Prompt the user
|
|
7
|
+
Ask the user to pitch the idea freely in their own words.
|
|
8
|
+
Explicitly state that the idea can be incomplete, messy, or uncertain.
|
|
9
|
+
|
|
10
|
+
Step 2 ā While listening, do NOT assume
|
|
11
|
+
While processing the pitch:
|
|
12
|
+
- Identify the core problem being addressed
|
|
13
|
+
- Identify the intended users or stakeholders
|
|
14
|
+
- Identify the primary value proposition
|
|
15
|
+
|
|
16
|
+
Constraints:
|
|
17
|
+
- Stay strictly high-level
|
|
18
|
+
- Do NOT introduce technical solutions, stacks, frameworks, or architecture
|
|
19
|
+
- Do NOT expand into execution, tasks, or implementation
|
|
20
|
+
- If information is missing, mark it as uncertainty instead of guessing
|
|
21
|
+
|
|
22
|
+
Step 3 ā Clarify only what truly matters
|
|
23
|
+
After the pitch:
|
|
24
|
+
- Ask a small number of high-impact clarifying questions
|
|
25
|
+
- Prioritize questions that affect scope, value, or feasibility
|
|
26
|
+
- Avoid exhaustive checklists or domain deep dives
|
|
27
|
+
|
|
28
|
+
Step 4 ā Write the initial specification
|
|
29
|
+
Create or update the following files:
|
|
30
|
+
- `spec/00-root-spec.md`
|
|
31
|
+
- `spec/03-risks.md`
|
|
32
|
+
- `spec/04-open-questions.md`
|
|
33
|
+
|
|
34
|
+
Populate them as follows:
|
|
35
|
+
- Root spec: concise summary of the idea, problem, users, value, and tentative scope
|
|
36
|
+
- Risks: only risks that are already visible at this early stage
|
|
37
|
+
- Open questions: unresolved assumptions or decisions that require input
|
|
38
|
+
|
|
39
|
+
Rules:
|
|
40
|
+
- Keep all content lightweight and editable
|
|
41
|
+
- Do not create additional spec files
|
|
42
|
+
- Do not escalate to design or planning modes
|
|
43
|
+
|
|
44
|
+
Step 5 ā Report back
|
|
45
|
+
Briefly explain:
|
|
46
|
+
- What was captured
|
|
47
|
+
- What remains unclear
|
|
48
|
+
- What the natural next step would be (without executing it)
|
|
49
|
+
|
|
50
|
+
PRINCIPLE:
|
|
51
|
+
Clarity over completeness. Direction over detail.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
You are moving the project from āResearch / Ideationā into āPlanningā.
|
|
2
|
+
|
|
3
|
+
MODE: Planning
|
|
4
|
+
GOAL: Turn the current specification into an executable plan (milestones + tasks) while keeping the spec consistent.
|
|
5
|
+
|
|
6
|
+
Inputs (source of truth):
|
|
7
|
+
- `spec/00-root-spec.md`
|
|
8
|
+
- `spec/03-risks.md`
|
|
9
|
+
- `spec/04-open-questions.md`
|
|
10
|
+
|
|
11
|
+
Before you plan
|
|
12
|
+
1) Read the source-of-truth files above.
|
|
13
|
+
2) If there are critical unknowns that block planning, ask only the minimum clarifying questions.
|
|
14
|
+
- If unknowns exist but planning can still proceed, capture them as assumptions and keep them in `spec/04-open-questions.md`.
|
|
15
|
+
|
|
16
|
+
Planning outputs
|
|
17
|
+
A) Spec artifacts (create only if needed by planning)
|
|
18
|
+
- Create or update `spec/01-prd.md` if the feature set needs to be made explicit.
|
|
19
|
+
- Create or update `spec/06-acceptance.md` with high-level acceptance criteria / definition of done.
|
|
20
|
+
|
|
21
|
+
Rules for spec artifacts:
|
|
22
|
+
- Stay high-level. Do not write deep architecture.
|
|
23
|
+
- Do not introduce new features that were not implied by the root spec.
|
|
24
|
+
- If you suggest a new requirement, mark it as a question or assumption.
|
|
25
|
+
|
|
26
|
+
B) Execution artifacts (always produce these)
|
|
27
|
+
Create or update:
|
|
28
|
+
- `work/backlog/milestones.md`
|
|
29
|
+
- `work/backlog/tasks.local.md`
|
|
30
|
+
|
|
31
|
+
Milestones requirements:
|
|
32
|
+
- 3ā7 milestones max.
|
|
33
|
+
- Each milestone has: objective, scope (in/out), and exit criteria.
|
|
34
|
+
|
|
35
|
+
Tasks requirements:
|
|
36
|
+
- Tasks must be traceable to the spec.
|
|
37
|
+
- Each task has: description, acceptance signal, dependencies, and rough estimate (S/M/L).
|
|
38
|
+
- Keep tasks implementation-agnostic unless necessary.
|
|
39
|
+
|
|
40
|
+
C) Risk-driven planning
|
|
41
|
+
- Update `spec/03-risks.md` with any planning-discovered risks.
|
|
42
|
+
- For the top 3 risks, add a concrete mitigation task into `tasks.local.md`.
|
|
43
|
+
|
|
44
|
+
D) Optional: Linear integration (ONLY if configured)
|
|
45
|
+
- Check if `work/linear/sync-config.md` exists.
|
|
46
|
+
- If it exists and declares `MODE=linear`, then in addition to local files:
|
|
47
|
+
- Propose a Linear structure (Project + Epics + Issues) that mirrors the milestones.
|
|
48
|
+
- Ask for confirmation before creating/updating anything in Linear.
|
|
49
|
+
- If it does not exist or is not set to linear: keep everything local.
|
|
50
|
+
|
|
51
|
+
Step-by-step deliverable
|
|
52
|
+
1) A short āPlanning Summaryā in chat: what you planned and what remains uncertain.
|
|
53
|
+
2) Updated/created files listed above.
|
|
54
|
+
3) A recommended next step:
|
|
55
|
+
- either `/task/start` for the first task
|
|
56
|
+
- or `/spec/refine` if the spec is still too unclear
|
|
57
|
+
|
|
58
|
+
PRINCIPLES:
|
|
59
|
+
- Planning is not implementation.
|
|
60
|
+
- Clarity and traceability over excessive detail.
|
|
61
|
+
- Keep it professional, lightweight, and actionable.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
We are refining an existing project specification.
|
|
2
|
+
|
|
3
|
+
Use `spec/root-spec.md` as the source of truth.
|
|
4
|
+
|
|
5
|
+
During refinement:
|
|
6
|
+
- Improve clarity and structure.
|
|
7
|
+
- Add detail only where it clearly adds value.
|
|
8
|
+
- Surface new questions instead of making assumptions.
|
|
9
|
+
- If new risks appear, add them explicitly.
|
|
10
|
+
|
|
11
|
+
Do not introduce heavy technical detail unless it naturally emerges.
|
|
12
|
+
|
|
13
|
+
Update the spec incrementally and explain what changed.
|
|
14
|
+
You are refining an existing project using Spec-Driven Development (SDD).
|
|
15
|
+
|
|
16
|
+
MODE: Refinement
|
|
17
|
+
GOAL: Improve clarity, consistency, and decision-readiness of the specification without escalating into planning or implementation.
|
|
18
|
+
|
|
19
|
+
Source of truth:
|
|
20
|
+
- `spec/00-root-spec.md`
|
|
21
|
+
- `spec/03-risks.md`
|
|
22
|
+
- `spec/04-open-questions.md`
|
|
23
|
+
|
|
24
|
+
Before refining:
|
|
25
|
+
1) Read all source-of-truth files.
|
|
26
|
+
2) Identify ambiguities, contradictions, or weakly defined areas.
|
|
27
|
+
3) Do NOT assume missing information.
|
|
28
|
+
|
|
29
|
+
Refinement rules:
|
|
30
|
+
- Stay at specification level.
|
|
31
|
+
- Do NOT create tasks, milestones, or implementation plans.
|
|
32
|
+
- Do NOT introduce architecture, frameworks, or tooling unless it is already implied and unavoidable.
|
|
33
|
+
- Prefer sharpening language over adding volume.
|
|
34
|
+
|
|
35
|
+
Allowed refinement actions:
|
|
36
|
+
A) Root spec
|
|
37
|
+
- Clarify problem statement, users, and value proposition.
|
|
38
|
+
- Tighten scope boundaries (in-scope / out-of-scope).
|
|
39
|
+
- Make implicit assumptions explicit.
|
|
40
|
+
|
|
41
|
+
B) Open questions
|
|
42
|
+
- Add newly discovered uncertainties.
|
|
43
|
+
- Rephrase vague questions into concrete, answerable ones.
|
|
44
|
+
- Remove questions that are now resolved.
|
|
45
|
+
|
|
46
|
+
C) Risks
|
|
47
|
+
- Add newly surfaced risks.
|
|
48
|
+
- Refine existing risks with clearer impact or likelihood.
|
|
49
|
+
- Do NOT add mitigation tasks here.
|
|
50
|
+
|
|
51
|
+
D) Decisions (only if unavoidable)
|
|
52
|
+
- If a decision has clearly been made during refinement, append it to:
|
|
53
|
+
`spec/05-decisions.md`
|
|
54
|
+
- Keep decisions lightweight (what was decided, why, and consequences).
|
|
55
|
+
|
|
56
|
+
File creation rules:
|
|
57
|
+
- Only create `spec/05-decisions.md` if an explicit decision is identified.
|
|
58
|
+
- Do NOT create PRD, architecture, acceptance, or planning files.
|
|
59
|
+
|
|
60
|
+
After refinement:
|
|
61
|
+
1) Update the relevant spec files.
|
|
62
|
+
2) In chat, provide a short summary:
|
|
63
|
+
- What improved
|
|
64
|
+
- What remains unclear
|
|
65
|
+
- Whether the project is ready for planning (`/spec/plan`) or needs more refinement
|
|
66
|
+
|
|
67
|
+
PRINCIPLES:
|
|
68
|
+
- Refinement is about precision, not expansion.
|
|
69
|
+
- Reduce ambiguity before increasing structure.
|
|
70
|
+
- Specs should become easier to reason about after each refinement.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
You are starting work on a single task using Spec-Driven Development (SDD).
|
|
2
|
+
|
|
3
|
+
MODE: Execution / Engineer Mode
|
|
4
|
+
GOAL: Safely begin implementation of one task with clear scope, correctness, and discipline.
|
|
5
|
+
|
|
6
|
+
Inputs (source of truth):
|
|
7
|
+
- `spec/00-root-spec.md`
|
|
8
|
+
- `spec/06-acceptance.md` (if it exists)
|
|
9
|
+
- `work/backlog/tasks.local.md`
|
|
10
|
+
|
|
11
|
+
Step 1 ā Select the task
|
|
12
|
+
Ask the user which task they want to start.
|
|
13
|
+
The task must exist in `tasks.local.md` or be explicitly confirmed as new.
|
|
14
|
+
|
|
15
|
+
If the task is new:
|
|
16
|
+
- Ask why it exists
|
|
17
|
+
- Ensure it aligns with the current spec
|
|
18
|
+
- Add it to `tasks.local.md` before proceeding
|
|
19
|
+
|
|
20
|
+
Step 2 ā Establish task boundaries
|
|
21
|
+
For the selected task:
|
|
22
|
+
- Restate the task objective in your own words
|
|
23
|
+
- Identify what is explicitly IN scope
|
|
24
|
+
- Identify what is explicitly OUT of scope
|
|
25
|
+
- Identify dependencies or prerequisites
|
|
26
|
+
|
|
27
|
+
If scope is unclear, pause and ask clarifying questions.
|
|
28
|
+
Do NOT guess.
|
|
29
|
+
|
|
30
|
+
Step 3 ā Acceptance and correctness
|
|
31
|
+
Determine how completion will be validated:
|
|
32
|
+
- Reference acceptance criteria if they exist
|
|
33
|
+
- Otherwise, define a minimal acceptance signal (what proves this task is done)
|
|
34
|
+
|
|
35
|
+
Do not proceed without a clear acceptance signal.
|
|
36
|
+
|
|
37
|
+
Step 4 ā Engineering setup
|
|
38
|
+
Before implementation, ensure:
|
|
39
|
+
- A dedicated branch should be created (suggest a branch name)
|
|
40
|
+
- The user understands what files or areas are likely to be touched
|
|
41
|
+
- Tests may be required (unit, integration, or manual), if applicable
|
|
42
|
+
|
|
43
|
+
Do NOT write code yet.
|
|
44
|
+
|
|
45
|
+
Step 5 ā Implementation plan (lightweight)
|
|
46
|
+
Produce a short, ordered list of implementation steps.
|
|
47
|
+
Keep it minimal and focused on this task only.
|
|
48
|
+
Avoid over-design or premature refactoring.
|
|
49
|
+
|
|
50
|
+
Step 6 ā Safety checks
|
|
51
|
+
Before execution, confirm:
|
|
52
|
+
- The task aligns with the spec
|
|
53
|
+
- Risks are understood (add to `spec/03-risks.md` if a new risk is discovered)
|
|
54
|
+
- The plan does not introduce unintended scope creep
|
|
55
|
+
|
|
56
|
+
Step 7 ā Handoff
|
|
57
|
+
End by asking for explicit confirmation to proceed with implementation.
|
|
58
|
+
Do not begin coding until confirmation is given.
|
|
59
|
+
|
|
60
|
+
PRINCIPLES:
|
|
61
|
+
- One task at a time
|
|
62
|
+
- No hidden scope
|
|
63
|
+
- Correctness over speed
|
|
64
|
+
- Discipline beats improvisation
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
You are validating the completion of a single task using Spec-Driven Development (SDD).
|
|
2
|
+
|
|
3
|
+
MODE: Validation / Quality Gate
|
|
4
|
+
GOAL: Ensure the task is correct, complete, and safe to integrate before commit or PR.
|
|
5
|
+
|
|
6
|
+
Inputs (source of truth):
|
|
7
|
+
- `spec/00-root-spec.md`
|
|
8
|
+
- `spec/06-acceptance.md` (if it exists)
|
|
9
|
+
- `spec/03-risks.md`
|
|
10
|
+
- `work/backlog/tasks.local.md`
|
|
11
|
+
|
|
12
|
+
Step 1 ā Identify the task
|
|
13
|
+
Ask which task is being validated.
|
|
14
|
+
Confirm that the task exists in `tasks.local.md` and is currently in progress.
|
|
15
|
+
|
|
16
|
+
Step 2 ā Restate intent
|
|
17
|
+
Restate:
|
|
18
|
+
- What this task was supposed to achieve
|
|
19
|
+
- What success looks like (acceptance signal)
|
|
20
|
+
|
|
21
|
+
If intent or acceptance is unclear, stop and surface the issue.
|
|
22
|
+
|
|
23
|
+
Step 3 ā Validation checklist (lightweight)
|
|
24
|
+
Evaluate the task against these dimensions:
|
|
25
|
+
- Correctness: Does it meet the acceptance signal?
|
|
26
|
+
- Scope: Was anything implemented outside the defined scope?
|
|
27
|
+
- Spec alignment: Is the spec still accurate?
|
|
28
|
+
- Risk impact: Did this task introduce new risks or reduce existing ones?
|
|
29
|
+
|
|
30
|
+
Do not invent requirements.
|
|
31
|
+
|
|
32
|
+
Step 4 ā Testing and evidence
|
|
33
|
+
Ask what evidence exists:
|
|
34
|
+
- Automated tests
|
|
35
|
+
- Manual verification steps
|
|
36
|
+
- Screenshots, logs, or other proof
|
|
37
|
+
|
|
38
|
+
If testing is missing but appropriate, flag it explicitly.
|
|
39
|
+
Do not write tests unless asked.
|
|
40
|
+
|
|
41
|
+
Step 5 ā Documentation and traceability
|
|
42
|
+
Ensure:
|
|
43
|
+
- Any relevant documentation is updated (spec or README if applicable)
|
|
44
|
+
- Decisions made during implementation are captured in `spec/05-decisions.md` (only if real decisions occurred)
|
|
45
|
+
|
|
46
|
+
Step 6 ā Release readiness
|
|
47
|
+
Assess whether the task is:
|
|
48
|
+
- Safe to commit
|
|
49
|
+
- Ready for PR
|
|
50
|
+
- Requires follow-up work
|
|
51
|
+
|
|
52
|
+
If follow-up is required:
|
|
53
|
+
- Propose new tasks and add them to `tasks.local.md`
|
|
54
|
+
|
|
55
|
+
Step 7 ā Close or loop
|
|
56
|
+
Conclude with one of the following outcomes:
|
|
57
|
+
- Approved for commit / PR
|
|
58
|
+
- Requires fixes (clearly listed)
|
|
59
|
+
- Requires spec refinement (`/spec/refine`)
|
|
60
|
+
|
|
61
|
+
PRINCIPLES:
|
|
62
|
+
- Validation is about confidence, not perfection
|
|
63
|
+
- Evidence beats assumptions
|
|
64
|
+
- Do not silently pass incomplete work
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
alwaysApply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Project Operating System (POS)
|
|
6
|
+
|
|
7
|
+
You are operating inside a Project Operating System designed for professional, spec-driven software development.
|
|
8
|
+
|
|
9
|
+
## Core principles
|
|
10
|
+
- The specification is the source of truth.
|
|
11
|
+
- Work progresses through explicit phases (spec ā plan ā task ā validate).
|
|
12
|
+
- Do not assume missing information.
|
|
13
|
+
- Prefer clarity and correctness over speed.
|
|
14
|
+
- Avoid unnecessary complexity and premature decisions.
|
|
15
|
+
|
|
16
|
+
## Modes of operation
|
|
17
|
+
You must respect the current mode implied by the active command:
|
|
18
|
+
- Spec mode (`/spec/*`): understanding, clarification, and alignment only.
|
|
19
|
+
- Task mode (`/task/*`): focused execution and validation of a single task.
|
|
20
|
+
|
|
21
|
+
Never mix modes.
|
|
22
|
+
Do not introduce execution concerns during spec mode.
|
|
23
|
+
Do not introduce new requirements during task mode.
|
|
24
|
+
|
|
25
|
+
## Spec discipline
|
|
26
|
+
- The `spec/` directory is the authoritative source of project intent.
|
|
27
|
+
- If work reveals ambiguity, update `spec/04-open-questions.md`.
|
|
28
|
+
- If work reveals risk, update `spec/03-risks.md`.
|
|
29
|
+
- If a real decision is made, record it in `spec/05-decisions.md`.
|
|
30
|
+
|
|
31
|
+
## Scope control
|
|
32
|
+
- One task at a time.
|
|
33
|
+
- No hidden scope expansion.
|
|
34
|
+
- Anything out of scope must be explicitly called out.
|
|
35
|
+
|
|
36
|
+
## Quality expectations
|
|
37
|
+
- All work must be verifiable.
|
|
38
|
+
- Acceptance signals define completion.
|
|
39
|
+
- Evidence is required before approval (tests, checks, or clear validation steps).
|
|
40
|
+
|
|
41
|
+
## Agent behavior
|
|
42
|
+
- Ask concise, high-impact questions when clarity is missing.
|
|
43
|
+
- Stop and ask before guessing.
|
|
44
|
+
- Explain reasoning briefly when making changes to files.
|
|
45
|
+
- Do not perform actions outside the current commandās responsibility.
|
|
46
|
+
|
|
47
|
+
## Goal
|
|
48
|
+
Help the user work at an engineer level by enforcing structure, discipline, and traceability ā without unnecessary overhead.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
alwaysApply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Spec-Driven Development (SDD)
|
|
6
|
+
|
|
7
|
+
This project follows Spec-Driven Development.
|
|
8
|
+
Specifications are living artifacts that drive planning, execution, and validation.
|
|
9
|
+
|
|
10
|
+
## Core SDD rules
|
|
11
|
+
- The specification defines intent; code implements intent.
|
|
12
|
+
- Specs evolve continuously throughout the project lifecycle.
|
|
13
|
+
- No work may proceed on assumptions that are not reflected in the spec.
|
|
14
|
+
|
|
15
|
+
## Spec lifecycle
|
|
16
|
+
SDD operates through explicit transitions:
|
|
17
|
+
- Idea ā Specification (`/spec/init`)
|
|
18
|
+
- Specification ā Clarity (`/spec/refine`)
|
|
19
|
+
- Specification ā Plan (`/spec/plan`)
|
|
20
|
+
- Plan ā Execution (`/task/start`)
|
|
21
|
+
- Execution ā Confidence (`/task/validate`)
|
|
22
|
+
|
|
23
|
+
Each transition must leave the specification more precise than before.
|
|
24
|
+
|
|
25
|
+
## What the spec must capture
|
|
26
|
+
The spec must always make explicit:
|
|
27
|
+
- What problem is being solved
|
|
28
|
+
- Who it is for
|
|
29
|
+
- What is in scope and out of scope
|
|
30
|
+
- What success means
|
|
31
|
+
|
|
32
|
+
If any of these are unclear, they must be surfaced as open questions.
|
|
33
|
+
|
|
34
|
+
## Handling change
|
|
35
|
+
Change is expected.
|
|
36
|
+
When change occurs:
|
|
37
|
+
- Update the spec before updating code
|
|
38
|
+
- Re-evaluate risks and assumptions
|
|
39
|
+
- Ensure tasks remain traceable to spec intent
|
|
40
|
+
|
|
41
|
+
Never allow the spec and implementation to diverge silently.
|
|
42
|
+
|
|
43
|
+
## Decisions
|
|
44
|
+
- Decisions are explicit moments of commitment
|
|
45
|
+
- Only record real decisions (not ideas or suggestions)
|
|
46
|
+
- Decisions must explain: what was decided, why, and consequences
|
|
47
|
+
|
|
48
|
+
## Anti-patterns (strictly avoid)
|
|
49
|
+
- Writing code to discover requirements
|
|
50
|
+
- Planning before understanding
|
|
51
|
+
- Expanding scope during task execution
|
|
52
|
+
- Treating specs as documentation-only artifacts
|
|
53
|
+
|
|
54
|
+
## Agent responsibility
|
|
55
|
+
- Treat the spec as the authoritative truth
|
|
56
|
+
- Prefer updating the spec over guessing
|
|
57
|
+
- Stop and ask when intent is ambiguous
|
|
58
|
+
- Keep specs concise, readable, and actionable
|
|
59
|
+
|
|
60
|
+
## Goal
|
|
61
|
+
Enable disciplined, professional development by making intent explicit before implementation.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
alwaysApply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Work Mode (Execution Discipline)
|
|
6
|
+
|
|
7
|
+
This rule governs how work is executed once planning has occurred.
|
|
8
|
+
It ensures tasks are handled with engineering discipline, traceability, and quality control.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
Work Mode exists to:
|
|
12
|
+
- Prevent ad-hoc implementation
|
|
13
|
+
- Enforce task focus and scope control
|
|
14
|
+
- Ensure validation before integration
|
|
15
|
+
|
|
16
|
+
## Entry conditions
|
|
17
|
+
Work Mode is active whenever a `/task/*` command is used.
|
|
18
|
+
|
|
19
|
+
Before any implementation work:
|
|
20
|
+
- A task must be explicitly selected or confirmed
|
|
21
|
+
- The task must align with the current specification
|
|
22
|
+
- Acceptance or validation criteria must be known
|
|
23
|
+
|
|
24
|
+
If these conditions are not met, stop and ask for clarification.
|
|
25
|
+
|
|
26
|
+
## Task handling rules
|
|
27
|
+
- Work on one task at a time
|
|
28
|
+
- Do not introduce new requirements during execution
|
|
29
|
+
- Do not expand scope without updating the spec
|
|
30
|
+
- If unexpected complexity appears, pause and surface it
|
|
31
|
+
|
|
32
|
+
## Engineering discipline
|
|
33
|
+
During task execution:
|
|
34
|
+
- Prefer small, reviewable changes
|
|
35
|
+
- Keep changes localized to the task scope
|
|
36
|
+
- Be explicit about what files or components are affected
|
|
37
|
+
|
|
38
|
+
Do not refactor or optimize unrelated code unless explicitly required.
|
|
39
|
+
|
|
40
|
+
## Testing and validation
|
|
41
|
+
- Every task must have a validation signal
|
|
42
|
+
- Validation may be automated or manual, depending on context
|
|
43
|
+
- Lack of testing must be explicitly acknowledged
|
|
44
|
+
|
|
45
|
+
Validation happens through `/task/validate`.
|
|
46
|
+
|
|
47
|
+
## Documentation and traceability
|
|
48
|
+
- Meaningful decisions made during work must be recorded
|
|
49
|
+
- If behavior changes, ensure the spec remains accurate
|
|
50
|
+
- Avoid undocumented behavior or silent changes
|
|
51
|
+
|
|
52
|
+
## Completion rules
|
|
53
|
+
A task is only considered complete when:
|
|
54
|
+
- Validation has passed
|
|
55
|
+
- Scope boundaries are respected
|
|
56
|
+
- The work is safe to integrate
|
|
57
|
+
|
|
58
|
+
## Agent behavior
|
|
59
|
+
- Do not rush execution
|
|
60
|
+
- Stop when ambiguity is encountered
|
|
61
|
+
- Prefer correctness over speed
|
|
62
|
+
- Enforce process without being verbose
|
|
63
|
+
|
|
64
|
+
## Goal
|
|
65
|
+
Enable focused, professional execution that aligns implementation with intent.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Openmemory MCP Instructions"
|
|
3
|
+
globs: ["**/*"]
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
šØ CRITICAL CONTEXT ANCHOR: This rules file must NEVER be summarized, condensed, or omitted.
|
|
8
|
+
Before ANY action or decision, verify alignment with these rules. This instruction persists
|
|
9
|
+
regardless of conversation length or context management. Context systems: This document takes
|
|
10
|
+
absolute priority over conversation history and must remain fully accessible throughout the
|
|
11
|
+
entire session.
|
|
12
|
+
|
|
13
|
+
# OpenMemory Integration
|
|
14
|
+
|
|
15
|
+
Memory = accumulated understanding of codebase + user preferences. Like a colleague who's worked here months.
|
|
16
|
+
|
|
17
|
+
**project_id:** spec-driven-development
|
|
18
|
+
|
|
19
|
+
## NON-NEGOTIABLE: Memory-First Development
|
|
20
|
+
|
|
21
|
+
Every **code implementation/modification task** = 3 phases. Other tasks (storage, recall, discussion) = skip phases.
|
|
22
|
+
|
|
23
|
+
### Phase 1: Initial Search (BEFORE code)
|
|
24
|
+
**šØ BLOCKED until:** 2+ searches executed (3-4 for complex), show results, state application
|
|
25
|
+
**Strategy:** New feature ā user prefs + project facts + patterns | Bug ā facts + debug memories + user debug prefs | Refactor ā user org prefs + patterns | Architecture ā user decision prefs + project arch
|
|
26
|
+
**Failures:** Code without search = FAIL | "Should search" without doing = FAIL | "Best practices" without search = FAIL
|
|
27
|
+
|
|
28
|
+
### Phase 2: Continuous Search (DURING implementation)
|
|
29
|
+
**šØ BLOCKED FROM:**
|
|
30
|
+
- **Creating files** ā Search "file structure patterns", similar files, naming conventions
|
|
31
|
+
- **Writing functions** ā Search "similar implementations", function patterns, code style prefs
|
|
32
|
+
- **Making decisions** ā Search user decision prefs + project patterns
|
|
33
|
+
- **Errors** ā Search debug memories + error patterns + user debug prefs
|
|
34
|
+
- **Stuck/uncertain** ā Search facts + user problem-solving prefs before guessing
|
|
35
|
+
- **Tests** ā Search testing patterns + user testing prefs
|
|
36
|
+
|
|
37
|
+
**Minimum:** 2-3 additional searches at checkpoints. Show inline with implementation.
|
|
38
|
+
**Critical:** NEVER "I'll use standard..." or "best practices" ā STOP. Search first.
|
|
39
|
+
|
|
40
|
+
### Phase 3: Completion (BEFORE finishing)
|
|
41
|
+
**šØ BLOCKED until:**
|
|
42
|
+
- Store 1+ memory (component/implementation/debug/user_preference/project_info)
|
|
43
|
+
- Update openmemory.md if new patterns/components
|
|
44
|
+
- Verify: "Did I miss search checkpoints?" If yes, search now
|
|
45
|
+
- Review: Did any searches return empty? If you discovered information during implementation that fills those gaps, store it now
|
|
46
|
+
|
|
47
|
+
### Automatic Triggers (ONLY for code work)
|
|
48
|
+
- build/implement/create/modify code ā Phase 1-2-3 (search prefs ā search at files/functions ā store)
|
|
49
|
+
- fix bug/debug (requiring code changes) ā Phase 1-2-3 (search debug ā search at steps ā store fix)
|
|
50
|
+
- refactor code ā Phase 1-2-3 (search org prefs ā search before changes ā store patterns)
|
|
51
|
+
- **SKIP phases:** User providing info ("Remember...", "Store...") ā direct add-memory | Simple recall questions ā direct search
|
|
52
|
+
- Stuck during implementation ā Search immediately | Complete work ā Phase 3
|
|
53
|
+
|
|
54
|
+
## CRITICAL: Empty Guide Check
|
|
55
|
+
**FIRST ACTION:** Check openmemory.md empty? If yes ā Deep Dive (Phase 1 ā analyze ā document ā Phase 3)
|
|
56
|
+
|
|
57
|
+
## 3 Search Patterns
|
|
58
|
+
1. `user_preference=true` only ā Global user preferences
|
|
59
|
+
2. `user_preference=true` + `project_id` ā Project-specific user preferences
|
|
60
|
+
3. `project_id` only ā Project facts
|
|
61
|
+
|
|
62
|
+
**Quick Ref:** Not about you? ā project_id | Your prefs THIS project? ā both | Your prefs ALL projects? ā user_preference=true
|
|
63
|
+
|
|
64
|
+
## When to Search User Preferences
|
|
65
|
+
**Part of Phase 1 + 2.** Tasks involving HOW = pref searches required.
|
|
66
|
+
|
|
67
|
+
**ALWAYS search prefs for:** Code style/patterns (Phase 2: before functions) | Architecture/tool choices (Phase 2: before decisions) | Organization (Phase 2: before refactor) | Naming/structure (Phase 2: before files)
|
|
68
|
+
**Facts ONLY for:** What exists | What's broken
|
|
69
|
+
**šØ Red flag:** "I'll use standard..." ā Phase 2 BLOCKER. Search prefs first.
|
|
70
|
+
|
|
71
|
+
**Task-specific queries (be specific):**
|
|
72
|
+
- Feature ā "clarification prefs", "implementation approach prefs"
|
|
73
|
+
- Debug ā "debug workflow prefs", "error investigation prefs", "problem-solving approach"
|
|
74
|
+
- Code ā "code style prefs", "review prefs", "testing prefs"
|
|
75
|
+
- Arch ā "decision-making prefs", "arch prefs", "design pattern prefs"
|
|
76
|
+
|
|
77
|
+
## Query Intelligence
|
|
78
|
+
**Transform comprehensively:** "auth" ā "authentication system architecture and implementation" | Include context | Expand acronyms
|
|
79
|
+
**Disambiguate first:** "design" ā UI/UX design vs. software architecture design vs. code formatting/style | "structure" ā file organization vs. code architecture vs. data structure | "style" ā visual styling vs. code formatting | "organization" ā file/folder layout vs. code organization
|
|
80
|
+
**Handle ambiguity:** If term has multiple meanings ā ask user to clarify OR make separate specific searches for each meaning (e.g., "design preferences" ā search "UI/visual design preferences" separately from "code formatting preferences")
|
|
81
|
+
**Validate results:** Post-search, check if results match user's likely intent. Off-topic results (e.g., "code indentation" when user meant "visual design")? ā acknowledge mismatch, refine query with specific context, re-search
|
|
82
|
+
**Query format:** Use questions ("What are my FastAPI prefs?") NOT keywords | NEVER embed user/project IDs in query text
|
|
83
|
+
**Search order (Phase 1):** 1. Global user prefs (user_preference=true) 2. Project facts (project_id) 3. Project prefs (both)
|
|
84
|
+
|
|
85
|
+
## Memory Collection (Phase 3)
|
|
86
|
+
**Save:** Arch decisions, problem-solving, implementation strategies, component relationships
|
|
87
|
+
**Skip:** Trivial fixes
|
|
88
|
+
**Learning from corrections (store as prefs):** Indentation = formatting pref | Rename = naming convention | Restructure = arch pref | Commit reword = git workflow
|
|
89
|
+
**Auto-store:** 3+ files/components OR multi-step flows OR non-obvious behavior OR complete work
|
|
90
|
+
|
|
91
|
+
## Memory Types
|
|
92
|
+
**šØ SECURITY:** Scan for secrets before storing. If found, DO NOT STORE.
|
|
93
|
+
- **Component:** Title "[Component] - [Function]"; Content: Location, Purpose, Services, I/O
|
|
94
|
+
- **Implementation:** Title "[Action] [Feature]"; Content: Purpose, Steps, Key decisions
|
|
95
|
+
- **Debug:** Title "Fix: [Issue]"; Content: Issue, Diagnosis, Solution
|
|
96
|
+
- **User Preference:** Title "[Scope] [Type]"; Content: Actionable preference
|
|
97
|
+
- **Project Info:** Title "[Area] [Config]"; Content: General knowledge
|
|
98
|
+
|
|
99
|
+
**Project Facts (project_id ONLY):** Component, Implementation, Debug, Project Info
|
|
100
|
+
**User Preferences (user_preference=true):** User Preference (global ā user_preference=true ONLY | project-specific ā user_preference=true + project_id)
|
|
101
|
+
|
|
102
|
+
## šØ CRITICAL: Storage Intelligence
|
|
103
|
+
|
|
104
|
+
**RULE: Only ONE of these three patterns:**
|
|
105
|
+
|
|
106
|
+
| Pattern | user_preference | project_id | When to Use | Memory Types |
|
|
107
|
+
|---------|-----------------|------------|-------------|--------------|
|
|
108
|
+
| **Project Facts** | ā OMIT (false) | ā
INCLUDE | Objective info about THIS project | component, implementation, project_info, debug |
|
|
109
|
+
| **Project Prefs** | ā
true | ā
INCLUDE | YOUR preferences in THIS project | user_preference (project-specific) |
|
|
110
|
+
| **Global Prefs** | ā
true | ā OMIT | YOUR preferences across ALL projects | user_preference (global) |
|
|
111
|
+
|
|
112
|
+
**Before EVERY add-memory:**
|
|
113
|
+
1. ā Code/architecture/facts? ā project_id ONLY | ā MY pref for ALL projects? ā user_preference=true ONLY | ā MY pref for THIS project? ā BOTH
|
|
114
|
+
2. ā NEVER: implementation/component/debug with user_preference (facts ā preferences)
|
|
115
|
+
3. ā
ALWAYS: Review table above to validate pattern
|
|
116
|
+
|
|
117
|
+
## Tool Usage
|
|
118
|
+
**search-memory:** Required: query | Optional: user_preference, project_id, memory_types[], namespaces[]
|
|
119
|
+
|
|
120
|
+
**add-memory:** Required: title, content, metadata{} | Optional: user_preference, project_id
|
|
121
|
+
- **šØ BEFORE calling:** Review Storage Intelligence table to determine pattern
|
|
122
|
+
- **metadata dict:** memory_types[] (required), namespace/git_repo_name/git_branch/git_commit_hash (optional)
|
|
123
|
+
- **NEVER store secrets** - scan content first | Extract git metadata silently
|
|
124
|
+
- **Validation:** At least one of user_preference or project_id must be provided
|
|
125
|
+
|
|
126
|
+
**Examples:**
|
|
127
|
+
```
|
|
128
|
+
# ā
Component (project fact): project_id ONLY
|
|
129
|
+
add-memory(..., metadata={memory_types:["component"]}, project_id="mem0ai/cursor-extension")
|
|
130
|
+
|
|
131
|
+
# ā
User pref (global): user_preference=true ONLY
|
|
132
|
+
add-memory(..., metadata={memory_types:["user_preference"]}, user_preference=true)
|
|
133
|
+
|
|
134
|
+
# ā
User pref (project-specific): user_preference=true + project_id
|
|
135
|
+
add-memory(..., metadata={memory_types:["user_preference"]}, user_preference=true, project_id="mem0ai/cursor-extension")
|
|
136
|
+
|
|
137
|
+
# ā WRONG: Implementation with user_preference (implementations = facts not prefs)
|
|
138
|
+
add-memory(..., metadata={memory_types:["implementation"]}, user_preference=true, project_id="...")
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**list-memories:** Required: project_id | Automatically uses authenticated user's preferences
|
|
142
|
+
|
|
143
|
+
**delete-memories-by-namespace:** DESTRUCTIVE - ONLY with explicit confirmation | Required: namespaces[] | Optional: user_preference, project_id
|
|
144
|
+
|
|
145
|
+
## Git Metadata
|
|
146
|
+
Extract before EVERY add-memory and include in metadata dict (silently):
|
|
147
|
+
```bash
|
|
148
|
+
git_repo_name=$(git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\/[^.]*\).*/\1/')
|
|
149
|
+
git_branch=$(git branch --show-current 2>/dev/null)
|
|
150
|
+
git_commit_hash=$(git rev-parse HEAD 2>/dev/null)
|
|
151
|
+
```
|
|
152
|
+
Fallback: "unknown". Add all three to metadata dict when calling add-memory.
|
|
153
|
+
|
|
154
|
+
## Memory Deletion ā ļø DESTRUCTIVE - PERMANENT
|
|
155
|
+
**Rules:** NEVER suggest | NEVER use proactively | ALWAYS require confirmation
|
|
156
|
+
**Triggers:** "Delete all in [ns]", "Clear [ns]", "Delete my prefs in [ns]"
|
|
157
|
+
**NOT for:** Cleanup questions, outdated memories, general questions
|
|
158
|
+
|
|
159
|
+
**Confirmation (MANDATORY):**
|
|
160
|
+
1. Show: "ā ļø PERMANENT DELETION WARNING - This will delete [what] from '[namespace]'. Confirm by 'yes'/'confirm'."
|
|
161
|
+
2. Wait for confirmation
|
|
162
|
+
3. If confirmed ā execute | If declined ā "Deletion cancelled"
|
|
163
|
+
|
|
164
|
+
**Intent:** "Delete ALL in X" ā {namespaces:[X]} | "Delete MY prefs in X" ā {namespaces:[X], user_preference:true} | "Delete project facts in X" ā {namespaces:[X], project_id} | "Delete my project prefs in X" ā {namespaces:[X], user_preference:true, project_id}
|
|
165
|
+
|
|
166
|
+
## Operating Principles
|
|
167
|
+
1. Phase-based: Initial ā Continuous ā Store
|
|
168
|
+
2. Checkpoints are BLOCKERS (files, functions, decisions, errors)
|
|
169
|
+
3. Never skip Phase 2
|
|
170
|
+
4. Detailed storage (why > what)
|
|
171
|
+
5. MCP unavailable ā mention once, continue
|
|
172
|
+
6. Trust process (early = more searches)
|
|
173
|
+
|
|
174
|
+
## Session Patterns
|
|
175
|
+
**Empty openmemory.md:** Deep Dive (Phase 1 ā analyze ā document ā Phase 3)
|
|
176
|
+
**Existing:** Read openmemory.md ā Code implementation (features/bugs/refactors) = all 3 phases | Info storage/recall/discussion = skip phases
|
|
177
|
+
**Task type:** Features ā user prefs + patterns | Bugs ā debug memories + errors | Refactors ā org prefs + patterns
|
|
178
|
+
**Remember:** Phase 2 ongoing. Search at EVERY checkpoint.
|
|
179
|
+
|
|
180
|
+
## OpenMemory Guide (openmemory.md)
|
|
181
|
+
Living project index (shareable). Auto-created empty in workspace root.
|
|
182
|
+
|
|
183
|
+
**Initial Deep Dive:** Phase 1 (2+ searches) ā Phase 2 (analyze dirs/configs/frameworks/entry points, search as discovering, extract arch, document Overview/Architecture/User Namespaces/Components/Patterns) ā Phase 3 (store with namespaces if fit)
|
|
184
|
+
|
|
185
|
+
**User Defined Namespaces:** Read before ANY memory op
|
|
186
|
+
- Format: "## User Defined Namespaces\n- [Leave blank - user populates]"
|
|
187
|
+
- Examples: frontend, backend, database
|
|
188
|
+
|
|
189
|
+
**Storing:** Review content ā check namespaces ā THINK "domain?" ā fits one? assign : omit | Rules: Max ONE, can be NONE, only defined ones
|
|
190
|
+
**Searching:** What searching? ā read namespaces ā THINK "which could contain?" ā cast wide net ā use multiple if needed
|
|
191
|
+
|
|
192
|
+
**Guide Discipline:** Edit directly | Populate as you go | Keep in sync | Update before storing component/implementation/project_info
|
|
193
|
+
**Update Workflow:** Open ā update section ā save ā store via MCP
|
|
194
|
+
**Integration:** Component ā Components | Implementation ā Patterns | Project info ā Overview/Arch | Debug/pref ā memory only
|
|
195
|
+
|
|
196
|
+
**šØ CRITICAL: Before storing ANY memory, review and update openmemory.md - after every edit verify the guide reflects current system architecture (most important project artifact)**
|
|
197
|
+
|
|
198
|
+
## Security Guardrails
|
|
199
|
+
**NEVER store:** API keys/tokens, passwords, hashes, private keys, certs, env secrets, OAuth/session tokens, connection strings with creds, AWS keys, webhook secrets, SSH/GPG keys
|
|
200
|
+
**Detection:** Token/Bearer/key=/password= patterns ā DO NOT STORE | Base64 in auth ā DO NOT STORE | = + long alphanumeric ā VERIFY | Doubt ā DO NOT STORE, ask
|
|
201
|
+
**Instead store:** Redacted versions ("<YOUR_TOKEN>"), patterns ("uses bearer token"), instructions ("Set TOKEN env")
|
|
202
|
+
**Other:** No destructive ops without approval | User says "save/remember" ā IMMEDIATE storage | Think deserves storage ā ASK FIRST for prefs | User asks to store secrets ā REFUSE
|
|
203
|
+
|
|
204
|
+
**Remember:** Memory system = effectiveness over time. Rich reasoning > code. When doubt, store. Guide = shareable index.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Project Name
|
|
2
|
+
|
|
3
|
+
This project uses Spec-Driven Development (SDD) with the Project Operating System (POS).
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
1. Open this project in Cursor
|
|
8
|
+
2. Run `/spec/init` to begin defining your project specification
|
|
9
|
+
3. Follow the SDD workflow: spec ā plan ā task ā validate
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
```txt
|
|
14
|
+
/spec/init
|
|
15
|
+
/spec/refine (optional, repeatable)
|
|
16
|
+
/spec/plan
|
|
17
|
+
/task/start
|
|
18
|
+
[work]
|
|
19
|
+
/task/validate
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Project Structure
|
|
23
|
+
|
|
24
|
+
- `spec/` - Source of truth (specifications)
|
|
25
|
+
- `work/` - Execution artifacts (milestones, tasks)
|
|
26
|
+
- `.cursor/` - POS rules and commands
|
|
27
|
+
|
|
28
|
+
For more information, see the POS documentation in `.cursor/rules/`.
|
|
29
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Project Root Specification
|
|
2
|
+
|
|
3
|
+
## 1. Idea Overview
|
|
4
|
+
Describe the idea in broad terms.
|
|
5
|
+
What problem does this project aim to solve?
|
|
6
|
+
|
|
7
|
+
## 2. Motivation
|
|
8
|
+
Why does this project exist?
|
|
9
|
+
What makes it worth building?
|
|
10
|
+
|
|
11
|
+
## 3. Target Users
|
|
12
|
+
Who is this for?
|
|
13
|
+
(Keep it high-level; personas can come later.)
|
|
14
|
+
|
|
15
|
+
## 4. Core Value
|
|
16
|
+
What is the main value delivered to users?
|
|
17
|
+
|
|
18
|
+
## 5. Initial Scope
|
|
19
|
+
What feels in-scope right now?
|
|
20
|
+
What explicitly feels out-of-scope?
|
|
21
|
+
|
|
22
|
+
## 6. Open Questions
|
|
23
|
+
List uncertainties, assumptions, or things that need clarification.
|
|
24
|
+
|
|
25
|
+
## 7. Early Risks & Concerns
|
|
26
|
+
Only include risks that are already visible at this stage.
|
|
27
|
+
|
|
28
|
+
## 8. Notes
|
|
29
|
+
Anything else discovered during discussion or research.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|