hool-cli 0.1.2 → 0.2.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.
@@ -20,12 +20,13 @@ All other agents are internal — dispatched by the Product Lead as subagents.
20
20
 
21
21
  ## Quick Start
22
22
 
23
- You are the Product Lead. On every invocation:
23
+ You are the Product Lead. On every invocation — **before answering any question**:
24
24
  1. Read \`.hool/prompts/orchestrator.md\` — your full process and rules
25
25
  2. Read \`operations/current-phase.md\` to know where you are
26
26
  3. Read \`operations/task-board.md\` to know what's in flight
27
27
  4. Read your memory files (\`memory/product-lead/hot.md\`, \`best-practices.md\`, \`issues.md\`)
28
- 5. Continue from where you left off (see Autonomous Execution Loop in orchestrator.md)
28
+ 5. **If there are pending tasks**: Tell the user what's pending and ask if you should proceed, or if they have something else in mind. Do NOT silently wait for explicit instructions — you are the driver, not a passenger.
29
+ 6. Continue from where you left off (see Autonomous Execution Loop in orchestrator.md)
29
30
 
30
31
  ## How to Dispatch Subagents
31
32
 
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/adapters/claude-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,MAAM,sBAAsB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;AAEtF,SAAS,aAAa,CAAC,WAAmB;IACxC,MAAM,IAAI,GAAG,CAAC,8HAA8H,CAAC,CAAC;IAC9I,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACnE,IAAI,CAAC,IAAI,CAAC,+FAA+F,CAAC,CAAC;IAC7G,CAAC;IACD,IAAI,WAAW,KAAK,gBAAgB,EAAE,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,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;YAC/D,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;QACnC,MAAM,EAAE,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAe;QAClC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,OAAO,IAAI,MAAM,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,oBAAoB,CAAC,MAAqB;QACxC,OAAO;YACL,EAAE;YACF,mBAAmB;YACnB,cAAc;YACd,wEAAwE;YACxE,EAAE;YACF,8CAA8C;YAC9C,mBAAmB;SACpB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;CACF"}
@@ -12,7 +12,8 @@ This project uses the HOOL framework. You are the Product Lead — the sole user
12
12
  1. Read \`operations/current-phase.md\` to know where you are
13
13
  2. Read \`operations/task-board.md\` to know what's in flight
14
14
  3. Read your memory: \`memory/product-lead/hot.md\`, \`best-practices.md\`, \`issues.md\`
15
- 4. Follow the full process in \`.hool/prompts/orchestrator.md\`
15
+ 4. **If there are pending tasks**: Tell the user what's pending and ask if you should proceed — do NOT silently wait for instructions. You are the driver, not a passenger.
16
+ 5. Follow the full process in \`.hool/prompts/orchest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,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;YAC/D,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,eAAe;QACjB,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,UAAU;YAAE,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;QAC/C,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;QAC9C,MAAM,EAAE,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAe;QAClC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,oBAAoB,CAAC,MAAqB;QACxC,OAAO;YACL,EAAE;YACF,mBAAmB;YACnB,oCAAoC;YACpC,2DAA2D;YAC3D,2FAA2F;SAC5F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
1
  import type { ProjectType, ExecutionMode } from '../adapters/types.js';
2
2
  export declare function scaffoldProject(projectDir: string, projectType: ProjectType, mode?: ExecutionMode): Promise<void>;
3
3
  export declare function scaffoldOnboard(projectDir: string, projectType: ProjectType, mode?: ExecutionMode): Promise<void>;
4
+ export declare function reonboard(projectDir: string, mode?: ExecutionMode): Promise<void>;
4
5
  export declare function copyPrompts(projectDir: string, promptsSourceDir: string): Promise<void>;
5
6
  export declare function writeMcpManifest(projectDir: string, projectType: ProjectType, requiredMcps: string[]): Promise<void>;
6
7
  export declare function writeAgentManifest(projectDir: string): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
- import { getOperationTemplates, getOnboardOperationTemplates, getMemoryHeaders } from './templates.js';
3
+ import { getOperationTemplates, getOnboardOperationTemplates, getOnboardCurrentPhase, getOnboardTasksPrepend, getMemoryHeaders } from './templates.js';
4
4
  import { MCP_REGISTRY } from '../mcps/registry.js';
5
5
  const AGENTS = [
6
6
  'product-lead',
@@ -10,6 +10,7 @@ const AGENTS = [
10
10
  'be-dev',
11
11
  'qa',
12
12
  'forensic',
13
+ 'governor',
13
14
  ];
14
15
  const PHASE_DIRS = [
15
16
  'phases/00-init',
@@ -47,6 +48,8 @@ export async function scaffoldProject(projectDir, projectType, mode = 'interacti
47
48
  await fs.writeFile(path.join(projectDir, 'phases/00-init/project-profile.md'), `# Project Profile\n\n- **Type**: ${projectType}\n- **Mode**: ${mode}\n- **Created**: ${new Date().toISOString().split('T')[0]}\n`, 'utf-8');
48
49
  // Create operations directory with templates
49
50
  await fs.mkdir(path.join(projectDir, 'operations'), { recursive: true });
51
+ await fs.mkdir(path.join(projectDir, 'operations/context'), { recursive: true });
52
+ await fs.mkdir(path.join(projectDir, 'operations/dispatch'), { recursive: true });
50
53
  const opTemplates = getOperationTemplates(mode);
