tycono 0.1.65 → 0.1.66

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.
Files changed (35) hide show
  1. package/bin/tycono.ts +13 -4
  2. package/package.json +1 -1
  3. package/src/api/src/create-server.ts +5 -1
  4. package/src/api/src/engine/agent-loop.ts +17 -6
  5. package/src/api/src/engine/context-assembler.ts +156 -48
  6. package/src/api/src/engine/knowledge-gate.ts +335 -0
  7. package/src/api/src/engine/llm-adapter.ts +7 -1
  8. package/src/api/src/engine/runners/claude-cli.ts +98 -116
  9. package/src/api/src/engine/runners/types.ts +2 -0
  10. package/src/api/src/engine/tools/executor.ts +3 -5
  11. package/src/api/src/routes/active-sessions.ts +143 -0
  12. package/src/api/src/routes/coins.ts +137 -0
  13. package/src/api/src/routes/execute.ts +158 -48
  14. package/src/api/src/routes/knowledge.ts +30 -0
  15. package/src/api/src/routes/operations.ts +48 -11
  16. package/src/api/src/routes/sessions.ts +1 -1
  17. package/src/api/src/routes/setup.ts +68 -1
  18. package/src/api/src/routes/speech.ts +334 -143
  19. package/src/api/src/services/activity-stream.ts +1 -1
  20. package/src/api/src/services/job-manager.ts +185 -9
  21. package/src/api/src/services/port-registry.ts +222 -0
  22. package/src/api/src/services/scaffold.ts +90 -0
  23. package/src/api/src/services/session-store.ts +75 -5
  24. package/src/web/dist/assets/index-BDLT2xew.js +109 -0
  25. package/src/web/dist/assets/index-LvS5V8aP.css +1 -0
  26. package/src/web/dist/assets/{preview-app-qIFqrb-y.js → preview-app-AJtyaM6L.js} +1 -1
  27. package/src/web/dist/index.html +2 -2
  28. package/templates/skills/_manifest.json +6 -0
  29. package/templates/skills/agent-browser/SKILL.md +159 -0
  30. package/templates/skills/agent-browser/meta.json +19 -0
  31. package/templates/teams/agency.json +3 -3
  32. package/templates/teams/research.json +3 -3
  33. package/templates/teams/startup.json +3 -3
  34. package/src/web/dist/assets/index-B3dNhn76.js +0 -101
  35. package/src/web/dist/assets/index-C7IEX_o_.css +0 -1
