agileflow 2.77.0 → 2.79.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/README.md +6 -6
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +174 -2
- package/scripts/agileflow-statusline.sh +171 -78
- package/scripts/agileflow-welcome.js +88 -64
- package/scripts/auto-self-improve.js +23 -45
- package/scripts/check-update.js +35 -42
- package/scripts/damage-control/bash-tool-damage-control.js +257 -0
- package/scripts/damage-control/edit-tool-damage-control.js +279 -0
- package/scripts/damage-control/patterns.yaml +227 -0
- package/scripts/damage-control/write-tool-damage-control.js +274 -0
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/obtain-context.js +22 -3
- package/scripts/ralph-loop.js +191 -63
- package/scripts/screenshot-verifier.js +213 -0
- package/scripts/session-manager.js +12 -33
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/configuration-damage-control.md +248 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +391 -38
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/setup/visual-e2e.md +462 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/code-review.yaml +118 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/skills/_learnings/story-writer.yaml +71 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/installers/ide/claude-code.js +127 -0
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate/refresh full context brief for web AI tools
|
|
3
3
|
argument-hint: (no arguments)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:context:full - Generates docs/context.md for external AI tools"
|
|
8
|
+
- "ALWAYS create TodoWrite list for multi-step workflow tracking"
|
|
9
|
+
- "ALWAYS show diff BEFORE ANY file writes - wait for YES/NO confirmation"
|
|
10
|
+
- "PRESERVE user-written content - only update sections between MANAGED_SECTION markers"
|
|
11
|
+
- "REQUIRED SOURCES: status.json, bus/log.jsonl, epics, stories, ADRs, practices, architecture, CI, CHANGELOG"
|
|
12
|
+
- "MANAGED SECTIONS: overview, features, tech, decisions, progress, next"
|
|
13
|
+
- "DIFF-FIRST PATTERN: Read → Gather → Generate → Show diff → Confirm → Apply"
|
|
14
|
+
state_fields:
|
|
15
|
+
- context_sources
|
|
16
|
+
- managed_sections
|
|
17
|
+
- user_content_preserved
|
|
18
|
+
- user_confirmation
|
|
4
19
|
---
|
|
5
20
|
|
|
6
21
|
# /agileflow:context:full
|
|
@@ -24,24 +39,182 @@ This file is designed to be pasted into ChatGPT, Perplexity, Gemini, or Claude w
|
|
|
24
39
|
---
|
|
25
40
|
|
|
26
41
|
<!-- COMPACT_SUMMARY_START -->
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
|
|
43
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:context:full IS ACTIVE
|
|
44
|
+
|
|
45
|
+
**CRITICAL**: You are generating `docs/context.md` for external AI tools. Follow these rules EXACTLY.
|
|
46
|
+
|
|
47
|
+
**PURPOSE**: Create comprehensive context brief with managed sections that external AI tools (ChatGPT, Claude web, Perplexity) can paste for full project understanding.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### 🚨 RULE #1: ALWAYS START WITH TodoWrite LIST
|
|
52
|
+
|
|
53
|
+
**Before ANY gathering, create TodoWrite to track workflow:**
|
|
54
|
+
|
|
55
|
+
```xml
|
|
56
|
+
<invoke name="TodoWrite">
|
|
57
|
+
<parameter name="todos">[
|
|
58
|
+
{"content": "Read existing docs/context.md", "status": "in_progress", "activeForm": "Reading context file"},
|
|
59
|
+
{"content": "Gather sources (status.json, bus, epics, ADRs, practices, architecture, CI, CHANGELOG)", "status": "pending", "activeForm": "Gathering sources"},
|
|
60
|
+
{"content": "Generate/update managed sections (6 sections)", "status": "pending", "activeForm": "Generating sections"},
|
|
61
|
+
{"content": "Show diff for review", "status": "pending", "activeForm": "Showing diff"},
|
|
62
|
+
{"content": "Apply changes after YES confirmation", "status": "pending", "activeForm": "Applying changes"}
|
|
63
|
+
]</parameter>
|
|
64
|
+
</invoke>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**NEVER skip this.** It's how we track multi-step work.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### 🚨 RULE #2: DIFF-FIRST - ALWAYS SHOW CHANGES BEFORE WRITING
|
|
72
|
+
|
|
73
|
+
**Workflow sequence is NON-NEGOTIABLE:**
|
|
74
|
+
1. **Read** existing `docs/context.md` (if exists) - identify user vs managed content
|
|
75
|
+
2. **Gather** all source files (see REQUIRED SOURCES below)
|
|
76
|
+
3. **Generate** new managed sections
|
|
77
|
+
4. **Show diff** - display exactly what changed (use diff format)
|
|
78
|
+
5. **Confirm** - call AskUserQuestion: "Apply these changes?"
|
|
79
|
+
6. **Apply** - only after YES, write to file using Edit tool
|
|
80
|
+
|
|
81
|
+
**❌ WRONG:** Write changes without showing diff first
|
|
82
|
+
**✅ RIGHT:** Show diff, wait for YES, then write
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### 🚨 RULE #3: PRESERVE USER-WRITTEN CONTENT
|
|
87
|
+
|
|
88
|
+
**MANAGED SECTIONS are within markers:**
|
|
89
|
+
```markdown
|
|
90
|
+
<!-- MANAGED_SECTION: overview -->
|
|
91
|
+
[Content here - OK to update]
|
|
92
|
+
<!-- END_MANAGED -->
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**USER-WRITTEN SECTIONS have no markers:**
|
|
96
|
+
```markdown
|
|
97
|
+
## My Custom Section
|
|
98
|
+
[Content here - NEVER touch this]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Rules for updating:**
|
|
102
|
+
- Only modify content between `<!-- MANAGED_SECTION: X -->` markers
|
|
103
|
+
- NEVER delete or modify sections without markers
|
|
104
|
+
- If user has added custom sections outside markers, preserve them
|
|
105
|
+
- If user section conflicts with managed section, show diff and ask
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### 🚨 RULE #4: REQUIRED SOURCES & MANAGED SECTIONS
|
|
110
|
+
|
|
111
|
+
**Required source files (gather ALL, even if missing):**
|
|
112
|
+
```
|
|
113
|
+
docs/09-agents/status.json # Current story/epic status (REQUIRED)
|
|
114
|
+
docs/09-agents/bus/log.jsonl # Last 10 progress messages (REQUIRED)
|
|
115
|
+
docs/05-epics/*.md # Epic details (if exists)
|
|
116
|
+
docs/06-stories/*/*.md # Story details (if exists)
|
|
117
|
+
docs/03-decisions/*.md # ADRs (if exists)
|
|
118
|
+
docs/02-practices/*.md # Development practices (if exists)
|
|
119
|
+
docs/04-architecture/*.md # System architecture (if exists)
|
|
120
|
+
package.json / pyproject.toml # Project manifest (for tech stack)
|
|
121
|
+
.github/workflows/*.yml # CI config (if exists)
|
|
122
|
+
CHANGELOG.md # Recent changes (if exists)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Managed sections to generate (6 total):**
|
|
126
|
+
|
|
127
|
+
| Section | Source | Purpose | Max Lines |
|
|
128
|
+
|---------|--------|---------|-----------|
|
|
129
|
+
| **overview** | README, package.json | What we're building + current focus | 10 |
|
|
130
|
+
| **features** | status.json epics | Epic map with story counts | 20 |
|
|
131
|
+
| **tech** | package.json, workflows | Tech stack and dependencies | 15 |
|
|
132
|
+
| **decisions** | ADRs directory | Key ADRs with status | 15 |
|
|
133
|
+
| **progress** | bus/log.jsonl | Last 10 bus messages (chronological) | 30 |
|
|
134
|
+
| **next** | status.json | Ready/in-progress stories | 20 |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### 🚨 RULE #5: HANDLING MISSING FILES
|
|
139
|
+
|
|
140
|
+
**If file doesn't exist, DON'T ERROR - adapt:**
|
|
141
|
+
|
|
142
|
+
| Missing File | Action |
|
|
143
|
+
|--------------|--------|
|
|
144
|
+
| `docs/context.md` | Create new file with all sections |
|
|
145
|
+
| `status.json` | Skip features/next sections, leave placeholders |
|
|
146
|
+
| `bus/log.jsonl` | Skip progress section |
|
|
147
|
+
| `ADR files` | Skip decisions section |
|
|
148
|
+
| `CI config` | Skip CI details from tech section |
|
|
149
|
+
|
|
150
|
+
**Placeholder format for missing sections:**
|
|
151
|
+
```markdown
|
|
152
|
+
<!-- MANAGED_SECTION: features -->
|
|
153
|
+
No epics found. Create epics in docs/05-epics/ to populate this section.
|
|
154
|
+
<!-- END_MANAGED -->
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### 🚨 RULE #6: CONFIRMATION BEFORE WRITING
|
|
160
|
+
|
|
161
|
+
**Always use AskUserQuestion before Edit:**
|
|
162
|
+
|
|
163
|
+
```xml
|
|
164
|
+
<invoke name="AskUserQuestion">
|
|
165
|
+
<parameter name="questions">[{
|
|
166
|
+
"question": "Apply these changes to docs/context.md?",
|
|
167
|
+
"header": "Confirm Context Update",
|
|
168
|
+
"multiSelect": false,
|
|
169
|
+
"options": [
|
|
170
|
+
{"label": "Yes, update", "description": "Write changes to file"},
|
|
171
|
+
{"label": "No, abort", "description": "Cancel without saving"}
|
|
172
|
+
]
|
|
173
|
+
}]</parameter>
|
|
174
|
+
</invoke>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Only call Edit tool if response is YES.**
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### KEY FILES & STATE TO REMEMBER
|
|
182
|
+
|
|
183
|
+
| File/State | Purpose | Path |
|
|
184
|
+
|-----------|---------|------|
|
|
185
|
+
| Managed source | List of files to read | Required sources (Rule 4) |
|
|
186
|
+
| Diff display | What's changing | Show before confirm |
|
|
187
|
+
| User confirmation | Gate before writing | YES = write, NO = cancel |
|
|
188
|
+
| Managed sections | Content to update | 6 sections (overview, features, tech, decisions, progress, next) |
|
|
189
|
+
| File markers | Protect user content | Between `<!-- MANAGED_SECTION: X -->` markers |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### ANTI-PATTERNS & CORRECT PATTERNS
|
|
194
|
+
|
|
195
|
+
❌ **DON'T**: Write directly without diff
|
|
196
|
+
✅ **DO**: Show diff → ask → write
|
|
197
|
+
|
|
198
|
+
❌ **DON'T**: Modify user-written content
|
|
199
|
+
✅ **DO**: Only touch content between MANAGED_SECTION markers
|
|
200
|
+
|
|
201
|
+
❌ **DON'T**: Skip gathering if file missing
|
|
202
|
+
✅ **DO**: Gather what exists, use placeholders for missing
|
|
203
|
+
|
|
204
|
+
❌ **DON'T**: Create context.md without section markers
|
|
205
|
+
✅ **DO**: All managed content wrapped in `<!-- MANAGED_SECTION: X -->` markers
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### REMEMBER AFTER COMPACTION
|
|
210
|
+
|
|
211
|
+
After this command completes:
|
|
212
|
+
- ✓ docs/context.md created/updated with managed sections
|
|
213
|
+
- ✓ User-written content preserved (outside markers untouched)
|
|
214
|
+
- ✓ File ready for pasting into ChatGPT, Perplexity, Gemini, Claude web
|
|
215
|
+
- ✓ Use `/agileflow:context:export` to get ≤300 line excerpt for pasting
|
|
216
|
+
- ✓ Use `/agileflow:context:note` to add quick timestamped notes
|
|
217
|
+
|
|
45
218
|
<!-- COMPACT_SUMMARY_END -->
|
|
46
219
|
|
|
47
220
|
---
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Add timestamped note to context file
|
|
3
3
|
argument-hint: NOTE=<text>
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:context:note NOTE=\"text\" - Append timestamped note to docs/context.md"
|
|
8
|
+
- "ALWAYS show diff BEFORE applying changes - wait for YES/NO confirmation"
|
|
9
|
+
- "REQUIRED ARGUMENT: NOTE must be provided (ask user if missing)"
|
|
10
|
+
- "AUTO-CREATE: Creates Notes section if missing, appends note to end"
|
|
11
|
+
- "ISO TIMESTAMP: Always use ISO 8601 format for timestamps"
|
|
12
|
+
- "PRESERVE: Creates docs/context.md if missing (don't error, create it)"
|
|
13
|
+
- "CHRONOLOGICAL ORDER: Notes appear in order added (newest at bottom)"
|
|
14
|
+
state_fields:
|
|
15
|
+
- note_text
|
|
16
|
+
- context_file_exists
|
|
17
|
+
- notes_section_exists
|
|
18
|
+
- user_confirmation
|
|
4
19
|
---
|
|
5
20
|
|
|
6
21
|
# /agileflow:context:note
|
|
@@ -16,11 +31,240 @@ Quickly add a note to `docs/context.md` under the "Notes" section. Useful for re
|
|
|
16
31
|
---
|
|
17
32
|
|
|
18
33
|
<!-- COMPACT_SUMMARY_START -->
|
|
19
|
-
## Compact Summary
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**
|
|
35
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:context:note IS ACTIVE
|
|
36
|
+
|
|
37
|
+
**CRITICAL**: You are appending a timestamped note to `docs/context.md`. Follow these rules EXACTLY.
|
|
38
|
+
|
|
39
|
+
**PURPOSE**: Quickly record decisions, observations, and reminders as timestamped notes that persist in project context.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### 🚨 RULE #1: REQUIRE NOTE ARGUMENT
|
|
44
|
+
|
|
45
|
+
**The NOTE argument is MANDATORY.**
|
|
46
|
+
|
|
47
|
+
**If not provided, ask user:**
|
|
48
|
+
|
|
49
|
+
```xml
|
|
50
|
+
<invoke name="AskUserQuestion">
|
|
51
|
+
<parameter name="questions">[{
|
|
52
|
+
"question": "What note would you like to add to docs/context.md?",
|
|
53
|
+
"header": "Enter note text",
|
|
54
|
+
"multiSelect": false,
|
|
55
|
+
"options": [
|
|
56
|
+
{"label": "Enter note (use 'Other' field)", "description": "Type your 1-5 line note"}
|
|
57
|
+
]
|
|
58
|
+
}]</parameter>
|
|
59
|
+
</invoke>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Then extract the user's text from response and proceed.**
|
|
63
|
+
|
|
64
|
+
**Examples of good notes:**
|
|
65
|
+
```
|
|
66
|
+
"Decided to use JWT instead of sessions"
|
|
67
|
+
"User reported auth bug in production, investigating now"
|
|
68
|
+
"Sprint planning: focusing on US-0042 and US-0045 this week"
|
|
69
|
+
"Performance issue fixed: reduced API response time by 40%"
|
|
70
|
+
"Stakeholder meeting: new feature request added to backlog"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 🚨 RULE #2: AUTO-CREATE MISSING FILES
|
|
76
|
+
|
|
77
|
+
**If docs/context.md doesn't exist, CREATE it with Notes section:**
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
# Project Context
|
|
81
|
+
|
|
82
|
+
<!-- MANAGED_SECTION: placeholder -->
|
|
83
|
+
Run /agileflow:context:full to populate project context.
|
|
84
|
+
<!-- END_MANAGED -->
|
|
85
|
+
|
|
86
|
+
## Notes
|
|
87
|
+
|
|
88
|
+
[Notes will appear here]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Do NOT error or skip. Create the file and add the note.**
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### 🚨 RULE #3: FIND OR CREATE NOTES SECTION
|
|
96
|
+
|
|
97
|
+
**Workflow:**
|
|
98
|
+
1. Read docs/context.md
|
|
99
|
+
2. Look for `## Notes` section
|
|
100
|
+
3. If NOT found, CREATE it at the end of the file:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
|
|
104
|
+
## Notes
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
4. If found, position cursor after last note
|
|
108
|
+
|
|
109
|
+
**Append format (ALWAYS use this):**
|
|
110
|
+
```markdown
|
|
111
|
+
- **[ISO_TIMESTAMP]**: Note text here
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Example:**
|
|
115
|
+
```markdown
|
|
116
|
+
## Notes
|
|
117
|
+
|
|
118
|
+
- **[2024-12-31T10:30:00Z]**: Decided to use JWT instead of sessions
|
|
119
|
+
- **[2024-12-31T15:45:00Z]**: User reported auth bug in production
|
|
120
|
+
- **[2025-01-01T09:00:00Z]**: Sprint planning: focusing on US-0042 this week
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### 🚨 RULE #4: ALWAYS DIFF-FIRST
|
|
126
|
+
|
|
127
|
+
**NEVER write directly. Always show changes first:**
|
|
128
|
+
|
|
129
|
+
1. **Read** docs/context.md (or create new)
|
|
130
|
+
2. **Find/Create** Notes section
|
|
131
|
+
3. **Generate** new note with ISO timestamp
|
|
132
|
+
4. **Show diff** (display exactly what changed)
|
|
133
|
+
5. **Confirm** (ask user: "Add this note?")
|
|
134
|
+
6. **Apply** (only after YES, write using Edit tool)
|
|
135
|
+
|
|
136
|
+
**Diff format:**
|
|
137
|
+
```diff
|
|
138
|
+
## Notes
|
|
139
|
+
|
|
140
|
+
- **[2024-12-31T10:30:00Z]**: Old note here
|
|
141
|
+
+ - **[2025-01-07T14:22:00Z]**: New note being added
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### 🚨 RULE #5: ISO 8601 TIMESTAMP FORMAT
|
|
147
|
+
|
|
148
|
+
**ALWAYS use ISO 8601 format for all timestamps.**
|
|
149
|
+
|
|
150
|
+
**Format**: `YYYY-MM-DDTHH:MM:SSZ` (UTC/Zulu time)
|
|
151
|
+
|
|
152
|
+
**Examples:**
|
|
153
|
+
- `2024-12-31T10:30:00Z` - correct
|
|
154
|
+
- `2025-01-07T15:45:30Z` - correct
|
|
155
|
+
- `12/31/2024 3:30 PM` - WRONG (not ISO)
|
|
156
|
+
- `Jan 7, 2025 3:45 PM` - WRONG (not ISO)
|
|
157
|
+
|
|
158
|
+
**To get current timestamp in JavaScript:**
|
|
159
|
+
```javascript
|
|
160
|
+
new Date().toISOString() // Returns "2025-01-07T14:22:18.123Z"
|
|
161
|
+
// Remove milliseconds: "2025-01-07T14:22:18Z"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### 🚨 RULE #6: CONFIRMATION BEFORE WRITING
|
|
167
|
+
|
|
168
|
+
**Always use AskUserQuestion before Edit:**
|
|
169
|
+
|
|
170
|
+
```xml
|
|
171
|
+
<invoke name="AskUserQuestion">
|
|
172
|
+
<parameter name="questions">[{
|
|
173
|
+
"question": "Add this note to docs/context.md?",
|
|
174
|
+
"header": "Confirm Note Addition",
|
|
175
|
+
"multiSelect": false,
|
|
176
|
+
"options": [
|
|
177
|
+
{"label": "Yes, add note", "description": "Append note to Notes section"},
|
|
178
|
+
{"label": "No, cancel", "description": "Cancel without saving"}
|
|
179
|
+
]
|
|
180
|
+
}]</parameter>
|
|
181
|
+
</invoke>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Only call Edit tool if response is YES.**
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### KEY FILES & STATE TO REMEMBER
|
|
189
|
+
|
|
190
|
+
| File/State | Purpose | Format |
|
|
191
|
+
|-----------|---------|--------|
|
|
192
|
+
| docs/context.md | Target file | Markdown with Notes section |
|
|
193
|
+
| Notes section | Append location | `## Notes` header at end |
|
|
194
|
+
| Timestamp | Each note | ISO 8601: `YYYY-MM-DDTHH:MM:SSZ` |
|
|
195
|
+
| Note format | Structure | `- **[timestamp]**: note text` |
|
|
196
|
+
| Diff display | Review before confirm | Show change with context lines |
|
|
197
|
+
| User confirmation | Gate before write | YES = write, NO = cancel |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### WORKFLOW SEQUENCE
|
|
202
|
+
|
|
203
|
+
**This is the EXACT workflow:**
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
1. Validate NOTE argument provided
|
|
207
|
+
├─ If missing: AskUserQuestion for note text
|
|
208
|
+
└─ If provided: Use provided value
|
|
209
|
+
|
|
210
|
+
2. Read docs/context.md
|
|
211
|
+
├─ If missing: Create new file with placeholder
|
|
212
|
+
└─ If exists: Read entire file
|
|
213
|
+
|
|
214
|
+
3. Find or Create Notes section
|
|
215
|
+
├─ If found: Position after last note
|
|
216
|
+
└─ If missing: Add at end of file
|
|
217
|
+
|
|
218
|
+
4. Generate note entry
|
|
219
|
+
├─ Get current ISO timestamp
|
|
220
|
+
├─ Format: "- **[timestamp]**: note text"
|
|
221
|
+
└─ Store as pending_entry
|
|
222
|
+
|
|
223
|
+
5. Show diff to user
|
|
224
|
+
├─ Display before/after
|
|
225
|
+
└─ Add context lines
|
|
226
|
+
|
|
227
|
+
6. Confirm with AskUserQuestion
|
|
228
|
+
├─ If YES: Go to step 7
|
|
229
|
+
└─ If NO: Exit, don't write
|
|
230
|
+
|
|
231
|
+
7. Apply change using Edit tool
|
|
232
|
+
├─ Call Edit with old_string and new_string
|
|
233
|
+
└─ Done
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
### ANTI-PATTERNS & CORRECT PATTERNS
|
|
239
|
+
|
|
240
|
+
❌ **DON'T**: Write note without showing diff
|
|
241
|
+
✅ **DO**: Show diff → confirm → write
|
|
242
|
+
|
|
243
|
+
❌ **DON'T**: Error if docs/context.md missing
|
|
244
|
+
✅ **DO**: Create file with placeholder, add note
|
|
245
|
+
|
|
246
|
+
❌ **DON'T**: Use non-ISO timestamp format
|
|
247
|
+
✅ **DO**: Use `YYYY-MM-DDTHH:MM:SSZ` format
|
|
248
|
+
|
|
249
|
+
❌ **DON'T**: Skip creating Notes section
|
|
250
|
+
✅ **DO**: Create `## Notes` if missing, append notes there
|
|
251
|
+
|
|
252
|
+
❌ **DON'T**: Use custom timestamp format
|
|
253
|
+
✅ **DO**: All notes use same ISO format (consistent ordering)
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### REMEMBER AFTER COMPACTION
|
|
258
|
+
|
|
259
|
+
After this command completes:
|
|
260
|
+
- ✓ Note appended to docs/context.md (diff shown first)
|
|
261
|
+
- ✓ ISO 8601 timestamp added automatically
|
|
262
|
+
- ✓ Notes section created if missing
|
|
263
|
+
- ✓ Note visible in `/agileflow:context:export` (if space allows)
|
|
264
|
+
- ✓ Notes persist across sessions
|
|
265
|
+
- ✓ Use `/agileflow:context:full` to regenerate managed sections
|
|
266
|
+
- ✓ Use `/agileflow:context:export` to get excerpt for pasting
|
|
267
|
+
|
|
24
268
|
<!-- COMPACT_SUMMARY_END -->
|
|
25
269
|
|
|
26
270
|
---
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Track and prioritize technical debt items
|
|
3
|
+
compact_context:
|
|
4
|
+
priority: medium
|
|
5
|
+
preserve_rules:
|
|
6
|
+
- "Scan for debt indicators: TODOs, complexity >10, functions >50 lines, duplication, coverage <70%"
|
|
7
|
+
- "Parse story tags: tech-debt: true, blocked by debt, 'refactor' or 'cleanup' in title"
|
|
8
|
+
- "Check ADRs for deprecated status and negative consequences"
|
|
9
|
+
- "Analyze git history: high churn files, unclear ownership"
|
|
10
|
+
- "Score each item (0-100): Severity × Scope × Pain / 10"
|
|
11
|
+
- "Categorize: Architecture/CodeQuality/Documentation/Testing/Security/Performance/Dependencies"
|
|
12
|
+
- "NEVER auto-create stories without user approval"
|
|
13
|
+
- "Provide realistic effort estimates (err on high side)"
|
|
14
|
+
- "Show debt trend analysis and recommendations for reduction"
|
|
15
|
+
state_fields:
|
|
16
|
+
- debt_items_found
|
|
17
|
+
- critical_count
|
|
18
|
+
- high_count
|
|
19
|
+
- stories_created
|
|
3
20
|
---
|
|
4
21
|
|
|
5
22
|
# tech-debt
|