openfleet 0.1.0 → 0.2.0

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,7 +8,7 @@ not for humans, though it would be difficult to mess this up unintentionally.
8
8
 
9
9
  ## For Agents 🤖
10
10
 
11
- Understand `## Structure`, then see `./status/current.md`, and other necessary
11
+ Understand `## Structure`, then see `./status.md`, and other necessary
12
12
  files before starting your current task.
13
13
 
14
14
  ## Structure
@@ -16,36 +16,51 @@ files before starting your current task.
16
16
  ```
17
17
  .openfleet/
18
18
  ├── README.md
19
- ├── status/
20
- ├── current.md # Anchor point - agent reads this first
19
+ ├── status.md # Anchor point - agent reads this first (gitignored)
20
+ ├── agents/ # Per-agent scratchpads (gitignored)
21
+ │ ├── Zeus.md
22
+ │ ├── Athena.md
23
+ │ ├── Apollo.md
24
+ │ ├── Hercules.md
25
+ │ ├── Chiron.md
26
+ │ └── Mnemosyne.md
27
+ ├── sessions/ # Agent transcripts / journals (gitignored)
28
+ ├── stories/ # Work organized by story/epic (gitignored)
29
+ ├── docs/ # Permanent documentation (committed)
21
30
  │ └── README.md
22
- ├── sessions/ # Agent transcripts / journals
23
- └── README.md
24
- ├── stories/ # Work organized by story/epic
25
- │ ├── README.md
26
- │ └── unassigned/
27
- │ └── README.md
28
- ├── docs/
29
- │ ├── README.md
30
- │ └── working/ # Agent scratch space
31
- │ └── README.md
32
- ├── experience/ # Self-healing long term memory
33
- │ ├── README.md
34
- │ ├── Mnemosyne.md
35
- │ ├── runbooks/ # Used for recurring tasks, like Claude Agent Skills
36
- │ ├── troubleshooting/ # Used for common errors
37
- │ ├── lessons/ # Used for learning from past mistakes
38
- │ └── blunders/ # Used for learning from stupid mistakes
39
- ├── standards/
40
- │ ├── README.md
31
+ ├── experience/ # Self-healing long term memory (committed)
32
+ ├── runbooks/ # Used for recurring tasks
33
+ ├── troubleshooting/ # Used for common errors
34
+ │ ├── lessons/ # Used for learning from past mistakes
35
+ │ └── blunders/ # Used for learning from stupid mistakes
36
+ ├── standards/ # Prescriptive guidelines (committed)
41
37
  │ ├── code-style.md
42
38
  │ ├── architecture.md
43
39
  │ ├── testing.md
44
40
  │ └── review-checklist.md
45
- └── reviews/ # Human review artifacts
41
+ └── reviews/ # Human review artifacts (committed)
46
42
  └── README.md
47
43
  ```
48
44
 
45
+ ## Git worktree visualization
46
+
47
+ ```
48
+ main/dev
49
+
50
+ └──► feat/<story>
51
+
52
+ ├──► feat/<story>/<task>
53
+ │ │
54
+ │ └──► feat/<story>/<task>/<branch>
55
+
56
+ ╰─────● PR raised for review
57
+
58
+ Legend:
59
+ - `├──►` branch created
60
+ - `╰─────●` resolved (merged back to parent)
61
+ - `╰─────` escalated (became sibling story)
62
+ ```
63
+
49
64
  ## Flexibility
50
65
 
51
66
  This template is a _general_ guide for project management. Feel free to customize
