Skip to content

Commit 039b100

Browse files
committed
feat: Swarm Network Fat Ticket bootstrapping and autoGoldenPath (#9790)
1 parent 4c40d2e commit 039b100

4 files changed

Lines changed: 29 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For any actionable request that requires modifying the repository, you **MUST**
2525

2626
**Gate 1: The Ticket Gate**
2727
1. **Scoping:** Tickets force focus. A single ticket (and its subsequent commit) should address one discrete problem or feature. Never bundle unrelated fixes into a single ticket/commit.
28-
2. **Problem-Focused:** When creating a ticket, focus the description on the *problem* or the *user story*.
28+
2. **The "Fat Ticket" Protocol (MANDATORY):** You MUST adhere to the Swarm Architecture "Fat Ticket" protocol (defined in `AGENTS_STARTUP.md`). When creating a ticket, focus the description not just for human tracking, but as a rich A2A (Agent-to-Agent) memory bridge containing deep architectural context, rationale, and avoided pitfalls.
2929
3. **Exploration is Allowed:** You are permitted to write code, modify files, and experiment locally to understand a complex problem ("Unknown Unknowns") *before* creating the ticket.
3030
4. **The Hard Stop:** The absolute hard stop is `git commit`. You **MUST NEVER** execute a commit without referencing a valid, narrowly scoped ticket ID in the commit message. Use the `create_issue` tool and follow its workflow.
3131

AGENTS_STARTUP.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,20 @@ Without this context, sub-agents will hallucinate bugs where none exist (e.g., c
251251
3. **Consult the Expert:** If tools are insufficient or the hierarchy is complex, **ASK THE USER**.
252252
- *Template:* "I cannot see the parent container's computed styles. Could you please paste the computed `height` and `overflow` of the element wrapping `.my-component`?"
253253
4. **Verify Assumptions:** Never assume a class like `neo-label` behaves standardly. Verify its computed style.
254+
255+
## 9. Swarm Architecture: The "Fat Ticket" Protocol
256+
257+
**Context:** The Neo.mjs project runs as a distributed agentic swarm. Multiple hardware instances (e.g., Mac 1, Mac 2) operate simultaneously, but their underlying SQLite `/neo-ai-data` repositories are entirely local to avoid cross-network database collisions.
258+
259+
**The Boot Amnesia Problem:** This means that when a secondary agent drops into the network or pulls a new git sync, it has *zero* chronological memory vectors of what the primary agent discussed, discovered, or decided in the preceding sessions.
260+
261+
**The Solution:** You MUST bridge the SQLite gap by converting GitHub Issues into your primary episodic memory carriers.
262+
263+
**Mandatory Workflow:**
264+
1. **Do Not Create Skeleton Tickets:** You are strictly forbidden from creating GitHub issues with one-sentence descriptions. A ticket is not just for human tracking; it is the **A2A (Agent-to-Agent)** data transport mechanism.
265+
2. **Generate "Fat Tickets":** When you call `create_issue`, the `body` parameter MUST contain a highly detailed summary that functions as a structural graph node proxy.
266+
3. **Required A2A Context:** The Fat Ticket MUST contain:
267+
- **The Problem:** Include deep background context or insights from your recent Memory Core explorations.
268+
- **The Architectural Reality:** Point out exactly *which* Neo.mjs patterns or class topologies this issue interacts with. Include specific paths to files discovered during your research.
269+
- **Avoided Gold Standards/Traps:** Summarize *why* you decided not to use alternative paths based on your prior queries.
270+
4. **Handoff Realization:** On boot (`initAsync`), nodes like Mac 2 automatically synthesize the latest synced `.md` issues into their local SQLite matrix and build `sandman_handoff.md`. If your tickets are "Fat," the resulting "Golden Path" ranking will accurately bridge the distributed swarm without ever merging the raw SQLite files.

ai/mcp/server/memory-core/config.template.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ const defaultConfig = {
2323
* @type {boolean}
2424
*/
2525
autoDream: process.env.AUTO_DREAM !== 'false',
26+
/**
27+
* Automatically trigger Golden Path Synthesis into the handoff file on startup.
28+
* Crucial for headless swarm nodes (Mac 2) to physically generate sandman_handoff.md.
29+
* @type {boolean}
30+
*/
31+
autoGoldenPath: process.env.AUTO_GOLDEN_PATH !== 'false',
2632
/**
2733
* Immediately parse each incoming memory turn (add_memory) for Graph Injection.
2834
* @type {boolean}

ai/mcp/server/memory-core/services/DreamService.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ class DreamService extends Base {
6868
logger.info('[Startup] DreamService: Checking for undigested session memories...');
6969
this.processUndigestedSessions().catch(e => logger.error('[Startup] DreamService failed:', e));
7070
}
71+
72+
if (aiConfig.data.autoGoldenPath) {
73+
logger.info('[Startup] DreamService: Synthesizing Golden Path into handoff file...');
74+
this.synthesizeGoldenPath().catch(e => logger.error('[Startup] Golden Path generation failed:', e));
75+
}
7176
}
7277

7378
/**

0 commit comments

Comments
 (0)