@sdsrs/codeagent 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -67
- package/dist/adapters/code-graph.d.ts +1 -0
- package/dist/adapters/code-graph.d.ts.map +1 -1
- package/dist/adapters/code-graph.js +54 -71
- package/dist/adapters/code-graph.js.map +1 -1
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.d.ts.map +1 -1
- package/dist/adapters/memory.js +21 -50
- package/dist/adapters/memory.js.map +1 -1
- package/dist/adapters/orchestration/gsd.d.ts +6 -1
- package/dist/adapters/orchestration/gsd.d.ts.map +1 -1
- package/dist/adapters/orchestration/gsd.js +23 -20
- package/dist/adapters/orchestration/gsd.js.map +1 -1
- package/dist/adapters/orchestration/superpowers.js +1 -1
- package/dist/adapters/orchestration/superpowers.js.map +1 -1
- package/dist/broker/broker.d.ts +4 -2
- package/dist/broker/broker.d.ts.map +1 -1
- package/dist/broker/broker.js +96 -32
- package/dist/broker/broker.js.map +1 -1
- package/dist/broker/compressor.d.ts +4 -1
- package/dist/broker/compressor.d.ts.map +1 -1
- package/dist/broker/compressor.js +52 -11
- package/dist/broker/compressor.js.map +1 -1
- package/dist/broker/query-parser.js +1 -1
- package/dist/broker/query-parser.js.map +1 -1
- package/dist/cli/commands/chat.d.ts.map +1 -1
- package/dist/cli/commands/chat.js +18 -37
- package/dist/cli/commands/chat.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +10 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +11 -16
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +9 -11
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/index.js +4 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui/renderer.d.ts.map +1 -1
- package/dist/cli/tui/renderer.js +4 -1
- package/dist/cli/tui/renderer.js.map +1 -1
- package/dist/hooks/post-compact.d.ts +15 -0
- package/dist/hooks/post-compact.d.ts.map +1 -0
- package/dist/hooks/post-compact.js +57 -0
- package/dist/hooks/post-compact.js.map +1 -0
- package/dist/hooks/session-start.js +1 -1
- package/dist/hooks/session-start.js.map +1 -1
- package/dist/hooks/stop.js +10 -13
- package/dist/hooks/stop.js.map +1 -1
- package/dist/hooks/user-prompt.js +2 -2
- package/dist/hooks/user-prompt.js.map +1 -1
- package/dist/providers/anthropic-api.d.ts +2 -1
- package/dist/providers/anthropic-api.d.ts.map +1 -1
- package/dist/providers/anthropic-api.js +21 -9
- package/dist/providers/anthropic-api.js.map +1 -1
- package/dist/providers/claude-cli.d.ts.map +1 -1
- package/dist/providers/claude-cli.js +19 -15
- package/dist/providers/claude-cli.js.map +1 -1
- package/dist/providers/claude-sdk.d.ts.map +1 -1
- package/dist/providers/claude-sdk.js +11 -4
- package/dist/providers/claude-sdk.js.map +1 -1
- package/dist/scripts/install-hooks.js +9 -3
- package/dist/scripts/install-hooks.js.map +1 -1
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +3 -2
- package/dist/session/manager.js.map +1 -1
- package/dist/session/schema.d.ts.map +1 -1
- package/dist/session/schema.js +12 -5
- package/dist/session/schema.js.map +1 -1
- package/dist/utils/exec.d.ts +3 -2
- package/dist/utils/exec.d.ts.map +1 -1
- package/dist/utils/exec.js +7 -6
- package/dist/utils/exec.js.map +1 -1
- package/dist/utils/tokens.d.ts.map +1 -1
- package/dist/utils/tokens.js +2 -0
- package/dist/utils/tokens.js.map +1 -1
- package/package.json +6 -5
- package/src/skills/remember.md +40 -0
- package/src/skills/spec.md +37 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/session/schema.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAA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AAC,CAAC;AACzD,CAAC;AAED,SAAS,YAAY,CAAC,EAAqB;IACzC,wBAAwB;IACxB,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC,GAAG,EAE3D,CAAC;QACd,IAAI,GAAG;YAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,0BAA0B;IAC5B,CAAC;IAED,iEAAiE;IACjE,KAAK,IAAI,CAAC,GAAG,cAAc,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxD,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjB,IAAI,CAAC;YACH,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvB,EAAE,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,GAAG,EAAE,CAAC;YAC/C,EAAE,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACzE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/utils/exec.d.ts
CHANGED
|
@@ -4,16 +4,17 @@ export interface ExecResult {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Execute a command with timeout and error handling.
|
|
7
|
+
* Uses execFileSync (no shell) to prevent command injection.
|
|
7
8
|
* Returns { stdout, ok } — never throws.
|
|
8
9
|
*/
|
|
9
|
-
export declare function execSafe(cmd: string, opts?: {
|
|
10
|
+
export declare function execSafe(cmd: string, args: string[], opts?: {
|
|
10
11
|
cwd?: string;
|
|
11
12
|
timeout?: number;
|
|
12
13
|
}): ExecResult;
|
|
13
14
|
/**
|
|
14
15
|
* Execute a command, return stdout or empty string on failure.
|
|
15
16
|
*/
|
|
16
|
-
export declare function execQuiet(cmd: string, opts?: {
|
|
17
|
+
export declare function execQuiet(cmd: string, args: string[], opts?: {
|
|
17
18
|
cwd?: string;
|
|
18
19
|
timeout?: number;
|
|
19
20
|
}): string;
|
package/dist/utils/exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;CACb;AAED
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,UAAU,CAcZ;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,MAAM,CAER"}
|
package/dist/utils/exec.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
2
|
/**
|
|
3
3
|
* Execute a command with timeout and error handling.
|
|
4
|
+
* Uses execFileSync (no shell) to prevent command injection.
|
|
4
5
|
* Returns { stdout, ok } — never throws.
|
|
5
6
|
*/
|
|
6
|
-
export function execSafe(cmd, opts = {}) {
|
|
7
|
+
export function execSafe(cmd, args, opts = {}) {
|
|
7
8
|
const { cwd = process.cwd(), timeout = 3000 } = opts;
|
|
8
9
|
try {
|
|
9
|
-
const stdout =
|
|
10
|
+
const stdout = execFileSync(cmd, args, {
|
|
10
11
|
cwd,
|
|
11
12
|
timeout,
|
|
12
13
|
encoding: 'utf8',
|
|
13
14
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
14
|
-
maxBuffer: 1024 * 1024,
|
|
15
|
+
maxBuffer: 1024 * 1024,
|
|
15
16
|
});
|
|
16
17
|
return { stdout: stdout.trim(), ok: true };
|
|
17
18
|
}
|
|
@@ -22,7 +23,7 @@ export function execSafe(cmd, opts = {}) {
|
|
|
22
23
|
/**
|
|
23
24
|
* Execute a command, return stdout or empty string on failure.
|
|
24
25
|
*/
|
|
25
|
-
export function execQuiet(cmd, opts = {}) {
|
|
26
|
-
return execSafe(cmd, opts).stdout;
|
|
26
|
+
export function execQuiet(cmd, args, opts = {}) {
|
|
27
|
+
return execSafe(cmd, args, opts).stdout;
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=exec.js.map
|
package/dist/utils/exec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CACtB,GAAW,EACX,IAAc,EACd,OAA2C,EAAE;IAE7C,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IACrD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE;YACrC,GAAG;YACH,OAAO;YACP,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAC/B,SAAS,EAAE,IAAI,GAAG,IAAI;SACvB,CAAC,CAAC;QACH,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CACvB,GAAW,EACX,IAAc,EACd,OAA2C,EAAE;IAE7C,OAAO,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/utils/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/utils/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAsB1E"}
|
package/dist/utils/tokens.js
CHANGED
|
@@ -16,6 +16,8 @@ export function estimateTokens(text) {
|
|
|
16
16
|
* Truncates at line boundaries to avoid cutting mid-sentence.
|
|
17
17
|
*/
|
|
18
18
|
export function truncateToTokenBudget(text, budget) {
|
|
19
|
+
if (budget <= 0)
|
|
20
|
+
return '';
|
|
19
21
|
if (estimateTokens(text) <= budget)
|
|
20
22
|
return text;
|
|
21
23
|
const lines = text.split('\n');
|
package/dist/utils/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/utils/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,CAAC,IAAI;QAAE,OAAO,CAAC,CAAC;IACpB,mDAAmD;IACnD,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,4CAA4C,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IACzF,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;IAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,MAAc;IAChE,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IAEhD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,IAAI,GAAG,UAAU,GAAG,MAAM;YAAE,MAAM;QACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,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IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,IAAI,GAAG,UAAU,GAAG,MAAM;YAAE,MAAM;QACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,IAAI,UAAU,CAAC;IACrB,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,wCAAwC;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB;QAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC;IAC1C,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdsrs/codeagent",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CodeAgent — Context Broker + CLI for intelligent coding assistance. Integrates code search, memory, and orchestration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/broker/broker.js",
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
"build": "tsc",
|
|
42
42
|
"dev": "tsc --watch",
|
|
43
43
|
"test": "vitest run",
|
|
44
|
+
"test:unit": "vitest run src/",
|
|
44
45
|
"test:watch": "vitest",
|
|
45
46
|
"lint": "tsc --noEmit",
|
|
46
47
|
"test:integration": "vitest run tests/integration",
|
|
47
48
|
"install-hooks": "node dist/scripts/install-hooks.js",
|
|
48
49
|
"install-hooks:global": "node dist/scripts/install-hooks.js --global",
|
|
49
|
-
"prepublishOnly": "npm run lint && npm run build && npm test",
|
|
50
|
+
"prepublishOnly": "npm run lint && npm run build && npm run test:unit",
|
|
50
51
|
"postbuild": "chmod +x dist/cli/index.js"
|
|
51
52
|
},
|
|
52
53
|
"keywords": [
|
|
@@ -65,11 +66,11 @@
|
|
|
65
66
|
"license": "MIT",
|
|
66
67
|
"repository": {
|
|
67
68
|
"type": "git",
|
|
68
|
-
"url": "https://github.com/
|
|
69
|
+
"url": "https://github.com/sdsrss/codeagent.git"
|
|
69
70
|
},
|
|
70
|
-
"homepage": "https://github.com/
|
|
71
|
+
"homepage": "https://github.com/sdsrss/codeagent#readme",
|
|
71
72
|
"bugs": {
|
|
72
|
-
"url": "https://github.com/
|
|
73
|
+
"url": "https://github.com/sdsrss/codeagent/issues"
|
|
73
74
|
},
|
|
74
75
|
"engines": {
|
|
75
76
|
"node": ">=20"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeagent-remember
|
|
3
|
+
description: Explicitly save current context, decisions, or discoveries to long-term memory
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CodeAgent Remember
|
|
8
|
+
|
|
9
|
+
You are saving important context to **long-term memory** via the CodeAgent memory system.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- After making an important architectural decision
|
|
14
|
+
- After discovering a non-obvious bug pattern
|
|
15
|
+
- After learning something about the codebase that isn't in docs
|
|
16
|
+
- When the user explicitly says "remember this"
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
1. **Identify** what should be remembered from the current conversation:
|
|
21
|
+
- **decision**: An architectural or design decision with rationale
|
|
22
|
+
- **bugfix**: A bug that was found and fixed, with root cause
|
|
23
|
+
- **discovery**: A non-obvious finding about the codebase or tools
|
|
24
|
+
|
|
25
|
+
2. **Summarize** into a concise title (< 100 chars) and body (< 500 chars)
|
|
26
|
+
|
|
27
|
+
3. **Save** using the memory CLI:
|
|
28
|
+
```bash
|
|
29
|
+
claude-mem-lite save --type <type> --title "<title>" --body "<body>"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
4. **Confirm** to the user what was saved
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Only save genuinely useful information — not ephemeral task details
|
|
37
|
+
- Use the most specific type (bugfix > decision > discovery)
|
|
38
|
+
- Include the "why" not just the "what"
|
|
39
|
+
- Do NOT save: file paths (they change), git history (use git log), code snippets (they rot)
|
|
40
|
+
- If unsure whether to save, ask the user
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeagent-spec
|
|
3
|
+
description: Generate a SPEC.md from brainstorm results using CodeAgent context
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CodeAgent Spec Generation
|
|
8
|
+
|
|
9
|
+
You are generating a **technical specification** based on prior brainstorming.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
The CodeAgent Context Broker has injected relevant context above, including:
|
|
14
|
+
- Prior brainstorm results and decisions from memory
|
|
15
|
+
- Related code structure and patterns
|
|
16
|
+
- Active orchestration state
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
1. **Gather** — Review injected memories for brainstorm decisions and approaches
|
|
21
|
+
2. **Structure** — Create a SPEC.md with these sections:
|
|
22
|
+
- **Goal**: One sentence describing what we're building
|
|
23
|
+
- **Background**: Why this is needed (from brainstorm context)
|
|
24
|
+
- **Approach**: The chosen approach (from brainstorm decision)
|
|
25
|
+
- **Tasks**: Ordered list of implementation tasks
|
|
26
|
+
- **Interfaces**: Key types, APIs, or contracts that will be created/modified
|
|
27
|
+
- **Risks**: Known risks and mitigation strategies
|
|
28
|
+
- **Validation**: How to verify the implementation is correct
|
|
29
|
+
3. **Output** — Write the spec to `SPEC.md` in the project root (or a specified path)
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- Base the spec on actual brainstorm results — do NOT invent requirements
|
|
34
|
+
- Each task should be small enough to implement in one session
|
|
35
|
+
- Include file paths for files that need to be created or modified
|
|
36
|
+
- Reference existing patterns from the injected code context
|
|
37
|
+
- If no brainstorm results exist in memory, ask the user to run /brainstorm first
|