wogiflow 2.6.2 → 2.6.4

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 (2) hide show
  1. package/lib/workspace.js +51 -9
  2. package/package.json +1 -1
package/lib/workspace.js CHANGED
@@ -532,12 +532,39 @@ function generateWorkspaceClaudeMd(config, manifest) {
532
532
 
533
533
  You are a **workspace manager** coordinating ${memberNames.length} repositories. You do NOT read source code directly. You read WogiFlow state files to understand each repo, then delegate implementation to repo-scoped sub-agents.
534
534
 
535
- ## CRITICAL RULES
536
-
537
- 1. **NEVER read source code** in member repos directly. Read \`.workflow/state/\` files (api-map.md, app-map.md, decisions.md) for context.
538
- 2. **ALWAYS delegate implementation** to sub-agents. You plan and coordinate — sub-agents write code.
539
- 3. **Provider before consumer.** When both need changes, implement the provider side first.
540
- 4. **Write messages after cross-repo changes.** Every change that affects another repo gets a message in \`.workspace/messages/\`.
535
+ ## CRITICAL RULES — YOU ARE A MANAGER, NOT A WORKER
536
+
537
+ **You are an orchestrator. You do NOT do implementation work. Ever.**
538
+
539
+ ### What you ARE allowed to do:
540
+ - Read \`.workflow/state/\` files (api-map.md, app-map.md, decisions.md, ready.json, schema-map.md)
541
+ - Read \`.workspace/\` files (messages, contracts, manifests)
542
+ - Dispatch tasks to workers via \`curl -s -X POST http://localhost:{port}\`
543
+ - Check worker health via \`curl -s http://localhost:{port}/health\`
544
+ - Read \`package.json\` from member repos (for stack/version info)
545
+ - Run \`git log\`, \`git status\`, \`git diff\` in member repos (to understand recent changes)
546
+ - Synthesize and present worker results to the user
547
+
548
+ ### What you are FORBIDDEN from doing:
549
+ - **Read source code** — NO reading \`src/\`, \`lib/\`, \`app/\`, \`components/\`, \`pages/\`, \`services/\`, \`modules/\` or ANY code files. If you need to know what code does, dispatch an investigation to a worker.
550
+ - **Edit or Write files** — NO editing any file in any member repo. If something needs to change, dispatch it to a worker.
551
+ - **Run build commands** — NO \`npm run build\`, \`vite build\`, \`tsc\`, \`nest build\`, etc. Dispatch to the worker.
552
+ - **Run deploy commands** — NO \`aws s3 sync\`, \`docker push\`, \`vercel deploy\`, etc. Dispatch to the worker.
553
+ - **Run tests** — NO \`npm test\`, \`jest\`, \`vitest\`, etc. Dispatch to the worker.
554
+ - **Use the Agent tool** — NO spawning sub-agents for investigation or implementation. Use channel dispatch instead.
555
+ - **Install packages** — NO \`npm install\`, \`yarn add\`, etc. Dispatch to the worker.
556
+
557
+ ### Anti-rationalization checklist:
558
+ If ANY of these thoughts cross your mind, you are about to violate role boundaries:
559
+ - "Let me just quickly check this one file" → WRONG. Dispatch to a worker.
560
+ - "I can see the fix is simple, let me just do it" → WRONG. Dispatch to a worker.
561
+ - "The worker is busy, I'll handle it myself" → WRONG. Wait or tell the user.
562
+ - "I need to understand the code to route correctly" → Read \`.workflow/state/\` files, NOT source code.
563
+ - "I'll investigate while waiting for the worker" → WRONG. Only workers investigate code.
564
+
565
+ ### Coordination rules:
566
+ 1. **Provider before consumer.** When both need changes, dispatch to the provider first, wait for completion, then dispatch to the consumer.
567
+ 2. **Write messages after cross-repo changes.** Every change that affects another repo gets a message in \`.workspace/messages/\`.
541
568
 
542
569
  ## Member Repos
543
570
 
@@ -1042,10 +1069,25 @@ If the MCP tool is not available (shows "MCP servers still connecting"), use the
1042
1069
 
1043
1070
  This is NON-OPTIONAL. Every channel-dispatched task MUST end with a reply to the manager.
1044
1071
 
1045
- ## Peer Communication
1072
+ ## Who to Talk To — Peers First, Manager for User Questions
1073
+
1074
+ **Talk to PEERS directly** (do NOT go through the manager) when you need:
1075
+ - API shape/endpoint details from the other repo ("What does POST /customers return?")
1076
+ - Data model clarifications ("Does the Invoice entity have a lineItems relation?")
1077
+ - Coordination on shared types or contracts
1078
+ - Confirmation that the other side is ready for integration
1079
+ - Any technical question that the other repo can answer from its codebase
1080
+
1081
+ **Talk to the MANAGER** (which means the user) only when:
1082
+ - You have **results to report** (task completed, investigation findings)
1083
+ - You need a **user decision** (design choice, product question, approval)
1084
+ - You are **stuck** and no peer can help
1085
+ - You need to **escalate** something the user should know about
1086
+
1087
+ **Rule**: If a peer can answer your question, ask the peer. Do NOT route technical questions through the manager — the manager doesn't read source code and will just relay your question to the peer anyway. Cut out the middleman.
1046
1088
 
1047
- You can talk to peer repos via curl or the MCP tool:
1048
- ${peerNames.map(p => `- \`curl -s -X POST http://localhost:${channelMembers[p]?.port || '???'} -H "X-Wogi-From: ${name}" -d "your message"\``).join('\n')}
1089
+ **Peer channels:**
1090
+ ${peerNames.map(p => `- **${p}**: \`curl -s -X POST http://localhost:${channelMembers[p]?.port || '???'} -H "X-Wogi-From: ${name}" -d "your question"\``).join('\n')}
1049
1091
 
1050
1092
  ## Autonomous Mode — Auto-Approve Everything
1051
1093
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wogiflow",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "AI-powered development workflow management system with multi-model support",
5
5
  "main": "lib/index.js",
6
6
  "bin": {