@@ -0,0 +1,10 @@
1
+ # Apollo
2
+
3
+ _God of music, poetry, and prophecy._
4
+
5
+ Your personal scratchpad. Use this for:
6
+
7
+ - Design patterns that worked well
8
+ - Estimation accuracy notes
9
+ - HLD/LLD templates worth reusing
10
+ - Architecture decisions and rationale
@@ -0,0 +1,10 @@
1
+ # Athena
2
+
3
+ _Goddess of wisdom and strategic warfare._
4
+
5
+ Your personal scratchpad. Use this for:
6
+
7
+ - Research patterns that worked well
8
+ - Useful search queries and codebase landmarks
9
+ - Notes on documentation sources
10
+ - Patterns discovered during exploration
@@ -0,0 +1,10 @@
1
+ # Chiron
2
+
3
+ _Wisest of the centaurs, teacher of heroes._
4
+
5
+ Your personal scratchpad. Use this for:
6
+
7
+ - Common review findings
8
+ - Code style preferences observed
9
+ - Patterns worth enforcing
10
+ - Review checklist additions
@@ -0,0 +1,10 @@
1
+ # Hercules
2
+
3
+ _Divine hero known for strength and endurance._
4
+
5
+ Your personal scratchpad. Use this for:
6
+
7
+ - Commands and scripts that worked
8
+ - Environment quirks and workarounds
9
+ - Debugging approaches that helped
10
+ - Build/test configurations
@@ -0,0 +1,12 @@
1
+ # Zeus
2
+
3
+ _King of the gods, ruler of Mount Olympus._
4
+
5
+ Your personal scratchpad. Use this for:
6
+
7
+ - Pending decisions awaiting user input
8
+ - User preferences observed during sessions
9
+ - Notes on agent performance and coordination
10
+
11
+ Do NOT use this for public information - use `status.md` instead,
12
+ where other agents can see it as well.
@@ -1,51 +1,51 @@
1
1
  # Documentation Directory
2
2
 
3
- Design documents and working notes.
3
+ Permanent documentation and compressed story learnings.
4
4
 
5
5
  ## Structure
6
6
 
7
7
  ```
8
8
  docs/
9
- ├── README.md # This file
10
- ├── adr/ # Architecture decision records
9
+ ├── README.md # This file
10
+ ├── <story-name>.md # Compressed learnings (auto-generated by Zeus)
11
+ ├── adr/ # Architecture decision records (optional)
11
12
  │ └── 001-use-postgres.md
12
- ├── guides/ # How-to guides for humans
13
- └── local-development.md
14
- └── working/ # Agent scratch space for drafts
15
- └── <document-name>.md
13
+ └── guides/ # How-to guides for humans (optional)
14
+ └── local-development.md
16
15
  ```
17
16
 
18
- ## File naming
17
+ ## Story Documentation Format
19
18
 
20
- Use lowercase kebab-case:
19
+ After a story completes, Zeus writes `<story-name>.md`:
21
20
 
22
- - `openfleet-v2-hld.md`
23
- - `auth-redesign-proposal.md`
24
- - `api-migration-plan.md`
21
+ ```markdown
22
+ # <Story Name>
25
23
 
26
- ## Usage
24
+ **Completed**: YYYY-MM-DD
25
+ **PR**: #XX (if applicable)
27
26
 
28
- The `working/` directory is for temporary documents being drafted by agents.
29
- Once finalized, move docs to appropriate directories under `docs/` or `stories/`.
27
+ ## Summary
30
28
 
31
- ## Format
29
+ <1-2 paragraph overview>
32
30
 
33
- Working documents are freeform, but commonly include:
31
+ ## Task Tree
34
32
 
35
- ```markdown
36
- # <Document title>
33
+ <Git tree visualization>
37
34
 
38
- ## Overview
35
+ ## Key Decisions
39
36
 
40
- <Brief description of what this document covers>
37
+ | Decision | Choice | Rationale |
38
+ | -------- | ------ | --------- |
41
39
 
42
- ## <Section 1>
40
+ ## Learnings
43
41
 
44
- <Content>
42
+ - <Insight 1>
43
+ - <Insight 2>
44
+ ```
45
45
 
46
- ## <Section 2>
46
+ ## File Naming
47
47
 
48
- <Content>
49
- ```
48
+ Use lowercase kebab-case:
50
49
 
51
- For design docs specifically (HLD/LLD), see the story task format in `stories/README.md`.
50
+ - `auth-redesign.md`
51
+ - `openfleet-branching-model.md`
@@ -6,7 +6,6 @@ Self-healing systems with long-term memory. Learned knowledge from past work.
6
6
 
