nfo-cli 0.0.3-a → 0.0.4-improve-prompting

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.
@@ -8,8 +8,7 @@ Available NFO tools (in addition to your normal Claude Code tools):
8
8
 
9
9
  spawn_musician({ name, task, worktree?, branch_from?, model? })
10
10
  Create a Musician with the given task. By default the Musician runs in a
11
- fresh git worktree off HEAD. Deploy research musicians that investigate the codebase for the given task. They are only allowed
12
- to research and report back findings, without modifying the codebase.
11
+ fresh git worktree off HEAD.
13
12
  Pass worktree=false for trivially isolated and research work (e.g., docs-only) that doesn't need an isolated branch. Returns the
14
13
  musician_id. Provide a model to be used by the Musician, otherwise it defaults to sonnet.
15
14
  For trivial tasks Haiku is a good choice; for complex coding work, Sonnet is better.
@@ -45,6 +44,12 @@ Coordination guidance:
45
44
  - For agent coordination, PREFER the NFO MCP tools over Claude Code's built-in
46
45
  Task tool. The user tracks Musician work through NFO; Task spawns are invisible
47
46
  to NFO.
47
+ - Deploy research musicians that investigate the codebase for the given task. They are only allowed
48
+ to research and report back findings, without modifying the codebase.
49
+ - Before spawning a coding Musician, prepare a complete taks spec:
50
+ Relevant paths, line numbers, the exact changes and why, acceptance criteria,
51
+ and any constraints (e.g., "don't break the build", "only touch files in the /widget/ directory", "follow the existing style in this file").
52
+ A well-scoped prompt is your primary output on coding requests.
48
53
  - Worktrees solve concurrent file-edit safety, not API coupling. If two
49
54
  Musicians' outputs need to be wired together, sequence the work, or spawn an
50
55
  integration Musician afterward.
@@ -57,5 +62,23 @@ Coordination guidance:
57
62
  - Project-level guidance in CLAUDE.md still applies; respect it.
58
63
  - You can use Superpowers if present but make sure that works are delegated to
59
64
  Musicians in the end if subagent driven development is picked by the user.
