claude-fsd 1.5.27 → 1.5.28

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 CHANGED
@@ -83,8 +83,14 @@ Runs the development agent fleet. This command:
83
83
  - Updates the plan to track progress
84
84
  - Repeats until all tasks are done
85
85
 
86
+ Options:
87
+ - `--max-time=MINUTES` - Maximum total runtime (default: 120 minutes)
88
+ - `--working-dir=DIR` - Directory containing BRIEF.md and PLAN.md (default: docs)
89
+
86
90
  Every 4th cycle, it activates "megathinking mode" using ultrathink for deep architectural planning.
87
91
 
92
+ **@STOP Checkpoint**: Add `@STOP` on its own line in PLAN.md to pause when all preceding tasks complete. Useful for human review or deployment gates.
93
+
88
94
  #### claudefsd-interview
89
95
  Interactive expert Q&A session that:
90
96
  - Analyzes your BRIEF.md with multiple AI personas (DBA, Architect, UX Expert, etc.)
package/bin/claudefsd-dev CHANGED
@@ -1,28 +1,43 @@
1
1
  #!/bin/bash
2
2
  #
3
3
  # Main development mode - intelligent task selection with parallel execution
4
- # Usage: claudefsd-dev
4
+ # Usage: claudefsd-dev [--working-dir=DIR] [--max-time=MINUTES]
5
+ #
6
+ # Options:
7
+ # --working-dir=DIR Directory containing BRIEF.md and PLAN.md (default: docs)
8
+ # --max-time=MINUTES Maximum total runtime in minutes (default: 120)
5
9
  #
6
10
  # Features:
7
11
  # - Fail-fast loop detection and "all done" prompt from iterative mode
8
12
  # - Direct parallel Task agent execution from direct mode
9
13
  # - Intelligent task planning and coordination
14
+ # - @STOP marker support: stops when all tasks before @STOP are complete
15
+ # - Max runtime limit to prevent runaway sessions
10
16
  #
11
17
 
12
18
  #set -e
13
19
 
14
- # Parse --working-dir parameter
20
+ # Parse command line parameters
15
21
  WORKING_DIR="docs"
22
+ MAX_TIME_MINUTES=120
16
23
  for arg in "$@"; do
17
24
  case $arg in
18
25
  --working-dir=*)
19
26
  WORKING_DIR="${arg#*=}"
20
27
  shift
21
28
  ;;
29
+ --max-time=*)
30
+ MAX_TIME_MINUTES="${arg#*=}"
31
+ shift
32
+ ;;
22
33
  esac
23
34
  done
24
35
  export CLAUDEFSD_WORKING_DIR="$WORKING_DIR"
25
36
 
37
+ # Convert max time to seconds and record start time
38
+ MAX_TIME_SECONDS=$((MAX_TIME_MINUTES * 60))
39
+ OVERALL_START_TIME=$(date +%s)
40
+
26
41
  # Get the actual location of this script (resolving symlinks)
27
42
  if command -v realpath >/dev/null 2>&1; then
28
43
  SCRIPT_PATH="$(realpath "$0")"
@@ -301,6 +316,38 @@ Be thorough but concise in your verification."
301
316
  exit 0
302
317
  fi
303
318
 
319
+ # Check for @STOP marker in plan file - if all tasks before @STOP are complete, pause for human review
320
+ if [ -n "$plan_file" ] && grep -q "@STOP" "$plan_file"; then
321
+ # Extract content before @STOP and check if any tasks are incomplete
322
+ BEFORE_STOP=$(sed -n '1,/@STOP/p' "$plan_file")
323
+ # Check for incomplete tasks ([ ] or - [ ]) before @STOP
324
+ if ! echo "$BEFORE_STOP" | grep -qE '\[ \]'; then
325
+ echo -e "\033[33m==================================================================\033[0m"
326
+ echo -e "\033[33m== @STOP CHECKPOINT REACHED\033[0m"
327
+ echo -e "\033[33m==================================================================\033[0m"
328
+ echo -e "\033[33mAll tasks before @STOP marker are complete.\033[0m"
329
+ echo -e "\033[33mPausing for human review/deployment/intervention.\033[0m"
330
+ echo -e "\033[33mTo continue: remove or move @STOP in $plan_file, then restart.\033[0m"
331
+ echo -e "\033[33m==================================================================\033[0m"
332
+ exit 0
333
+ fi
334
+ fi
335
+
336
+ # Check if max runtime has been exceeded
337
+ CURRENT_TIME=$(date +%s)
338
+ ELAPSED_SECONDS=$((CURRENT_TIME - OVERALL_START_TIME))
339
+ ELAPSED_MINUTES=$((ELAPSED_SECONDS / 60))
340
+ if [ $ELAPSED_SECONDS -ge $MAX_TIME_SECONDS ]; then
341
+ echo -e "\033[33m==================================================================\033[0m"
342
+ echo -e "\033[33m== MAX RUNTIME REACHED (${ELAPSED_MINUTES}m / ${MAX_TIME_MINUTES}m)\033[0m"
343
+ echo -e "\033[33m==================================================================\033[0m"
344
+ echo -e "\033[33mStopping after ${MAX_TIME_MINUTES} minutes as configured.\033[0m"
345
+ echo -e "\033[33mTo continue: restart with 'claudefsd dev' or increase --max-time\033[0m"
346
+ echo -e "\033[33m==================================================================\033[0m"
347
+ exit 0
348
+ fi
349
+ echo -e "\033[36mTotal runtime: ${ELAPSED_MINUTES}m / ${MAX_TIME_MINUTES}m\033[0m"
350
+
304
351
  # Calculate iteration duration and check for failure patterns
305
352
  ITERATION_END_TIME=$(date +%s)
306
353
  ITERATION_DURATION=$((ITERATION_END_TIME - ITERATION_START_TIME))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-fsd",
3
- "version": "1.5.27",
3
+ "version": "1.5.28",
4
4
  "description": "Claude Full Self Drive tools for autonomous AI-powered development",
5
5
  "bin": {
6
6
  "claude-fsd": "bin/claude-fsd",