7
7
  ```
8
8
  experience/
9
- ├── Mnemosyne.md # Ignore unless you're the Reflect agent
10
9
  ├── runbooks/ # How-to guides for recurring tasks
11
10
  ├── troubleshooting/ # Problem → solution mappings
12
11
  ├── lessons/ # Insights and best practices
@@ -0,0 +1,7 @@
1
+ # .openfleet
2
+ agents/
3
+ stories/
4
+ status.md
5
+ sessions/
6
+ transcripts/
7
+ openfleet.log
@@ -0,0 +1,31 @@
1
+ # Status
2
+
3
+ Shared anchor point for all agents. Read this first before starting any task.
4
+
5
+ ## Current Position
6
+
7
+ **Story**: _None_
8
+ **Branch**: `main`
9
+ **Task**: _None_
10
+
11
+ ## Context Files
12
+
13
+ _No active story - nothing to read yet._
14
+
15
+ ## Git Tree
16
+
17
+ ```
18
+ main ← you are here
19
+ ```
20
+
21
+ ## Instructions
22
+
23
+ _No active instructions._
24
+
25
+ ## Blocked
26
+
27
+ _Nothing blocked._
28
+
29
+ ## Notes
30
+
31
+ _No notes._
@@ -1,86 +1,197 @@
1
1
  # Stories Directory
2
2
 
3
- Work organized by story (epic-level grouping).
3
+ Working tree for active stories. **This directory is gitignored.**
4
4
 
5
5
  ## Structure
6
6
 
7
7
  ```
8
8
  stories/
9
- ├── README.md # This file
10
- ├── YYYY-WXX/ # Week-based organization
11
- │ └── <story-name>/
12
- ├── README.md # Story overview
13
- │ └── tasks/
14
- │ └── MM-DD_<task-name>/
15
- ├── Research.md # Scout the topic
16
- │ ├── HLD.md # High-level design
17
- └── LLD.md # Low-level design
18
- └── unassigned/ # Tasks without a story
9
+ ├── README.md # This file
10
+ └── <story-name>/
11
+ ├── README.md # Story overview, goals
12
+ ├── Research.md # Scout's findings
13
+ ├── HLD.md # High-level design
14
+ ├── LLD.md # Low-level design
15
+ ├── Implementation.md # Actor's report
16
+ └── tasks/
17
+ └── <MM-DD_task-name>/
18
+ ├── README.md # Task overview
19
+ ├── Research.md
20
+ ├── HLD.md
21
+ ├── LLD.md
22
+ ├── Implementation.md
23
+ └── branches/ # For discovered issues
24
+ └── <branch-name>/
25
+ ├── README.md
26
+ ├── Research.md
27
+ ├── HLD.md
28
+ ├── LLD.md
29
+ ├── Implementation.md
30
+ └── branches/ # Recursive (unlimited depth)
19
31
  ```
20
32
 
21
- ## Naming conventions
33
+ ## Naming Conventions
22
34
 
23
- - **Week directories**: `YYYY-WXX` (e.g., `2026-W01`)
24
- - **Story directories**: lowercase kebab-case (e.g., `auth-redesign`, `openfleet-v2`)
25
- - **Task directories**: `MM-DD_<task-name>` (e.g., `01-03_implement-save-conversation`)
35
+ - **Story directories**: lowercase kebab-case (`auth-redesign`, `openfleet-v2`)
36
+ - **Task directories**: `MM-DD_<task-name>` (month-day, e.g. `01-05_jwt-validation` for Jan 5)
37
+ - **Branch directories**: lowercase kebab-case (`fix-expiry`, `add-caching`)
26
38
 
27
- ## Usage
39
+ ## Git Alignment
28
40
 
29
- Stories group related tasks under a common theme or epic.
30
- Use week-based directories to organize by time period.
41
+ File system paths map to git branches:
31
42
 
32
- ## Story README format
43
+ | Path | Git Branch |
44
+ | ----------------------------------------------------------- | -------------------------------------------------------------- |
45
+ | `stories/agent-harness-hardening/` | `feat/agent-harness-hardening` |
46
+ | `stories/agent-harness-hardening/tasks/01-05_plugin-hooks/` | `feat/agent-harness-hardening/plugin-hooks` |
47
+ | `stories/.../branches/fix-opencode-hooks/` | `feat/agent-harness-hardening/plugin-hooks/fix-opencode-hooks` |
33
48
 
34
- ```markdown
35
- # <Story name>
36
-
37
- ## Goal
38
-
39
- <What this story aims to accomplish>
49
+ ## Branch Complexity Tiers
40
50
 
