project-memory-cli 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/LICENSE.md +21 -0
- package/README.md +153 -0
- package/SPEC.md +445 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +163 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/new-task.d.ts +2 -0
- package/dist/commands/new-task.d.ts.map +1 -0
- package/dist/commands/new-task.js +54 -0
- package/dist/commands/new-task.js.map +1 -0
- package/dist/commands/new-workflow.d.ts +2 -0
- package/dist/commands/new-workflow.d.ts.map +1 -0
- package/dist/commands/new-workflow.js +29 -0
- package/dist/commands/new-workflow.js.map +1 -0
- package/dist/commands/tree.d.ts +2 -0
- package/dist/commands/tree.d.ts.map +1 -0
- package/dist/commands/tree.js +55 -0
- package/dist/commands/tree.js.map +1 -0
- package/dist/commands/validate.d.ts +2 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +36 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/detector.d.ts +12 -0
- package/dist/lib/detector.d.ts.map +1 -0
- package/dist/lib/detector.js +131 -0
- package/dist/lib/detector.js.map +1 -0
- package/dist/lib/fs.d.ts +7 -0
- package/dist/lib/fs.d.ts.map +1 -0
- package/dist/lib/fs.js +27 -0
- package/dist/lib/fs.js.map +1 -0
- package/dist/lib/ids.d.ts +8 -0
- package/dist/lib/ids.d.ts.map +1 -0
- package/dist/lib/ids.js +19 -0
- package/dist/lib/ids.js.map +1 -0
- package/dist/lib/planner.d.ts +23 -0
- package/dist/lib/planner.d.ts.map +1 -0
- package/dist/lib/planner.js +44 -0
- package/dist/lib/planner.js.map +1 -0
- package/dist/lib/rules.d.ts +18 -0
- package/dist/lib/rules.d.ts.map +1 -0
- package/dist/lib/rules.js +97 -0
- package/dist/lib/rules.js.map +1 -0
- package/dist/lib/templates.d.ts +24 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +391 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/validator.d.ts +8 -0
- package/dist/lib/validator.d.ts.map +1 -0
- package/dist/lib/validator.js +77 -0
- package/dist/lib/validator.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
// ── Signal definitions ────────────────────────────────────────────────────────
|
|
4
|
+
const EXISTING_SIGNALS = [
|
|
5
|
+
{ check: '.git', label: '.git/', isDir: true },
|
|
6
|
+
{ check: 'package.json', label: 'package.json' },
|
|
7
|
+
{ check: 'requirements.txt', label: 'requirements.txt' },
|
|
8
|
+
{ check: 'pyproject.toml', label: 'pyproject.toml' },
|
|
9
|
+
{ check: 'Cargo.toml', label: 'Cargo.toml' },
|
|
10
|
+
{ check: 'go.mod', label: 'go.mod' },
|
|
11
|
+
{ check: 'Gemfile', label: 'Gemfile' },
|
|
12
|
+
{ check: 'composer.json', label: 'composer.json' },
|
|
13
|
+
{ check: 'pom.xml', label: 'pom.xml' },
|
|
14
|
+
{ check: 'src', label: 'src/', isDir: true },
|
|
15
|
+
{ check: 'app', label: 'app/', isDir: true },
|
|
16
|
+
{ check: 'components', label: 'components/', isDir: true },
|
|
17
|
+
{ check: 'README.md', label: 'README.md' },
|
|
18
|
+
{ check: 'Dockerfile', label: 'Dockerfile' },
|
|
19
|
+
{ check: 'docker-compose.yml', label: 'docker-compose.yml' },
|
|
20
|
+
{ check: '.github', label: '.github/', isDir: true },
|
|
21
|
+
{ check: '.gitlab-ci.yml', label: '.gitlab-ci.yml' },
|
|
22
|
+
{ check: 'Jenkinsfile', label: 'Jenkinsfile' },
|
|
23
|
+
];
|
|
24
|
+
const MATURITY_SIGNALS = [
|
|
25
|
+
{ check: 'tests', label: 'tests/', isDir: true },
|
|
26
|
+
{ check: '__tests__', label: '__tests__/', isDir: true },
|
|
27
|
+
{ check: '.github', label: '.github/', isDir: true },
|
|
28
|
+
{ check: '.gitlab-ci.yml', label: '.gitlab-ci.yml' },
|
|
29
|
+
{ check: 'Jenkinsfile', label: 'Jenkinsfile' },
|
|
30
|
+
{ check: 'docker-compose.yml', label: 'docker-compose.yml' },
|
|
31
|
+
];
|
|
32
|
+
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
33
|
+
function exists(cwd, name, isDir = false) {
|
|
34
|
+
const full = path.join(cwd, name);
|
|
35
|
+
try {
|
|
36
|
+
const stat = fs.statSync(full);
|
|
37
|
+
return isDir ? stat.isDirectory() : stat.isFile() || stat.isDirectory();
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function hasDir(cwd, name) {
|
|
44
|
+
return exists(cwd, name, true);
|
|
45
|
+
}
|
|
46
|
+
function hasFile(cwd, name) {
|
|
47
|
+
try {
|
|
48
|
+
return fs.statSync(path.join(cwd, name)).isFile();
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function inferType(cwd) {
|
|
55
|
+
const hasPkg = hasFile(cwd, 'package.json');
|
|
56
|
+
if (hasPkg && (hasDir(cwd, 'components') || hasDir(cwd, 'pages')))
|
|
57
|
+
return 'web-app';
|
|
58
|
+
if (hasPkg)
|
|
59
|
+
return 'node';
|
|
60
|
+
if (hasFile(cwd, 'requirements.txt') || hasFile(cwd, 'pyproject.toml'))
|
|
61
|
+
return 'python';
|
|
62
|
+
if (hasFile(cwd, 'Cargo.toml'))
|
|
63
|
+
return 'rust';
|
|
64
|
+
if (hasFile(cwd, 'go.mod'))
|
|
65
|
+
return 'go';
|
|
66
|
+
if (hasFile(cwd, 'Gemfile'))
|
|
67
|
+
return 'ruby';
|
|
68
|
+
if (hasFile(cwd, 'pom.xml'))
|
|
69
|
+
return 'java';
|
|
70
|
+
return 'generic';
|
|
71
|
+
}
|
|
72
|
+
function inferName(cwd) {
|
|
73
|
+
// Try package.json name first
|
|
74
|
+
const pkgPath = path.join(cwd, 'package.json');
|
|
75
|
+
try {
|
|
76
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
77
|
+
if (pkg.name && typeof pkg.name === 'string')
|
|
78
|
+
return pkg.name;
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// fall through
|
|
82
|
+
}
|
|
83
|
+
// Fall back to directory name
|
|
84
|
+
return path.basename(cwd);
|
|
85
|
+
}
|
|
86
|
+
function countSourceFiles(cwd) {
|
|
87
|
+
const srcDir = path.join(cwd, 'src');
|
|
88
|
+
try {
|
|
89
|
+
return fs.readdirSync(srcDir).length;
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ── Main detector ─────────────────────────────────────────────────────────────
|
|
96
|
+
export function detect(cwd) {
|
|
97
|
+
const signals = [];
|
|
98
|
+
for (const signal of EXISTING_SIGNALS) {
|
|
99
|
+
if (exists(cwd, signal.check, signal.isDir)) {
|
|
100
|
+
signals.push(signal.label);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const isExisting = signals.length > 0;
|
|
104
|
+
const maturitySignals = [];
|
|
105
|
+
if (isExisting) {
|
|
106
|
+
for (const signal of MATURITY_SIGNALS) {
|
|
107
|
+
if (exists(cwd, signal.check, signal.isDir)) {
|
|
108
|
+
maturitySignals.push(signal.label);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Large src/ directory counts as a maturity signal
|
|
112
|
+
if (countSourceFiles(cwd) > 10) {
|
|
113
|
+
maturitySignals.push('src/ (>10 files)');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const hasDocker = hasFile(cwd, 'docker-compose.yml');
|
|
117
|
+
const manifests = ['package.json', 'requirements.txt', 'pyproject.toml',
|
|
118
|
+
'Cargo.toml', 'go.mod', 'Gemfile', 'composer.json', 'pom.xml']
|
|
119
|
+
.filter(m => hasFile(cwd, m));
|
|
120
|
+
const hasMultipleManifests = manifests.length > 1;
|
|
121
|
+
return {
|
|
122
|
+
isExisting,
|
|
123
|
+
type: isExisting ? inferType(cwd) : 'generic',
|
|
124
|
+
signals,
|
|
125
|
+
maturitySignals,
|
|
126
|
+
projectName: inferName(cwd),
|
|
127
|
+
hasDocker,
|
|
128
|
+
hasMultipleManifests,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detector.js","sourceRoot":"","sources":["../../src/lib/detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AA4BxB,iFAAiF;AAEjF,MAAM,gBAAgB,GAA6D;IACjF,EAAE,KAAK,EAAE,MAAM,EAAe,KAAK,EAAE,OAAO,EAAe,KAAK,EAAE,IAAI,EAAE;IACxE,EAAE,KAAK,EAAE,cAAc,EAAO,KAAK,EAAE,cAAc,EAAE;IACrD,EAAE,KAAK,EAAE,kBAAkB,EAAG,KAAK,EAAE,kBAAkB,EAAE;IACzD,EAAE,KAAK,EAAE,gBAAgB,EAAK,KAAK,EAAE,gBAAgB,EAAE;IACvD,EAAE,KAAK,EAAE,YAAY,EAAS,KAAK,EAAE,YAAY,EAAE;IACnD,EAAE,KAAK,EAAE,QAAQ,EAAa,KAAK,EAAE,QAAQ,EAAE;IAC/C,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAE,SAAS,EAAE;IAChD,EAAE,KAAK,EAAE,eAAe,EAAM,KAAK,EAAE,eAAe,EAAE;IACtD,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAE,SAAS,EAAE;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+1,7 @@
|
|
|
1
|
+
export declare function ensureDir(dirPath: string): void;
|
|
2
|
+
export declare function writeFile(filePath: string, content: string): void;
|
|
3
|
+
export declare function fileExists(filePath: string): boolean;
|
|
4
|
+
export declare function readFile(filePath: string): string;
|
|
5
|
+
export declare function listDirs(dirPath: string): string[];
|
|
6
|
+
export declare function touchGitkeep(dirPath: string): void;
|
|
7
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/lib/fs.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAGjE;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAKlD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAGlD"}
|
package/dist/lib/fs.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
export function ensureDir(dirPath) {
|
|
4
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
5
|
+
}
|
|
6
|
+
export function writeFile(filePath, content) {
|
|
7
|
+
ensureDir(path.dirname(filePath));
|
|
8
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
9
|
+
}
|
|
10
|
+
export function fileExists(filePath) {
|
|
11
|
+
return fs.existsSync(filePath);
|
|
12
|
+
}
|
|
13
|
+
export function readFile(filePath) {
|
|
14
|
+
return fs.readFileSync(filePath, 'utf8');
|
|
15
|
+
}
|
|
16
|
+
export function listDirs(dirPath) {
|
|
17
|
+
if (!fs.existsSync(dirPath))
|
|
18
|
+
return [];
|
|
19
|
+
return fs.readdirSync(dirPath).filter((f) => {
|
|
20
|
+
return fs.statSync(path.join(dirPath, f)).isDirectory();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function touchGitkeep(dirPath) {
|
|
24
|
+
ensureDir(dirPath);
|
|
25
|
+
writeFile(path.join(dirPath, '.gitkeep'), '');
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/lib/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,OAAe;IACzD,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClC,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAe;IACtC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,OAAO,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1C,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type EntityType = 'TASK' | 'WORKFLOW';
|
|
2
|
+
/**
|
|
3
|
+
* Scans the project-memory folder and returns the next sequential ID.
|
|
4
|
+
* e.g. if TASK-001 and TASK-002 exist, returns "TASK-003"
|
|
5
|
+
*/
|
|
6
|
+
export declare function nextId(rootDir: string, type: EntityType): string;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAGA,KAAK,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAahE"}
|
package/dist/lib/ids.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { listDirs } from './fs.js';
|
|
3
|
+
/**
|
|
4
|
+
* Scans the project-memory folder and returns the next sequential ID.
|
|
5
|
+
* e.g. if TASK-001 and TASK-002 exist, returns "TASK-003"
|
|
6
|
+
*/
|
|
7
|
+
export function nextId(rootDir, type) {
|
|
8
|
+
const subfolder = type === 'TASK' ? 'tasks' : 'workflows';
|
|
9
|
+
const dirPath = path.join(rootDir, 'project-memory', subfolder);
|
|
10
|
+
const prefix = type === 'TASK' ? 'TASK-' : 'WORKFLOW-';
|
|
11
|
+
const existing = listDirs(dirPath)
|
|
12
|
+
.filter((d) => d.startsWith(prefix))
|
|
13
|
+
.map((d) => parseInt(d.replace(prefix, ''), 10))
|
|
14
|
+
.filter((n) => !isNaN(n));
|
|
15
|
+
const max = existing.length > 0 ? Math.max(...existing) : 0;
|
|
16
|
+
const next = max + 1;
|
|
17
|
+
return `${prefix}${String(next).padStart(3, '0')}`;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAInC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAe,EAAE,IAAgB;IACtD,MAAM,SAAS,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IAEvD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC;SAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;SACnC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;SAC/C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;IACrB,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DetectionResult } from './detector.js';
|
|
2
|
+
export interface ScaffoldItem {
|
|
3
|
+
/** Path relative to cwd. */
|
|
4
|
+
path: string;
|
|
5
|
+
/** Template key to render. */
|
|
6
|
+
template: string;
|
|
7
|
+
/** Human-readable description for plan output. */
|
|
8
|
+
description: string;
|
|
9
|
+
/** True if this is a dynamic addition (shown separately in plan output). */
|
|
10
|
+
dynamic: boolean;
|
|
11
|
+
/** True if optional (e.g. AI.md in existing project flow). */
|
|
12
|
+
optional?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ScaffoldPlan {
|
|
15
|
+
projectName: string;
|
|
16
|
+
isExisting: boolean;
|
|
17
|
+
detectedType: string;
|
|
18
|
+
signals: string[];
|
|
19
|
+
base: ScaffoldItem[];
|
|
20
|
+
dynamic: ScaffoldItem[];
|
|
21
|
+
}
|
|
22
|
+
export declare function plan(detection: DetectionResult): ScaffoldPlan;
|
|
23
|
+
//# sourceMappingURL=planner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../src/lib/planner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQhD,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AA4BD,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,YAAY,CAyB7D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BASE_LAYER, DYNAMIC_RULES } from './rules.js';
|
|
2
|
+
// ── Trigger evaluation ────────────────────────────────────────────────────────
|
|
3
|
+
function triggerFires(trigger, detection) {
|
|
4
|
+
switch (trigger) {
|
|
5
|
+
case 'newProject':
|
|
6
|
+
return !detection.isExisting;
|
|
7
|
+
case 'newProjectOrWebApp':
|
|
8
|
+
return !detection.isExisting || detection.type === 'web-app';
|
|
9
|
+
case 'existingProject':
|
|
10
|
+
return detection.isExisting;
|
|
11
|
+
case 'existingWithMaturity':
|
|
12
|
+
return detection.isExisting && detection.maturitySignals.length > 0;
|
|
13
|
+
case 'dockerOrMultiManifest':
|
|
14
|
+
return detection.hasDocker || detection.hasMultipleManifests;
|
|
15
|
+
default:
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// ── Main planner ──────────────────────────────────────────────────────────────
|
|
20
|
+
export function plan(detection) {
|
|
21
|
+
const base = BASE_LAYER.map(item => ({
|
|
22
|
+
path: item.path,
|
|
23
|
+
template: item.template,
|
|
24
|
+
description: item.description,
|
|
25
|
+
dynamic: false,
|
|
26
|
+
}));
|
|
27
|
+
const dynamic = DYNAMIC_RULES
|
|
28
|
+
.filter(rule => triggerFires(rule.trigger, detection))
|
|
29
|
+
.map(rule => ({
|
|
30
|
+
path: rule.path,
|
|
31
|
+
template: rule.template,
|
|
32
|
+
description: rule.description,
|
|
33
|
+
dynamic: true,
|
|
34
|
+
}));
|
|
35
|
+
return {
|
|
36
|
+
projectName: detection.projectName,
|
|
37
|
+
isExisting: detection.isExisting,
|
|
38
|
+
detectedType: detection.type,
|
|
39
|
+
signals: detection.signals,
|
|
40
|
+
base,
|
|
41
|
+
dynamic,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=planner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner.js","sourceRoot":"","sources":["../../src/lib/planner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAkB,MAAM,YAAY,CAAC;AA6BvE,iFAAiF;AAEjF,SAAS,YAAY,CAAC,OAAuB,EAAE,SAA0B;IACvE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,YAAY;YACf,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;QAE/B,KAAK,oBAAoB;YACvB,OAAO,CAAC,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC;QAE/D,KAAK,iBAAiB;YACpB,OAAO,SAAS,CAAC,UAAU,CAAC;QAE9B,KAAK,sBAAsB;YACzB,OAAO,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;QAEtE,KAAK,uBAAuB;YAC1B,OAAO,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,oBAAoB,CAAC;QAE/D;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,iFAAiF;AAEjF,MAAM,UAAU,IAAI,CAAC,SAA0B;IAC7C,MAAM,IAAI,GAAmB,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnD,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,KAAK;KACf,CAAC,CAAC,CAAC;IAEJ,MAAM,OAAO,GAAmB,aAAa;SAC1C,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;SACrD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI;KACd,CAAC,CAAC,CAAC;IAEN,OAAO;QACL,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,YAAY,EAAE,SAAS,CAAC,IAAI;QAC5B,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type DynamicTrigger = 'newProject' | 'newProjectOrWebApp' | 'existingProject' | 'existingWithMaturity' | 'dockerOrMultiManifest';
|
|
2
|
+
export interface BaseItem {
|
|
3
|
+
/** Path relative to cwd. Use forward slashes. */
|
|
4
|
+
path: string;
|
|
5
|
+
/** Key into the templates map. */
|
|
6
|
+
template: string;
|
|
7
|
+
/** Human-readable description shown in plan output. */
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DynamicRule {
|
|
11
|
+
path: string;
|
|
12
|
+
template: string;
|
|
13
|
+
description: string;
|
|
14
|
+
trigger: DynamicTrigger;
|
|
15
|
+
}
|
|
16
|
+
export declare const BASE_LAYER: BaseItem[];
|
|
17
|
+
export declare const DYNAMIC_RULES: DynamicRule[];
|
|
18
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/lib/rules.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,oBAAoB,GACpB,iBAAiB,GACjB,sBAAsB,GACtB,uBAAuB,CAAC;AAE5B,MAAM,WAAW,QAAQ;IACvB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;CACzB;AAMD,eAAO,MAAM,UAAU,EAAE,QAAQ,EAyChC,CAAC;AAKF,eAAO,MAAM,aAAa,EAAE,WAAW,EA2CtC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// ─── Rules: Base Layer + Dynamic Expansion ───────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// This file is the single source of truth for what project-memory scaffolds.
|
|
4
|
+
// Every scaffold decision derives from these constants.
|
|
5
|
+
// Do not add items here without a corresponding spec entry.
|
|
6
|
+
// ── Base layer ────────────────────────────────────────────────────────────────
|
|
7
|
+
// Always scaffolded. No rule can remove these.
|
|
8
|
+
// AI.md is handled separately in init (new=always, existing=prompt).
|
|
9
|
+
export const BASE_LAYER = [
|
|
10
|
+
{
|
|
11
|
+
path: 'project-memory/README.md',
|
|
12
|
+
template: 'frameworkReadme',
|
|
13
|
+
description: 'framework entrypoint and read order',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
path: 'project-memory/project/overview.md',
|
|
17
|
+
template: 'projectOverview',
|
|
18
|
+
description: 'project identity and goal',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
path: 'project-memory/project/architecture.md',
|
|
22
|
+
template: 'projectArchitecture',
|
|
23
|
+
description: 'system design and tech stack',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
path: 'project-memory/context/decisions.md',
|
|
27
|
+
template: 'contextDecisions',
|
|
28
|
+
description: 'key decisions log',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: 'project-memory/tasks/active.md',
|
|
32
|
+
template: 'tasksActive',
|
|
33
|
+
description: 'master task tracker',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
path: 'project-memory/tools/global-tools.md',
|
|
37
|
+
template: 'globalTools',
|
|
38
|
+
description: 'environment setup and global commands',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: 'project-memory/data/.gitkeep',
|
|
42
|
+
template: 'gitkeep',
|
|
43
|
+
description: 'shared data assets folder',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: 'project-memory/workflows/.gitkeep',
|
|
47
|
+
template: 'gitkeep',
|
|
48
|
+
description: 'workflows folder',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
// ── Dynamic expansion layer ───────────────────────────────────────────────────
|
|
52
|
+
// Added only when trigger condition is met. Never added speculatively.
|
|
53
|
+
export const DYNAMIC_RULES = [
|
|
54
|
+
{
|
|
55
|
+
path: 'project-memory/project/brief.md',
|
|
56
|
+
template: 'projectBrief',
|
|
57
|
+
description: 'what and why — project brief',
|
|
58
|
+
trigger: 'newProjectOrWebApp',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: 'project-memory/project/plan.md',
|
|
62
|
+
template: 'projectPlan',
|
|
63
|
+
description: 'how and when — high-level roadmap',
|
|
64
|
+
trigger: 'newProject',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: 'project-memory/context/current-state.md',
|
|
68
|
+
template: 'contextCurrentState',
|
|
69
|
+
description: 'current operational state',
|
|
70
|
+
trigger: 'existingWithMaturity',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: 'project-memory/context/constraints.md',
|
|
74
|
+
template: 'contextConstraints',
|
|
75
|
+
description: 'technical and business constraints',
|
|
76
|
+
trigger: 'existingProject',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: 'project-memory/context/dependencies.md',
|
|
80
|
+
template: 'contextDependencies',
|
|
81
|
+
description: 'external services and integrations',
|
|
82
|
+
trigger: 'dockerOrMultiManifest',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: 'project-memory/tasks/completed.md',
|
|
86
|
+
template: 'tasksCompleted',
|
|
87
|
+
description: 'completed tasks log',
|
|
88
|
+
trigger: 'existingProject',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: 'project-memory/tasks/archive/.gitkeep',
|
|
92
|
+
template: 'gitkeep',
|
|
93
|
+
description: 'task archive folder',
|
|
94
|
+
trigger: 'existingWithMaturity',
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/lib/rules.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,EAAE;AACF,6EAA6E;AAC7E,wDAAwD;AACxD,4DAA4D;AAyB5D,iFAAiF;AACjF,+CAA+C;AAC/C,qEAAqE;AAErE,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC;QACE,IAAI,EAAE,0BAA0B;QAChC,QAAQ,EAAE,iBAAiB;QAC3B,WAAW,EAAE,qCAAqC;KACnD;IACD;QACE,IAAI,EAAE,oCAAoC;QAC1C,QAAQ,EAAE,iBAAiB;QAC3B,WAAW,EAAE,2BAA2B;KACzC;IACD;QACE,IAAI,EAAE,wCAAwC;QAC9C,QAAQ,EAAE,qBAAqB;QAC/B,WAAW,EAAE,8BAA8B;KAC5C;IACD;QACE,IAAI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,EAAE,uCAAuC;QAC7C,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,sBAAsB;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const gitkeep: () => string;
|
|
2
|
+
export declare const aiMd: () => string;
|
|
3
|
+
export declare const frameworkReadme: (projectName: string) => string;
|
|
4
|
+
export declare const projectOverview: (projectName: string) => string;
|
|
5
|
+
export declare const projectArchitecture: () => string;
|
|
6
|
+
export declare const projectBrief: () => string;
|
|
7
|
+
export declare const projectPlan: () => string;
|
|
8
|
+
export declare const contextDecisions: () => string;
|
|
9
|
+
export declare const contextCurrentState: () => string;
|
|
10
|
+
export declare const contextConstraints: () => string;
|
|
11
|
+
export declare const contextDependencies: () => string;
|
|
12
|
+
export declare const tasksActive: () => string;
|
|
13
|
+
export declare const tasksCompleted: () => string;
|
|
14
|
+
export declare const globalTools: (projectName: string) => string;
|
|
15
|
+
export declare const taskInstructions: (id: string, title: string) => string;
|
|
16
|
+
export declare const taskContext: (id: string) => string;
|
|
17
|
+
export declare const taskOutput: (id: string) => string;
|
|
18
|
+
export declare const taskTools: (id: string) => string;
|
|
19
|
+
export declare const workflowOverview: (id: string, title: string) => string;
|
|
20
|
+
export type TemplateKey = 'gitkeep' | 'aiMd' | 'frameworkReadme' | 'projectOverview' | 'projectArchitecture' | 'projectBrief' | 'projectPlan' | 'contextDecisions' | 'contextCurrentState' | 'contextConstraints' | 'contextDependencies' | 'tasksActive' | 'tasksCompleted' | 'globalTools';
|
|
21
|
+
export declare function renderTemplate(key: TemplateKey, context?: {
|
|
22
|
+
name?: string;
|
|
23
|
+
}): string;
|
|
24
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,OAAO,QAAO,MAAY,CAAC;AAIxC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