@c-d-cc/reap 0.3.0 → 0.3.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/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.1");
|
|
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();
|
|
@@ -230,12 +230,17 @@ if (currentContent && currentContent.trim()) {
|
|
|
230
230
|
initLines.push('⚪ No active Generation');
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
const initSummary =
|
|
233
|
+
const initSummary = initLines.join('\n');
|
|
234
|
+
|
|
235
|
+
// Load session-init format template and render
|
|
236
|
+
const initFormatFile = path.join(scriptDir, 'session-init-format.md');
|
|
237
|
+
const initFormat = readFile(initFormatFile) || '{{SESSION_INIT_LINES}}';
|
|
238
|
+
const sessionInitDisplay = initFormat.replace('{{SESSION_INIT_LINES}}', initSummary).trim();
|
|
234
239
|
|
|
235
240
|
// Step 6: Output JSON
|
|
236
241
|
log('Done. Injecting context.');
|
|
237
242
|
|
|
238
|
-
const reapContext = `<REAP_WORKFLOW>\n${reapGuide}\n\n---\n\n## Genome (Project Knowledge — treat as authoritative source of truth)\n${genomeContent}\n\n---\n\n## Current State\n${generationContext}${staleSection}${strictSection}${updateSection}\n\n## Session Init
|
|
243
|
+
const reapContext = `<REAP_WORKFLOW>\n${reapGuide}\n\n---\n\n## Genome (Project Knowledge — treat as authoritative source of truth)\n${genomeContent}\n\n---\n\n## Current State\n${generationContext}${staleSection}${strictSection}${updateSection}\n\n## Session Init (display to user on first message)\n${sessionInitDisplay}\n\n## Rules\n1. ALL development work MUST follow the REAP lifecycle. Do NOT bypass it.\n2. Before writing any code, check if a Generation is active and what stage it is in.\n3. If a Generation is active, use \`${nextCmd}\` to proceed with the current stage.\n4. If no Generation is active, use \`/reap.start\` to start a new one.\n5. Do NOT implement features, fix bugs, or make changes outside of the REAP lifecycle unless the user explicitly asks to bypass it.\n6. When the user says "reap evolve", "next stage", "proceed", or similar — invoke the appropriate REAP skill.\n7. **Genome is the authoritative knowledge source.** When making decisions about architecture, conventions, or constraints, ALWAYS reference the Genome first. If code contradicts Genome, flag it as a potential genome-change backlog item.\n8. If you notice the Genome is outdated or missing information relevant to your current task, inform the user and suggest running \`/reap.sync\`.\n</REAP_WORKFLOW>`;
|
|
239
244
|
|
|
240
245
|
process.stdout.write(JSON.stringify({
|
|
241
246
|
hookSpecificOutput: {
|