41
- ## Tasks
51
+ When Zeus discovers an issue mid-task:
42
52
 
43
- - [ ] <Task 1>
44
- - [ ] <Task 2>
53
+ | Tier | Criteria | Action |
54
+ | ------- | --------------------- | ------------------------------ |
55
+ | Trivial | <10 lines, obvious | Actor fixes inline |
56
+ | Medium | Needs investigation | Create `branches/`, mini-SPARR |
57
+ | Hard | Cross-cutting concern | Escalate to sibling story |
45
58
 
46
- ## Status
59
+ ## Story Lifecycle
47
60
 
48
- <Current status: planning | in-progress | completed>
49
- ```
61
+ 1. Zeus creates story directory + git branch
62
+ 2. SPARR cycle: Scout → Planner → Actor → Reviewer → Reflector
63
+ 3. If issue discovered: assess tier, branch if needed
64
+ 4. On completion: Zeus compresses to `docs/<story>.md`
65
+ 5. Working files can be deleted (gitignored anyway)
50
66
 
51
- ## Task HLD format
67
+ ## Story README Format
52
68
 
53
69
  ```markdown
54
- # <Task name> - High Level Design
70
+ # <Story Name>
55
71
 
56
- ## Problem
72
+ **Created**: YYYY-MM-DD
73
+ **Status**: planning | in_progress | completed
74
+ **Branch**: feat/<story-name>
75
+
76
+ ## Goal
57
77
 
58
- <What problem does this solve>
78
+ <What this story aims to accomplish>
59
79
 
60
- ## Solution
80
+ ## Tasks
61
81
 
62
- <High-level approach>
82
+ - [ ] <Task 1>
83
+ - [x] <Task 2> ← completed
63
84
 
64
- ## Scope
85
+ ## Git Tree
65
86
 
66
- - <What's included>
67
- - <What's excluded>
87
+ <Current branch topology - maintained by Zeus>
68
88
  ```
69
89
 
70
- ## Task LLD format
90
+ ## Example: Complete Story with Branches
71
91
 
72
- ```markdown
73
- # <Task name> - Low Level Design
92
+ This example demonstrates a real story with nested branches, escalation, and resolution.
74
93
 
75
- ## Implementation
94
+ ### File System Structure
76
95
 
77
- <Detailed technical approach>
96
+ ```
97
+ stories/
98
+ └── agent-harness-hardening/
99
+ ├── README.md
100
+ ├── Research.md
101
+ ├── HLD.md
102
+ ├── LLD.md
103
+ └── tasks/
104
+ ├── 01-05_plugin-hooks/
105
+ │ ├── README.md
106
+ │ ├── Research.md
107
+ │ ├── HLD.md
108
+ │ ├── LLD.md
109
+ │ └── branches/
110
+ │ └── fix-opencode-hooks/
111
+ │ ├── README.md
112
+ │ ├── Research.md ← mini-SPARR
113
+ │ ├── HLD.md
114
+ │ ├── LLD.md
115
+ │ └── branches/
116
+ │ └── add-hook-regression-tests/ ← nested branch (2 levels deep)
117
+ │ ├── README.md
118
+ │ ├── Research.md
119
+ │ └── LLD.md
120
+
121
+ ├── 01-07_transcript-pipeline/
122
+ │ ├── README.md
123
+ │ ├── Research.md
124
+ │ ├── HLD.md
125
+ │ ├── LLD.md
126
+ │ └── branches/
127
+ │ └── add-browser-mcp/ ← escalated to sibling story
128
+ │ ├── README.md
129
+ │ └── Research.md ← Scout found it's too big
130
+
131
+ └── 01-09_tool-registry/
132
+ ├── README.md
133
+ ├── Research.md
134
+ ├── HLD.md
135
+ └── LLD.md ← simple task, no branches needed
136
+ ```
78
137
 
