agileflow 2.33.1 â 2.35.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.
- package/LICENSE +22 -0
- package/README.md +536 -0
- package/package.json +1 -1
- package/src/core/agents/adr-writer.md +3 -19
- package/src/core/agents/api.md +9 -43
- package/src/core/agents/ci.md +8 -40
- package/src/core/agents/configuration/archival.md +301 -0
- package/src/core/agents/configuration/attribution.md +318 -0
- package/src/core/agents/configuration/ci.md +1077 -0
- package/src/core/agents/configuration/git-config.md +511 -0
- package/src/core/agents/configuration/hooks.md +507 -0
- package/src/core/agents/configuration/verify.md +540 -0
- package/src/core/agents/devops.md +7 -35
- package/src/core/agents/documentation.md +0 -1
- package/src/core/agents/epic-planner.md +3 -22
- package/src/core/agents/mentor.md +8 -24
- package/src/core/agents/research.md +0 -7
- package/src/core/agents/security.md +0 -5
- package/src/core/agents/ui.md +8 -42
- package/src/core/commands/PATTERNS-AskUserQuestion.md +474 -0
- package/src/core/commands/adr.md +5 -0
- package/src/core/commands/agent.md +4 -0
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/auto.md +1 -1
- package/src/core/commands/babysit.md +147 -31
- package/src/core/commands/baseline.md +7 -0
- package/src/core/commands/blockers.md +2 -0
- package/src/core/commands/board.md +9 -0
- package/src/core/commands/configure.md +415 -0
- package/src/core/commands/context.md +1 -0
- package/src/core/commands/deps.md +2 -0
- package/src/core/commands/diagnose.md +0 -41
- package/src/core/commands/epic.md +8 -0
- package/src/core/commands/handoff.md +4 -0
- package/src/core/commands/impact.md +1 -1
- package/src/core/commands/metrics.md +10 -0
- package/src/core/commands/research.md +3 -0
- package/src/core/commands/retro.md +11 -1
- package/src/core/commands/sprint.md +2 -1
- package/src/core/commands/status.md +1 -0
- package/src/core/commands/story-validate.md +1 -1
- package/src/core/commands/story.md +29 -2
- package/src/core/commands/template.md +8 -0
- package/src/core/commands/update.md +1 -1
- package/src/core/commands/velocity.md +9 -0
- package/src/core/commands/verify.md +6 -0
- package/src/core/templates/validate-tokens.sh +0 -15
- package/src/core/templates/worktrees-guide.md +0 -4
- package/tools/agileflow-npx.js +21 -9
- package/tools/cli/commands/config.js +284 -0
- package/tools/cli/commands/doctor.js +221 -4
- package/tools/cli/commands/setup.js +4 -1
- package/tools/cli/commands/update.js +59 -15
- package/tools/cli/installers/core/installer.js +369 -37
- package/tools/cli/installers/ide/claude-code.js +1 -1
- package/tools/cli/installers/ide/cursor.js +1 -1
- package/tools/cli/installers/ide/windsurf.js +1 -1
- package/tools/cli/lib/docs-setup.js +52 -28
- package/tools/cli/lib/npm-utils.js +62 -0
- package/tools/cli/lib/ui.js +9 -2
- package/tools/postinstall.js +71 -13
- package/src/core/agents/context7.md +0 -164
- package/src/core/commands/setup.md +0 -708
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Visualize dependency graph with critical path detection
|
|
3
|
+
argument-hint: [SCOPE=story|epic|all] [EPIC=<id>] [STORY=<id>] [FORMAT=ascii|mermaid|graphviz|json] [ANALYSIS=critical-path|circular|blocking|all]
|
|
3
4
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
5
|
+
model: haiku
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# dependencies
|
|
@@ -30,8 +30,6 @@ JSON_FILES=(
|
|
|
30
30
|
"docs/00-meta/agileflow-metadata.json"
|
|
31
31
|
"docs/09-agents/status.json"
|
|
32
32
|
"docs/09-agents/status-archive.json"
|
|
33
|
-
"docs/08-project/github-sync-map.json"
|
|
34
|
-
"docs/08-project/notion-sync-map.json"
|
|
35
33
|
".claude/settings.json"
|
|
36
34
|
)
|
|
37
35
|
|
|
@@ -162,45 +160,6 @@ fi
|
|
|
162
160
|
|
|
163
161
|
echo ""
|
|
164
162
|
|
|
165
|
-
# Check 5: MCP Integration
|
|
166
|
-
echo "đ MCP Integration"
|
|
167
|
-
echo "------------------"
|
|
168
|
-
|
|
169
|
-
if [ -f .mcp.json ]; then
|
|
170
|
-
if jq empty .mcp.json 2>/dev/null; then
|
|
171
|
-
echo " â
.mcp.json is valid JSON"
|
|
172
|
-
|
|
173
|
-
# Check if in .gitignore
|
|
174
|
-
if grep -q "^\\.mcp\\.json$" .gitignore 2>/dev/null; then
|
|
175
|
-
echo " â
.mcp.json is in .gitignore (secure)"
|
|
176
|
-
else
|
|
177
|
-
echo " â ī¸ WARNING: .mcp.json is NOT in .gitignore"
|
|
178
|
-
echo " This is a SECURITY RISK - add it immediately!"
|
|
179
|
-
JSON_ERRORS=$((JSON_ERRORS + 1))
|
|
180
|
-
fi
|
|
181
|
-
else
|
|
182
|
-
echo " â .mcp.json is INVALID JSON"
|
|
183
|
-
JSON_ERRORS=$((JSON_ERRORS + 1))
|
|
184
|
-
fi
|
|
185
|
-
else
|
|
186
|
-
echo " âšī¸ MCP not configured (.mcp.json not found)"
|
|
187
|
-
fi
|
|
188
|
-
|
|
189
|
-
if [ -f .env ]; then
|
|
190
|
-
# Check if in .gitignore
|
|
191
|
-
if grep -q "^\\.env$" .gitignore 2>/dev/null; then
|
|
192
|
-
echo " â
.env is in .gitignore (secure)"
|
|
193
|
-
else
|
|
194
|
-
echo " â ī¸ WARNING: .env is NOT in .gitignore"
|
|
195
|
-
echo " This is a SECURITY RISK - add it immediately!"
|
|
196
|
-
JSON_ERRORS=$((JSON_ERRORS + 1))
|
|
197
|
-
fi
|
|
198
|
-
else
|
|
199
|
-
echo " âšī¸ .env not found (optional if MCP not configured)"
|
|
200
|
-
fi
|
|
201
|
-
|
|
202
|
-
echo ""
|
|
203
|
-
|
|
204
163
|
# Final Summary
|
|
205
164
|
echo "đ Diagnostic Summary"
|
|
206
165
|
echo "====================="
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create a new epic with stories
|
|
3
|
+
argument-hint: EPIC=<EP-ID> TITLE=<text> OWNER=<id> GOAL=<text> [STORIES=<list>]
|
|
3
4
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -11,6 +12,9 @@ Create a new epic with optional child stories.
|
|
|
11
12
|
|
|
12
13
|
ROLE: Epic Creator
|
|
13
14
|
|
|
15
|
+
OBJECTIVE
|
|
16
|
+
Analyze feature requirements and create structured epics with associated stories. Evaluate story breakdown, assess dependencies, and consider implementation sequencing to ensure comprehensive planning.
|
|
17
|
+
|
|
14
18
|
TODO LIST TRACKING
|
|
15
19
|
**CRITICAL**: Immediately create a todo list using TodoWrite tool to track epic creation:
|
|
16
20
|
```
|
|
@@ -31,6 +35,10 @@ OWNER=<name or agent id>
|
|
|
31
35
|
GOAL=<outcome/metric>
|
|
32
36
|
STORIES=<optional> comma-separated "<US_ID>|<short title>|<owner>"
|
|
33
37
|
|
|
38
|
+
TEMPLATE
|
|
39
|
+
Use the following epic template structure:
|
|
40
|
+
@packages/cli/src/core/templates/epic-template.md
|
|
41
|
+
|
|
34
42
|
ACTIONS
|
|
35
43
|
1) Create docs/05-epics/<EPIC>.md from epic-template.md (status=active; created/updated=now).
|
|
36
44
|
2) For each story, create docs/06-stories/<EPIC>/<US_ID>-<slug>.md from story-template.md (status=ready; estimate=0.5d; deps=[]).
|
|
@@ -26,6 +26,10 @@ INPUTS
|
|
|
26
26
|
STORY=<US-ID> FROM=<id> TO=<id>
|
|
27
27
|
SUMMARY=<what changed> BLOCKERS=<optional list>
|
|
28
28
|
|
|
29
|
+
TEMPLATE
|
|
30
|
+
Use the following comms note template:
|
|
31
|
+
@packages/cli/src/core/templates/comms-note-template.md
|
|
32
|
+
|
|
29
33
|
ACTIONS
|
|
30
34
|
1) Create docs/09-agents/comms/<STORY>-<YYYYMMDD>-handoff.md from comms-note-template.md.
|
|
31
35
|
2) Append bus line type="handoff".
|
|
@@ -12,7 +12,7 @@ Analyze the impact of code changes on other parts of the codebase.
|
|
|
12
12
|
ROLE: Impact Analyzer
|
|
13
13
|
|
|
14
14
|
OBJECTIVE
|
|
15
|
-
|
|
15
|
+
Analyze and identify which files, tests, and features are affected by code changes to prevent regressions. Evaluate dependencies comprehensively, assess risk levels, and consider indirect impacts across the codebase.
|
|
16
16
|
|
|
17
17
|
INPUTS (optional)
|
|
18
18
|
- FILES=<comma-separated paths> (default: auto-detect from git diff)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Analytics dashboard with cycle time and throughput
|
|
3
|
+
argument-hint: [TIMEFRAME=7d|30d|90d|all] [EPIC=<id>] [OWNER=<id>] [FORMAT=ascii|json|csv] [METRIC=cycle-time|lead-time|throughput|all]
|
|
3
4
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
5
|
+
model: haiku
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# metrics
|
|
@@ -14,6 +16,14 @@ ROLE: Metrics & Analytics Specialist
|
|
|
14
16
|
OBJECTIVE
|
|
15
17
|
Generate comprehensive project metrics from AgileFlow data sources (status.json, bus/log.jsonl, story files) to enable data-driven decision making.
|
|
16
18
|
|
|
19
|
+
CONTEXT
|
|
20
|
+
|
|
21
|
+
Live repository state:
|
|
22
|
+
- Current branch: !`git branch --show-current`
|
|
23
|
+
- Recent commits: !`git log --since="30 days ago" --oneline | wc -l`
|
|
24
|
+
- Active stories: !`grep -c '"status":"in-progress"' docs/09-agents/status.json 2>/dev/null || echo "0"`
|
|
25
|
+
- Bus log entries: !`wc -l < docs/09-agents/bus/log.jsonl 2>/dev/null || echo "0"`
|
|
26
|
+
|
|
17
27
|
INPUTS (optional)
|
|
18
28
|
- TIMEFRAME=7d|30d|90d|all (default: 30d)
|
|
19
29
|
- EPIC=<EP_ID> (filter by specific epic)
|
|
@@ -11,6 +11,9 @@ Initialize or save research notes to the research folder.
|
|
|
11
11
|
|
|
12
12
|
ROLE: Research Initializer
|
|
13
13
|
|
|
14
|
+
OBJECTIVE
|
|
15
|
+
Evaluate and organize research findings with structured analysis. Assess relevance, consider key insights, and examine sources to create comprehensive research documentation.
|
|
16
|
+
|
|
14
17
|
TODO LIST TRACKING
|
|
15
18
|
**CRITICAL**: Immediately create a todo list using TodoWrite tool to track research initialization:
|
|
16
19
|
```
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate retrospective with Start/Stop/Continue format
|
|
3
|
+
argument-hint: [TIMEFRAME=sprint|2weeks|30d|90d] [EPIC=<id>] [FORMAT=ascii|markdown|html] [SAVE=true|false]
|
|
3
4
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
5
|
+
model: haiku
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# retro
|
|
@@ -30,6 +32,14 @@ Mark each step complete as you finish it. This ensures comprehensive retrospecti
|
|
|
30
32
|
OBJECTIVE
|
|
31
33
|
Automatically generate retrospective insights by analyzing bus/log.jsonl, status.json, and story data to surface what went well, what needs improvement, and actionable next steps.
|
|
32
34
|
|
|
35
|
+
CONTEXT
|
|
36
|
+
|
|
37
|
+
Live repository state:
|
|
38
|
+
- Current branch: !`git branch --show-current`
|
|
39
|
+
- Sprint activity: !`git log --since="14 days ago" --oneline | wc -l`
|
|
40
|
+
- Contributors: !`git log --since="14 days ago" --format='%an' | sort -u`
|
|
41
|
+
- Recent completions: !`tail -10 docs/09-agents/bus/log.jsonl 2>/dev/null | grep -c '"status":"done"' || echo "0"`
|
|
42
|
+
|
|
33
43
|
INPUTS (optional)
|
|
34
44
|
- TIMEFRAME=sprint|2weeks|30d|90d (default: 2weeks)
|
|
35
45
|
- EPIC=<EP_ID> (retrospective for specific epic)
|
|
@@ -516,7 +526,7 @@ USAGE EXAMPLES
|
|
|
516
526
|
/AgileFlow:retro SAVE=false
|
|
517
527
|
```
|
|
518
528
|
|
|
519
|
-
### Export as markdown
|
|
529
|
+
### Export as markdown
|
|
520
530
|
```bash
|
|
521
531
|
/AgileFlow:retro FORMAT=markdown > retro.md
|
|
522
532
|
```
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Data-driven sprint planning with velocity forecasting
|
|
3
|
+
argument-hint: [SPRINT=<id>] [DURATION=<days>] [AGENTS=<list>] [MODE=suggest|commit] [FOCUS_EPIC=<id>]
|
|
3
4
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
5
|
+
model: haiku
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# sprint-plan
|
|
@@ -470,7 +472,6 @@ ${MODE == "commit" && "1. â
Sprint committed! Stories updated in status.json"}
|
|
|
470
472
|
2. Assign first stories: /AgileFlow:assign STORY=US-0043 (highest priority)
|
|
471
473
|
3. Monitor progress: /AgileFlow:board
|
|
472
474
|
4. Track blockers: /AgileFlow:blockers
|
|
473
|
-
5. Sync to external systems: /AgileFlow:github-sync or /AgileFlow:notion
|
|
474
475
|
```
|
|
475
476
|
|
|
476
477
|
RULES
|
|
@@ -26,7 +26,7 @@ TODO LIST TRACKING
|
|
|
26
26
|
Mark each step complete as you finish it. This ensures thorough validation.
|
|
27
27
|
|
|
28
28
|
OBJECTIVE
|
|
29
|
-
|
|
29
|
+
Comprehensively analyze and validate that a story is complete, well-structured, and ready for implementation. Evaluate each aspect critically and assess readiness:
|
|
30
30
|
1. All required sections present (per story template)
|
|
31
31
|
2. Architecture Context populated with source citations
|
|
32
32
|
3. Clear, testable Acceptance Criteria
|
|
@@ -19,7 +19,7 @@ TODO LIST TRACKING
|
|
|
19
19
|
3. Create docs/07-testing/test-cases/<STORY>.md stub
|
|
20
20
|
4. Merge into docs/09-agents/status.json
|
|
21
21
|
5. Append assign line to bus/log.jsonl
|
|
22
|
-
6. Show preview and
|
|
22
|
+
6. Show preview and confirm with AskUserQuestion
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Mark each step complete as you finish it. This ensures nothing is forgotten.
|
|
@@ -30,9 +30,36 @@ OWNER=<name or agent id> ESTIMATE=<e.g., 0.5d>
|
|
|
30
30
|
DEPENDENCIES=[US-000X,...] (optional)
|
|
31
31
|
AC=<Given/When/Then bullets>
|
|
32
32
|
|
|
33
|
+
TEMPLATE
|
|
34
|
+
Use the following template structure:
|
|
35
|
+
@packages/cli/src/core/templates/story-template.md
|
|
36
|
+
|
|
33
37
|
ACTIONS
|
|
34
38
|
1) Create docs/06-stories/<EPIC>/<STORY>-<slug>.md from story-template.md with frontmatter & AC.
|
|
35
39
|
2) Create docs/07-testing/test-cases/<STORY>.md (stub referencing AC).
|
|
36
40
|
3) Merge into docs/09-agents/status.json; append "assign" line to bus/log.jsonl.
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
**Show diff-first, then confirm with AskUserQuestion**:
|
|
43
|
+
```xml
|
|
44
|
+
<invoke name="AskUserQuestion">
|
|
45
|
+
<parameter name="questions">[{
|
|
46
|
+
"question": "Create story <STORY>: <TITLE> with these files?",
|
|
47
|
+
"header": "Create story",
|
|
48
|
+
"multiSelect": false,
|
|
49
|
+
"options": [
|
|
50
|
+
{
|
|
51
|
+
"label": "Yes, create story",
|
|
52
|
+
"description": "Write story file, test stub, and update status.json (Recommended)"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"label": "No, revise first",
|
|
56
|
+
"description": "I want to modify the content before creating"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"label": "Cancel",
|
|
60
|
+
"description": "Don't create this story"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}]</parameter>
|
|
64
|
+
</invoke>
|
|
65
|
+
```
|
|
@@ -31,6 +31,14 @@ AgileFlow includes default templates in `docs/00-meta/templates/`:
|
|
|
31
31
|
- `research-template.md` - Research notes
|
|
32
32
|
- `README-template.md` - Folder READMEs
|
|
33
33
|
|
|
34
|
+
**Built-in Template References** (view actual templates):
|
|
35
|
+
- Story Template: @packages/cli/src/core/templates/story-template.md
|
|
36
|
+
- Epic Template: @packages/cli/src/core/templates/epic-template.md
|
|
37
|
+
- ADR Template: @packages/cli/src/core/templates/adr-template.md
|
|
38
|
+
- Agent Profile: @packages/cli/src/core/templates/agent-profile-template.md
|
|
39
|
+
- Comms Note: @packages/cli/src/core/templates/comms-note-template.md
|
|
40
|
+
- Research: @packages/cli/src/core/templates/research-template.md
|
|
41
|
+
|
|
34
42
|
Users can create custom templates for:
|
|
35
43
|
- Meeting notes
|
|
36
44
|
- Sprint retrospectives
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Track velocity and forecast sprint capacity
|
|
3
3
|
allowed-tools: Bash, Read, Edit, Write, Glob, Grep
|
|
4
|
+
model: haiku
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# velocity
|
|
@@ -14,6 +15,14 @@ ROLE: Velocity Analyst & Forecaster
|
|
|
14
15
|
OBJECTIVE
|
|
15
16
|
Calculate team velocity from completed stories, identify trends, and forecast epic/milestone completion dates.
|
|
16
17
|
|
|
18
|
+
CONTEXT
|
|
19
|
+
|
|
20
|
+
Live repository state:
|
|
21
|
+
- Current branch: !`git branch --show-current`
|
|
22
|
+
- Commits this week: !`git log --since="7 days ago" --oneline | wc -l`
|
|
23
|
+
- Bus log activity: !`tail -5 docs/09-agents/bus/log.jsonl 2>/dev/null || echo "No bus log found"`
|
|
24
|
+
- Stories completed recently: !`grep -c '"status":"done"' docs/09-agents/status.json 2>/dev/null || echo "0"`
|
|
25
|
+
|
|
17
26
|
INPUTS (optional)
|
|
18
27
|
- PERIOD=week|sprint|month|all (default: sprint - last 2 weeks)
|
|
19
28
|
- FORECAST=<EPIC_ID or milestone> (predict completion date)
|
|
@@ -11,6 +11,12 @@ You are running the `/AgileFlow:verify` command to execute project tests and upd
|
|
|
11
11
|
|
|
12
12
|
Execute project tests and update `test_status` for stories in `docs/09-agents/status.json`. This is a core component of the **Session Harness System** (introduced in v2.24.0) that ensures test verification before and after implementation work.
|
|
13
13
|
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
- Current branch: !`git branch --show-current`
|
|
17
|
+
- Git status: !`git status --short`
|
|
18
|
+
- Last commit: !`git log -1 --oneline`
|
|
19
|
+
|
|
14
20
|
## TODO LIST TRACKING
|
|
15
21
|
|
|
16
22
|
**CRITICAL**: Immediately create a todo list using TodoWrite tool to track test verification:
|
|
@@ -49,21 +49,6 @@ else
|
|
|
49
49
|
echo "âšī¸ NOTION_TOKEN not found in .env (optional if Notion not enabled)"
|
|
50
50
|
fi
|
|
51
51
|
|
|
52
|
-
echo ""
|
|
53
|
-
|
|
54
|
-
# Check Context7 token (secure - doesn't print value)
|
|
55
|
-
if grep -q "^CONTEXT7_API_KEY=" .env && ! grep -q "CONTEXT7_API_KEY=$" .env; then
|
|
56
|
-
TOKEN_VALUE=$(grep "^CONTEXT7_API_KEY=" .env | cut -d'=' -f2)
|
|
57
|
-
if [ -z "$TOKEN_VALUE" ] || [ "$TOKEN_VALUE" = "your_key_here" ] || [[ "$TOKEN_VALUE" == *"placeholder"* ]]; then
|
|
58
|
-
echo "â ī¸ CONTEXT7_API_KEY is set but appears to be placeholder"
|
|
59
|
-
echo " â Replace with real key (optional for higher rate limits)"
|
|
60
|
-
else
|
|
61
|
-
echo "â
CONTEXT7_API_KEY is set (length: ${#TOKEN_VALUE})"
|
|
62
|
-
fi
|
|
63
|
-
else
|
|
64
|
-
echo "âšī¸ CONTEXT7_API_KEY not found in .env (optional)"
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
52
|
echo ""
|
|
68
53
|
echo "đ Security Check:"
|
|
69
54
|
|
|
@@ -178,10 +178,6 @@ git branch -d feature/new-feature
|
|
|
178
178
|
|
|
179
179
|
AgileFlow's message bus (`docs/09-agents/bus/log.jsonl`) is shared across all worktrees. The bus is append-only (JSONL), so concurrent appends are generally safe. However, **status.json** uses read-modify-write, so avoid concurrent edits to the same stories.
|
|
180
180
|
|
|
181
|
-
### GitHub & Notion Sync
|
|
182
|
-
|
|
183
|
-
If you have GitHub or Notion MCP integration enabled, each worktree can sync independently. Both updates go to the same GitHub repo/Notion workspace (shared .git).
|
|
184
|
-
|
|
185
181
|
## Troubleshooting
|
|
186
182
|
|
|
187
183
|
### "fatal: 'branch' is already checked out"
|
package/tools/agileflow-npx.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* It preserves the user's working directory when spawning the CLI.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const {
|
|
10
|
+
const { spawnSync } = require('node:child_process');
|
|
11
11
|
const path = require('node:path');
|
|
12
12
|
const fs = require('node:fs');
|
|
13
13
|
|
|
@@ -25,15 +25,27 @@ if (isNpxExecution) {
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
// Execute CLI from user's working directory (process.cwd()), not npm cache
|
|
29
|
+
const result = spawnSync(process.execPath, [cliPath, ...args], {
|
|
30
|
+
stdio: 'inherit',
|
|
31
|
+
cwd: process.cwd(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
if (result.error) {
|
|
35
|
+
console.error('Error: Failed to run AgileFlow CLI:', result.error.message);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (result.signal) {
|
|
40
|
+
try {
|
|
41
|
+
process.kill(process.pid, result.signal);
|
|
42
|
+
} catch {
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
process.exit(1);
|
|
36
46
|
}
|
|
47
|
+
|
|
48
|
+
process.exit(result.status ?? 0);
|
|
37
49
|
} else {
|
|
38
50
|
// Local execution - use require
|
|
39
51
|
require('./cli/agileflow-cli.js');
|