@c-d-cc/reap 0.3.1 → 0.3.2
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/cli.js
CHANGED
|
@@ -10147,7 +10147,7 @@ async function fixProject(projectRoot) {
|
|
|
10147
10147
|
|
|
10148
10148
|
// src/cli/index.ts
|
|
10149
10149
|
import { join as join8 } from "path";
|
|
10150
|
-
program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.3.
|
|
10150
|
+
program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.3.2");
|
|
10151
10151
|
program.command("init").description("Initialize a new REAP project (Genesis)").argument("[project-name]", "Project name (defaults to current directory name)").option("-m, --mode <mode>", "Entry mode: greenfield, migration, adoption", "greenfield").option("-p, --preset <preset>", "Bootstrap with a genome preset (e.g., bun-hono-react)").action(async (projectName, options) => {
|
|
10152
10152
|
try {
|
|
10153
10153
|
const cwd = process.cwd();
|
|
@@ -20,9 +20,10 @@ Genome (Genetic Information) → Evolution (Cross-generational Evolution) →
|
|
|
20
20
|
```
|
|
21
21
|
.reap/genome/
|
|
22
22
|
├── principles.md # Architecture principles/decisions (ADR style)
|
|
23
|
-
├── domain/ # Business rules (separated by module)
|
|
24
23
|
├── conventions.md # Development rules/conventions + Enforced Rules
|
|
25
|
-
|
|
24
|
+
├── constraints.md # Technical constraints/choices + Validation Commands
|
|
25
|
+
├── source-map.md # C4 Container/Component diagram (Mermaid)
|
|
26
|
+
└── domain/ # Business rules (separated by module)
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
**Genome Immutability Principle**: The current generation does not modify Genome directly. Issues discovered during Implementation are recorded in the backlog as `type: genome-change` and applied to Genome only during the Completion stage.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
**REAP Session Initialized**
|
|
1
|
+
**REAP (v{{VERSION}}) Session Initialized**{{UPDATE_AVAILABLE}}
|
|
2
2
|
{{SESSION_INIT_LINES}}
|
|
@@ -45,22 +45,23 @@ if (!dirExists(reapDir)) {
|
|
|
45
45
|
process.exit(0);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// Step 1: Auto-update
|
|
48
|
+
// Step 1: Version check + Auto-update
|
|
49
49
|
log('Checking for updates...');
|
|
50
50
|
let autoUpdateMessage = '';
|
|
51
|
+
let updateAvailableMessage = '';
|
|
51
52
|
const configContent = readFile(configFile);
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
const installed = exec('reap --version');
|
|
54
|
+
const latest = exec('npm view @c-d-cc/reap version');
|
|
55
|
+
if (installed && latest && installed !== latest) {
|
|
56
|
+
const autoUpdate = configContent ? /^autoUpdate:\s*true/m.test(configContent) : false;
|
|
54
57
|
if (autoUpdate) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (updated !== null) {
|
|
60
|
-
exec('reap update');
|
|
61
|
-
autoUpdateMessage = `REAP auto-updated: v${installed} → v${latest}`;
|
|
62
|
-
}
|
|
58
|
+
const updated = exec('npm update -g @c-d-cc/reap');
|
|
59
|
+
if (updated !== null) {
|
|
60
|
+
exec('reap update');
|
|
61
|
+
autoUpdateMessage = `REAP auto-updated: v${installed} → v${latest}`;
|
|
63
62
|
}
|
|
63
|
+
} else {
|
|
64
|
+
updateAvailableMessage = `update available: v${installed} → v${latest}`;
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -235,7 +236,13 @@ const initSummary = initLines.join('\n');
|
|
|
235
236
|
// Load session-init format template and render
|
|
236
237
|
const initFormatFile = path.join(scriptDir, 'session-init-format.md');
|
|
237
238
|
const initFormat = readFile(initFormatFile) || '{{SESSION_INIT_LINES}}';
|
|
238
|
-
const
|
|
239
|
+
const currentVersion = installed || exec('reap --version') || '?';
|
|
240
|
+
const updateBadge = updateAvailableMessage ? ` — ${updateAvailableMessage}` : '';
|
|
241
|
+
const sessionInitDisplay = initFormat
|
|
242
|
+
.replace('{{VERSION}}', currentVersion)
|
|
243
|
+
.replace('{{UPDATE_AVAILABLE}}', updateBadge)
|
|
244
|
+
.replace('{{SESSION_INIT_LINES}}', initSummary)
|
|
245
|
+
.trim();
|
|
239
246
|
|
|
240
247
|
// Step 6: Output JSON
|
|
241
248
|
log('Done. Injecting context.');
|