79
- ## Files to modify
138
+ ### Corresponding Git Tree
80
139
 
81
- - `path/to/file.ts`: <changes>
140
+ ```
141
+ main
142
+
143
+ ├──► feat/agent-harness-hardening a1b2c3d start agent harness hardening
144
+ │ │
145
+ │ ├──► feat/agent-harness-hardening/plugin-hooks b2c3d4e harden opencode plugin hooks
146
+ │ │ │
147
+ │ │ ├──► feat/agent-harness-hardening/plugin-hooks/fix-opencode-hooks
148
+ │ │ │ │ c3d4e5f fix hook edge case
149
+ │ │ │ │
150
+ │ │ │ ├──► feat/agent-harness-hardening/plugin-hooks/fix-opencode-hooks/add-hook-regression-tests
151
+ │ │ │ │ │ d4e5f6g add regression test coverage
152
+ │ │ │ │ │
153
+ │ │ │ ╰─────● ← resolved (merged to fix-opencode-hooks)
154
+ │ │ │ │
155
+ │ │ │ └── e5f6g7h tests passing
156
+ │ │ │
157
+ │ │ ╰─────● ← resolved (merged to plugin-hooks)
158
+ │ │ │
159
+ │ │ └── f6g7h8i hook hardening complete
160
+ │ │
161
+ │ ╰─────● ← resolved (merged to agent-harness-hardening)
162
+ │ │
163
+ │ ├──► feat/agent-harness-hardening/transcript-pipeline g7h8i9j implement transcript pipeline
164
+ │ │ │
165
+ │ │ ├──► feat/agent-harness-hardening/transcript-pipeline/add-browser-mcp
166
+ │ │ │ │ h8i9j0k scout browser mcp integration
167
+ │ │ │ │
168
+ │ │ ╰─────✕ ← escalated to feat/browser-mcp-integration
169
+ │ │ │
170
+ │ │ └── i9j0k1l transcript pipeline (sans browser mcp)
171
+ │ │
172
+ │ ╰─────● ← resolved (merged to agent-harness-hardening)
173
+ │ │
174
+ │ ├──► feat/agent-harness-hardening/tool-registry j0k1l2m implement tool registry
175
+ │ │ │
176
+ │ │ └── k1l2m3n tool registry complete
177
+ │ │
178
+ │ ╰─────● ← resolved (merged to agent-harness-hardening)
179
+ │ │
180
+ │ └── l2m3n4o agent harness hardening complete
181
+
182
+ ╰─────● PR #47 merged to main
183
+
184
+
185
+ stories/browser-mcp-integration/ ← sibling story (escalated from transcript-pipeline)
186
+ └──► feat/browser-mcp-integration m3n4o5p start browser mcp integration
187
+
188
+ └── (in progress...)
189
+ ```
82
190
 
83
- ## Testing
191
+ ### Legend
84
192
 
