agileflow 2.71.0 โ†’ 2.72.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "2.71.0",
3
+ "version": "2.72.0",
4
4
  "description": "AI-driven agile development system for Claude Code, Cursor, Windsurf, and more",
5
5
  "keywords": [
6
6
  "agile",
@@ -0,0 +1,76 @@
1
+ #!/bin/bash
2
+ # AgileFlow Development Environment Initialization
3
+ # Generated by AgileFlow session harness
4
+ # This script sets up your development environment for consistent sessions
5
+
6
+ set -e
7
+
8
+ echo "๐Ÿš€ Initializing development environment..."
9
+
10
+ # Detect project type and install dependencies
11
+ # This section will be customized based on your project
12
+
13
+ # Node.js projects
14
+ if [ -f "package-lock.json" ]; then
15
+ echo "๐Ÿ“ฆ Installing dependencies (npm ci)..."
16
+ npm ci
17
+ elif [ -f "yarn.lock" ]; then
18
+ echo "๐Ÿ“ฆ Installing dependencies (yarn)..."
19
+ yarn install --frozen-lockfile
20
+ elif [ -f "pnpm-lock.yaml" ]; then
21
+ echo "๐Ÿ“ฆ Installing dependencies (pnpm)..."
22
+ pnpm install --frozen-lockfile
23
+ elif [ -f "package.json" ]; then
24
+ echo "๐Ÿ“ฆ Installing dependencies (npm install)..."
25
+ npm install
26
+ fi
27
+
28
+ # Python projects
29
+ if [ -f "requirements.txt" ]; then
30
+ echo "๐Ÿ“ฆ Installing Python dependencies..."
31
+ pip install -r requirements.txt
32
+ fi
33
+
34
+ if [ -f "poetry.lock" ]; then
35
+ echo "๐Ÿ“ฆ Installing Poetry dependencies..."
36
+ poetry install
37
+ fi
38
+
39
+ # Rust projects
40
+ if [ -f "Cargo.toml" ]; then
41
+ echo "๐Ÿ“ฆ Building Rust project..."
42
+ cargo build
43
+ fi
44
+
45
+ # Go projects
46
+ if [ -f "go.mod" ]; then
47
+ echo "๐Ÿ“ฆ Downloading Go modules..."
48
+ go mod download
49
+ fi
50
+
51
+ # Run database migrations if applicable
52
+ if [ -f "migrations/run.sh" ]; then
53
+ echo "๐Ÿ—„๏ธ Running database migrations..."
54
+ bash migrations/run.sh
55
+ fi
56
+
57
+ if [ -d "prisma" ] && [ -f "package.json" ]; then
58
+ if command -v npx &> /dev/null; then
59
+ echo "๐Ÿ—„๏ธ Running Prisma migrations..."
60
+ npx prisma migrate deploy 2>/dev/null || echo "โš ๏ธ Prisma migrations skipped"
61
+ fi
62
+ fi
63
+
64
+ # Environment setup
65
+ if [ -f ".env.example" ] && [ ! -f ".env" ]; then
66
+ echo "โš™๏ธ Creating .env from .env.example..."
67
+ cp .env.example .env
68
+ echo "โš ๏ธ Please configure .env with your settings"
69
+ fi
70
+
71
+ echo "โœ… Environment initialization complete"
72
+ echo ""
73
+ echo "Next steps:"
74
+ echo " - Run tests: Check environment.json for test_command"
75
+ echo " - Start dev server: Check environment.json for dev_server.command"
76
+ echo " - Review .env: Ensure environment variables are configured"
@@ -0,0 +1,121 @@
1
+ #!/bin/bash
2
+ # AgileFlow Session Resume Script
3
+ # This script is called by the SessionStart hook to automatically resume sessions.
4
+ # It replicates the functionality of /agileflow:session:resume as a shell script.
5
+
6
+ set -e
7
+
8
+ echo "๐Ÿ”„ Resuming AgileFlow Session..."
9
+ echo ""
10
+
11
+ # Load environment configuration
12
+ if [ ! -f "docs/00-meta/environment.json" ]; then
13
+ echo "โš ๏ธ Session harness not initialized"
14
+ echo " Run /agileflow:session:init to set up session management"
15
+ exit 0
16
+ fi
17
+
18
+ # Extract configuration
19
+ TEST_COMMAND=$(jq -r '.test_command // "echo \"No test command configured\""' docs/00-meta/environment.json 2>/dev/null)
20
+ INIT_SCRIPT=$(jq -r '.init_script // "./docs/00-meta/init.sh"' docs/00-meta/environment.json 2>/dev/null)
21
+ VERIFICATION_POLICY=$(jq -r '.verification_policy // "warn"' docs/00-meta/environment.json 2>/dev/null)
22
+
23
+ # Step 1: Run initialization script
24
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
25
+ echo "๐Ÿš€ Running Initialization Script..."
26
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
27
+ echo ""
28
+
29
+ if [ -f "$INIT_SCRIPT" ] && [ -x "$INIT_SCRIPT" ]; then
30
+ if bash "$INIT_SCRIPT"; then
31
+ echo ""
32
+ echo "โœ… Initialization complete"
33
+ else
34
+ echo ""
35
+ echo "โš ๏ธ Initialization script failed (exit code $?)"
36
+ echo " Continuing with test verification..."
37
+ fi
38
+ else
39
+ echo "โš ๏ธ Init script not found or not executable: $INIT_SCRIPT"
40
+ echo " Skipping initialization"
41
+ fi
42
+
43
+ echo ""
44
+
45
+ # Step 2: Run test verification
46
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
47
+ echo "๐Ÿงช Running Test Verification..."
48
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
49
+ echo ""
50
+ echo "Command: $TEST_COMMAND"
51
+ echo ""
52
+
53
+ START_TIME=$(date +%s)
54
+
55
+ if eval "$TEST_COMMAND"; then
56
+ END_TIME=$(date +%s)
57
+ DURATION=$((END_TIME - START_TIME))
58
+ echo ""
59
+ echo "โœ… Tests passing (${DURATION}s)"
60
+ TEST_STATUS="passing"
61
+ else
62
+ END_TIME=$(date +%s)
63
+ DURATION=$((END_TIME - START_TIME))
64
+ EXIT_CODE=$?
65
+ echo ""
66
+ echo "โš ๏ธ Tests failing (exit code $EXIT_CODE, ${DURATION}s)"
67
+ TEST_STATUS="failing"
68
+
69
+ if [ "$VERIFICATION_POLICY" = "block" ]; then
70
+ echo ""
71
+ echo "โŒ Verification policy: block"
72
+ echo " Cannot proceed with failing tests"
73
+ exit 1
74
+ else
75
+ echo ""
76
+ echo "โš ๏ธ Verification policy: warn"
77
+ echo " You can proceed, but tests are failing"
78
+ fi
79
+ fi
80
+
81
+ echo ""
82
+
83
+ # Step 3: Load session context
84
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
85
+ echo "๐Ÿ“Š Session Summary"
86
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
87
+ echo ""
88
+
89
+ # Get baseline info
90
+ BASELINE_COMMIT=$(jq -r '.baseline_commit // "Not established"' docs/00-meta/environment.json 2>/dev/null)
91
+ BASELINE_DATE=$(jq -r '.baseline_established // "N/A"' docs/00-meta/environment.json 2>/dev/null)
92
+
93
+ # Get current session info
94
+ if [ -f "docs/09-agents/session-state.json" ]; then
95
+ CURRENT_STORY=$(jq -r '.current_session.current_story // "None"' docs/09-agents/session-state.json 2>/dev/null)
96
+ ACTIVE_AGENT=$(jq -r '.current_session.active_agent // "None"' docs/09-agents/session-state.json 2>/dev/null)
97
+ else
98
+ CURRENT_STORY="None"
99
+ ACTIVE_AGENT="None"
100
+ fi
101
+
102
+ # Display summary
103
+ echo "Baseline: ${BASELINE_COMMIT:0:7} ($BASELINE_DATE)"
104
+ echo "Status: $TEST_STATUS"
105
+ echo "Active Story: $CURRENT_STORY"
106
+ echo "Active Agent: $ACTIVE_AGENT"
107
+
108
+ # Get recent commits
109
+ echo ""
110
+ echo "Recent Activity:"
111
+ if git log --oneline -3 2>/dev/null; then
112
+ :
113
+ else
114
+ echo " (Git history unavailable)"
115
+ fi
116
+
117
+ echo ""
118
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
119
+ echo "โœ… Session Resumed - Ready to work! ๐Ÿš€"
120
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
121
+ echo ""
@@ -0,0 +1,73 @@
1
+ #!/bin/bash
2
+
3
+ # AgileFlow Token Validation Script
4
+ # Safely checks if required MCP tokens are present in .env WITHOUT exposing them
5
+ # Security-first approach: shows token lengths, never displays actual values
6
+
7
+ echo "๐Ÿ” Token Validation (Secure Check - No Tokens Exposed)"
8
+ echo "========================================================="
9
+ echo ""
10
+
11
+ # Check if .env exists
12
+ if [ ! -f .env ]; then
13
+ echo "โŒ .env file NOT found"
14
+ echo ""
15
+ echo "To create .env, copy from template:"
16
+ echo " cp .env.example .env"
17
+ echo "Then edit .env and add your real tokens (DO NOT COMMIT)"
18
+ exit 1
19
+ fi
20
+
21
+ echo "โœ… .env file found"
22
+ echo ""
23
+
24
+ # Check GitHub token (secure - doesn't print value)
25
+ if grep -q "^GITHUB_PERSONAL_ACCESS_TOKEN=" .env && ! grep -q "GITHUB_PERSONAL_ACCESS_TOKEN=$" .env; then
26
+ TOKEN_VALUE=$(grep "^GITHUB_PERSONAL_ACCESS_TOKEN=" .env | cut -d'=' -f2)
27
+ if [ -z "$TOKEN_VALUE" ] || [ "$TOKEN_VALUE" = "your_token_here" ] || [ "$TOKEN_VALUE" = "ghp_placeholder" ]; then
28
+ echo "โš ๏ธ GITHUB_PERSONAL_ACCESS_TOKEN is set but appears to be placeholder"
29
+ echo " โ†’ Replace with real token (starts with ghp_)"
30
+ else
31
+ echo "โœ… GITHUB_PERSONAL_ACCESS_TOKEN is set (length: ${#TOKEN_VALUE})"
32
+ fi
33
+ else
34
+ echo "โš ๏ธ GITHUB_PERSONAL_ACCESS_TOKEN not found in .env"
35
+ fi
36
+
37
+ echo ""
38
+
39
+ # Check Notion token (secure - doesn't print value)
40
+ if grep -q "^NOTION_TOKEN=" .env && ! grep -q "NOTION_TOKEN=$" .env; then
41
+ TOKEN_VALUE=$(grep "^NOTION_TOKEN=" .env | cut -d'=' -f2)
42
+ if [ -z "$TOKEN_VALUE" ] || [ "$TOKEN_VALUE" = "your_token_here" ] || [[ "$TOKEN_VALUE" == *"placeholder"* ]]; then
43
+ echo "โš ๏ธ NOTION_TOKEN is set but appears to be placeholder"
44
+ echo " โ†’ Replace with real token (starts with ntn_ or secret_)"
45
+ else
46
+ echo "โœ… NOTION_TOKEN is set (length: ${#TOKEN_VALUE})"
47
+ fi
48
+ else
49
+ echo "โ„น๏ธ NOTION_TOKEN not found in .env (optional if Notion not enabled)"
50
+ fi
51
+
52
+ echo ""
53
+ echo "๐Ÿ”’ Security Check:"
54
+
55
+ # Check .gitignore for .mcp.json
56
+ if grep -q '^\\.mcp\\.json$' .gitignore 2>/dev/null; then
57
+ echo "โœ… .mcp.json is in .gitignore"
58
+ else
59
+ echo "โŒ .mcp.json NOT in .gitignore (CRITICAL - must exclude!)"
60
+ fi
61
+
62
+ # Check .gitignore for .env
63
+ if grep -q '^\\.env$' .gitignore 2>/dev/null; then
64
+ echo "โœ… .env is in .gitignore"
65
+ else
66
+ echo "โŒ .env NOT in .gitignore (CRITICAL - must exclude!)"
67
+ fi
68
+
69
+ echo ""
70
+ echo "If you added new tokens to .env, remember to:"
71
+ echo " 1. Verify .mcp.json and .env are in .gitignore (NEVER commit them!)"
72
+ echo " 2. ๐Ÿ”ด RESTART Claude Code for MCP servers to load new tokens"
73
+ echo " 3. Test MCP commands after restart"
@@ -0,0 +1,111 @@
1
+ #!/bin/bash
2
+ # AgileFlow Worktree Helper Script
3
+ # Creates a git worktree with proper naming and guidance
4
+
5
+ set -e # Exit on error
6
+
7
+ # Color codes for output
8
+ RED='\033[0;31m'
9
+ GREEN='\033[0;32m'
10
+ YELLOW='\033[1;33m'
11
+ BLUE='\033[0;34m'
12
+ NC='\033[0m' # No Color
13
+
14
+ # Check if running in a git repository
15
+ if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
16
+ echo -e "${RED}Error: Not in a git repository${NC}"
17
+ exit 1
18
+ fi
19
+
20
+ # Check for feature name argument
21
+ if [ $# -eq 0 ]; then
22
+ echo -e "${RED}Error: Feature name required${NC}"
23
+ echo ""
24
+ echo "Usage: $0 <feature-name> [base-branch]"
25
+ echo ""
26
+ echo "Examples:"
27
+ echo " $0 authentication"
28
+ echo " $0 payment-integration"
29
+ echo " $0 hotfix-memory-leak main"
30
+ echo " $0 experiment-graphql develop"
31
+ echo ""
32
+ exit 1
33
+ fi
34
+
35
+ FEATURE_NAME=$1
36
+ BASE_BRANCH=${2:-main}
37
+ BRANCH_NAME="feature/$FEATURE_NAME"
38
+ REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
39
+ WORKTREE_PATH="../${REPO_NAME}-${FEATURE_NAME}"
40
+
41
+ # Check if base branch exists
42
+ if ! git rev-parse --verify "$BASE_BRANCH" > /dev/null 2>&1; then
43
+ echo -e "${RED}Error: Base branch '$BASE_BRANCH' does not exist${NC}"
44
+ echo ""
45
+ echo "Available branches:"
46
+ git branch -a
47
+ exit 1
48
+ fi
49
+
50
+ # Check if worktree path already exists
51
+ if [ -d "$WORKTREE_PATH" ]; then
52
+ echo -e "${RED}Error: Directory already exists: $WORKTREE_PATH${NC}"
53
+ echo ""
54
+ echo "Options:"
55
+ echo " 1. Remove existing directory: rm -rf $WORKTREE_PATH"
56
+ echo " 2. Use different feature name"
57
+ echo " 3. List existing worktrees: git worktree list"
58
+ exit 1
59
+ fi
60
+
61
+ # Check if branch already exists
62
+ if git rev-parse --verify "$BRANCH_NAME" > /dev/null 2>&1; then
63
+ echo -e "${YELLOW}Warning: Branch '$BRANCH_NAME' already exists${NC}"
64
+ echo "Creating worktree from existing branch..."
65
+ git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
66
+ else
67
+ echo -e "${BLUE}Creating new branch '$BRANCH_NAME' from '$BASE_BRANCH'${NC}"
68
+ git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" "$BASE_BRANCH"
69
+ fi
70
+
71
+ echo ""
72
+ echo -e "${GREEN}โœ… Worktree created successfully!${NC}"
73
+ echo ""
74
+ echo -e "${BLUE}๐Ÿ“‚ Location:${NC} $WORKTREE_PATH"
75
+ echo -e "${BLUE}๐ŸŒฟ Branch:${NC} $BRANCH_NAME"
76
+ echo -e "${BLUE}๐Ÿ“Œ Base:${NC} $BASE_BRANCH"
77
+ echo ""
78
+ echo -e "${GREEN}๐Ÿค– Next steps:${NC}"
79
+ echo " 1. Open in new editor window:"
80
+ echo -e " ${YELLOW}code $WORKTREE_PATH${NC}"
81
+ echo ""
82
+ echo " 2. Navigate to worktree:"
83
+ echo -e " ${YELLOW}cd $WORKTREE_PATH${NC}"
84
+ echo ""
85
+ echo " 3. Start AgileFlow babysit:"
86
+ echo -e " ${YELLOW}/babysit${NC}"
87
+ echo ""
88
+ echo -e "${YELLOW}โš ๏ธ Important Reminders:${NC}"
89
+ echo " โ€ข Use this worktree for '$FEATURE_NAME' work only"
90
+ echo " โ€ข Avoid concurrent edits to the same epic/stories across worktrees"
91
+ echo " โ€ข Clean up when done: git worktree remove $WORKTREE_PATH"
92
+ echo ""
93
+ echo -e "${BLUE}๐Ÿ“š Documentation:${NC} docs/guides/worktrees.md"
94
+ echo ""
95
+ echo -e "${GREEN}Shared across worktrees:${NC}"
96
+ echo " โ€ข Git history (commits, branches)"
97
+ echo " โ€ข AgileFlow status.json and message bus"
98
+ echo " โ€ข All docs/ files (ADRs, epics, stories)"
99
+ echo ""
100
+ echo -e "${BLUE}Independent in this worktree:${NC}"
101
+ echo " โ€ข Working directory files (src/, etc.)"
102
+ echo " โ€ข Dependencies (node_modules/, .venv/, etc.)"
103
+ echo " โ€ข /babysit AI context"
104
+ echo ""
105
+
106
+ # List all worktrees
107
+ echo -e "${BLUE}๐Ÿ“‹ All active worktrees:${NC}"
108
+ git worktree list
109
+ echo ""
110
+
111
+ echo -e "${GREEN}Happy coding with preserved context! ๐Ÿš€${NC}"