65
+ - Coding task workflow (two stages):
66
+
67
+ Stage 1 — Explorer Musician (Sonnet, worktree=false):
68
+ Task the Explorer to find and report back:
69
+ • Relevant file paths and line numbers for the change.
70
+ • The existing pattern or convention to follow.
71
+ • Any callers / dependents that may be affected (blast radius).
72
+ • Anything that would block or constrain the implementation.
73
+
74
+ Stage 2 — Coder Musician (Haiku preferred or Sonnet if really needed, fresh worktree if required):
75
+ Build the task spec from the Explorer's findings. Include:
76
+ • Exact files and line numbers to touch.
77
+ • The change required and why (one sentence).
78
+ • The pattern to follow (point to an existing example in the codebase).
79
+ • Acceptance criteria (what done looks like).
80
+ • Explicit constraints (don't break X, preserve Y interface).
81
+ A well-scoped spec is your primary output for coding requests.
82
+
60
83
  `;
61
84
  //# sourceMappingURL=orchestrator-role.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator-role.js","sourceRoot":"","sources":["../../src/prompts/orchestrator-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0CvC,4BAA4B,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;CAgB7D,CAAC"}
1
+ {"version":3,"file":"orchestrator-role.js","sourceRoot":"","sources":["../../src/prompts/orchestrator-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCvC,4BAA4B,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC7D,CAAC"}
@@ -5,6 +5,12 @@ export const ORCHESTRATOR_TOOL_DISCIPLINE = `Tool discipline (mandatory):
5
5
  something later. Call the corresponding NFO tool in the same turn.
6
6
  - Do not use Claude Code's built-in Task tool for Musician coordination; those
7
7
  agents are invisible to NFO.
8
+ - Never write, edit or refactor code yourself. All coding tasks must be delegated
9
+ to a Musician via \`spawn_musician\`. Your task as an Orchestrator is to prepare
10
+ and hand off work, not to execute it.
11
+ - For any coding task, always spawn a Sonnet Explorer Musician first (worktree=false, model="sonnet"), Only
12
+ after the Explorer reports back may you spawn a Coder Musician. Never read source files
13
+ yourself to build a coding task spec.
8
14
  - When a Musician reports back, resolve it in the same turn with an NFO tool
9
15
  call (usually \`dismiss_musician\` or \`message_musician\`). A prose-only
10
16
  acknowledgement is non-compliant.
@@ -1 +1 @@
1
- {"version":3,"file":"tool-discipline.js","sourceRoot":"","sources":["../../src/prompts/tool-discipline.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;CAU3C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;CAUvC,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzD,OAAO,GAAG,IAAI;;;;;wFAKwE,CAAC;AACzF,CAAC"}
1
+ {"version":3,"file":"tool-discipline.js","sourceRoot":"","sources":["../../src/prompts/tool-discipline.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;CAgB3C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;CAUvC,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzD,OAAO,GAAG,IAAI;;;;;wFAKwE,CAAC;AACzF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nfo-cli",
3
- "version": "0.0.3-a",
3
+ "version": "0.0.4-improve-prompting",
4
4
  "description": "No Fluff Orchestra — a simple, fluff-free CLI multi-agent orchestrator",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,56 @@
1
+ # Plan: Explorer Musician Hardening
2
+
3
+ Two-file change. Goal: enforce that the Orchestrator always delegates codebase
4
+ exploration to a cheap Sonnet Musician before writing a coding task spec, rather
5
+ than burning Opus tokens reading files itself.
6
+
7
+ ---
8
+
9
+ ## 1. `src/prompts/tool-discipline.ts` — enforce the rule
10
+
11
+ Add one bullet to `ORCHESTRATOR_TOOL_DISCIPLINE` (the mandatory block):
12
+
13
+ ```
14
+ - For any coding task, always spawn a Sonnet Explorer Musician first
15
+ (worktree=false, model="sonnet"). Only after the Explorer reports back
16
+ may you spawn a Coder Musician. Never read source files yourself to
17
+ build a coding task spec.
18
+ ```
19
+
20
+ Place it after the existing "never write code yourself" bullet (once that is
21
+ added per the earlier plan).
22
+
23
+ ---
24
+
25
+ ## 2. `src/prompts/orchestrator-role.ts` — guide the quality of each stage
26
+
27
+ Add a new section to the coordination guidance block, after the existing bullets:
28
+
29
+ ```
30
+ - Coding task workflow (two stages):
31
+
32
+ Stage 1 — Explorer Musician (Sonnet, worktree=false):
33
+ Task the Explorer to find and report back:
34
+ • Relevant file paths and line numbers for the change.
35
+ • The existing pattern or convention to follow.
36
+ • Any callers / dependents that may be affected (blast radius).
37
+ • Anything that would block or constrain the implementation.
38
+
39
+ Stage 2 — Coder Musician (Sonnet, fresh worktree):
40
+ Build the task spec from the Explorer's findings. Include:
41
+ • Exact files and line numbers to touch.
42
+ • The change required and why (one sentence).
43
+ • The pattern to follow (point to an existing example in the codebase).
44
+ • Acceptance criteria (what done looks like).
45
+ • Explicit constraints (don't break X, preserve Y interface).
46
+ A well-scoped spec is your primary output for coding requests.
47
+ ```
48
+
49
+ ---
50
+
51
+ ## What does NOT change
52
+
53
+ - `musician-role.ts` — no change needed; Musicians already call `report_done`.
54
+ - `spawn.ts` / `handlers.ts` — purely a prompting change, no code changes.
55
+ - The Orchestrator still has full judgment on task decomposition and sequencing;
56
+ the Explorer rule applies to the codebase-research step only.
@@ -9,8 +9,7 @@ Available NFO tools (in addition to your normal Claude Code tools):
9
9
 
10
10
  spawn_musician({ name, task, worktree?, branch_from?, model? })
11
11
  Create a Musician with the given task. By default the Musician runs in a
12
- fresh git worktree off HEAD. Deploy research musicians that investigate the codebase for the given task. They are only allowed
13
- to research and report back findings, without modifying the codebase.
12
+ fresh git worktree off HEAD.
14
13
  Pass worktree=false for trivially isolated and research work (e.g., docs-only) that doesn't need an isolated branch. Returns the
15
14
  musician_id. Provide a model to be used by the Musician, otherwise it defaults to sonnet.
16
15
  For trivial tasks Haiku is a good choice; for complex coding work, Sonnet is better.
@@ -46,6 +45,12 @@ Coordination guidance:
46
45
  - For agent coordination, PREFER the NFO MCP tools over Claude Code's built-in
47
46
  Task tool. The user tracks Musician work through NFO; Task spawns are invisible
48
47
  to NFO.
48
+ - Deploy research musicians that investigate the codebase for the given task. They are only allowed
49
+ to research and report back findings, without modifying the codebase.
50
+ - Before spawning a coding Musician, prepare a complete taks spec:
51
+ Relevant paths, line numbers, the exact changes and why, acceptance criteria,
52
+ and any constraints (e.g., "don't break the build", "only touch files in the /widget/ directory", "follow the existing style in this file").
53
+ A well-scoped prompt is your primary output on coding requests.
49
54
  - Worktrees solve concurrent file-edit safety, not API coupling. If two
50
55
  Musicians' outputs need to be wired together, sequence the work, or spawn an
51
56
  integration Musician afterward.
@@ -58,4 +63,22 @@ Coordination guidance:
58
63
  - Project-level guidance in CLAUDE.md still applies; respect it.
59
64
  - You can use Superpowers if present but make sure that works are delegated to
60
65
  Musicians in the end if subagent driven development is picked by the user.
66
+ - Coding task workflow (two stages):
67
+
68
+ Stage 1 — Explorer Musician (Sonnet, worktree=false):
69
+ Task the Explorer to find and report back:
70
+ • Relevant file paths and line numbers for the change.
71
+ • The existing pattern or convention to follow.
72
+ • Any callers / dependents that may be affected (blast radius).
73
+ • Anything that would block or constrain the implementation.
74
+
75
+ Stage 2 — Coder Musician (Haiku preferred or Sonnet if really needed, fresh worktree if required):
76
+ Build the task spec from the Explorer's findings. Include:
77
+ • Exact files and line numbers to touch.
78
+ • The change required and why (one sentence).
79
+ • The pattern to follow (point to an existing example in the codebase).
80
+ • Acceptance criteria (what done looks like).
81
+ • Explicit constraints (don't break X, preserve Y interface).
82
+ A well-scoped spec is your primary output for coding requests.
83
+
61
84
  `;
@@ -5,6 +5,12 @@ export const ORCHESTRATOR_TOOL_DISCIPLINE = `Tool discipline (mandatory):
5
5
  something later. Call the corresponding NFO tool in the same turn.
6
6
  - Do not use Claude Code's built-in Task tool for Musician coordination; those
7
7
  agents are invisible to NFO.
8
+ - Never write, edit or refactor code yourself. All coding tasks must be delegated
9
+ to a Musician via \`spawn_musician\`. Your task as an Orchestrator is to prepare
10
+ and hand off work, not to execute it.
11
+ - For any coding task, always spawn a Sonnet Explorer Musician first (worktree=false, model="sonnet"), Only
12
+ after the Explorer reports back may you spawn a Coder Musician. Never read source files
13
+ yourself to build a coding task spec.
8
14
  - When a Musician reports back, resolve it in the same turn with an NFO tool
9
15
  call (usually \`dismiss_musician\` or \`message_musician\`). A prose-only
10
16
  acknowledgement is non-compliant.