agileflow 2.71.0 → 2.73.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/package.json +1 -1
- package/scripts/agileflow-configure.js +119 -85
- package/src/core/agents/configuration/archival.md +10 -10
- package/src/core/commands/configure.md +68 -32
- package/tools/cli/installers/core/installer.js +3 -11
- package/src/core/templates/agileflow-configure.js +0 -1033
- package/src/core/templates/agileflow-statusline.sh +0 -355
- package/src/core/templates/agileflow-welcome.js +0 -731
- package/src/core/templates/clear-active-command.js +0 -42
- package/src/core/templates/precompact-context.sh +0 -123
- /package/{src/core/templates → scripts}/init.sh +0 -0
- /package/{src/core/templates → scripts}/resume-session.sh +0 -0
- /package/{src/core/templates → scripts}/validate-tokens.sh +0 -0
- /package/{src/core/templates → scripts}/worktree-create.sh +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* clear-active-command.js - Clears active_command on session start
|
|
4
|
-
*
|
|
5
|
-
* This script runs on SessionStart to reset the active_command field
|
|
6
|
-
* in session-state.json. This ensures that if a user starts a new chat
|
|
7
|
-
* without running a command like /babysit, they won't get stale command
|
|
8
|
-
* rules in their PreCompact output.
|
|
9
|
-
*
|
|
10
|
-
* Usage: Called automatically by SessionStart hook
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const fs = require('fs');
|
|
14
|
-
const path = require('path');
|
|
15
|
-
|
|
16
|
-
function clearActiveCommand() {
|
|
17
|
-
const sessionStatePath = path.join(process.cwd(), 'docs/09-agents/session-state.json');
|
|
18
|
-
|
|
19
|
-
// Skip if session-state.json doesn't exist
|
|
20
|
-
if (!fs.existsSync(sessionStatePath)) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const sessionState = JSON.parse(fs.readFileSync(sessionStatePath, 'utf8'));
|
|
26
|
-
|
|
27
|
-
// Only update if active_command was set
|
|
28
|
-
if (sessionState.active_command && sessionState.active_command !== null) {
|
|
29
|
-
sessionState.active_command = null;
|
|
30
|
-
fs.writeFileSync(sessionStatePath, JSON.stringify(sessionState, null, 2) + '\n', 'utf8');
|
|
31
|
-
console.log('Cleared active_command from previous session');
|
|
32
|
-
}
|
|
33
|
-
} catch (err) {
|
|
34
|
-
// Silently ignore errors - don't break session start
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (require.main === module) {
|
|
39
|
-
clearActiveCommand();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
module.exports = { clearActiveCommand };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# AgileFlow PreCompact Hook
|
|
4
|
-
# Outputs critical context that should survive conversation compaction.
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
# Get current version from package.json
|
|
8
|
-
VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "unknown")
|
|
9
|
-
|
|
10
|
-
# Get current git branch
|
|
11
|
-
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
12
|
-
|
|
13
|
-
# Get current story from status.json
|
|
14
|
-
CURRENT_STORY=""
|
|
15
|
-
WIP_COUNT=0
|
|
16
|
-
if [ -f "docs/09-agents/status.json" ]; then
|
|
17
|
-
CURRENT_STORY=$(node -p "
|
|
18
|
-
const s = require('./docs/09-agents/status.json');
|
|
19
|
-
const stories = Object.entries(s.stories || {})
|
|
20
|
-
.filter(([,v]) => v.status === 'in_progress')
|
|
21
|
-
.map(([k,v]) => k + ': ' + v.title)
|
|
22
|
-
.join(', ');
|
|
23
|
-
stories || 'None in progress';
|
|
24
|
-
" 2>/dev/null || echo "Unable to read")
|
|
25
|
-
|
|
26
|
-
WIP_COUNT=$(node -p "
|
|
27
|
-
const s = require('./docs/09-agents/status.json');
|
|
28
|
-
Object.values(s.stories || {}).filter(v => v.status === 'in_progress').length;
|
|
29
|
-
" 2>/dev/null || echo "0")
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# Get practices list
|
|
33
|
-
PRACTICES=""
|
|
34
|
-
if [ -d "docs/02-practices" ]; then
|
|
35
|
-
PRACTICES=$(ls docs/02-practices/*.md 2>/dev/null | head -8 | xargs -I {} basename {} .md | tr '\n' ',' | sed 's/,$//')
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# Get active epics
|
|
39
|
-
EPICS=""
|
|
40
|
-
if [ -d "docs/05-epics" ]; then
|
|
41
|
-
EPICS=$(ls docs/05-epics/ 2>/dev/null | head -5 | tr '\n' ',' | sed 's/,$//')
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
# Detect active commands and extract their Compact Summaries
|
|
45
|
-
COMMAND_SUMMARIES=""
|
|
46
|
-
if [ -f "docs/09-agents/session-state.json" ]; then
|
|
47
|
-
ACTIVE_COMMANDS=$(node -p "
|
|
48
|
-
const s = require('./docs/09-agents/session-state.json');
|
|
49
|
-
(s.active_commands || []).map(c => c.name).join(' ');
|
|
50
|
-
" 2>/dev/null || echo "")
|
|
51
|
-
|
|
52
|
-
for ACTIVE_COMMAND in $ACTIVE_COMMANDS; do
|
|
53
|
-
[ -z "$ACTIVE_COMMAND" ] && continue
|
|
54
|
-
|
|
55
|
-
COMMAND_FILE=""
|
|
56
|
-
if [ -f "packages/cli/src/core/commands/${ACTIVE_COMMAND}.md" ]; then
|
|
57
|
-
COMMAND_FILE="packages/cli/src/core/commands/${ACTIVE_COMMAND}.md"
|
|
58
|
-
elif [ -f ".agileflow/commands/${ACTIVE_COMMAND}.md" ]; then
|
|
59
|
-
COMMAND_FILE=".agileflow/commands/${ACTIVE_COMMAND}.md"
|
|
60
|
-
elif [ -f ".claude/commands/agileflow/${ACTIVE_COMMAND}.md" ]; then
|
|
61
|
-
COMMAND_FILE=".claude/commands/agileflow/${ACTIVE_COMMAND}.md"
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
if [ ! -z "$COMMAND_FILE" ]; then
|
|
65
|
-
SUMMARY=$(node -e "
|
|
66
|
-
const fs = require('fs');
|
|
67
|
-
const content = fs.readFileSync('$COMMAND_FILE', 'utf8');
|
|
68
|
-
const match = content.match(/<!-- COMPACT_SUMMARY_START[\\s\\S]*?-->([\\s\\S]*?)<!-- COMPACT_SUMMARY_END -->/);
|
|
69
|
-
if (match) {
|
|
70
|
-
console.log('## ACTIVE COMMAND: /agileflow:${ACTIVE_COMMAND}');
|
|
71
|
-
console.log('');
|
|
72
|
-
console.log(match[1].trim());
|
|
73
|
-
}
|
|
74
|
-
" 2>/dev/null || echo "")
|
|
75
|
-
|
|
76
|
-
if [ ! -z "$SUMMARY" ]; then
|
|
77
|
-
COMMAND_SUMMARIES="${COMMAND_SUMMARIES}
|
|
78
|
-
|
|
79
|
-
${SUMMARY}"
|
|
80
|
-
fi
|
|
81
|
-
fi
|
|
82
|
-
done
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# Output context
|
|
86
|
-
cat << EOF
|
|
87
|
-
AGILEFLOW PROJECT CONTEXT (preserve during compact):
|
|
88
|
-
|
|
89
|
-
## Project Status
|
|
90
|
-
- Project: AgileFlow v${VERSION}
|
|
91
|
-
- Branch: ${BRANCH}
|
|
92
|
-
- Active Stories: ${CURRENT_STORY}
|
|
93
|
-
- WIP Count: ${WIP_COUNT}
|
|
94
|
-
|
|
95
|
-
## Key Files to Check After Compact
|
|
96
|
-
- CLAUDE.md - Project system prompt with conventions
|
|
97
|
-
- README.md - Project overview and setup
|
|
98
|
-
- docs/09-agents/status.json - Story statuses and assignments
|
|
99
|
-
- docs/02-practices/ - Codebase practices (${PRACTICES:-check folder})
|
|
100
|
-
|
|
101
|
-
## Active Epics
|
|
102
|
-
${EPICS:-Check docs/05-epics/ for epic files}
|
|
103
|
-
|
|
104
|
-
## Key Conventions (from CLAUDE.md)
|
|
105
|
-
$(grep -A 15 "## Key\|## Critical\|## Important\|CRITICAL:" CLAUDE.md 2>/dev/null | head -20 || echo "- Read CLAUDE.md for project conventions")
|
|
106
|
-
|
|
107
|
-
## Recent Agent Activity
|
|
108
|
-
$(tail -3 docs/09-agents/bus/log.jsonl 2>/dev/null | head -3 || echo "")
|
|
109
|
-
EOF
|
|
110
|
-
|
|
111
|
-
# Output active command summaries
|
|
112
|
-
if [ ! -z "$COMMAND_SUMMARIES" ]; then
|
|
113
|
-
echo "$COMMAND_SUMMARIES"
|
|
114
|
-
fi
|
|
115
|
-
|
|
116
|
-
cat << EOF
|
|
117
|
-
|
|
118
|
-
## Post-Compact Actions
|
|
119
|
-
1. Re-read CLAUDE.md if unsure about conventions
|
|
120
|
-
2. Check status.json for current story state
|
|
121
|
-
3. Review docs/02-practices/ for implementation patterns
|
|
122
|
-
4. Check git log for recent changes
|
|
123
|
-
EOF
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|