@agentic-coding-framework/orchestrator-core 0.1.0 → 0.1.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
@@ -83,7 +83,8 @@ try {
83
83
  process.exit(1);
84
84
  }
85
85
  const label = args[2] || undefined; // optional label
86
- const state = (0, dispatch_1.startCustom)(projectRoot, instruction, label);
86
+ const agentTeams = args[3] === "--agent-teams";
87
+ const state = (0, dispatch_1.startCustom)(projectRoot, instruction, { label, agentTeams });
87
88
  console.log(`Started custom task: "${instruction}"`);
88
89
  console.log(` label: ${state.story}, step: ${state.step}, task_type: ${state.task_type}`);
89
90
  break;
@@ -98,7 +98,9 @@ export declare function rejectReview(projectRoot: string, reason: Reason, humanN
98
98
  * Begin a new User Story. Resets state to bdd step with attempt 1.
99
99
  * Auto-initializes STATE.json if the project hasn't adopted the framework yet.
100
100
  */
101
- export declare function startStory(projectRoot: string, storyId: string): State;
101
+ export declare function startStory(projectRoot: string, storyId: string, options?: {
102
+ agentTeams?: boolean;
103
+ }): State;
102
104
  /**
103
105
  * Get a human-friendly project status summary.
104
106
  * OpenClaw calls this when the user asks "how's the project?" or "open project X".
@@ -189,4 +191,7 @@ export declare function listProjects(workspaceRoot: string): ProjectEntry[];
189
191
  * Use cases: refactoring, code review, bug fix, DevOps, documentation,
190
192
  * testing, migration, performance optimization, security, cleanup, etc.
191
193
  */
192
- export declare function startCustom(projectRoot: string, instruction: string, label?: string): State;
194
+ export declare function startCustom(projectRoot: string, instruction: string, options?: {
195
+ label?: string;
196
+ agentTeams?: boolean;
197
+ }): State;
package/dist/dispatch.js CHANGED
@@ -203,6 +203,15 @@ function buildPrompt(state, rule) {
203
203
  }
204
204
  lines.push("");
205
205
  }
206
+ // Agent-teams
207
+ if (state.agent_teams) {
208
+ lines.push("=== Agent Teams ===");
209
+ lines.push("You may spawn sub-agents using Claude Code's agent-teams feature to parallelize this work. " +
210
+ "Assign sub-agents by role (e.g. backend, frontend, test) with scoped context. " +
211
+ "Each sub-agent should produce its own HANDOFF.md or result summary for you to merge.");
212
+ lines.push("===================");
213
+ lines.push("");
214
+ }
206
215
  // Step instruction
207
216
  lines.push(rule.step_instruction);
208
217
  lines.push("");
@@ -481,7 +490,7 @@ function ensureState(projectRoot) {
481
490
  * Begin a new User Story. Resets state to bdd step with attempt 1.
482
491
  * Auto-initializes STATE.json if the project hasn't adopted the framework yet.
483
492
  */
484
- function startStory(projectRoot, storyId) {
493
+ function startStory(projectRoot, storyId, options = {}) {
485
494
  const state = ensureState(projectRoot);
486
495
  const rule = (0, rules_1.getRule)("bdd");
487
496
  state.story = storyId;
@@ -499,6 +508,7 @@ function startStory(projectRoot, storyId) {
499
508
  state.files_changed = [];
500
509
  state.blocked_by = [];
501
510
  state.human_note = null;
511
+ state.agent_teams = options.agentTeams ?? false;
502
512
  (0, state_1.writeState)(projectRoot, state);
503
513
  return state;
504
514
  }
@@ -692,10 +702,10 @@ function listProjects(workspaceRoot) {
692
702
  * Use cases: refactoring, code review, bug fix, DevOps, documentation,
693
703
  * testing, migration, performance optimization, security, cleanup, etc.
694
704
  */
695
- function startCustom(projectRoot, instruction, label) {
705
+ function startCustom(projectRoot, instruction, options = {}) {
696
706
  const state = ensureState(projectRoot);
697
707
  const rule = (0, rules_1.getRule)("custom");
698
- state.story = label ?? `CUSTOM-${Date.now()}`;
708
+ state.story = options.label ?? `CUSTOM-${Date.now()}`;
699
709
  state.step = "custom";
700
710
  state.attempt = 1;
701
711
  state.max_attempts = rule.max_attempts;
@@ -711,6 +721,7 @@ function startCustom(projectRoot, instruction, label) {
711
721
  state.blocked_by = [];
712
722
  state.human_note = instruction;
713
723
  state.task_type = "custom";
724
+ state.agent_teams = options.agentTeams ?? false;
714
725
  (0, state_1.writeState)(projectRoot, state);
715
726
  return state;
716
727
  }
package/dist/state.d.ts CHANGED
@@ -55,6 +55,8 @@ export interface State {
55
55
  human_note: string | null;
56
56
  /** Task type: "story" for micro-waterfall, "custom" for ad-hoc tasks */
57
57
  task_type: TaskType;
58
+ /** Whether CC is allowed to spawn agent-teams for this task */
59
+ agent_teams: boolean;
58
60
  }
59
61
  /** Create a blank STATE.json for a new project */
60
62
  export declare function createInitialState(project: string): State;
package/dist/state.js CHANGED
@@ -39,6 +39,7 @@ function createInitialState(project) {
39
39
  blocked_by: [],
40
40
  human_note: null,
41
41
  task_type: "story",
42
+ agent_teams: false,
42
43
  };
43
44
  }
44
45
  // ─── File I/O ────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-coding-framework/orchestrator-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Zero-token orchestrator for the Agentic Coding Protocol — state machine, rules table, dispatch logic, CC integration",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",