package/bin/tycono.ts CHANGED
@@ -19,10 +19,15 @@ function printHelp(): void {
19
19
  Build an AI company. Watch them work.
20
20
 
21
21
  Usage:
22
- tycono Start the server and open dashboard
22
+ tycono [path] Start the server (optionally point to a company directory)
23
23
  tycono --help Show this help message
24
24
  tycono --version Show version
25
25
 
26
+ Examples:
27
+ tycono Start in current directory
28
+ tycono ./my-company Start with existing company folder
29
+ tycono /path/to/akb Start with absolute path
30
+
26
31
  AI Engine (auto-detected):
27
32
  1. Claude Code CLI Install from https://claude.ai/download (recommended)
28
33
  2. ANTHROPIC_API_KEY Set in .env for direct API mode (BYOK)
@@ -199,9 +204,13 @@ export async function main(args: string[]): Promise<void> {
199
204
  }
200
205
 
201
206
  if (command && !command.startsWith('-')) {
202
- console.error(` Unknown command: ${command}`);
203
- printHelp();
204
- process.exit(1);
207
+ // Treat as path to company directory
208
+ const resolved = path.resolve(command);
209
+ if (!fs.existsSync(resolved)) {
210
+ console.error(` Path not found: ${resolved}`);
211
+ process.exit(1);
212
+ }
213
+ process.env.COMPANY_ROOT = resolved;
205
214
  }
206
215
 
207
216
  await startServer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,6 +30,8 @@ import { syncRouter } from './routes/sync.js';
30
30
  import { gitRouter } from './routes/git.js';
31
31
  import { skillsRouter } from './routes/skills.js';
32
32
  import { questsRouter } from './routes/quests.js';
33
+ import { coinsRouter } from './routes/coins.js';
34
+ import { activeSessionsRouter } from './routes/active-sessions.js';
33
35
  import { importKnowledge } from './services/knowledge-importer.js';
34
36
  import { AnthropicProvider, type LLMProvider } from './engine/llm-adapter.js';
35
37
  import { readConfig } from './services/company-config.js';
@@ -117,7 +119,7 @@ export function createHttpServer(): http.Server {
117
119
  const method = req.method ?? '';
118
120
 
119
121
  // SSE 엔드포인트: Express 우회하여 raw HTTP로 처리
120
- if ((url.startsWith('/api/exec/') || url.startsWith('/api/jobs') || url === '/api/setup/import-knowledge') && method === 'POST') {
122
+ if ((url.startsWith('/api/exec/') || url.startsWith('/api/jobs') || url === '/api/waves/save' || url === '/api/setup/import-knowledge') && method === 'POST') {
121
123
  setExecCors(req, res);
122
124
  if (url === '/api/setup/import-knowledge') {
123
125
  handleImportKnowledge(req, res);
@@ -197,6 +199,8 @@ export function createExpressApp(): express.Application {
197
199
  app.use('/api/git', gitRouter);
198
200
  app.use('/api/skills', skillsRouter);
199
201
  app.use('/api/quests', questsRouter);
202
+ app.use('/api/coins', coinsRouter);
203
+ app.use('/api/active-sessions', activeSessionsRouter);
200
204
 
201
205
  app.get('/api/health', (_req, res) => {
202
206
  res.json({ status: 'ok', companyRoot: COMPANY_ROOT });
@@ -26,6 +26,7 @@ export interface AgentConfig {
26
26
  model?: string; // LLM model name for cost tracking
27
27
  tokenLedger?: TokenLedger; // Token usage ledger (optional)
28
28
  attachments?: ImageAttachment[]; // Image attachments for vision
29
+ targetRoles?: string[]; // Selective dispatch scope
29
30
  // Callbacks
30
31
  onText?: (text: string) => void;
31
32
  onToolExec?: (name: string, input: Record<string, unknown>) => void;
@@ -82,7 +83,7 @@ export async function runAgentLoop(config: AgentConfig): Promise<AgentResult> {
82
83
  const llm = config.llm ?? new AnthropicProvider();
83
84
 
84
85
  // 1. Assemble context
85
- const context = assembleContext(companyRoot, roleId, task, sourceRole, orgTree, { teamStatus: config.teamStatus });
86
+ const context = assembleContext(companyRoot, roleId, task, sourceRole, orgTree, { teamStatus: config.teamStatus, targetRoles: config.targetRoles });
86
87
 
87
88
  // 2. Determine tools
88
89
  const subordinates = getSubordinates(orgTree, roleId);
@@ -299,16 +300,25 @@ export async function runAgentLoop(config: AgentConfig): Promise<AgentResult> {
299
300
  `${i + 1}. **${d.roleId}**: "${d.task.slice(0, 80)}"\n Result: ${d.result.slice(0, 300)}`,
300
301
  ).join('\n\n');
301
302
 
303
+ // Build list of already-dispatched tasks to prevent re-dispatch
304
+ const dispatchedList = dispatches.map(d => `- ${d.roleId}: "${d.task.slice(0, 100)}"`).join('\n');
305
+
302
306
  const supervisionPrompt = [
303
307
  '[SUPERVISION LOOP] Your subordinates have completed their tasks. Follow the C-Level Protocol:',
304
308
  '',
305
309
  '## Subordinate Results',
306
310
  dispatchSummary,
307
311
  '',
312
+ '## Already Dispatched (DO NOT re-dispatch these)',
313
+ dispatchedList,
314
+ '',
315
+ '⛔ **Do NOT re-dispatch the same or similar task to the same role.** If a subordinate already completed a task, accept the result and move on.',
316
+ '⛔ **If the result is satisfactory, do NOT dispatch again.** Only re-dispatch if the result clearly fails acceptance criteria with SPECIFIC feedback on what to fix.',
317
+ '',
308
318
  '## Required Actions (do ALL of these):',
309
319
  '',
310
320
  '### 1. Review',
311
- 'Does each result meet the acceptance criteria? If not, re-dispatch with specific feedback.',
321
+ 'Does each result meet the acceptance criteria? If clearly unsatisfactory, re-dispatch with SPECIFIC fix instructions (not the same task again).',
312
322
  '',
313
323
  '### 2. Knowledge Update (The Loop Step ④)',
314
324
  'Record any new decisions, findings, or analysis in appropriate AKB documents:',
@@ -320,10 +330,11 @@ export async function runAgentLoop(config: AgentConfig): Promise<AgentResult> {
320
330
  'Update task status in the relevant tasks.md or project documents.',
321
331
  'Mark completed items as DONE. Identify the NEXT task to dispatch.',
322
332
  '',
323
- '### 4. Next Dispatch',
324
- 'If there are remaining tasks (e.g., QA after Engineer, or the next task in the backlog):',
325
- '- Dispatch the next task to the appropriate subordinate',
326
- '- If all work is done, synthesize a final report for your superior',
333
+ '### 4. Next Dispatch (ONLY if there is genuinely NEW work)',
334
+ 'If there are DIFFERENT remaining tasks (e.g., QA after Engineer, or a DIFFERENT backlog item):',
335
+ '- Dispatch the NEXT DIFFERENT task to the appropriate subordinate',
336
+ '- If all work from the directive is done, synthesize a final report for your superior',
337
+ '- **If the subordinate already completed the requested work, report success — do NOT re-dispatch**',
327
338
  '',
328
339
  'Execute these actions now using your tools (Read, Edit, Bash, dispatch).',
329
340
  ].join('\n');
@@ -10,6 +10,7 @@ import {
10
10
  formatOrgChart,
11
11
  canConsult,
12
12
  } from './org-tree.js';
13
+ import { extractKeywords, searchRelatedDocs } from './knowledge-gate.js';
13
14
 
14
15
  /* ─── Types ──────────────────────────────────── */
15
16
 
@@ -49,7 +50,7 @@ export function assembleContext(
49
50
  task: string,
50
51
  sourceRole: string,
51
52
  orgTree: OrgTree,
52
- options?: { teamStatus?: TeamStatus },
53
+ options?: { teamStatus?: TeamStatus; targetRoles?: string[] },
53
54
  ): AssembledContext {
54
55
  const node = orgTree.nodes.get(roleId);
55
56
  if (!node) {
@@ -103,11 +104,34 @@ export function assembleContext(
103
104
  // 9. Code Root (코드 프로젝트 경로)
104
105
  const config = readConfig(companyRoot);
105
106
  if (config.codeRoot) {
106
- sections.push(`# Code Project\n\nThe code repository is located at: \`${config.codeRoot}\`\nUse this path when working with source code (reading, writing, building, testing).`);
107
+ sections.push(`# Code Project
108
+
109
+ The code repository is located at: \`${config.codeRoot}\` (env: $TYCONO_CODE_ROOT)
110
+ The AKB (knowledge) directory is at: \`${companyRoot}\` (env: $TYCONO_AKB_ROOT)
111
+
112
+ Use the code repository path for all source code work (reading, writing, building, testing).
113
+
114
+ ## Git Worktree Rules (CRITICAL)
115
+ - Your cwd is already set to the code repository. When creating worktrees, use relative paths or \`$TYCONO_CODE_ROOT\`.
116
+ - **NEVER run \`git worktree add\` in \`$TYCONO_AKB_ROOT\`** — the AKB directory is not a code repository.
117
+ - Recommended worktree path: \`$TYCONO_CODE_ROOT/.worktrees/{branch-name}\`
118
+ - Example: \`git worktree add .worktrees/feature-xyz -b feature/xyz\` (from cwd, which is already code repo)`);
119
+ }
120
+
121
+ // 10. Pre-Knowledging: 작업 관련 문서 자동 탐색
122
+ const preKSection = buildPreKnowledgingSection(companyRoot, task);
123
+ if (preKSection) {
124
+ sections.push(preKSection);
107
125
  }
108
126
 
109
- // 10. Task는 별도 필드로 분리
110
- const subordinates = getSubordinates(orgTree, roleId);
127
+ // Task는 별도 필드로 분리
128
+ let subordinates = getSubordinates(orgTree, roleId);
129
+
130
+ // Filter subordinates by targetRoles ONLY for CEO (wave dispatch scope)
131
+ // C-Level roles should always see their own subordinates regardless of targetRoles
132
+ if (options?.targetRoles && options.targetRoles.length > 0 && roleId === 'ceo') {
133
+ subordinates = subordinates.filter(id => options.targetRoles!.includes(id));
134
+ }
111
135
 
112
136
  // Dispatch 도구 안내 (하위 Role이 있는 경우)
113
137
  if (subordinates.length > 0) {
@@ -163,7 +187,20 @@ export function assembleContext(
163
187
 
164
188
  ## Output
165
189
  - Always produce a concrete deliverable: code change, report, analysis, or clear status update.
166
- - End with a brief summary of what you did and any unresolved items.`);
190
+ - End with a brief summary of what you did and any unresolved items.
191
+
192
+ ## Sub-task Efficiency (when dispatched by a superior)
193
+ - Focus ONLY on the assigned task — nothing else.
194
+ - Do NOT update journals, knowledge docs, or tasks.md — your superior handles that.
195
+ - Do NOT read CLAUDE.md or explore unrelated files — go straight to the target file.
196
+ - If tsc/tests fail, fix the specific error. Do NOT refactor surrounding code.
197
+
198
+ ## Commit Rule (when you modify code files)
199
+ - After completing code changes, you MUST commit your work.
200
+ - Use a descriptive commit message: \`git commit -m "type(scope): description"\`
201
+ - Common types: feat, fix, refactor, test, chore
202
+ - This ensures your work is not lost in uncommitted changes.
203
+ - Do NOT push — just commit locally. Your superior or the system handles push/PR.`);
167
204
 
168
205
  const systemPrompt = sections.join('\n\n---\n\n');
169
206
 
@@ -183,6 +220,27 @@ export function assembleContext(
183
220
 
184
221
  /* ─── Section Builders ───────────────────────── */
185
222
 
223
+ function buildPreKnowledgingSection(companyRoot: string, task: string): string | null {
224
+ // Extract keywords from the task directive
225
+ const keywords = extractKeywords(task);
226
+ if (keywords.length < 2) return null; // Too few keywords to be meaningful
227
+
228
+ const related = searchRelatedDocs(companyRoot, keywords);
229
+ if (related.length === 0) return null;
230
+
231
+ const docList = related
232
+ .map(doc => `- \`${doc.path}\` — ${doc.preview} (relevance: ${doc.matches})`)
233
+ .join('\n');
234
+
235
+ return `# 📚 Pre-Knowledging: Related Documents
236
+
237
+ The following existing documents are related to this task. **Read relevant ones before starting work** to avoid duplicating knowledge or missing existing context.
238
+
239
+ ${docList}
240
+
241
+ > **Knowledging Rule**: Check these documents first. If your work produces new knowledge, update existing docs or create new ones with cross-links.`;
242
+ }
243
+
186
244
  function loadCompanyRules(companyRoot: string): string | null {
187
245
  const parts: string[] = [];
188
246
 
@@ -443,40 +501,48 @@ ${subInfo}
443
501
 
444
502
  ## How to Dispatch
445
503
 
446
- **Use Bash to run the dispatch command:**
504
+ **Dispatch is async: start a job → poll for result → review → next task.**
447
505
 
448
506
  \`\`\`bash
449
- # Start a job (returns immediately with job ID)
507
+ # Step 1: Dispatch (returns immediately with job ID)
450
508
  python3 "$DISPATCH_CMD" ${exampleSubId} "Task description here"
451
509
 
452
- # Check job status/result later
510
+ # Step 2: Poll for result (repeat every 10-30s until DONE)
453
511
  python3 "$DISPATCH_CMD" --check <jobId>
454
-
455
- # Start and wait for result (blocks up to 90s)
456
- python3 "$DISPATCH_CMD" --wait ${exampleSubId} "Task description here"
457
512
  \`\`\`
458
513
 
459
- **IMPORTANT**: Always use \`python3 "$DISPATCH_CMD"\` this is the ONLY way to dispatch tasks to subordinates.
460
-
461
- ### Recommended Pattern: Parallel Dispatch
514
+ **NEVER use the Agent tool or Task tool to spawn sub-agents.** Those bypass the job tracking system. Use ONLY the dispatch command.
462
515
 
463
- For multiple tasks, dispatch all at once, then check results:
516
+ ### The Pattern: Dispatch Poll Review Next
464
517
 
465
518
  \`\`\`bash
466
- # 1. Dispatch all tasks (each returns immediately)
519
+ # 1. Dispatch first task (returns job ID immediately)
467
520
  python3 "$DISPATCH_CMD" ${exampleSubId} "Task A"
521
+ # Output includes: Job ID: job-xxx
522
+
523
+ # 2. Poll for result (repeat until status is DONE)
524
+ python3 "$DISPATCH_CMD" --check job-xxx
525
+ # If RUNNING → wait 10-30s → --check again
526
+ # If DONE → read the result → proceed to next task
527
+
528
+ # 3. Dispatch next task
468
529
  python3 "$DISPATCH_CMD" ${subordinates.length > 1 ? subordinates[1] : exampleSubId} "Task B"
530
+ python3 "$DISPATCH_CMD" --check job-yyy
531
+ # ... repeat
469
532
 
470
- # 2. Check results later (use the Job IDs from step 1)
471
- python3 "$DISPATCH_CMD" --check <jobId-A>
472
- python3 "$DISPATCH_CMD" --check <jobId-B>
533
+ # 4. Continue until ALL tasks are done
473
534
  \`\`\`
474
535
 
475
- ### Status Values
476
- - **running** — Subordinate is working
477
- - **done** — Task completed, result available
478
- - **error** — Task failed
479
- - **awaiting_input** — Subordinate has a question for you`;
536
+ ### --check Status Values
537
+ - **RUNNING** — Subordinate still working → poll again in 10-30s
538
+ - **DONE** — Task completed, result is printed
539
+ - **ERROR** — Task failed (re-dispatch with different instructions or report)
540
+ - **AWAITING_INPUT** — Subordinate has a question for you
541
+
542
+ ### ⛔ CRITICAL Rules
543
+ - **NEVER re-dispatch the same task.** If --check shows RUNNING, just keep polling.
544
+ - **NEVER dispatch and immediately finish.** The dispatch→check→review loop must continue until ALL work is complete.
545
+ - **Save the job ID** from each dispatch to use with --check.`;
480
546
 
481
547
  // C-level roles get mandatory delegation rules
482
548
  if (isCLevel) {
@@ -492,9 +558,10 @@ python3 "$DISPATCH_CMD" --check <jobId-B>
492
558
  When you receive a directive:
493
559
  1. **Analyze** — Break it into sub-tasks appropriate for each subordinate
494
560
  2. **Dispatch** — Assign tasks to subordinates with clear acceptance criteria
495
- 3. **Monitor** — Wait for results, review quality
496
- 4. **Follow up** — If output doesn't meet criteria, dispatch back with feedback
497
- 5. **Report** — Synthesize results and report to your superior
561
+ 3. **Monitor** — Poll for results, review quality
562
+ 4. **Verify** — Check git status: did subordinate commit? What files changed?
563
+ 5. **Follow up** — If output doesn't meet criteria, dispatch back with feedback
564
+ 6. **Report** — Synthesize results with change summary (files, commits, branch)
498
565
 
499
566
  ### What You Do vs What Subordinates Do
500
567
 
@@ -506,36 +573,54 @@ When you receive a directive:
506
573
  | Update knowledge & tasks | Update their own journals |
507
574
  | Report to superior | Report to you |
508
575
 
509
- ### The Supervision Loop (CRITICAL)
576
+ ### The Supervision Loop (CRITICAL — DO NOT SKIP)
510
577
 
511
- After dispatching tasks, follow this loop:
578
+ **You MUST keep running until ALL planned tasks are dispatched, reviewed, and completed.**
579
+ ⛔ **NEVER dispatch once and stop. That leaves work half-done.**
512
580
 
581
+ The loop:
513
582
  \`\`\`
514
- DISPATCH ALLCHECK RESULTS → REVIEW → DECIDE
515
- ├── PASS → Knowledge Update Task Update → Next Dispatch
516
- └── FAIL → Re-dispatch with feedback
583
+ PLAN TASKSDISPATCH POLL (--check) → REVIEW RESULT → DECIDE
584
+ ├── PASS → Next DIFFERENT Task
585
+ └── FAIL → Re-dispatch with SPECIFIC fix
586
+ └── ALL DONE → Update knowledge → Report
517
587
  \`\`\`
518
588
 
519
- **Step 1: Dispatch all tasks** (fire-and-forget, collect job IDs)
520
- \`\`\`bash
521
- python3 "$DISPATCH_CMD" engineer "Task A" # → job-xxx
522
- python3 "$DISPATCH_CMD" designer "Task B" # → job-yyy
523
- \`\`\`
589
+ ### ⛔ CRITICAL: No Duplicate Dispatch
524
590
 
525
- **Step 2: Check results** (after waiting, use --check with saved job IDs)
591
+ **NEVER dispatch the same or similar task to the same role twice.**
592
+ - If --check shows RUNNING, keep polling — do NOT re-dispatch
593
+ - If a subordinate completed a task, accept the result — do NOT re-dispatch
594
+ - If the result is unsatisfactory, re-dispatch with SPECIFIC different instructions
595
+ - Track dispatched job IDs — never repeat the same task
596
+ - After 2 dispatches to the same role, accept the result or report to CEO
597
+
598
+ **Example: Full supervision session**
526
599
  \`\`\`bash
527
- python3 "$DISPATCH_CMD" --check <job-xxx>
528
- python3 "$DISPATCH_CMD" --check <job-yyy>
600
+ # Task 1: Dispatch to engineer
601
+ python3 "$DISPATCH_CMD" engineer "Implement feature X. Read tasks.md first."
602
+ # → Job ID: job-001
603
+
604
+ # Poll until done
605
+ python3 "$DISPATCH_CMD" --check job-001
606
+ # → Status: RUNNING — check again in 10-30s
607
+ python3 "$DISPATCH_CMD" --check job-001
608
+ # → Status: DONE (result printed)
609
+
610
+ # Review result... looks good. Task 2 (QA):
611
+ python3 "$DISPATCH_CMD" qa "Test feature X that engineer just implemented."
612
+ # → Job ID: job-002
613
+ python3 "$DISPATCH_CMD" --check job-002
614
+ # → Status: DONE — found bugs
615
+
616
+ # Re-dispatch with SPECIFIC fix:
617
+ python3 "$DISPATCH_CMD" engineer "Fix BUG: null check missing in auth.ts line 42"
618
+ # → Job ID: job-003
619
+ python3 "$DISPATCH_CMD" --check job-003
620
+ # → Status: DONE — all good. Update knowledge and report.
529
621
  \`\`\`
530
622
 
531
- **Step 3-4: Review → Knowledge Update → Task Update → Next Dispatch**
532
- 1. **Review**: Does the output meet acceptance criteria?
533
- 2. **Knowledge Update**: Record decisions, findings, analysis in AKB (journals, knowledge/)
534
- 3. **Task Update**: Update task status in tasks.md or project docs
535
- 4. **Next Dispatch**: Identify and dispatch the next task
536
-
537
623
  ⚠️ Do NOT use curl or other methods to create jobs — always use the dispatch command.
538
- ⚠️ Do NOT use sleep loops to wait — use --check to poll for results.
539
624
 
540
625
  ### Dispatch Quality Requirements
541
626
 
@@ -547,12 +632,35 @@ Every dispatch MUST include:
547
632
 
548
633
  ### Anti-Patterns (NEVER do these)
549
634
 
635
+ - ❌ **Dispatching once and stopping** — you MUST keep working until directive is complete
636
+ - ❌ **Dispatching and NOT polling with --check** — you must poll for results
637
+ - ❌ **Re-dispatching when --check shows RUNNING** — just poll again
550
638
  - ❌ Writing code yourself instead of dispatching to engineer
551
639
  - ❌ Dispatching without acceptance criteria
552
640
  - ❌ Accepting output without reviewing it
553
641
  - ❌ Forgetting to update knowledge/tasks after work completes
554
642
  - ❌ Doing only 1 dispatch when you should chain multiple (Engineer → QA)
555
- - ❌ Reporting to superior without synthesizing subordinate outputs`;
643
+ - ❌ Reporting to superior without synthesizing subordinate outputs
644
+
645
+ ### Post-Dispatch Verification (CRITICAL)
646
+
647
+ After a subordinate completes a code task, you MUST verify the work is preserved:
648
+
649
+ \`\`\`bash
650
+ # 1. Check if subordinate committed their work
651
+ git log --oneline -3
652
+
653
+ # 2. If NOT committed (changes are unstaged), commit on their behalf
654
+ git add -A && git commit -m "feat(scope): description of subordinate's work"
655
+
656
+ # 3. Include in your report to CEO:
657
+ # - What files were changed
658
+ # - Commit hash (if committed)
659
+ # - Whether the changes compile (tsc --noEmit)
660
+ \`\`\`
661
+
662
+ ⛔ **Uncommitted work = lost work.** If the subordinate didn't commit, YOU must commit before reporting.
663
+ Your final report MUST include a **Change Summary** with files changed and commit status.`;
556
664
  } else {
557
665
  section += `
558
666