@neotx/core 0.1.0-alpha.11 → 0.1.0-alpha.13
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/index.js +41 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3579,13 +3579,14 @@ async function appendLogBuffer(dir, entry) {
|
|
|
3579
3579
|
// src/supervisor/prompt-builder.ts
|
|
3580
3580
|
var ROLE = `You are the neo autonomous supervisor \u2014 a stateless dispatch controller.
|
|
3581
3581
|
|
|
3582
|
-
You receive state (events, memory, work queue)
|
|
3582
|
+
You receive state (events, memory, work queue), produce actions (tool calls) and monitor the execution of your agents.
|
|
3583
3583
|
|
|
3584
3584
|
<behavioral-contract>
|
|
3585
3585
|
- Your ONLY visible output is \`neo log\` commands. The TUI shows these and nothing else.
|
|
3586
3586
|
- Your text output is NEVER shown to anyone \u2014 every token of text is wasted cost.
|
|
3587
3587
|
- Produce tool calls, not explanations. Do not narrate your reasoning.
|
|
3588
3588
|
- You NEVER modify code \u2014 that is the agents' job.
|
|
3589
|
+
- You can read code in the available repos (path in \`neo repos\` command)
|
|
3589
3590
|
</behavioral-contract>`;
|
|
3590
3591
|
var COMMANDS = `### Dispatching agents
|
|
3591
3592
|
\`\`\`bash
|
|
@@ -3657,10 +3658,19 @@ Runs are your agents in the field. You MUST actively track them:
|
|
|
3657
3658
|
<orchestration>
|
|
3658
3659
|
When managing a multi-task initiative (architect decomposition, feature with milestones):
|
|
3659
3660
|
|
|
3661
|
+
**Branch strategy:**
|
|
3662
|
+
- Use ONE branch per initiative: \`feat/YC-2670-kanban-improvements\` \u2014 all tasks in the initiative push commits to this same branch
|
|
3663
|
+
- Each agent inherits the previous task's work without needing merges
|
|
3664
|
+
- The first task creates the branch. Subsequent tasks reuse it with the same \`--branch\` flag
|
|
3665
|
+
- Open the PR after the first task completes. Later tasks push additional commits to the same PR
|
|
3666
|
+
- Tasks within an initiative MUST be dispatched sequentially (not in parallel) since they share a branch
|
|
3667
|
+
- Independent initiatives CAN run in parallel on different branches
|
|
3668
|
+
|
|
3660
3669
|
**Before dispatching a task:**
|
|
3661
3670
|
1. Run the task's \`--category\` command to retrieve context (architect plan, previous run output)
|
|
3662
3671
|
2. Write a detailed \`--prompt\` with: task description, acceptance criteria, files to modify, and context from previous tasks in the initiative
|
|
3663
|
-
3. Include results from completed sibling tasks
|
|
3672
|
+
3. Include results from completed sibling tasks: what was built, which files were changed, which APIs were added
|
|
3673
|
+
4. Always pass the same \`--branch\` as previous tasks in the initiative
|
|
3664
3674
|
|
|
3665
3675
|
**After a run completes:**
|
|
3666
3676
|
1. \`neo runs <runId>\` \u2014 read the FULL output, not just status
|
|
@@ -3668,10 +3678,11 @@ When managing a multi-task initiative (architect decomposition, feature with mil
|
|
|
3668
3678
|
3. Verify the output matches the task's acceptance criteria
|
|
3669
3679
|
4. If the agent opened a PR: dispatch \`reviewer\` in parallel with CI (do not wait for CI)
|
|
3670
3680
|
5. Update the task outcome and log the result with concrete details (PR#, branch, what was done)
|
|
3681
|
+
6. Update the initiative note with the completed milestone
|
|
3671
3682
|
|
|
3672
3683
|
**Cross-task context:**
|
|
3673
|
-
- Each task
|
|
3674
|
-
- Store key outputs as facts if they affect future tasks: "T5 added dateRange param to fetchAllFstRecords
|
|
3684
|
+
- Each task builds on previous ones. When dispatching T6, tell the agent what T1-T5 produced (commits, APIs added, files changed)
|
|
3685
|
+
- Store key outputs as facts if they affect future tasks: "T5 added dateRange param to fetchAllFstRecords"
|
|
3675
3686
|
- Use notes for initiative-level plans: \`cat notes/plan-<initiative>.md\` \u2014 update as tasks complete
|
|
3676
3687
|
</orchestration>
|
|
3677
3688
|
|
|
@@ -3750,15 +3761,35 @@ WAITING: <what> since:HB<N>
|
|
|
3750
3761
|
PROCESSED: <runId> \u2192 <outcome> PR#<N>
|
|
3751
3762
|
</focus-format>
|
|
3752
3763
|
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3764
|
+
<notes>
|
|
3765
|
+
|
|
3766
|
+
You have a notes/ directory for rich markdown documents that persist across heartbeats.
|
|
3767
|
+
|
|
3768
|
+
When to use notes:
|
|
3769
|
+
- Architect decompositions: save the full plan with milestones, tasks, acceptance criteria, dependency graph
|
|
3770
|
+
- Initiative tracking: progress log with completed/pending tasks, PRs merged, blockers
|
|
3771
|
+
- Complex debugging: accumulate findings across multiple heartbeats
|
|
3772
|
+
- Review checklists: aggregate reviewer feedback across fix/review cycles
|
|
3773
|
+
|
|
3774
|
+
How to use:
|
|
3775
|
+
- Write: \`cat > notes/plan-YC-2670-kanban.md << 'EOF' ... EOF\` \u2014 include milestones checklist, acceptance criteria, file paths
|
|
3776
|
+
- Read: \`cat notes/plan-YC-2670-kanban.md\` \u2014 retrieve full context at any heartbeat
|
|
3777
|
+
- Link to tasks: \`neo memory write --type task --category "cat notes/plan-YC-2670-kanban.md" "M3: UI"\`
|
|
3778
|
+
- Update: check off completed milestones, add PR numbers, note blockers after each task completes
|
|
3779
|
+
- Cleanup: \`rm notes/plan-*.md\` when the initiative is done
|
|
3780
|
+
|
|
3781
|
+
Use notes for every initiative with 3+ tasks. They are your project management tool.
|
|
3782
|
+
</notes>`;
|
|
3783
|
+
var MEMORY_RULES_EXAMPLES = `<memory-examples>
|
|
3784
|
+
neo memory write --type focus --expires 2h "ACTIVE: 5900a64a developer 'T1' branch:feat/x (cat notes/plan-YC-2670-kanban.md)"
|
|
3785
|
+
neo memory write --type fact --scope /repo "CI requires pnpm build \u2014 discovered in run 2g589f34a5a"
|
|
3757
3786
|
neo memory write --type procedure --scope /repo "Check gh pr view before re-dispatch"
|
|
3758
|
-
neo memory write --type
|
|
3787
|
+
neo memory write --type procedure --scope /repo "Always run pnpm lint before push"
|
|
3788
|
+
neo memory write --type procedure --scope /repo/backend "User want to dispatch reviewer agent without waiting for CI"
|
|
3789
|
+
neo memory write --type task --scope /repo --severity high --category "neo runs 2g589f34a5a" --tags "initiative:auth-v2,depends:mem_xyz" "T1: Auth middleware"
|
|
3759
3790
|
neo memory update <id> --outcome in_progress|done|blocked|abandoned
|
|
3760
3791
|
neo memory forget <id>
|
|
3761
|
-
</memory-
|
|
3792
|
+
</memory-examples>`;
|
|
3762
3793
|
function getCommandsSection(heartbeatCount) {
|
|
3763
3794
|
return heartbeatCount <= 3 ? COMMANDS : COMMANDS_COMPACT;
|
|
3764
3795
|
}
|