85
- <How to verify the implementation>
86
- ```
193
+ | Symbol | Meaning |
194
+ | --------- | -------------------------------- |
195
+ | `├──►` | Branch created |
196
+ | `╰─────●` | Resolved (merged back to parent) |
197
+ | `╰─────✕` | Escalated (became sibling story) |
@@ -0,0 +1,30 @@
1
+ # Transcripts Directory
2
+
3
+ Human-readable Markdown transcripts of agent sessions.
4
+
5
+ ## Format
6
+
7
+ Each session is stored as `{sessionID}.md` with entries:
8
+
9
+ - **User Message**: User messages with timestamp and content
10
+ - **Tool Use**: Tool invocations with call ID and input
11
+ - **Tool Result**: Tool outputs with input, output, and metadata
12
+
13
+ Entries are separated by `---` for readability.
14
+
15
+ ## Subagent Transcripts
16
+
17
+ Subagent transcripts are stored in `{parentSessionID}/{subagentSessionID}.md`.
18
+
19
+ ## Usage
20
+
21
+ ```bash
22
+ # View full transcript
23
+ cat .openfleet/transcripts/{sessionID}.md
24
+
25
+ # Search for tool calls
26
+ grep "## Tool Use:" .openfleet/transcripts/{sessionID}.md
27
+
28
+ # Count tool calls
29
+ grep -c "## Tool Use:" .openfleet/transcripts/{sessionID}.md
30
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfleet",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "SPAR framework agents + infinite context for OpenCode",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "url": "git+https://github.com/scottsus/openfleet.git"
20
20
  },
21
21
  "scripts": {
22
- "build": "tsup src/index.ts --format esm --dts --clean && cp -r src/templates dist/",
22
+ "build": "rm -rf dist && tsup src/index.ts --format esm --dts && cp -r src/templates dist/",
23
23
  "dev": "tsup src/index.ts --format esm --dts --watch",
24
24
  "typecheck": "tsc --noEmit",
25
25
  "format": "prettier --write .",
@@ -1,5 +0,0 @@
1
- # Working Documents
2
-
3
- Agent scratch space for drafts and work-in-progress documents.
4
-
5
- Files here are temporary. Move finalized docs to appropriate story directories.
@@ -1,15 +0,0 @@
1
- # Status Directory
2
-
3
- The anchor point for agent context. Always read `current.md` first.
4
-
5
- ## Files
6
-
7
- - `current.md`: Current work status, active story, recent sessions
8
-
9
- ## Usage
10
-
11
- All agents will read this file on startup for working context.
12
-
13
- ## Git commit preference
14
-
15
- _Undecided between **submit as PR** or **NEVER MAKE ANY COMMITS**_
@@ -1,29 +0,0 @@
1
- # Current Status
2
-
3
- **Last Updated**: 2026-01-04T04:09:33.840Z
4
- **Active Story**: _none_
5
- **Status**: idle
6
-
7
- ## Current Work
8
-
9
- _No active work._
10
-
11
- ## Active Tasks
12
-
13
- _None._
14
-
15
- ## Recent Sessions
16
-
17
- - `001_investigate-openfleet-directory.md` (2026-01-04) [188 messages, 74.5K tokens] ← current session
18
-
19
- ---
20
-
21
- ## Quick Stats
22
-
23
- - Sessions today: 1
24
- - Sessions this week: 1
25
- - Last housekeeping: 2026-01-04T04:10:15Z
26
-
27
- ---
28
-
29
- _Updated by agents and tools automatically._
@@ -1,40 +0,0 @@
1
- # Unassigned Tasks
2
-
3
- Tasks that don't belong to a specific story.
4
-
5
- ## Structure
6
-
7
- ```
8
- unassigned/
9
- ├── README.md # This file
10
- └── MM-DD_<task-name>/
11
- ├── HLD.md # High-level design (optional for small tasks)
12
- └── LLD.md # Low-level design (optional for small tasks)
13
- ```
14
-
15
- ## Usage
16
-
17
- Place standalone tasks here that are:
18
-
19
- - Quick fixes
20
- - One-off requests
21
- - Not part of a larger initiative
22
-
23
- Move to a story directory when they become part of a larger effort.
24
-
25
- ## When to skip HLD/LLD
26
-
27
- For trivial tasks (< 1 hour of work), a single `notes.md` is sufficient:
28
-
29
- ```markdown
30
- # <Task name>
31
-
32
- ## What
33
-
34
- <Brief description>
35
-
36
- ## Changes
37
-
38
- - <Change 1>
39
- - <Change 2>
40
- ```