@pjmendonca/devflow 1.9.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/CHANGELOG.md +526 -0
- package/LICENSE +21 -0
- package/README.md +620 -0
- package/bin/devflow-checkpoint.js +10 -0
- package/bin/devflow-collab.js +10 -0
- package/bin/devflow-cost.js +10 -0
- package/bin/devflow-create-persona.js +10 -0
- package/bin/devflow-init.js +10 -0
- package/bin/devflow-memory.js +10 -0
- package/bin/devflow-new-doc.js +10 -0
- package/bin/devflow-personalize.js +10 -0
- package/bin/devflow-setup-checkpoint.js +10 -0
- package/bin/devflow-story.js +10 -0
- package/bin/devflow-tech-debt.js +10 -0
- package/bin/devflow-validate-overrides.js +10 -0
- package/bin/devflow-validate.js +10 -0
- package/bin/devflow-version.js +10 -0
- package/lib/constants.js +30 -0
- package/lib/exec-python.js +78 -0
- package/lib/python-check.js +178 -0
- package/package.json +64 -0
- package/tooling/.automation/agents/architect.md +135 -0
- package/tooling/.automation/agents/ba.md +70 -0
- package/tooling/.automation/agents/dev.md +79 -0
- package/tooling/.automation/agents/maintainer.md +97 -0
- package/tooling/.automation/agents/pm.md +116 -0
- package/tooling/.automation/agents/reviewer.md +141 -0
- package/tooling/.automation/agents/sm.md +61 -0
- package/tooling/.automation/agents/writer.md +193 -0
- package/tooling/.automation/config.ps1.template +61 -0
- package/tooling/.automation/config.sh.template +48 -0
- package/tooling/.automation/memory/.gitkeep +6 -0
- package/tooling/.automation/memory/knowledge/kg_integration-test.json +94 -0
- package/tooling/.automation/memory/knowledge/kg_test-story.json +300 -0
- package/tooling/.automation/memory/shared/shared_integration-test.json +30 -0
- package/tooling/.automation/memory/shared/shared_test-story.json +78 -0
- package/tooling/.automation/overrides/templates/README.md +113 -0
- package/tooling/.automation/overrides/templates/architect/README.md +27 -0
- package/tooling/.automation/overrides/templates/architect/cloud-native.yaml +92 -0
- package/tooling/.automation/overrides/templates/architect/enterprise-architect.yaml +85 -0
- package/tooling/.automation/overrides/templates/architect/pragmatic-minimalist.yaml +88 -0
- package/tooling/.automation/overrides/templates/ba/README.md +27 -0
- package/tooling/.automation/overrides/templates/ba/agile-storyteller.yaml +86 -0
- package/tooling/.automation/overrides/templates/ba/domain-expert.yaml +91 -0
- package/tooling/.automation/overrides/templates/ba/requirements-engineer.yaml +89 -0
- package/tooling/.automation/overrides/templates/dev/README.md +32 -0
- package/tooling/.automation/overrides/templates/dev/junior-mentored.yaml +39 -0
- package/tooling/.automation/overrides/templates/dev/performance-engineer.yaml +43 -0
- package/tooling/.automation/overrides/templates/dev/rapid-prototyper.yaml +52 -0
- package/tooling/.automation/overrides/templates/dev/security-focused.yaml +43 -0
- package/tooling/.automation/overrides/templates/dev/senior-fullstack.yaml +39 -0
- package/tooling/.automation/overrides/templates/maintainer/README.md +27 -0
- package/tooling/.automation/overrides/templates/maintainer/devops-maintainer.yaml +113 -0
- package/tooling/.automation/overrides/templates/maintainer/legacy-steward.yaml +94 -0
- package/tooling/.automation/overrides/templates/maintainer/oss-maintainer.yaml +94 -0
- package/tooling/.automation/overrides/templates/pm/README.md +27 -0
- package/tooling/.automation/overrides/templates/pm/agile-pm.yaml +91 -0
- package/tooling/.automation/overrides/templates/pm/hybrid-delivery.yaml +87 -0
- package/tooling/.automation/overrides/templates/pm/traditional-pm.yaml +91 -0
- package/tooling/.automation/overrides/templates/reviewer/README.md +11 -0
- package/tooling/.automation/overrides/templates/reviewer/mentoring-reviewer.yaml +45 -0
- package/tooling/.automation/overrides/templates/reviewer/quick-sanity.yaml +50 -0
- package/tooling/.automation/overrides/templates/reviewer/thorough-critic.yaml +48 -0
- package/tooling/.automation/overrides/templates/sm/README.md +11 -0
- package/tooling/.automation/overrides/templates/sm/agile-coach.yaml +52 -0
- package/tooling/.automation/overrides/templates/sm/startup-pm.yaml +50 -0
- package/tooling/.automation/overrides/templates/sm/technical-lead.yaml +47 -0
- package/tooling/.automation/overrides/templates/user-profile.template.yaml +62 -0
- package/tooling/.automation/overrides/templates/writer/README.md +27 -0
- package/tooling/.automation/overrides/templates/writer/api-documentarian.yaml +99 -0
- package/tooling/.automation/overrides/templates/writer/docs-as-code.yaml +108 -0
- package/tooling/.automation/overrides/templates/writer/user-guide-author.yaml +100 -0
- package/tooling/completions/DevflowCompletion.ps1 +213 -0
- package/tooling/completions/_run-story +116 -0
- package/tooling/completions/run-story-completion.bash +136 -0
- package/tooling/docs/DOC-STANDARD.md +717 -0
- package/tooling/docs/sprint-status.yaml.template +24 -0
- package/tooling/docs/templates/bug-report.md +234 -0
- package/tooling/docs/templates/migration-spec.md +274 -0
- package/tooling/docs/templates/refactor-spec.md +86 -0
- package/tooling/docs/templates/tech-debt.md +86 -0
- package/tooling/scripts/context_checkpoint.py +556 -0
- package/tooling/scripts/cost_dashboard.py +617 -0
- package/tooling/scripts/create-persona.py +690 -0
- package/tooling/scripts/create-persona.sh +435 -0
- package/tooling/scripts/init-project-workflow.ps1 +651 -0
- package/tooling/scripts/init-project-workflow.py +70 -0
- package/tooling/scripts/init-project-workflow.sh +746 -0
- package/tooling/scripts/lib/__init__.py +35 -0
- package/tooling/scripts/lib/agent_handoff.py +526 -0
- package/tooling/scripts/lib/agent_router.py +698 -0
- package/tooling/scripts/lib/checkpoint-integration.ps1 +245 -0
- package/tooling/scripts/lib/checkpoint-integration.sh +191 -0
- package/tooling/scripts/lib/claude-cli.ps1 +952 -0
- package/tooling/scripts/lib/claude-cli.sh +1293 -0
- package/tooling/scripts/lib/cost_config.py +222 -0
- package/tooling/scripts/lib/cost_display.py +443 -0
- package/tooling/scripts/lib/cost_tracker.py +710 -0
- package/tooling/scripts/lib/currency_converter.py +328 -0
- package/tooling/scripts/lib/errors.py +438 -0
- package/tooling/scripts/lib/override-loader.sh +286 -0
- package/tooling/scripts/lib/pair_programming.py +589 -0
- package/tooling/scripts/lib/shared_memory.py +637 -0
- package/tooling/scripts/lib/swarm_orchestrator.py +689 -0
- package/tooling/scripts/memory_summarize.py +324 -0
- package/tooling/scripts/new-doc.ps1 +405 -0
- package/tooling/scripts/new-doc.py +93 -0
- package/tooling/scripts/new-doc.sh +534 -0
- package/tooling/scripts/personalize_agent.py +385 -0
- package/tooling/scripts/rollback-migration.sh +540 -0
- package/tooling/scripts/run-collab.ps1 +251 -0
- package/tooling/scripts/run-collab.py +605 -0
- package/tooling/scripts/run-collab.sh +110 -0
- package/tooling/scripts/run-story.ps1 +490 -0
- package/tooling/scripts/run-story.py +387 -0
- package/tooling/scripts/run-story.sh +467 -0
- package/tooling/scripts/setup-checkpoint-service.ps1 +219 -0
- package/tooling/scripts/setup-checkpoint-service.py +87 -0
- package/tooling/scripts/setup-checkpoint-service.sh +236 -0
- package/tooling/scripts/tech-debt-tracker.py +608 -0
- package/tooling/scripts/update_version.py +244 -0
- package/tooling/scripts/validate-overrides.py +511 -0
- package/tooling/scripts/validate-overrides.sh +432 -0
- package/tooling/scripts/validate_setup.py +539 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Cross-Platform Checkpoint Service Setup
|
|
4
|
+
|
|
5
|
+
Automatically detects the operating system and runs the appropriate setup:
|
|
6
|
+
- Windows: Task Scheduler
|
|
7
|
+
- macOS: LaunchAgent
|
|
8
|
+
- Linux: systemd (if available) or cron
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
python setup-checkpoint-service.py [install|uninstall|status]
|
|
12
|
+
|
|
13
|
+
Examples:
|
|
14
|
+
python setup-checkpoint-service.py install
|
|
15
|
+
python setup-checkpoint-service.py status
|
|
16
|
+
python setup-checkpoint-service.py uninstall
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import os
|
|
20
|
+
import subprocess
|
|
21
|
+
import sys
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
SCRIPT_DIR = Path(__file__).parent
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_platform():
|
|
28
|
+
"""Detect the current platform."""
|
|
29
|
+
if sys.platform == "win32":
|
|
30
|
+
return "windows"
|
|
31
|
+
elif sys.platform == "darwin":
|
|
32
|
+
return "macos"
|
|
33
|
+
else:
|
|
34
|
+
return "linux"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def run_windows(action):
|
|
38
|
+
"""Run PowerShell script on Windows."""
|
|
39
|
+
script = SCRIPT_DIR / "setup-checkpoint-service.ps1"
|
|
40
|
+
|
|
41
|
+
if not script.exists():
|
|
42
|
+
print(f"Error: PowerShell script not found: {script}")
|
|
43
|
+
return 1
|
|
44
|
+
|
|
45
|
+
cmd = ["powershell", "-ExecutionPolicy", "Bypass", "-File", str(script), "-Action", action]
|
|
46
|
+
return subprocess.call(cmd)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def run_unix(action):
|
|
50
|
+
"""Run shell script on macOS/Linux."""
|
|
51
|
+
script = SCRIPT_DIR / "setup-checkpoint-service.sh"
|
|
52
|
+
|
|
53
|
+
if not script.exists():
|
|
54
|
+
print(f"Error: Shell script not found: {script}")
|
|
55
|
+
return 1
|
|
56
|
+
|
|
57
|
+
# Ensure script is executable
|
|
58
|
+
os.chmod(script, 0o755)
|
|
59
|
+
|
|
60
|
+
cmd = [str(script), action]
|
|
61
|
+
return subprocess.call(cmd)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def main():
|
|
65
|
+
action = "install"
|
|
66
|
+
if len(sys.argv) > 1:
|
|
67
|
+
action = sys.argv[1].lower()
|
|
68
|
+
|
|
69
|
+
if action not in ["install", "uninstall", "status"]:
|
|
70
|
+
print(__doc__)
|
|
71
|
+
print("\nDetected platform:", get_platform())
|
|
72
|
+
return 1
|
|
73
|
+
|
|
74
|
+
platform = get_platform()
|
|
75
|
+
|
|
76
|
+
print(f"Platform: {platform}")
|
|
77
|
+
print(f"Action: {action}")
|
|
78
|
+
print()
|
|
79
|
+
|
|
80
|
+
if platform == "windows":
|
|
81
|
+
return run_windows(action)
|
|
82
|
+
else:
|
|
83
|
+
return run_unix(action)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
if __name__ == "__main__":
|
|
87
|
+
sys.exit(main())
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
################################################################################
|
|
3
|
+
# Setup Checkpoint Service - macOS LaunchAgent
|
|
4
|
+
#
|
|
5
|
+
# Creates a background service that monitors Claude sessions for context warnings
|
|
6
|
+
# and automatically creates checkpoints.
|
|
7
|
+
################################################################################
|
|
8
|
+
|
|
9
|
+
set -e
|
|
10
|
+
|
|
11
|
+
PROJECT_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
12
|
+
SCRIPT_PATH="$PROJECT_ROOT/tooling/scripts/context_checkpoint.py"
|
|
13
|
+
PLIST_NAME="com.stronger.checkpoint"
|
|
14
|
+
PLIST_PATH="$HOME/Library/LaunchAgents/${PLIST_NAME}.plist"
|
|
15
|
+
LOG_DIR="$PROJECT_ROOT/tooling/.automation/logs"
|
|
16
|
+
|
|
17
|
+
# Colors
|
|
18
|
+
RED='\033[0;31m'
|
|
19
|
+
GREEN='\033[0;32m'
|
|
20
|
+
YELLOW='\033[1;33m'
|
|
21
|
+
BLUE='\033[0;34m'
|
|
22
|
+
NC='\033[0m'
|
|
23
|
+
|
|
24
|
+
print_header() {
|
|
25
|
+
echo ""
|
|
26
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
27
|
+
echo -e "${BLUE} Context Checkpoint Service Setup${NC}"
|
|
28
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
29
|
+
echo ""
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
print_success() {
|
|
33
|
+
echo -e "${GREEN}✅ $1${NC}"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
print_error() {
|
|
37
|
+
echo -e "${RED}❌ $1${NC}"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
print_info() {
|
|
41
|
+
echo -e "${BLUE}ℹ️ $1${NC}"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
print_warning() {
|
|
45
|
+
echo -e "${YELLOW}⚠️ $1${NC}"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Check if script exists
|
|
49
|
+
check_prerequisites() {
|
|
50
|
+
print_info "Checking prerequisites..."
|
|
51
|
+
|
|
52
|
+
if [[ ! -f "$SCRIPT_PATH" ]]; then
|
|
53
|
+
print_error "Checkpoint script not found at: $SCRIPT_PATH"
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if ! command -v python3 &> /dev/null; then
|
|
58
|
+
print_error "Python 3 is required but not installed"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# Make script executable
|
|
63
|
+
chmod +x "$SCRIPT_PATH"
|
|
64
|
+
|
|
65
|
+
print_success "Prerequisites OK"
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Create LaunchAgent plist
|
|
69
|
+
create_plist() {
|
|
70
|
+
print_info "Creating LaunchAgent plist..."
|
|
71
|
+
|
|
72
|
+
mkdir -p "$HOME/Library/LaunchAgents"
|
|
73
|
+
mkdir -p "$LOG_DIR"
|
|
74
|
+
|
|
75
|
+
cat > "$PLIST_PATH" <<EOF
|
|
76
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
77
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
78
|
+
<plist version="1.0">
|
|
79
|
+
<dict>
|
|
80
|
+
<key>Label</key>
|
|
81
|
+
<string>${PLIST_NAME}</string>
|
|
82
|
+
|
|
83
|
+
<key>ProgramArguments</key>
|
|
84
|
+
<array>
|
|
85
|
+
<string>/usr/bin/python3</string>
|
|
86
|
+
<string>${SCRIPT_PATH}</string>
|
|
87
|
+
<string>--watch-log</string>
|
|
88
|
+
<string>${LOG_DIR}/current.log</string>
|
|
89
|
+
</array>
|
|
90
|
+
|
|
91
|
+
<key>RunAtLoad</key>
|
|
92
|
+
<true/>
|
|
93
|
+
|
|
94
|
+
<key>KeepAlive</key>
|
|
95
|
+
<dict>
|
|
96
|
+
<key>SuccessfulExit</key>
|
|
97
|
+
<false/>
|
|
98
|
+
</dict>
|
|
99
|
+
|
|
100
|
+
<key>StandardOutPath</key>
|
|
101
|
+
<string>${LOG_DIR}/checkpoint-service.log</string>
|
|
102
|
+
|
|
103
|
+
<key>StandardErrorPath</key>
|
|
104
|
+
<string>${LOG_DIR}/checkpoint-service-error.log</string>
|
|
105
|
+
|
|
106
|
+
<key>WorkingDirectory</key>
|
|
107
|
+
<string>${PROJECT_ROOT}</string>
|
|
108
|
+
|
|
109
|
+
<key>EnvironmentVariables</key>
|
|
110
|
+
<dict>
|
|
111
|
+
<key>PATH</key>
|
|
112
|
+
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
|
113
|
+
</dict>
|
|
114
|
+
|
|
115
|
+
<key>ThrottleInterval</key>
|
|
116
|
+
<integer>10</integer>
|
|
117
|
+
</dict>
|
|
118
|
+
</plist>
|
|
119
|
+
EOF
|
|
120
|
+
|
|
121
|
+
print_success "Created plist at: $PLIST_PATH"
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Load service
|
|
125
|
+
load_service() {
|
|
126
|
+
print_info "Loading service..."
|
|
127
|
+
|
|
128
|
+
# Unload if already loaded
|
|
129
|
+
launchctl unload "$PLIST_PATH" 2>/dev/null || true
|
|
130
|
+
|
|
131
|
+
# Load the service
|
|
132
|
+
if launchctl load "$PLIST_PATH"; then
|
|
133
|
+
print_success "Service loaded successfully"
|
|
134
|
+
else
|
|
135
|
+
print_error "Failed to load service"
|
|
136
|
+
return 1
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
sleep 2
|
|
140
|
+
|
|
141
|
+
# Check if running
|
|
142
|
+
if launchctl list | grep -q "$PLIST_NAME"; then
|
|
143
|
+
print_success "Service is running"
|
|
144
|
+
else
|
|
145
|
+
print_warning "Service loaded but not running"
|
|
146
|
+
fi
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
# Create symlink for easy access
|
|
150
|
+
create_symlink() {
|
|
151
|
+
print_info "Creating convenience command..."
|
|
152
|
+
|
|
153
|
+
local bin_dir="$PROJECT_ROOT/tooling/scripts"
|
|
154
|
+
local symlink="$bin_dir/checkpoint"
|
|
155
|
+
|
|
156
|
+
# Create wrapper script
|
|
157
|
+
cat > "$symlink" <<'EOF'
|
|
158
|
+
#!/bin/zsh
|
|
159
|
+
# Convenience wrapper for context checkpoint manager
|
|
160
|
+
|
|
161
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
162
|
+
python3 "$SCRIPT_DIR/context_checkpoint.py" "$@"
|
|
163
|
+
EOF
|
|
164
|
+
|
|
165
|
+
chmod +x "$symlink"
|
|
166
|
+
print_success "Created command: ./tooling/scripts/checkpoint"
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
# Print usage instructions
|
|
170
|
+
print_usage() {
|
|
171
|
+
echo ""
|
|
172
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════════════════${NC}"
|
|
173
|
+
echo -e "${GREEN} Setup Complete!${NC}"
|
|
174
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════════════════${NC}"
|
|
175
|
+
echo ""
|
|
176
|
+
echo "The context checkpoint service is now running in the background."
|
|
177
|
+
echo ""
|
|
178
|
+
echo -e "${BLUE}Service Management:${NC}"
|
|
179
|
+
echo " • Start: launchctl load $PLIST_PATH"
|
|
180
|
+
echo " • Stop: launchctl unload $PLIST_PATH"
|
|
181
|
+
echo " • Restart: launchctl kickstart -k gui/\$(id -u)/$PLIST_NAME"
|
|
182
|
+
echo " • Status: launchctl list | grep $PLIST_NAME"
|
|
183
|
+
echo ""
|
|
184
|
+
echo -e "${BLUE}Logs:${NC}"
|
|
185
|
+
echo " • Service log: $LOG_DIR/checkpoint-service.log"
|
|
186
|
+
echo " • Error log: $LOG_DIR/checkpoint-service-error.log"
|
|
187
|
+
echo " • Checkpoints: tooling/.automation/checkpoints/"
|
|
188
|
+
echo ""
|
|
189
|
+
echo -e "${BLUE}Quick Commands:${NC}"
|
|
190
|
+
echo " • Create checkpoint: ./tooling/scripts/checkpoint --checkpoint"
|
|
191
|
+
echo " • List checkpoints: ./tooling/scripts/checkpoint --list"
|
|
192
|
+
echo " • Resume session: ./tooling/scripts/checkpoint --resume <id>"
|
|
193
|
+
echo ""
|
|
194
|
+
echo -e "${BLUE}Next Steps:${NC}"
|
|
195
|
+
echo " 1. The service will monitor: $LOG_DIR/current.log"
|
|
196
|
+
echo " 2. Update your automation to write to this log file"
|
|
197
|
+
echo " 3. Watch for automatic checkpoints when context gets high"
|
|
198
|
+
echo ""
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# Uninstall function
|
|
202
|
+
uninstall() {
|
|
203
|
+
print_info "Uninstalling checkpoint service..."
|
|
204
|
+
|
|
205
|
+
# Unload service
|
|
206
|
+
launchctl unload "$PLIST_PATH" 2>/dev/null || true
|
|
207
|
+
|
|
208
|
+
# Remove plist
|
|
209
|
+
rm -f "$PLIST_PATH"
|
|
210
|
+
|
|
211
|
+
print_success "Service uninstalled"
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
# Main
|
|
215
|
+
main() {
|
|
216
|
+
print_header
|
|
217
|
+
|
|
218
|
+
case "${1:-install}" in
|
|
219
|
+
install)
|
|
220
|
+
check_prerequisites
|
|
221
|
+
create_plist
|
|
222
|
+
create_symlink
|
|
223
|
+
load_service
|
|
224
|
+
print_usage
|
|
225
|
+
;;
|
|
226
|
+
uninstall)
|
|
227
|
+
uninstall
|
|
228
|
+
;;
|
|
229
|
+
*)
|
|
230
|
+
echo "Usage: $0 [install|uninstall]"
|
|
231
|
+
exit 1
|
|
232
|
+
;;
|
|
233
|
+
esac
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
main "$@"
|