workflow-agent-cli 1.1.2

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.
@@ -0,0 +1,298 @@
1
+ # Self-Improvement Mandate
2
+
3
+ > **Generated by**: @hawkinside_out/workflow-agent v{{VERSION}}
4
+ > **Project**: {{PROJECT_NAME}}
5
+ > **Last Updated**: {{DATE}}
6
+
7
+ This document defines the **mandatory** self-improvement and evolution rules for {{PROJECT_NAME}}.
8
+
9
+ ---
10
+
11
+ ## 🎯 Mandatory Rule: Continuous Improvement Tracking
12
+
13
+ ### When This Applies
14
+
15
+ ANY time a developer, AI agent, or team member receives an "ask" or suggestion to improve the workflow, this process MUST be followed:
16
+
17
+ 1. **Document the Request**
18
+ - Create a new file in `.workflow/improvements/YYYY-MM-DD-<id>.md`
19
+ - Use the template below
20
+ - Timestamp: ISO 8601 format
21
+ - Status: `proposed` (initial), `accepted`, `implemented`, `rejected`
22
+
23
+ 2. **Categorize the Suggestion**
24
+ - **validation**: Branch/commit/PR validation rules
25
+ - **scopes**: Scope definitions, scope organization
26
+ - **documentation**: Guideline updates, clarity improvements
27
+ - **performance**: Speed, efficiency, workflow optimization
28
+ - **security**: Security concerns, sensitive data handling
29
+ - **ux**: Developer experience, CLI usability, IDE integration
30
+
31
+ 3. **Prioritize Impact**
32
+ - **critical**: Blocking issue, security vulnerability, data loss risk
33
+ - **high**: Significant pain point affecting daily work
34
+ - **medium**: Noticeable improvement but not urgent
35
+ - **low**: Nice-to-have, minor enhancement
36
+
37
+ 4. **Generate Implementation Plan**
38
+ - Use the implementation plan template from `AGENT_EDITING_INSTRUCTIONS.md`
39
+ - Include affected files, testing requirements, rollback plan
40
+ - Estimate effort and impact
41
+
42
+ ### Improvement Suggestion Template
43
+
44
+ \`\`\`markdown
45
+ # Improvement Suggestion
46
+
47
+ **ID**: <unique-id>
48
+ **Date**: <ISO-8601-timestamp>
49
+ **Status**: proposed | accepted | implemented | rejected
50
+ **Category**: validation | scopes | documentation | performance | security | ux
51
+ **Priority**: critical | high | medium | low
52
+ **Reporter**: <name-or-github-handle>
53
+
54
+ ## Problem/Opportunity
55
+
56
+ <Clear description of what needs improvement and why>
57
+
58
+ ## Proposed Solution
59
+
60
+ <Specific, actionable suggestion for improvement>
61
+
62
+ ## Impact Analysis
63
+
64
+ - **Who is affected**: <developers, teams, CI/CD, etc.>
65
+ - **Frequency**: <how often is this encountered?>
66
+ - **Current workaround**: <how do people handle this now?>
67
+ - **Benefit if implemented**: <concrete improvements expected>
68
+
69
+ ## Implementation Plan
70
+
71
+ ### Changes Required
72
+ - [ ] File/component to modify — `path/to/file.ts`
73
+ - [ ] Update documentation — `docs/section.md`
74
+ - [ ] Add tests — `tests/improvement.test.ts`
75
+
76
+ ### Testing
77
+ - [ ] Unit tests added
78
+ - [ ] Integration tests added
79
+ - [ ] Manual testing completed
80
+
81
+ ### Rollback Plan
82
+
83
+ <How to undo this change if it causes issues>
84
+
85
+ ## Notes
86
+
87
+ <Additional context, related issues, alternative approaches>
88
+
89
+ ---
90
+
91
+ *To submit this improvement to the workflow-agent community:*
92
+ \`\`\`bash
93
+ workflow suggest "$(cat .workflow/improvements/YYYY-MM-DD-<id>.md)"
94
+ \`\`\`
95
+ \`\`\`
96
+
97
+ ---
98
+
99
+ ## 💡 Proactive Suggestion Rule
100
+
101
+ ### Automatic Analysis Points
102
+
103
+ The workflow system MUST proactively analyze usage patterns and offer suggestions during these commands:
104
+
105
+ 1. **`workflow validate`** - After validation errors
106
+ - Detect repeated validation failures
107
+ - Suggest scope aliases for common typos
108
+ - Recommend adding frequently-used but unlisted scopes
109
+
110
+ 2. **`workflow sync`** - When syncing team config
111
+ - Compare local vs remote scope usage
112
+ - Suggest consolidating duplicate/overlapping scopes
113
+ - Recommend preset upgrades if available
114
+
115
+ 3. **`workflow doctor`** - Health check analysis
116
+ - Analyze git history for patterns (scope usage frequency, branch naming consistency)
117
+ - Detect unused scopes (defined but never used in past 90 days)
118
+ - Identify scope fragmentation (similar scopes that could merge)
119
+ - Check for validation rule mismatches (rules too strict/loose based on failure rate)
120
+
121
+ ### Suggestion Output Format
122
+
123
+ \`\`\`
124
+ 💡 Workflow Optimization Suggestion
125
+
126
+ [CATEGORY: <category>] [PRIORITY: <priority>]
127
+
128
+ <One-line summary of the issue>
129
+
130
+ Details:
131
+ • <Specific observation or pattern detected>
132
+ • <Impact or frequency data>
133
+ • <Concrete example from git history>
134
+
135
+ Recommendation:
136
+ <Actionable suggestion with exact command or config change>
137
+
138
+ To apply automatically:
139
+ workflow apply-suggestion <id>
140
+
141
+ To provide feedback:
142
+ workflow suggest "Alternative approach: ..."
143
+ \`\`\`
144
+
145
+ ### Pattern Detection Examples
146
+
147
+ **Example 1: Common Typo**
148
+ ```
149
+ 💡 Workflow Optimization Suggestion
150
+
151
+ [CATEGORY: validation] [PRIORITY: medium]
152
+
153
+ Detected 12 validation failures for scope 'task' (should be 'tasks')
154
+
155
+ Details:
156
+ • 12 failed commits over past 30 days
157
+ • All from 'tasks' scope being typed as 'task'
158
+ • Affects 3 different team members
159
+
160
+ Recommendation:
161
+ Add scope alias: 'task' → 'tasks' in workflow.config.ts
162
+
163
+ aliases: {
164
+ 'task': 'tasks',
165
+ 'ui-component': 'ui'
166
+ }
167
+
168
+ To apply automatically:
169
+ workflow config add-alias task tasks
170
+ ```
171
+
172
+ **Example 2: Scope Consolidation**
173
+ ```
174
+ 💡 Workflow Optimization Suggestion
175
+
176
+ [CATEGORY: scopes] [PRIORITY: low]
177
+
178
+ Both 'api' and 'backend' scopes exist but serve similar purposes
179
+
180
+ Details:
181
+ • 'api' used in 45 commits (68%)
182
+ • 'backend' used in 21 commits (32%)
183
+ • Descriptions overlap: "Server actions, API patterns, data fetching"
184
+
185
+ Recommendation:
186
+ Consolidate into single 'api' scope:
187
+ 1. Update 'api' scope description to be comprehensive
188
+ 2. Remove 'backend' scope
189
+ 3. Update CHANGELOG with migration note
190
+
191
+ To discuss with team:
192
+ workflow suggest "Should we keep both api and backend scopes separate?"
193
+ ```
194
+
195
+ ---
196
+
197
+ ## 📊 Evolution Tracking
198
+
199
+ ### Changelog Requirements
200
+
201
+ ALL implemented improvements MUST be documented in `WORKFLOW_CHANGELOG.md` with:
202
+
203
+ - **Date**: When improvement was implemented
204
+ - **Version**: Semantic version bump (if using workflow-agent package)
205
+ - **Category**: Same as suggestion category
206
+ - **Summary**: One-line description
207
+ - **Rationale**: Why this improvement was made
208
+ - **Migration**: Any breaking changes or required actions
209
+ - **Reporter**: Who suggested the improvement (credit!)
210
+
211
+ ### Changelog Template
212
+
213
+ \`\`\`markdown
214
+ ## {{VERSION}} - {{DATE}}
215
+
216
+ ### {{CATEGORY}} Improvements
217
+
218
+ **<One-line summary>**
219
+
220
+ - **Rationale**: <Why this was needed>
221
+ - **Changes**: <What changed>
222
+ - **Migration**: <How to adapt (if breaking)>
223
+ - **Reporter**: @<github-handle>
224
+ - **Impact**: <Who benefits and how>
225
+
226
+ \`\`\`
227
+
228
+ ---
229
+
230
+ ## 🔄 Workflow Agent Integration
231
+
232
+ If using `@hawkinside_out/workflow-agent` package, improvements are:
233
+
234
+ 1. **Submitted** to central registry at `workflow-improvements.dev`
235
+ 2. **Moderated** using trust scores and content filtering
236
+ 3. **Voted** on by the community (upvote/downvote)
237
+ 4. **Prioritized** by AI analysis (impact score calculation)
238
+ 5. **Implemented** in future package releases
239
+ 6. **Synced** back to your project via `workflow sync`
240
+
241
+ ### Opting In to Community Improvements
242
+
243
+ Edit `workflow.config.ts`:
244
+
245
+ \`\`\`typescript
246
+ export default {
247
+ projectName: '{{PROJECT_NAME}}',
248
+ scopes: [...],
249
+
250
+ // Enable community improvement syncing
251
+ syncRemote: 'https://workflow-improvements.dev/registry',
252
+ analytics: {
253
+ enabled: true,
254
+ shareAnonymous: true, // Help improve the tool!
255
+ },
256
+ };
257
+ \`\`\`
258
+
259
+ ---
260
+
261
+ ## ✅ Pre-Commit Checklist Addition
262
+
263
+ Before EVERY commit touching workflow configuration, verify:
264
+
265
+ - [ ] **Improvement Documented**: If changing workflow rules, is there a corresponding improvement suggestion file?
266
+ - [ ] **Changelog Updated**: Is WORKFLOW_CHANGELOG.md updated with the change?
267
+ - [ ] **Team Notified**: For breaking changes, has the team been notified via Slack/Discord?
268
+ - [ ] **Migration Guide**: For breaking changes, is there a clear migration path documented?
269
+
270
+ ---
271
+
272
+ ## 🚫 Prohibited Actions
273
+
274
+ - ❌ Changing workflow rules without documenting rationale in improvement suggestion
275
+ - ❌ Ignoring repeated validation failures without investigating root cause
276
+ - ❌ Rejecting community improvement suggestions without feedback/rationale
277
+ - ❌ Making breaking changes to scope definitions without team discussion
278
+ - ❌ Bypassing validation in "strict" mode without documenting exception reason
279
+
280
+ ---
281
+
282
+ ## 🎓 Philosophy
283
+
284
+ > "A workflow that doesn't evolve is a workflow that dies."
285
+
286
+ The goal is **continuous improvement** driven by:
287
+
288
+ 1. **Real usage data** - What actually happens in practice
289
+ 2. **Developer feedback** - Pain points from the team
290
+ 3. **Community wisdom** - Insights from other projects
291
+ 4. **Automated analysis** - Pattern detection by AI
292
+
293
+ Every suggestion makes the workflow better for everyone. Your feedback matters!
294
+
295
+ ---
296
+
297
+ *Generated by @hawkinside_out/workflow-agent - a self-evolving workflow management system*
298
+ *Learn more: https://workflow.dev/docs/self-improvement*