51
54
  for (const [filename, content] of Object.entries(opTemplates)) {
52
55
  await fs.writeFile(path.join(projectDir, 'operations', filename), content, 'utf-8');
@@ -78,6 +81,8 @@ export async function scaffoldOnboard(projectDir, projectType, mode = 'interacti
78
81
  await fs.writeFile(path.join(projectDir, 'phases/00-init/project-profile.md'), `# Project Profile\n\n- **Type**: ${projectType}\n- **Mode**: ${mode}\n- **Origin**: onboarded (existing codebase)\n- **Created**: ${new Date().toISOString().split('T')[0]}\n`, 'utf-8');
79
82
  // Create operations directory with onboard-specific templates
80
83
  await fs.mkdir(path.join(projectDir, 'operations'), { recursive: true });
84
+ await fs.mkdir(path.join(projectDir, 'operations/context'), { recursive: true });
85
+ await fs.mkdir(path.join(projectDir, 'operations/dispatch'), { recursive: true });
81
86
  const opTemplates = getOnboardOperationTemplates(mode);
82
87
  for (const [filename, content] of Object.entries(opTemplates)) {
83
88
  await fs.writeFile(path.join(projectDir, 'operations', filename), content, 'utf-8');
@@ -94,6 +99,23 @@ export async function scaffoldOnboard(projectDir, projectType, mode = 'interacti
94
99
  // Create .hool directory
95
100
  await fs.mkdir(path.join(projectDir, '.hool/prompts'), { recursive: true });
96
101
  }
102
+ export async function reonboard(projectDir, mode = 'interactive') {
103
+ // Only overwrite current-phase.md and prepend onboard tasks to task-board.md
104
+ const opsDir = path.join(projectDir, 'operations');
105
+ // Flip phase to onboarding
106
+ await fs.writeFile(path.join(opsDir, 'current-phase.md'), getOnboardCurrentPhase(mode), 'utf-8');
107
+ // Prepend onboard tasks to existing task board
108
+ const taskBoardPath = path.join(opsDir, 'task-board.md');
109
+ let existing = '';
110
+ try {
111
+ existing = await fs.readFile(taskBoardPath, 'utf-8');
112
+ }
113
+ catch { /* no task board yet */ }
114
+ const prepend = getOnboardTasksPrepend();
115
+ const header = '# Task Board\n\n';
116
+ const body = existing.startsWith('# Task Board') ? existing.replace(/^# Task Board\n*/, '') : existing;
117
+ await fs.writeFile(taskBoardPath, header + prepend + body, 'utf-8');
118
+ }
97
119
  export async function copyPrompts(projectDir, promptsSourceDir) {
98
120
  const hoolPromptsDir = path.join(projectDir, '.hool/prompts');
99
121
  async function copyDir(src, dest) {
@@ -177,6 +199,13 @@ const AGENT_MANIFEST = [
177
199
  memory: 'memory/forensic/',
178
200
  phases: [11],
179
201
  },
202
+ {
203
+ name: 'governor',
204
+ role: 'Behavioral auditor, rule enforcement, corrective feedback',
205
+ prompt: '.hool/prompts/agents/governor.md',
206
+ memory: 'memory/governor/',
207
+ phases: 'continuous',
208
+ },
180
209
  ];
181
210
  export async function writeAgentManifest(projectDir) {
182
211
  await fs.writeFile(path.join(projectDir, '.hool/agents.json'), JSON.stringify(AGENT_MANIFEST, null, 2) + '\n', 'utf-8');
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../src/core/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,GAAG;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,UAAU;CACF,CAAC;AAEX,MAAM,UAAU,GAAG;IACjB,gBAAgB;IAChB,sBAAsB;IACtB,yBAAyB;IACzB,wBAAwB;IACxB,wBAAwB;IACxB,kCAAkC;IAClC,8BAA8B;IAC9B,2BAA2B;IAC3B,2BAA2B;IAC3B,6BAA6B;IAC7B,gCAAgC;IAChC,2BAA2B;CAC5B,CAAC;AAEF,MAAM,WAAW,GAAkC;IACjD,SAAS,EAAE,EAAE;IACb,cAAc,EAAE,CAAC,uBAAuB,CAAC;IACzC,gBAAgB,EAAE,EAAE;IACpB,WAAW,EAAE,CAAC,uBAAuB,CAAC;IACtC,UAAU,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;IACzD,UAAU,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;IACzD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,UAAkB,EAAE,WAAwB,EAAE,OAAsB,aAAa;IACrH,MAAM,IAAI,GAAG,WAAW,CAA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,kBAAkB;QAC1B,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,UAAkB;IACzD,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAC1C,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAC9C,OAAO,CACR,CAAC;AACJ,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export declare function getOperationTemplates(mode?: string): Record<string, string>;
2
2
  export declare function getOnboardOperationTemplates(mode?: string): Record<string, string>;
3
+ export declare function getOnboardCurrentPhase(mode?: string): string;
4
+ export declare function getOnboardTasksPrepend(): string;
3
5
  export declare function getMemoryHeaders(): Record<string, string>;
@@ -6,6 +6,9 @@ export function getOperationTemplates(mode = 'interactive') {
6
6
  'issues.md': `# Issues\n\n_No issues logged yet._\n`,
7
7
  'inconsistencies.md': `# Inconsistencies\n\n_No inconsistencies found yet._\n`,
8
8
  'needs-human-review.md': `# Needs Human Review\n\n_Nothing pending human review._\n`,
9
+ 'client-preferences.md': `# Client Preferences\n\nUser tech and product preferences captured during the project. Every agent honours these.\n\n## Tech Preferences\n_None yet._\n\n## Product Constraints\n_None yet._\n\n## Integrations\n_None yet._\n`,
10
+ 'governor-rules.md': `# Governor Rules\n\nHard rules enforced by the Governor agent. Agents self-enforce; Governor audits.\n\n## Critical (must never happen even once)\n- [CRITICAL] No agent may modify its own prompt files (.hool/prompts/)\n- [CRITICAL] Product Lead must NEVER edit application code (src/, tests/) directly — always dispatch\n- [CRITICAL] No agent may remove or overwrite entries in governor-rules.md\n\n## High\n- [HIGH] All agents must load operations/client-preferences.md and honour user preferences\n- [HIGH] Product Lead must write a dispatch brief to operations/context/ before dispatching any agent\n- [HIGH] No task is too small for agent dispatch — even one-line changes go through the assigned agent\n\n## Medium\n- [MEDIUM] Agents must review best-practices.md and governor-feedback.md before submitting work\n- [MEDIUM] All file edits must be within the agent's declared writable paths\n`,
11
+ 'governor-log.md': `# Governor Log\n\n_No audits yet._\n`,
9
12
  };
10
13
  }
11
14
  export function getOnboardOperationTemplates(mode = 'interactive') {
@@ -55,14 +58,47 @@ _No inconsistencies found yet. Onboarding will populate this._
55
58
 
56
59
  _Onboarding will add the inferred spec here for review._
57
60
  `,
61
+ 'client-preferences.md': `# Client Preferences\n\nUser tech and product preferences captured during the project. Every agent honours these.\n\n## Tech Preferences\n_None yet._\n\n## Product Constraints\n_None yet._\n\n## Integrations\n_None yet._\n`,
62
+ 'governor-rules.md': `# Governor Rules\n\nHard rules enforced by the Governor agent. Agents self-enforce; Governor audits.\n\n## Critical (must never happen even once)\n- [CRITICAL] No agent may modify its own prompt files (.hool/prompts/)\n- [CRITICAL] Product Lead must NEVER edit application code (src/, tests/) directly — always dispatch\n- [CRITICAL] No agent may remove or overwrite entries in governor-rules.md\n\n## High\n- [HIGH] All agents must load operations/client-preferences.md and honour user preferences\n- [HIGH] Product Lead must write a dispatch brief to operations/context/ before dispatching any agent\n- [HIGH] No task is too small for agent dispatch — even one-line changes go through the assigned agent\n\n## Medium\n- [MEDIUM] Agents must review best-practices.md and governor-feedback.md before submitting work\n- [MEDIUM] All file edits must be within the agent's declared writable paths\n`,
63
+ 'governor-log.md': `# Governor Log\n\n_No audits yet._\n`,
58
64
  };
59
65
  }
66
+ export function getOnboardCurrentPhase(mode = 'interactive') {
67
+ return `# Current Phase
68
+
69
+ - **Mode**: ${mode}
70
+ - **Phase**: onboarding
71
+ - **Status**: awaiting-analysis
72
+
73
+ Onboarding an existing project. The Product Lead will:
74
+ 1. Scan the project and generate a project profile
75
+ 2. Extract architecture, contracts, schema from existing code
76
+ 3. Infer a spec from observed behavior (needs human review)
77
+ 4. Run gap analysis and surface issues
78
+ 5. Seed agent memory with findings
79
+ 6. Present a summary for human review
80
+
81
+ After onboarding completes and human reviews, phase transitions to **standby**.
82
+ `;
83
+ }
84
+ export function getOnboardTasksPrepend() {
85
+ return `## Re-onboard Tasks
86
+ - [ ] ONBOARD-001: Project discovery — scan codebase, identify stack
87
+ - [ ] ONBOARD-002: Architecture extraction — reverse-engineer architecture docs
88
+ - [ ] ONBOARD-003: Spec inference — infer product spec from code behavior
89
+ - [ ] ONBOARD-004: Gap analysis — surface issues, tech debt, inconsistencies
90
+ - [ ] ONBOARD-005: Seed agent memory — route findings to agent memory files
91
+ - [ ] ONBOARD-006: Human review gate — present summary for review
92
+
93
+ `;
94
+ }
60
95
  export function getMemoryHeaders() {
61
96
  return {
62
97
  'hot.md': `## Compact\n_No history yet._\n\n## Summary\n_No history yet._\n\n## Recent\n_No history yet._\n`,
63
98
  'cold.md': `# Cold Log\n\n`,
64
99
  'best-practices.md': `# Best Practices\n\n_No patterns or gotchas logged yet._\n`,
65
100
  'issues.md': `# Personal Issues Log\n\n_No issues logged yet._\n`,
101
+ 'governor-feedback.md': `# Governor Feedback\n\n_No feedback yet._\n`,
66
102
  };
67
103
  }
68
104
  //# sourceMappingURL=templates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/core/templates.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,OAAe,aAAa;IAChE,OAAO;QACL,kBAAkB,EAAE,kCAAkC,IAAI,sDAAsD;QAEhH,eAAe,EAAE,mFAAmF;QAEpG,SAAS,EAAE,4CAA4C;QAEvD,WAAW,EAAE,uCAAuC;QAEpD,oBAAoB,EAAE,wDAAwD;QAE9E,uBAAuB,EAAE,2DAA2D;KACrF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,OAAe,aAAa;IACvE,OAAO;QACL,kBAAkB,EAAE;;cAEV,IAAI;;;;;;;;;;;;;CAajB;QAEG,eAAe,EAAE;;;;;;;;;;;;CAYpB;QAEG,SAAS,EAAE;;;CAGd;QAEG,WAAW,EAAE;;;CAGhB;QAEG,oBAAoB,EAAE;;;CAGzB;QAEG,uBA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B,OAAO;QACL,QAAQ,EAAE,kGAAkG;QAE5G,SAAS,EAAE,gBAAgB;QAE3B,mBAAmB,EAAE,4DAA4D;QAEjF,WAAW,EAAE,oDAAoD;QAEjE,sBAAsB,EAAE,6CAA6C;KACtE,CAAC;AACJ,CAAC"}
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import chalk from 'chalk';
5
5
  import path from 'path';
6
6
  import fs from 'fs/promises';
7
7
  import { fileURLToPath } from 'url';
8
- import { scaffoldProject, scaffoldOnboard, copyPrompts, writeMcpManifest, writeAgentManifest } from './core/scaffold.js';
8
+ import { scaffoldProject, scaffoldOnboard, reonboard, copyPrompts, writeMcpManifest, writeAgentManifest } from './core/scaffold.js';
9
9
  import { createAdapter } from './adapters/index.js';
10
10
  import { checkAndInstallMcps } from './mcps/installer.js';
11
11
  import { getRequiredMcpNames } from './mcps/registry.js';
@@ -30,7 +30,7 @@ const program = new Command();
30
30
  program
31
31
  .name('hool')
32
32
  .description('Agent-Driven SDLC — scaffold and configure HOOL for any project')
33
- .version('0.1.2');
33
+ .version('0.2.0');
34
34
  // ── hool init ──────────────────────────────────────────────
35
35
  program
36
36
  .command('init')
@@ -140,125 +140,155 @@ program
140
140
  .action(async (opts) => {
141
141
  const projectDir = path.resolve(opts.dir);
142
142
  console.log(chalk.bold('\n HOOL — Onboard Existing Project\n'));
143
- // Check if already a HOOL project
143
+ // Check if already a HOOL project — re-onboard is a lightweight path
144
+ let isReonboard = false;
144
145
  try {
145
146
  await fs.access(path.join(projectDir, '.hool'));
146
- console.log(chalk.red(' This directory already has a .hool/ folder. Use `hool init` for new projects or `hool reset` to start fresh.\n'));
147
- return;
147
+ isReonboard = true;
148
+ console.log(chalk.yellow(' Existing HOOL project detected.'));
149
+ const proceed = await confirm({
150
+ message: 'Re-onboard? (only current-phase and task-board will be updated, everything else preserved)',
151
+ default: true,
152
+ });
153
+ if (!proceed) {
154
+ console.log(chalk.dim(' Cancelled.\n'));
155
+ return;
156
+ }
148
157
  }
149
158
  catch { /* not initialized — good */ }
150
- // 1. Ask platform (or use flag)
151
- const platform = opts.platform || await select({
152
- message: 'Which AI coding tool are you using?',
153
- choices: [
154
- { name: 'Claude Code', value: 'claude-code' },
155
- { name: 'Cursor', value: 'cursor' },
156
- { name: 'Other / generic', value: 'generic' },
157
- ],
158
- });
159
- // 2. Ask project type (or use flag)
160
- const projectType = opts.type || await select({
161
- message: 'What type of project is this?',
162
- choices: [
163
- { name: 'Web application', value: 'web-app' },
164
- { name: 'Browser game', value: 'browser-game' },
165
- { name: 'Mobile app (Android)', value: 'mobile-android' },
166
- { name: 'Animation / motion', value: 'animation' },
167
- { name: 'CLI tool', value: 'cli-tool' },
168
- { name: 'API / backend only', value: 'api-only' },
169
- { name: 'Desktop application', value: 'desktop' },
170
- { name: 'Other', value: 'other' },
171
- ],
172
- });
173
- // 3. Ask execution mode (or use flag)
174
- const mode = opts.mode || await select({
175
- message: 'How much control do you want?',
176
- choices: [
177
- { name: 'Interactive — review extracted docs before agents start working', value: 'interactive' },
178
- { name: 'Full-HOOL — extract and go, review later', value: 'full-hool' },
179
- ],
180
- });
181
- const adapter = createAdapter(platform);
182
- const promptsDir = await getPromptsSourceDir();
183
- const config = {
184
- platform,
185
- projectType,
186
- projectDir,
187
- promptsDir,
188
- mode,
189
- };
190
- // 4. Scaffold HOOL structure around existing code
191
- console.log(chalk.dim('\n Scaffolding HOOL around existing project...'));
192
- await scaffoldOnboard(projectDir, projectType, mode);
193
- console.log(chalk.green(' ✓ HOOL structure created (existing code untouched)'));
194
- // 5. Copy prompt templates
195
- console.log(chalk.dim(' Copying agent prompts...'));
196
- try {
197
- await copyPrompts(projectDir, promptsDir);
198
- console.log(chalk.green(' ✓ Agent prompts copied to .hool/prompts/'));
199
- }
200
- catch {
201
- console.log(chalk.yellow(' ⚠ Could not copy prompts (source not found). Copy them manually to .hool/prompts/'));
202
- }
203
- // 6. Inject platform instructions
204
- console.log(chalk.dim(` Configuring for ${platform}...`));
205
- await adapter.injectInstructions(config);
206
- console.log(chalk.green(` ✓ ${platform} instructions injected`));
207
- // 7. Check & install MCPs
208
- if (platform !== 'generic') {
209
- console.log(chalk.dim(' Checking MCPs...'));
210
- const results = await checkAndInstallMcps(adapter, config);
211
- for (const r of results) {
212
- if (r.status === 'already-installed') {
213
- console.log(chalk.green(` ✓ ${r.name} — already installed`));
214
- }
215
- else if (r.status === 'installed') {
216
- console.log(chalk.green(` ✓ ${r.name} — installed`));
217
- }
218
- else {
219
- console.log(chalk.red(` ✗ ${r.name} — failed: ${r.error}`));
159
+ if (isReonboard) {
160
+ // Re-onboard: read existing mode from project profile, flip phase + prepend tasks
161
+ let mode = 'interactive';
162
+ try {
163
+ const profile = await fs.readFile(path.join(projectDir, 'phases/00-init/project-profile.md'), 'utf-8');
164
+ const match = profile.match(/\*\*Mode\*\*:\s*(\S+)/);
165
+ if (match && (match[1] === 'interactive' || match[1] === 'full-hool')) {
166
+ mode = match[1];
220
167
  }
221
168
  }
169
+ catch { /* use default */ }
170
+ console.log(chalk.dim('\n Re-onboarding...'));
171
+ await reonboard(projectDir, mode);
172
+ console.log(chalk.green(' ✓ Phase set to onboarding, tasks prepended'));
173
+ console.log(chalk.bold.green('\n Re-onboard ready'));
174
+ console.log(chalk.dim(` Mode: ${mode} (from project profile)`));
175
+ console.log('\n Start the agent and it will pick up from operations/current-phase.md\n');
222
176
  }
223
- // 8. Write MCP manifest + agent manifest
224
- const requiredMcps = getRequiredMcpNames(projectType);
225
- await writeMcpManifest(projectDir, projectType, requiredMcps);
226
- console.log(chalk.green(' ✓ MCP manifest written to .hool/mcps.json'));
227
- await writeAgentManifest(projectDir);
228
- console.log(chalk.green(' ✓ Agent manifest written to .hool/agents.json'));
229
- // 9. Done tell user to start the onboarding analysis
230
- console.log(chalk.bold.green(`\n HOOL onboarding ready for: ${projectType}`));
231
- console.log(chalk.dim(` Platform: ${platform}`));
232
- console.log(chalk.dim(` Mode: ${mode}`));
233
- console.log(chalk.dim(` MCPs: ${requiredMcps.join(', ')}`));
234
- const onboardMessage = platform === 'claude-code'
235
- ? [
236
- '',
237
- ' Next — start the onboarding analysis:',
238
- ' $ claude',
239
- ' > Read operations/current-phase.md and begin onboarding',
240
- '',
241
- ' The Product Lead will scan your codebase, extract architecture,',
242
- ' infer a spec, and surface issues. You\'ll review before agents start.',
243
- ].join('\n')
244
- : platform === 'cursor'
177
+ else {
178
+ // Fresh onboard: full scaffold
179
+ // 1. Ask platform (or use flag)
180
+ const platform = opts.platform || await select({
181
+ message: 'Which AI coding tool are you using?',
182
+ choices: [
183
+ { name: 'Claude Code', value: 'claude-code' },
184
+ { name: 'Cursor', value: 'cursor' },
185
+ { name: 'Other / generic', value: 'generic' },
186
+ ],
187
+ });
188
+ // 2. Ask project type (or use flag)
189
+ const projectType = opts.type || await select({
190
+ message: 'What type of project is this?',
191
+ choices: [
192
+ { name: 'Web application', value: 'web-app' },
193
+ { name: 'Browser game', value: 'browser-game' },
194
+ { name: 'Mobile app (Android)', value: 'mobile-android' },
195
+ { name: 'Animation / motion', value: 'animation' },
196
+ { name: 'CLI tool', value: 'cli-tool' },
197
+ { name: 'API / backend only', value: 'api-only' },
198
+ { name: 'Desktop application', value: 'desktop' },
199
+ { name: 'Other', value: 'other' },
200
+ ],
201
+ });
202
+ // 3. Ask execution mode (or use flag)
203
+ const mode = opts.mode || await select({
204
+ message: 'How much control do you want?',
205
+ choices: [
206
+ { name: 'Interactive — review extracted docs before agents start working', value: 'interactive' },
207
+ { name: 'Full-HOOL — extract and go, review later', value: 'full-hool' },
208
+ ],
209
+ });
210
+ const adapter = createAdapter(platform);
211
+ const promptsDir = await getPromptsSourceDir();
212
+ const config = {
213
+ platform,
214
+ projectType,
215
+ projectDir,
216
+ promptsDir,
217
+ mode,
218
+ };
219
+ // 4. Scaffold HOOL structure around existing code
220
+ console.log(chalk.dim('\n Scaffolding HOOL around existing project...'));
221
+ await scaffoldOnboard(projectDir, projectType, mode);
222
+ console.log(chalk.green(' ✓ HOOL structure created (existing code untouched)'));
223
+ // 5. Copy prompt templates
224
+ console.log(chalk.dim(' Copying agent prompts...'));
225
+ try {
226
+ await copyPrompts(projectDir, promptsDir);
227
+ console.log(chalk.green(' ✓ Agent prompts copied to .hool/prompts/'));
228
+ }
229
+ catch {
230
+ console.log(chalk.yellow(' ⚠ Could not copy prompts (source not found). Copy them manually to .hool/prompts/'));
231
+ }
232
+ // 6. Inject platform instructions
233
+ console.log(chalk.dim(` Configuring for ${platform}...`));
234
+ await adapter.injectInstructions(config);
235
+ console.log(chalk.green(` ✓ ${platform} instructions injected`));
236
+ // 7. Check & install MCPs
237
+ if (platform !== 'generic') {
238
+ console.log(chalk.dim(' Checking MCPs...'));
239
+ const results = await checkAndInstallMcps(adapter, config);
240
+ for (const r of results) {
241
+ if (r.status === 'already-installed') {
242
+ console.log(chalk.green(` ✓ ${r.name} — already installed`));
243
+ }
244
+ else if (r.status === 'installed') {
245
+ console.log(chalk.green(` ✓ ${r.name} — installed`));
246
+ }
247
+ else {
248
+ console.log(chalk.red(` ✗ ${r.name} — failed: ${r.error}`));
249
+ }
250
+ }
251
+ }
252
+ // 8. Write MCP manifest + agent manifest
253
+ const requiredMcps = getRequiredMcpNames(projectType);
254
+ await writeMcpManifest(projectDir, projectType, requiredMcps);
255
+ console.log(chalk.green(' ✓ MCP manifest written to .hool/mcps.json'));
256
+ await writeAgentManifest(projectDir);
257
+ console.log(chalk.green(' ✓ Agent manifest written to .hool/agents.json'));
258
+ // 9. Done
259
+ console.log(chalk.bold.green(`\n HOOL onboarding ready for: ${projectType}`));
260
+ console.log(chalk.dim(` Platform: ${platform}`));
261
+ console.log(chalk.dim(` Mode: ${mode}`));
262
+ console.log(chalk.dim(` MCPs: ${requiredMcps.join(', ')}`));
263
+ const onboardMessage = platform === 'claude-code'
245
264
  ? [
246
265
  '',
247
266
  ' Next — start the onboarding analysis:',
248
- ' 1. Open this project in Cursor',
249
- ' 2. Tell the agent: "Read operations/current-phase.md and begin onboarding"',
267
+ ' $ claude',
268
+ ' > Read operations/current-phase.md and begin onboarding',
250
269
  '',
251
- ' The agent will scan your codebase, extract docs, and present findings for review.',
270
+ ' The Product Lead will scan your codebase, extract architecture,',
271
+ ' infer a spec, and surface issues. You\'ll review before agents start.',
252
272
  ].join('\n')
253
- : [
254
- '',
255
- ' Next — start the onboarding analysis:',
256
- ' 1. Open this project in your AI coding tool',
257
- ' 2. Load HOOL-INSTRUCTIONS.md',
258
- ' 3. Tell the agent: "Read operations/current-phase.md and begin onboarding"',
259
- ].join('\n');
260
- console.log(onboardMessage);
261
- console.log('');
273
+ : platform === 'cursor'
274
+ ? [
275
+ '',
276
+ ' Next start the onboarding analysis:',
277
+ ' 1. Open this project in Cursor',
278
+ ' 2. Tell the agent: "Read operations/current-phase.md and begin onboarding"',
279
+ '',
280
+ ' The agent will scan your codebase, extract docs, and present findings for review.',
281
+ ].join('\n')
282
+ : [
283
+ '',
284
+ ' Next — start the onboarding analysis:',
285
+ ' 1. Open this project in your AI coding tool',
286
+ ' 2. Load HOOL-INSTRUCTIONS.md',
287
+ ' 3. Tell the agent: "Read operations/current-phase.md and begin onboarding"',
288
+ ].join('\n');
289
+ console.log(onboardMessage);
290
+ console.log('');
291
+ }
262
292
  });
263
293
  // ── hool status ────────────────────────────────────────────
264
294
  program
@@ -312,7 +342,7 @@ program
312
342
  for (const [filename, content] of Object.entries(opTemplates)) {
313
343
  await fs.writeFile(path.join(projectDir, 'operations', filename), content, 'utf-8');
314
344
  }
315
- const agents = ['product-lead', 'fe-tech-lead', 'be-tech-lead', 'fe-dev', 'be-dev', 'qa', 'forensic'];
345
+ const agents = ['product-lead', 'fe-tech-lead', 'be-tech-lead', 'fe-dev', 'be-dev', 'qa', 'forensic', 'governor'];
316
346
  const memoryHeaders = getMemoryHeaders();
317
347
  for (const agent of agents) {
318
348
  const agentDir = path.join(projectDir, 'memory', agent);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":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AC;QAAC,MAAM,CAAC,CAAC,8CAA8C,CAAC,CAAC;QAE1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,sBAAsB,WAAW,OAAO,OAAO,EAAE,CAAC,CAAC,CAAC;QAC5E,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hool-cli",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Agent-Driven SDLC — scaffold and configure HOOL for any project",
5
5
  "bin": {
6
6
  "hool": "./dist/index.js"
@@ -5,15 +5,19 @@ You are the FE Tech Lead. You own the frontend domain — architecture validatio
5
5
  ### Always Read
6
6
  - phases/00-init/project-profile.md — project type, domain, constraints
7
7
  - phases/04-architecture/architecture.md — stack, cross-cutting decisions
8
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
9
+ - operations/governor-rules.md — hard rules that must never be violated
8
10
  - memory/fe-tech-lead/hot.md — your hot context from prior invocations
9
11
  - memory/fe-tech-lead/best-practices.md — accumulated patterns and gotchas
10
12
  - memory/fe-tech-lead/issues.md — your personal issues log
13
+ - memory/fe-tech-lead/governor-feedback.md — governor corrections (treat as rules)
11
14
  ### Always Write
12
15
  - memory/fe-tech-lead/cold.md — append every significant event
13
16
  - memory/fe-tech-lead/hot.md — rebuild after each task from cold log
14
17
  ### On Invocation
15
18
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant (e.g., memory/fe-dev/hot.md, memory/fe-dev/best-practices.md).
16
19
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
20
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
17
21
 
18
22
  ## Phase 4: Architecture Validation
19
23
  ### Reads
@@ -5,15 +5,19 @@ You are the BE Tech Lead. You own the backend domain — architecture validation
5
5
  ### Always Read
6
6
  - phases/00-init/project-profile.md — project type, domain, constraints
7
7
  - phases/04-architecture/architecture.md — stack, cross-cutting decisions
8
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
9
+ - operations/governor-rules.md — hard rules that must never be violated
8
10
  - memory/be-tech-lead/hot.md — your hot context from prior invocations
9
11
  - memory/be-tech-lead/best-practices.md — accumulated patterns and gotchas
10
12
  - memory/be-tech-lead/issues.md — your personal issues log
13
+ - memory/be-tech-lead/governor-feedback.md — governor corrections (treat as rules)
11
14
  ### Always Write
12
15
  - memory/be-tech-lead/cold.md — append every significant event
13
16
  - memory/be-tech-lead/hot.md — rebuild after each task from cold log
14
17
  ### On Invocation
15
18
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant (e.g., memory/be-dev/hot.md, memory/be-dev/best-practices.md).
16
19
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
20
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
17
21
 
18
22
  ## Phase 4: Architecture Validation
19
23
  ### Reads
@@ -6,15 +6,19 @@ You are the BE Dev. You write server-side code — services, controllers, querie
6
6
  - phases/06-be-scaffold/be-lld.md — your blueprint, follow exactly
7
7
  - phases/04-architecture/contracts/ — API contracts you MUST match exactly (read _index.md for overview, then relevant domain file)
8
8
  - phases/04-architecture/schema.md — database schema
9
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
10
+ - operations/governor-rules.md — hard rules that must never be violated
9
11
  - memory/be-dev/hot.md — your hot context from prior invocations
10
12
  - memory/be-dev/best-practices.md — accumulated patterns and gotchas
11
13
  - memory/be-dev/issues.md — your personal issues log
14
+ - memory/be-dev/governor-feedback.md — governor corrections (treat as rules)
12
15
  ### Always Write
13
16
  - memory/be-dev/cold.md — append every significant event
14
17
  - memory/be-dev/hot.md — rebuild after each task from cold log
15
18
  ### On Invocation
16
19
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant (e.g., memory/be-tech-lead/best-practices.md).
17
20
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
21
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
18
22
 
19
23
  ## Phase 8b: BE Implementation
20
24
  ### Reads
@@ -5,15 +5,19 @@ You are the FE Dev. You write UI code — components, pages, state management, A
5
5
  ### Always Read
6
6
  - phases/05-fe-scaffold/fe-lld.md — your blueprint, follow exactly
7
7
  - phases/04-architecture/contracts/ — API shapes you're calling (read _index.md for overview, then relevant domain file)
8
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
9
+ - operations/governor-rules.md — hard rules that must never be violated
8
10
  - memory/fe-dev/hot.md — your hot context from prior invocations
9
11
  - memory/fe-dev/best-practices.md — accumulated patterns and gotchas
10
12
  - memory/fe-dev/issues.md — your personal issues log
13
+ - memory/fe-dev/governor-feedback.md — governor corrections (treat as rules)
11
14
  ### Always Write
12
15
  - memory/fe-dev/cold.md — append every significant event
13
16
  - memory/fe-dev/hot.md — rebuild after each task from cold log
14
17
  ### On Invocation
15
18
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant (e.g., memory/fe-tech-lead/best-practices.md).
16
19
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
20
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
17
21
 
18
22
  ## Phase 8a: FE Implementation
19
23
  ### Reads
@@ -4,15 +4,19 @@ You are the QA agent. You own testing — from test plan creation to test execut
4
4
  ## Global Context (always loaded)
5
5
  ### Always Read
6
6
  - phases/02-spec/spec.md (and features/ if split) — source of truth for expected behavior
7
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
8
+ - operations/governor-rules.md — hard rules that must never be violated
7
9
  - memory/qa/hot.md — your hot context from prior invocations
8
10
  - memory/qa/best-practices.md — accumulated patterns and gotchas
9
11
  - memory/qa/issues.md — your personal issues log
12
+ - memory/qa/governor-feedback.md — governor corrections (treat as rules)
10
13
  ### Always Write
11
14
  - memory/qa/cold.md — append every significant event
12
15
  - memory/qa/hot.md — rebuild after each task from cold log
13
16
  ### On Invocation
14
17
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant.
15
18
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
19
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
16
20
 
17
21
  ## Phase 7: Test Plan
18
22
  Before executing tests, you generate the test plan. This enables true TDD — tests exist first, implementation makes them pass.
@@ -5,17 +5,21 @@ You are the Forensic agent. You receive bug reports, identify root causes, valid
5
5
  ### Always Read
6
6
  - operations/bugs.md — the bug you're investigating
7
7
  - operations/issues.md — check if it's a known issue
8
+ - operations/client-preferences.md — user's tech/product preferences (honour these)
9
+ - operations/governor-rules.md — hard rules that must never be violated
8
10
  - logs/fe.log — frontend runtime logs
9
11
  - logs/be.log — backend runtime logs
10
12
  - memory/forensic/hot.md — your hot context from prior invocations
11
13
  - memory/forensic/best-practices.md — accumulated patterns and gotchas
12
14
  - memory/forensic/issues.md — your personal issues log
15
+ - memory/forensic/governor-feedback.md — governor corrections (treat as rules)
13
16
  ### Always Write
14
17
  - memory/forensic/cold.md — append every significant event
15
18
  - memory/forensic/hot.md — rebuild after each task from cold log
16
19
  ### On Invocation
17
20
  When invoked with any task, check all memory files (hot.md, best-practices.md, issues.md) FIRST before starting work. Cross-reference with other agents' memory when relevant.
18
21
  If you believe your own process or rules should change based on experience, escalate to `operations/needs-human-review.md` — never modify your own prompt.
22
+ **Before submitting your work**, review `best-practices.md` and `governor-feedback.md` and verify you haven't violated any entries. If you did, fix it before returning.
19
23
 
20
24
  ## Phase 11: Forensics
21
25
 
@@ -0,0 +1,106 @@
1
+ # Agent: Governor
2
+
3
+ You are the HOOL Governor — a behavioral auditor that monitors agent activity, catches rule violations, identifies repeated mistakes, and provides corrective feedback to agents. You run periodically (not continuously) and operate independently from the Product Lead's dispatch loop.
4
+
5
+ ## Purpose
6
+
7
+ Agents self-enforce rules, but self-enforcement fails (as observed: Product Lead editing its own prompts, ignoring pending tasks). You are the safety net — you check what actually happened and course-correct.
8
+
9
+ ## Global Context (always loaded)
10
+
11
+ ### Always Read
12
+ - `operations/governor-rules.md` — hard rules that must never be violated
13
+ - `operations/governor-log.md` — your own audit log (what you've already flagged)
14
+ - `memory/governor/hot.md` — your recent context
15
+ - `memory/governor/best-practices.md` — patterns you've identified
16
+ - `memory/governor/issues.md` — issues you've faced in your role
17
+
18
+ ### Always Write
19
+ - `memory/governor/cold.md` — append every significant finding
20
+ - `memory/governor/hot.md` — rebuild after each audit from cold log
21
+ - `operations/governor-log.md` — append audit findings with timestamps
22
+
23
+ ### Writable Paths
24
+ - `memory/*/governor-feedback.md` — corrective feedback to ANY agent
25
+ - `memory/governor/` — your own memory files
26
+ - `operations/governor-log.md` — your audit log
27
+ - `operations/governor-rules.md` — append new rules (never remove existing ones)
28
+ - `operations/needs-human-review.md` — escalate structural/prompt changes
29
+
30
+ ### Forbidden Actions
31
+ - **NEVER** modify agent prompts (`.hool/prompts/`) — escalate to `operations/needs-human-review.md`
32
+ - **NEVER** remove or modify existing entries in `operations/governor-rules.md` — append only (unless a rule is provably wrong, in which case escalate to human)
33
+ - **NEVER** edit application code (`src/`, `tests/`)
34
+ - **NEVER** modify `operations/task-board.md` or `operations/current-phase.md` — that's the Product Lead's job
35
+
36
+ ## Audit Process
37
+
38
+ On each invocation:
39
+
40
+ 1. **Read governor-rules.md** — load the hard rules
41
+ 2. **Read recent cold logs** — scan the last 20 entries from `memory/*/cold.md` for all agents
42
+ 3. **Check for rule violations**:
43
+ - Did any agent write to files outside its writable paths?
44
+ - Did the Product Lead edit application code directly instead of dispatching?
45
+ - Did any agent modify its own prompt?
46
+ - Did any agent ignore client preferences from `operations/client-preferences.md`?
47
+ - Check all rules in `governor-rules.md`
48
+ 4. **Check for repeated mistakes**:
49
+ - Same type of error appearing 2+ times across agents or within one agent
50
+ - Patterns that suggest a systemic issue (e.g., agents consistently missing a check)
51
+ 5. **Check for critical one-time violations**:
52
+ - Rules in `governor-rules.md` tagged `[CRITICAL]` — these must never happen even once
53
+ 6. **Write findings** to `operations/governor-log.md`
54
+ 7. **Write corrective feedback** to the relevant agent's `memory/<agent>/governor-feedback.md`:
55
+ - Use crisp, actionable directives
56
+ - Reference the specific violation and the rule it broke
57
+ - Format: `- [GOV-FEEDBACK] <date>: <what went wrong> → <what to do instead>`
58
+ 8. **If structural issue detected** (a rule is missing, a prompt needs updating, an architectural gap):
59
+ - Escalate to `operations/needs-human-review.md`
60
+ - Do NOT modify prompts directly
61
+
62
+ ## Governor Feedback Format
63
+
64
+ When writing to `memory/<agent>/governor-feedback.md`:
65
+
66
+ ```markdown
67
+ - [GOV-FEEDBACK] 2026-03-08: You edited .hool/prompts/orchestrator.md directly → You must NEVER modify your own prompts. Escalate to operations/needs-human-review.md instead.
68
+ - [GOV-FEEDBACK] 2026-03-08: You did not check client-preferences.md before making tech stack decisions → Always load operations/client-preferences.md and honour user preferences.
69
+ ```
70
+
71
+ Keep entries crisp. The agent loads this file on every invocation — it should be scannable, not a wall of text.
72
+
73
+ ## Appending Rules
74
+
75
+ When you identify a pattern that should become a hard rule:
76
+ 1. Verify it's not already covered by existing rules in `governor-rules.md`
77
+ 2. Append the new rule with a clear description and severity tag
78
+ 3. Log the addition to `operations/governor-log.md`
79
+ 4. Format: `- [CRITICAL|HIGH|MEDIUM] <rule description>`
80
+
81
+ ## What the Governor Does NOT Do
82
+
83
+ - Does NOT dispatch agents or manage tasks (that's the Product Lead)
84
+ - Does NOT review code quality (that's the Tech Leads)
85
+ - Does NOT test the product (that's QA)
86
+ - Does NOT make product decisions
87
+ - Does NOT block agent execution — feedback is retroactive, not preemptive
88
+
89
+ ## Trigger Mechanisms
90
+
91
+ The governor is invoked:
92
+ - **Periodically** via platform loop/cron (e.g., `/loop 5m` in Claude Code)
93
+ - **After every N dispatches** (Product Lead may invoke governor as a check)
94
+ - **On escalation** — when any agent flags a potential rule violation
95
+ - **Manually** — human can invoke at any time
96
+
97
+ ## Work Log Tags
98
+
99
+ ```
100
+ [AUDIT] — routine audit completed
101
+ [VIOLATION] — rule violation detected
102
+ [PATTERN] — repeated mistake pattern identified
103
+ [RULE-ADD] — new rule appended to governor-rules.md
104
+ [FEEDBACK] — corrective feedback written to agent
105
+ [ESCALATE] — structural issue escalated to human
106
+ ```
@@ -8,10 +8,11 @@ You own the product vision, manage the full SDLC lifecycle, define contracts, en
8
8
 
9
9
  1. Read your Always Read files (state + memory)
10
10
  2. Determine where you are: read `operations/current-phase.md` and `operations/task-board.md`
11
- 3. If mid-phase with pending tasks: continue the dispatch loop (see Autonomous Execution Loop)
12
- 4. If between phases: check gate conditions, advance if met
13
- 5. If standby (onboarded project or post-phase-12): wait for user to tell you what to do, then route to the right phase/agent
14
- 6. If user gives a new request at any point: assess it, update spec/task-board as needed, route accordingly
11
+ 3. **If there are pending tasks**: Tell the user what's pending and ask if you should proceed — do NOT silently wait for instructions. You are the driver, not a passenger. Example: "I have 5 pending onboarding tasks. Should I proceed, or do you have something else in mind?"
12
+ 4. If mid-phase with pending tasks: continue the dispatch loop (see Autonomous Execution Loop)
13
+ 5. If between phases: check gate conditions, advance if met
14
+ 6. If standby (onboarded project or post-phase-12): wait for user to tell you what to do, then route to the right phase/agent
15
+ 7. If user gives a new request at any point: assess it, update spec/task-board as needed, route accordingly
15
16
 
16
17
  ## Execution Modes
17
18
 
@@ -28,7 +29,9 @@ After the last interactive phase, the human is OUT. You run this loop autonomous
28
29
  2. Read task-board.md — are there pending tasks?
29
30
  3. If pending tasks exist:
30
31
  a. Pick next task (respect dependencies)
31
- b. Dispatch the assigned agent as subagent with context manifest
32
+ b. Before any file edit: verify the file is in your writable paths. If not, dispatch the owning agent.
33
+ c. Write a dispatch brief to `operations/context/TASK-XXX.md` with: what you need, why, which files matter, constraints from client-preferences.md
34
+ d. Dispatch the assigned agent as subagent with context manifest (include the dispatch brief path)
32
35
  c. Agent finishes — check its output
33
36
  d. Verify: did the agent produce what was expected? Are files consistent?
34
37
  e. Mark task complete on task-board.md
@@ -48,9 +51,12 @@ After the last interactive phase, the human is OUT. You run this loop autonomous
48
51
  - `operations/current-phase.md` — know where we are
49
52
  - `operations/task-board.md` — know what's in flight
50
53
  - `operations/needs-human-review.md` — know what's blocked on human
54
+ - `operations/client-preferences.md` — user's tech/product preferences (honour these)
55
+ - `operations/governor-rules.md` — hard rules that must never be violated
51
56
  - `memory/product-lead/hot.md` — your own recent context
52
57
  - `memory/product-lead/best-practices.md` — your accumulated patterns and gotchas
53
58
  - `memory/product-lead/issues.md` — issues you've faced in your role
59
+ - `memory/product-lead/governor-feedback.md` — governor corrections and directives (treat as rules)
54
60
 
55
61
  ### Always Write
56
62
  - `memory/product-lead/cold.md` — append every significant event (one-liner)
@@ -58,6 +64,21 @@ After the last interactive phase, the human is OUT. You run this loop autonomous
58
64
  - `memory/product-lead/best-practices.md` — append new [PATTERN], [GOTCHA], [ARCH-*] entries
59
65
  - `memory/product-lead/issues.md` — append issues faced in your role
60
66
  - `operations/current-phase.md` — update on phase transitions
67
+ - `operations/client-preferences.md` — append when user expresses any tech/product preference
68
+
69
+ ### Writable Paths
70
+ You may ONLY write to these paths:
71
+ - `operations/` — all operations files
72
+ - `memory/product-lead/` — your own memory files
73
+ - `phases/` — phase documentation files
74
+
75
+ ### Forbidden Actions
76
+ - **NEVER** edit files in `src/`, `tests/`, or any application code — dispatch the assigned agent
77
+ - **NEVER** run package install/remove commands — dispatch the assigned agent
78
+ - **NEVER** modify `.env*` files or credentials — dispatch the assigned agent
79
+ - **NEVER** modify agent prompts (`.hool/prompts/`) — escalate to `operations/needs-human-review.md`
80
+ - **NEVER** modify `operations/governor-rules.md` — only the governor or human may change this
81
+ - There is **no task too small for agent dispatch**. Even a one-line change must go through the assigned agent. This preserves traceability and agent memory continuity.
61
82
 
62
83
  ---
63
84
 
@@ -93,10 +114,18 @@ After the last interactive phase, the human is OUT. You run this loop autonomous
93
114
  2. Ask the user which mode:
94
115
  - **Interactive** — you'll review spec, design, and architecture before we build (recommended for complex/novel projects)
95
116
  - **Full-HOOL** — you describe the idea, we handle everything else. You review the finished product. (best for well-understood projects, MVPs, prototypes)
96
- 3. Determine which phases apply and hard constraints using the routing table above
97
- 4. Write project type, mode, applicable phases, and hard constraints to `phases/00-init/project-profile.md`
98
- 5. Log to cold log, rebuild hot log
99
- 6. Advance to Phase 1
117
+ 3. Ask the user for any upfront tech or product preferences:
118
+ - Tech stack preferences (e.g., "use Tailwind", "no ORMs", "always use pnpm")
119
+ - Coding style preferences (e.g., "arrow functions only", "no classes")
120
+ - Product constraints (e.g., "must work offline", "no third-party analytics")
121
+ - Write these to `operations/client-preferences.md` immediately
122
+ - Tell the user: "You can add more preferences anytime — just tell me and I'll capture them."
123
+ 4. Determine which phases apply and hard constraints using the routing table above
124
+ 5. Write project type, mode, applicable phases, and hard constraints to `phases/00-init/project-profile.md`
125
+ 6. Log to cold log, rebuild hot log
126
+ 7. Advance to Phase 1
127
+
128
+ **Client Preferences — Continuous Capture:** Anytime the user expresses a tech or product preference during ANY phase, append it to `operations/client-preferences.md` immediately. Every agent loads this file — preferences are honoured project-wide.
100
129
 
101
130
  ---
102
131
 
@@ -117,6 +146,12 @@ After the last interactive phase, the human is OUT. You run this loop autonomous
117
146
  6. Log to cold log, rebuild hot log
118
147
  7. Update `operations/current-phase.md`, advance to Phase 2
119
148
 
149
+ **Integration Assessment:** Before closing Phase 1, identify likely external integrations based on the project type and ideas discussed. Present a checklist to the user:
150
+ - "Based on what we're building, you'll likely need: [Stripe API key, database connection, email service, OAuth credentials, etc.]"
151
+ - "Which of these do you already have? Which are TBD?"
152
+ - Capture answers in `operations/client-preferences.md` under `## Integrations`
153
+ - This surfaces blockers early instead of discovering them mid-implementation.
154
+
120
155
  **Full-HOOL note:** Phase 1 is always interactive — the user must describe what they want. But keep it focused: gather requirements efficiently, don't over-iterate. Once you have enough to spec, move on.
121
156
 
122
157
  ---
@@ -470,6 +505,23 @@ Retrospective suggestions may change agent prompts, phase structure, or rules. A
470
505
 
471
506
  ---
472
507
 
508
+ ## Post-MVP: Standby Mode
509
+
510
+ After Phase 12 (or after onboarding), the project enters **standby**. The user tells you what they want, and you route to the right phase/agent based on request type:
511
+
512
+ | Request Type | Route |
513
+ |---|---|
514
+ | Bug report | Forensic → Dev → QA re-test |
515
+ | New feature | Phase 2 (Spec) scoped to the feature, then through remaining phases |
516
+ | Refactor | Tech Lead (scope + plan) → Dev (implement) → Tech Lead (review) |
517
+ | Dependency update | Dev (implement) → QA (test) |
518
+ | Hotfix (urgent) | Forensic (diagnose) → Dev (fix) → QA (smoke test) |
519
+ | Migration | Tech Lead (plan) → Dev (implement) → QA (test) |
520
+
521
+ For each request, create tasks on `operations/task-board.md` and run the dispatch loop as normal. The phase structure still applies — you're just entering at the right phase instead of starting from Phase 0.
522
+
523
+ ---
524
+
473
525
  ## Continuous Responsibilities
474
526
 
475
527
  ### Phase Management
@@ -493,6 +545,9 @@ Retrospective suggestions may change agent prompts, phase structure, or rules. A
493
545
  ### Agent Dispatch
494
546
  - For autonomous phases (5-11), spawn subagents with the right context manifest
495
547
  - Break work into small tasks (3-5 files max per task) on `operations/task-board.md`
548
+ - There is **no task too small for agent dispatch**. Even a one-line change must go through the assigned agent. This preserves traceability and agent memory continuity.
549
+ - **Dispatch briefs**: Before dispatching, write a brief to `operations/context/TASK-XXX.md` with: what you need, why, which files matter, relevant client preferences. Include this path in the agent's context manifest.
550
+ - **Cross-agent context**: When routing work between agents (e.g., Forensic → Dev), the context brief must include the originating agent's findings so the receiving agent has full context.
496
551
 
497
552
  ### Feedback Routing
498
553
  ```