prjct-cli 1.11.0 → 1.13.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.
@@ -43,34 +43,102 @@ IF currentTask.subtasks exists AND has items:
43
43
  - label: "Continue current"
44
44
  description: "Keep working on this subtask"
45
45
 
46
- IF "Next subtask":
47
- # Mark current subtask as completed
46
+ IF "Continue current":
47
+ OUTPUT: "Continuing: {current subtask}"
48
+ STOP
49
+
50
+ IF "Next subtask" OR "Complete all remaining":
51
+ # ═══════════════════════════════════════════════════════════════
52
+ # MANDATORY HANDOFF COLLECTION (PRJ-262)
53
+ # Every subtask MUST provide handoff data before completing.
54
+ # This enables the next subtask to start with full context.
55
+ # ═══════════════════════════════════════════════════════════════
56
+
57
+ GOTO: Step 3.5 (Collect Handoff)
58
+
59
+ # After collecting handoff, mark current subtask as completed:
48
60
  currentTask.subtasks[currentSubtaskIndex].status = "completed"
49
- currentTask.currentSubtaskIndex++
50
- currentTask.subtasks[currentSubtaskIndex].status = "active"
51
- currentTask.description = currentTask.subtasks[currentSubtaskIndex].description
61
+ currentTask.subtasks[currentSubtaskIndex].output = "{handoff.output}"
62
+ currentTask.subtasks[currentSubtaskIndex].summary = {
63
+ "title": "{current subtask description}",
64
+ "description": "{what was accomplished}",
65
+ "filesChanged": [{path, action}...],
66
+ "whatWasDone": ["item1", "item2", ...],
67
+ "outputForNextAgent": "{context for next subtask}",
68
+ "notes": "{optional notes}"
69
+ }
52
70
 
53
- WRITE state.json
71
+ IF "Next subtask":
72
+ currentTask.currentSubtaskIndex++
73
+ currentTask.subtasks[currentSubtaskIndex].status = "active"
74
+ currentTask.description = currentTask.subtasks[currentSubtaskIndex].description
54
75
 
55
- OUTPUT:
56
- """
57
- ✅ Subtask complete: {completed subtask}
76
+ WRITE state.json
58
77
 
59
- Progress: {completed}/{total} subtasks
78
+ # Show previous subtask handoff to establish context
79
+ OUTPUT:
80
+ """
81
+ ✅ Subtask complete: {completed subtask}
60
82
 
61
- Current: {next subtask description}
83
+ Progress: {completed}/{total} subtasks
62
84
 
63
- Next: Continue working, then `p. done`
64
- """
65
- STOP
85
+ ### Handoff
86
+ {outputForNextAgent}
66
87
 
67
- IF "Continue current":
68
- OUTPUT: "Continuing: {current subtask}"
69
- STOP
88
+ Current: {next subtask description}
89
+
90
+ Next: Continue working, then `p. done`
91
+ """
92
+ STOP
93
+
94
+ # If "Complete all" - fall through to complete task (handoff still collected)
95
+ ```
96
+
97
+ ## Step 3.5: Collect Handoff (MANDATORY for subtask completion)
98
+
99
+ **⛔ DO NOT skip this step. Every subtask completion MUST include handoff data.**
70
100
 
71
- # If "Complete all" - fall through to complete task
101
+ The LLM should analyze the work done during this subtask and produce:
102
+
103
+ ### 1. Get Files Changed
104
+
105
+ ```bash
106
+ # Files changed during this subtask (uncommitted + recent commits on branch)
107
+ git diff --name-only HEAD 2>/dev/null
108
+ git diff --name-only --cached 2>/dev/null
72
109
  ```
73
110
 
111
+ Categorize each file as `created`, `modified`, or `deleted`.
112
+
113
+ ### 2. Summarize Work Done
114
+
115
+ Based on the code changes and task context, produce:
116
+ - **whatWasDone**: Array of 1-5 bullet points describing key accomplishments
117
+ - **outputForNextAgent**: A paragraph explaining context the next subtask needs:
118
+ - What was built/changed and why
119
+ - Key decisions made and their rationale
120
+ - Any patterns established that subsequent work should follow
121
+ - Known issues or edge cases to watch for
122
+
123
+ ### 3. Validation
124
+
125
+ ```
126
+ IF whatWasDone is empty:
127
+ ⛔ STOP. At least one item is required.
128
+ Re-analyze the work and provide at minimum 1 bullet point.
129
+
130
+ IF outputForNextAgent is empty:
131
+ ⛔ STOP. Context for next subtask is required.
132
+ Even if this is the last subtask, provide a summary for the done/ship step.
133
+ ```
134
+
135
+ ### 4. Store Handoff
136
+
137
+ The handoff data is stored in the subtask's `summary` field in state.json.
138
+ This data persists across sessions and feeds into the next subtask's prompt context.
139
+
140
+ ---
141
+
74
142
  ## Step 4: Complete Task
75
143
 
76
144
  Generate timestamp: