@zcy2nn/agent-forge 1.1.3 → 1.1.4
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/README.md +247 -247
- package/agent-forge.schema.json +2 -133
- package/dist/cli/index.js +109 -204
- package/dist/cli/providers.d.ts +0 -44
- package/dist/config/constants.d.ts +3 -4
- package/dist/config/index.d.ts +0 -1
- package/dist/config/schema.d.ts +2 -72
- package/dist/index.js +191 -995
- package/dist/tools/index.d.ts +0 -1
- package/dist/tui.js +5 -18
- package/package.json +104 -104
- package/src/skills/brainstorming/SKILL.md +185 -186
- package/src/skills/brainstorming/scripts/frame-template.html +214 -214
- package/src/skills/brainstorming/scripts/server.cjs +354 -354
- package/src/skills/brainstorming/spec-document-reviewer-prompt.md +1 -1
- package/src/skills/codemap/README.md +3 -3
- package/src/skills/codemap/SKILL.md +5 -5
- package/src/skills/codemap/codemap.md +4 -4
- package/src/skills/codemap/scripts/codemap.mjs +1 -1
- package/src/skills/codemap/scripts/codemap.test.ts +1 -1
- package/src/skills/requesting-code-review/SKILL.md +1 -1
- package/src/skills/subagent-driven-development/SKILL.md +1 -1
- package/src/skills/systematic-debugging/SKILL.md +318 -318
- package/src/skills/test-driven-development/SKILL.md +392 -392
- package/src/skills/verification-before-completion/SKILL.md +153 -153
- package/src/skills/writing-plans/SKILL.md +2 -2
- package/src/skills/writing-skills/graphviz-conventions.dot +171 -171
- package/dist/agents/council.d.ts +0 -27
- package/dist/agents/councillor.d.ts +0 -2
- package/dist/agents/designer.d.ts +0 -2
- package/dist/agents/explorer.d.ts +0 -2
- package/dist/agents/fixer.d.ts +0 -2
- package/dist/agents/implementer.d.ts +0 -2
- package/dist/agents/librarian.d.ts +0 -2
- package/dist/agents/observer.d.ts +0 -2
- package/dist/agents/oracle.d.ts +0 -2
- package/dist/agents/reviewer.d.ts +0 -2
- package/dist/cli/migration.d.ts +0 -46
- package/dist/config/council-schema.d.ts +0 -127
- package/dist/council/council-manager.d.ts +0 -49
- package/dist/council/index.d.ts +0 -1
- package/dist/skills/systematic-debugging/condition-based-waiting-example.d.ts +0 -51
- package/dist/tools/council.d.ts +0 -10
- package/src/skills/using-git-worktrees/SKILL.md +0 -226
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { ThreadManager } from '~/threads/thread-manager';
|
|
2
|
-
import type { LaceEvent, LaceEventType } from '~/threads/types';
|
|
3
|
-
/**
|
|
4
|
-
* Wait for a specific event type to appear in thread
|
|
5
|
-
*
|
|
6
|
-
* @param threadManager - The thread manager to query
|
|
7
|
-
* @param threadId - Thread to check for events
|
|
8
|
-
* @param eventType - Type of event to wait for
|
|
9
|
-
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
10
|
-
* @returns Promise resolving to the first matching event
|
|
11
|
-
*
|
|
12
|
-
* Example:
|
|
13
|
-
* await waitForEvent(threadManager, agentThreadId, 'TOOL_RESULT');
|
|
14
|
-
*/
|
|
15
|
-
export declare function waitForEvent(threadManager: ThreadManager, threadId: string, eventType: LaceEventType, timeoutMs?: number): Promise<LaceEvent>;
|
|
16
|
-
/**
|
|
17
|
-
* Wait for a specific number of events of a given type
|
|
18
|
-
*
|
|
19
|
-
* @param threadManager - The thread manager to query
|
|
20
|
-
* @param threadId - Thread to check for events
|
|
21
|
-
* @param eventType - Type of event to wait for
|
|
22
|
-
* @param count - Number of events to wait for
|
|
23
|
-
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
24
|
-
* @returns Promise resolving to all matching events once count is reached
|
|
25
|
-
*
|
|
26
|
-
* Example:
|
|
27
|
-
* // Wait for 2 AGENT_MESSAGE events (initial response + continuation)
|
|
28
|
-
* await waitForEventCount(threadManager, agentThreadId, 'AGENT_MESSAGE', 2);
|
|
29
|
-
*/
|
|
30
|
-
export declare function waitForEventCount(threadManager: ThreadManager, threadId: string, eventType: LaceEventType, count: number, timeoutMs?: number): Promise<LaceEvent[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Wait for an event matching a custom predicate
|
|
33
|
-
* Useful when you need to check event data, not just type
|
|
34
|
-
*
|
|
35
|
-
* @param threadManager - The thread manager to query
|
|
36
|
-
* @param threadId - Thread to check for events
|
|
37
|
-
* @param predicate - Function that returns true when event matches
|
|
38
|
-
* @param description - Human-readable description for error messages
|
|
39
|
-
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
40
|
-
* @returns Promise resolving to the first matching event
|
|
41
|
-
*
|
|
42
|
-
* Example:
|
|
43
|
-
* // Wait for TOOL_RESULT with specific ID
|
|
44
|
-
* await waitForEventMatch(
|
|
45
|
-
* threadManager,
|
|
46
|
-
* agentThreadId,
|
|
47
|
-
* (e) => e.type === 'TOOL_RESULT' && e.data.id === 'call_123',
|
|
48
|
-
* 'TOOL_RESULT with id=call_123'
|
|
49
|
-
* );
|
|
50
|
-
*/
|
|
51
|
-
export declare function waitForEventMatch(threadManager: ThreadManager, threadId: string, predicate: (event: LaceEvent) => boolean, description: string, timeoutMs?: number): Promise<LaceEvent>;
|
package/dist/tools/council.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PluginInput, type ToolDefinition } from '@opencode-ai/plugin';
|
|
2
|
-
import type { CouncilManager } from '../council/council-manager';
|
|
3
|
-
/**
|
|
4
|
-
* Creates the council_session tool for multi-LLM orchestration.
|
|
5
|
-
*
|
|
6
|
-
* This tool triggers a full council session: parallel councillors →
|
|
7
|
-
* formatted results returned to the council agent for synthesis.
|
|
8
|
-
* Available to the council agent.
|
|
9
|
-
*/
|
|
10
|
-
export declare function createCouncilTool(_ctx: PluginInput, councilManager: CouncilManager): Record<string, ToolDefinition>;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: using-git-worktrees
|
|
3
|
-
description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Using Git Worktrees
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
|
|
11
|
-
|
|
12
|
-
**Core principle:** Systematic directory selection + safety verification = reliable isolation.
|
|
13
|
-
|
|
14
|
-
**Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
|
|
15
|
-
|
|
16
|
-
## Directory Selection Process
|
|
17
|
-
|
|
18
|
-
Follow this priority order:
|
|
19
|
-
|
|
20
|
-
### 1. Check Existing Directories
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Check in priority order
|
|
24
|
-
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
|
25
|
-
ls -d worktrees 2>/dev/null # Alternative
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**If found:** Use that directory. If both exist, `.worktrees` wins.
|
|
29
|
-
|
|
30
|
-
### 2. Check CLAUDE.md
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**If preference specified:** Use it without asking.
|
|
37
|
-
|
|
38
|
-
### 3. Ask User
|
|
39
|
-
|
|
40
|
-
If no directory exists and no CLAUDE.md preference:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
No worktree directory found. Where should I create worktrees?
|
|
44
|
-
|
|
45
|
-
1. .worktrees/ (project-local, hidden)
|
|
46
|
-
2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
|
|
47
|
-
|
|
48
|
-
Which would you prefer?
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Safety Verification
|
|
52
|
-
|
|
53
|
-
### For Project-Local Directories (.worktrees or worktrees)
|
|
54
|
-
|
|
55
|
-
**MUST verify directory is ignored before creating worktree:**
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# Check if directory is ignored (respects local, global, and system gitignore)
|
|
59
|
-
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**If NOT ignored:**
|
|
63
|
-
|
|
64
|
-
Per Jesse's rule "Fix broken things immediately":
|
|
65
|
-
1. Add appropriate line to .gitignore
|
|
66
|
-
2. Commit the change
|
|
67
|
-
3. Proceed with worktree creation
|
|
68
|
-
|
|
69
|
-
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
|
70
|
-
|
|
71
|
-
### For Global Directory (~/.config/superpowers/worktrees)
|
|
72
|
-
|
|
73
|
-
No .gitignore verification needed - outside project entirely.
|
|
74
|
-
|
|
75
|
-
## Creation Steps
|
|
76
|
-
|
|
77
|
-
### 1. Detect Project Name
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
project=$(basename "$(git rev-parse --show-toplevel)")
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 2. Create Worktree
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Determine full path
|
|
87
|
-
case $LOCATION in
|
|
88
|
-
.worktrees|worktrees)
|
|
89
|
-
path="$LOCATION/$BRANCH_NAME"
|
|
90
|
-
;;
|
|
91
|
-
~/.config/superpowers/worktrees/*)
|
|
92
|
-
path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
|
|
93
|
-
;;
|
|
94
|
-
esac
|
|
95
|
-
|
|
96
|
-
# Create worktree with new branch
|
|
97
|
-
git worktree add "$path" -b "$BRANCH_NAME"
|
|
98
|
-
cd "$path"
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### 3. Run Project Setup
|
|
102
|
-
|
|
103
|
-
Auto-detect and run appropriate setup:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Node.js
|
|
107
|
-
if [ -f package.json ]; then npm install; fi
|
|
108
|
-
|
|
109
|
-
# Rust
|
|
110
|
-
if [ -f Cargo.toml ]; then cargo build; fi
|
|
111
|
-
|
|
112
|
-
# Python
|
|
113
|
-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
114
|
-
if [ -f pyproject.toml ]; then poetry install; fi
|
|
115
|
-
|
|
116
|
-
# Go
|
|
117
|
-
if [ -f go.mod ]; then go mod download; fi
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### 4. Verify Clean Baseline
|
|
121
|
-
|
|
122
|
-
Run tests to ensure worktree starts clean:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Examples - use project-appropriate command
|
|
126
|
-
npm test
|
|
127
|
-
cargo test
|
|
128
|
-
pytest
|
|
129
|
-
go test ./...
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**If tests fail:** Report failures, ask whether to proceed or investigate.
|
|
133
|
-
|
|
134
|
-
**If tests pass:** Report ready.
|
|
135
|
-
|
|
136
|
-
### 5. Report Location
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
Worktree ready at <full-path>
|
|
140
|
-
Tests passing (<N> tests, 0 failures)
|
|
141
|
-
Ready to implement <feature-name>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Quick Reference
|
|
145
|
-
|
|
146
|
-
| Situation | Action |
|
|
147
|
-
|-----------|--------|
|
|
148
|
-
| `.worktrees/` exists | Use it (verify ignored) |
|
|
149
|
-
| `worktrees/` exists | Use it (verify ignored) |
|
|
150
|
-
| Both exist | Use `.worktrees/` |
|
|
151
|
-
| Neither exists | Check CLAUDE.md → Ask user |
|
|
152
|
-
| Directory not ignored | Add to .gitignore + commit |
|
|
153
|
-
| Tests fail during baseline | Report failures + ask |
|
|
154
|
-
| No package.json/Cargo.toml | Skip dependency install |
|
|
155
|
-
|
|
156
|
-
## Common Mistakes
|
|
157
|
-
|
|
158
|
-
### Skipping ignore verification
|
|
159
|
-
|
|
160
|
-
- **Problem:** Worktree contents get tracked, pollute git status
|
|
161
|
-
- **Fix:** Always use `git check-ignore` before creating project-local worktree
|
|
162
|
-
|
|
163
|
-
### Assuming directory location
|
|
164
|
-
|
|
165
|
-
- **Problem:** Creates inconsistency, violates project conventions
|
|
166
|
-
- **Fix:** Follow priority: existing > CLAUDE.md > ask
|
|
167
|
-
|
|
168
|
-
### Proceeding with failing tests
|
|
169
|
-
|
|
170
|
-
- **Problem:** Can't distinguish new bugs from pre-existing issues
|
|
171
|
-
- **Fix:** Report failures, get explicit permission to proceed
|
|
172
|
-
|
|
173
|
-
### Hardcoding setup commands
|
|
174
|
-
|
|
175
|
-
- **Problem:** Breaks on projects using different tools
|
|
176
|
-
- **Fix:** Auto-detect from project files (package.json, etc.)
|
|
177
|
-
|
|
178
|
-
## Example Workflow
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
You: I'm using the using-git-worktrees skill to set up an isolated workspace.
|
|
182
|
-
|
|
183
|
-
[Check .worktrees/ - exists]
|
|
184
|
-
[Verify ignored - git check-ignore confirms .worktrees/ is ignored]
|
|
185
|
-
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
|
|
186
|
-
[Run npm install]
|
|
187
|
-
[Run npm test - 47 passing]
|
|
188
|
-
|
|
189
|
-
Worktree ready at /Users/jesse/myproject/.worktrees/auth
|
|
190
|
-
Tests passing (47 tests, 0 failures)
|
|
191
|
-
Ready to implement auth feature
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Red Flags
|
|
195
|
-
|
|
196
|
-
**Never:**
|
|
197
|
-
- Create worktree without verifying it's ignored (project-local)
|
|
198
|
-
- Skip baseline test verification
|
|
199
|
-
- Proceed with failing tests without asking
|
|
200
|
-
- Assume directory location when ambiguous
|
|
201
|
-
- Skip CLAUDE.md check
|
|
202
|
-
|
|
203
|
-
**Always:**
|
|
204
|
-
- Follow directory priority: existing > CLAUDE.md > ask
|
|
205
|
-
- Verify directory is ignored for project-local
|
|
206
|
-
- Auto-detect and run project setup
|
|
207
|
-
- Verify clean test baseline
|
|
208
|
-
|
|
209
|
-
## Complexity Assessment
|
|
210
|
-
|
|
211
|
-
**Lightweight usage:**
|
|
212
|
-
- Create worktree in default directory, skip safety verification
|
|
213
|
-
|
|
214
|
-
**Standard usage:**
|
|
215
|
-
- Directory selection → safety verification → create → project setup → verify baseline
|
|
216
|
-
|
|
217
|
-
## Integration
|
|
218
|
-
|
|
219
|
-
**Called by:**
|
|
220
|
-
- **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
|
|
221
|
-
- **subagent-driven-development** - REQUIRED before executing any tasks
|
|
222
|
-
- **executing-plans** - REQUIRED before executing any tasks
|
|
223
|
-
- Any skill needing isolated workspace
|
|
224
|
-
|
|
225
|
-
**Pairs with:**
|
|
226
|
-
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete
|