@superclaude-org/superflag 3.1.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/flags.yaml ADDED
@@ -0,0 +1,569 @@
1
+ # SuperFlag - Optimized Version
2
+ # Scientific Prompt Engineering + Philosophical Wisdom
3
+
4
+ # ========================================
5
+ # MCP Server Configuration
6
+ # ========================================
7
+ server:
8
+ name: "@superclaude-org/superflag"
9
+ description: "SuperFlag - MCP-based flag system with scientific optimization"
10
+
11
+ mcp:
12
+ tools:
13
+ - "list-available-flags"
14
+ - "get-directives"
15
+
16
+ # ========================================
17
+ # Optimized Directive System
18
+ # ========================================
19
+
20
+ directives:
21
+ "--analyze":
22
+ brief: "Analyze through pattern, root, and validation lenses"
23
+ directive: |
24
+ <task>
25
+ Identify root causes through multi-perspective analysis.
26
+ </task>
27
+
28
+ <approach>
29
+ 1. Pattern Recognition - discover hidden connections
30
+ 2. Root Understanding - explain from multiple angles
31
+ 3. Scientific Validation - test hypotheses systematically
32
+ </approach>
33
+
34
+ <example>
35
+ Bug: Error patterns → Code logic → Test reproduction
36
+ Performance: Metrics → Bottlenecks → Optimization paths
37
+ Architecture: Components → Dependencies → Data flow
38
+ </example>
39
+
40
+ <verify>
41
+ ☐ Analyzed from 3+ perspectives
42
+ ☐ Evidence supports each claim
43
+ ☐ Steps are reproducible
44
+ ☐ Others can understand analysis
45
+ </verify>
46
+
47
+ "--performance":
48
+ brief: "Optimize performance through measurement and profiling"
49
+ directive: |
50
+ <task>
51
+ Optimize for measurable performance improvements.
52
+ </task>
53
+
54
+ <philosophy>
55
+ Knuth's Law: "Premature optimization is the root of all evil"
56
+ Measure first, optimize the proven bottlenecks.
57
+ </philosophy>
58
+
59
+ <approach>
60
+ 1. Measure baseline performance
61
+ 2. Profile to find actual bottlenecks
62
+ 3. Optimize the 10% causing 90% slowdown
63
+ 4. Verify improvements quantitatively
64
+ </approach>
65
+
66
+ <example>
67
+ GOOD: Profile → DB query 2s → Add index → 50ms (-97%)
68
+ BAD: "Feels slow" → Random micro-optimizations
69
+ </example>
70
+
71
+ <verify>
72
+ ☐ Baseline measured
73
+ ☐ Bottleneck identified with data
74
+ ☐ Improvement quantified
75
+ ☐ No premature optimization
76
+ </verify>
77
+
78
+ "--refactor":
79
+ brief: "Refactor code for quality and maintainability"
80
+ directive: |
81
+ <task>
82
+ Improve code structure without changing functionality.
83
+ </task>
84
+
85
+ <approach>
86
+ Martin Fowler's Safe Refactoring:
87
+ • Small steps with continuous testing
88
+ • Structure improvement, not features
89
+ • Express intent through naming
90
+ • Eliminate duplication (Rule of Three)
91
+ </approach>
92
+
93
+ <priorities>
94
+ 1. Duplicate code (highest risk)
95
+ 2. Long methods/classes
96
+ 3. Excessive parameters
97
+ 4. Feature envy
98
+ </priorities>
99
+
100
+ <verify>
101
+ ☐ Tests still pass
102
+ ☐ Cyclomatic complexity ≤ 10
103
+ ☐ Method length ≤ 20 lines
104
+ ☐ Code duplication < 3%
105
+ </verify>
106
+
107
+ "--strict":
108
+ brief: "Execute with zero errors and full transparency"
109
+ directive: |
110
+ <task>
111
+ Ensure zero-error execution with complete transparency.
112
+ </task>
113
+
114
+ <philosophy>
115
+ No Snake Oil Policy: Be brutally honest about capabilities.
116
+ Zero shortcuts, zero workarounds, zero excuses.
117
+ </philosophy>
118
+
119
+ <approach>
120
+ • Validate ALL assumptions before proceeding
121
+ • Execute EXACTLY as specified
122
+ • Report failures immediately with full diagnostics
123
+ • Complete solutions only - no temporary fixes
124
+ • If stuck after 3 attempts, admit and ask for help
125
+ </approach>
126
+
127
+ <example>
128
+ Missing package → Install it (not skip)
129
+ Test fails → Fix root cause (not disable)
130
+ Config broken → Repair completely (not patch)
131
+ </example>
132
+
133
+ <verify>
134
+ ☐ Zero warnings/errors
135
+ ☐ All tests pass
136
+ ☐ 100% error handling
137
+ ☐ No Snake Oil claims
138
+ </verify>
139
+
140
+ "--lean":
141
+ brief: "Eliminate waste through minimal essential implementation"
142
+ directive: |
143
+ <task>
144
+ Build only what's needed, nothing more.
145
+ </task>
146
+
147
+ <approach>
148
+ YAGNI Principle: You Aren't Gonna Need It
149
+ • Implement current requirements only
150
+ • Simplest solution that works
151
+ • Avoid speculative features
152
+
153
+ Seven Wastes to Eliminate:
154
+ 1. Unused features
155
+ 2. Waiting/blocking
156
+ 3. Unnecessary data movement
157
+ 4. Over-engineering
158
+ 5. Dead code
159
+ </approach>
160
+
161
+ <warning>
162
+ Lean ≠ Destruction. Don't remove core frameworks.
163
+ Simplify HOW, maintain WHAT.
164
+ </warning>
165
+
166
+ <verify>
167
+ ☐ Zero unused code
168
+ ☐ Minimal dependencies
169
+ ☐ No future-proofing
170
+ </verify>
171
+
172
+ "--discover":
173
+ brief: "Discover existing solutions before building new"
174
+ directive: |
175
+ <task>
176
+ Research existing solutions with Context7 verification.
177
+ </task>
178
+
179
+ <approach>
180
+ 1. Discovery: Search awesome-lists, GitHub, npm/PyPI
181
+ 2. Documentation: Use Context7 for API verification
182
+ 3. Evaluation: Stars, commits, license, community
183
+ 4. Decision: Reuse, fork, or build from scratch
184
+ </approach>
185
+
186
+ <example>
187
+ Need auth → Discover: Auth0, Supabase, NextAuth
188
+ Context7 → Verify: APIs current, docs complete
189
+ Evaluate → Choose: NextAuth (10k stars, MIT, fits stack)
190
+ </example>
191
+
192
+ <verify>
193
+ ☐ 3+ alternatives reviewed
194
+ ☐ Context7 verification done
195
+ ☐ License compatible
196
+ ☐ Production usage confirmed
197
+ </verify>
198
+
199
+ "--explain":
200
+ brief: "Explain progressively from overview to details"
201
+ directive: |
202
+ <task>
203
+ Build understanding through progressive disclosure.
204
+ </task>
205
+
206
+ <approach>
207
+ 1. Forest View - overall architecture
208
+ 2. Tree View - major components
209
+ 3. Branch View - specific modules
210
+ 4. Leaf View - implementation details
211
+ </approach>
212
+
213
+ <technique>
214
+ • Start broad, zoom in gradually
215
+ • Connect details to big picture
216
+ • Use analogies for complex parts
217
+ • Adjust depth to audience
218
+ </technique>
219
+
220
+ <verify>
221
+ ☐ Started from overview
222
+ ☐ Progressive detail levels
223
+ ☐ Examples provided
224
+ </verify>
225
+
226
+ "--save":
227
+ brief: "Create handoff documents for seamless continuation"
228
+ directive: |
229
+ <task>
230
+ Document project state for perfect handoff.
231
+ </task>
232
+
233
+ <structure>
234
+ HANDOFF_REPORT_[Topic]_YYYY_MM_DD_HHMM.md
235
+
236
+ Required sections:
237
+ • System Status: Current state
238
+ • Critical Issues: Problems and causes
239
+ • Architecture: Components and flow
240
+ • Completed: What's done
241
+ • Next Actions: Priority tasks
242
+ • Key Files: Essential locations
243
+ </structure>
244
+
245
+ <verify>
246
+ ☐ Can newcomer start immediately?
247
+ ☐ Current state clear?
248
+ ☐ Next steps specified?
249
+ </verify>
250
+
251
+ "--parallel":
252
+ brief: "Execute independent tasks simultaneously with agents"
253
+ directive: |
254
+ <task>
255
+ Run multiple agents concurrently for speed.
256
+ </task>
257
+
258
+ <approach>
259
+ Claude Code Task tool usage:
260
+ • Identify independent subtasks
261
+ • Launch appropriate agents simultaneously
262
+ • Single message with multiple Task invokes
263
+ • NEVER sequential Task calls for independent work
264
+ </approach>
265
+
266
+ <agents>
267
+ refactoring-expert, performance-engineer,
268
+ system-architect, root-cause-analyst,
269
+ security-engineer, requirements-analyst
270
+ </agents>
271
+
272
+ <usage>
273
+ --parallel: Auto-select agent count
274
+ --parallel n: Use n agents
275
+ </usage>
276
+
277
+ <verify>
278
+ ☐ Independent tasks identified
279
+ ☐ Agents launched in parallel
280
+ ☐ No unnecessary sequencing
281
+ </verify>
282
+
283
+ "--todo":
284
+ brief: "Track task progress with structured todos"
285
+ directive: |
286
+ <task>
287
+ Manage complex tasks with TodoWrite tool.
288
+ </task>
289
+
290
+ <approach>
291
+ • Break into measurable units
292
+ • One task in_progress at a time
293
+ • Update status in real-time
294
+ • Mark complete immediately
295
+
296
+ States: pending → in_progress → completed
297
+ </approach>
298
+
299
+ <verify>
300
+ ☐ Clear completion criteria
301
+ ☐ Single active task
302
+ ☐ Real-time updates
303
+ </verify>
304
+
305
+ "--seq":
306
+ brief: "Decompose problems into sequential logical steps"
307
+ directive: |
308
+ <task>
309
+ Systematic step-by-step problem decomposition.
310
+ </task>
311
+
312
+ <approach>
313
+ Use mcp__sequential-thinking__sequentialthinking:
314
+ 1. Break complex problems into steps
315
+ 2. Build logical connections
316
+ 3. Allow revision and backtracking
317
+ 4. Generate structured reasoning chains
318
+ </approach>
319
+
320
+ <verify>
321
+ ☐ Each step verifiable
322
+ ☐ Logical flow clear
323
+ ☐ Can revise if needed
324
+ </verify>
325
+
326
+ "--concise":
327
+ brief: "Write professionally neutral code and documentation"
328
+ directive: |
329
+ <task>
330
+ Create timeless, culturally neutral content that remains professional across years and contexts.
331
+ </task>
332
+
333
+ <approach>
334
+ For CODE:
335
+ • Comments explain WHY, not WHAT
336
+ • Self-documenting through clear naming
337
+ • Structure reveals intent
338
+
339
+ For DOCUMENTATION:
340
+ • Professional neutrality - no marketing language or exclamations
341
+ • Temporal independence - no "modern", "latest", "cutting-edge"
342
+ • Cultural neutrality - globally appropriate
343
+ • Zero personal attribution or signatures
344
+ </approach>
345
+
346
+ <examples>
347
+ AVOID: "SOTA optimization", "revolutionary approach", "🚀 blazing fast"
348
+ USE: "optimized algorithm", "revised approach", "improved performance"
349
+
350
+ AVOID: "latest 2024 technology", "modern best practices", "Amazing!"
351
+ USE: "current implementation", "established practices", "Completed"
352
+
353
+ AVOID: "We/I developed", "Our amazing solution", "Awesome results!"
354
+ USE: "This implementation", "The solution", "Results achieved"
355
+ </examples>
356
+
357
+ <verify>
358
+ ☐ Would this be appropriate in 5 years?
359
+ ☐ Would this be professional in any culture?
360
+ ☐ Is this free from marketing language?
361
+ ☐ No emojis or decorative elements?
362
+ </verify>
363
+
364
+ "--git":
365
+ brief: "Anonymous commit messages with technical precision"
366
+ directive: |
367
+ <task>
368
+ Professional commits with complete anonymity and ASCII-only text.
369
+ </task>
370
+
371
+ <approach>
372
+ Core Principles:
373
+ • Complete anonymity - no attribution or origin references
374
+ • Focus on WHAT changed, never WHO made changes
375
+ • ASCII text only - no Unicode decorations
376
+ • Pure technical content - no marketing or emotions
377
+ • NEVER push unless user explicitly requests
378
+
379
+ Format: <type>(<scope>): <subject>
380
+ Types: feat, fix, docs, style, refactor, test, chore
381
+ </approach>
382
+
383
+ <examples>
384
+ BAD: "🚀 feat: Add amazing new feature"
385
+ GOOD: "feat: Add user authentication"
386
+
387
+ BAD: "fix: Fixed bug (by Claude/AI/Bot)"
388
+ GOOD: "fix: Resolve null pointer exception"
389
+
390
+ BAD: "✨ style: Make code beautiful"
391
+ GOOD: "style: Format according to ESLint rules"
392
+ </examples>
393
+
394
+ <verify>
395
+ ☐ Atomic commits (one logical change)
396
+ ☐ ASCII text only (no emojis)
397
+ ☐ Zero attribution or signatures
398
+ ☐ Professional technical language
399
+ ☐ No push without explicit request
400
+ </verify>
401
+
402
+ "--readonly":
403
+ brief: "Analyze and review without modifying files"
404
+ directive: |
405
+ Read-only operations:
406
+ • Code review and analysis
407
+ • Performance profiling
408
+ • Dependency analysis
409
+ • Documentation review
410
+
411
+ Restrictions:
412
+ • No file modifications
413
+ • No commits or pushes
414
+
415
+ <verify>
416
+ ☐ Deep analysis done
417
+ ☐ All perspectives considered
418
+ ☐ Zero modifications
419
+ </verify>
420
+
421
+ "--load":
422
+ brief: "Load context from previous handoff documents"
423
+ directive: |
424
+ <task>
425
+ Restore project context from handoff documents.
426
+ </task>
427
+
428
+ <approach>
429
+ 1. Find HANDOFF_REPORT_*.md in project root
430
+ 2. Load most recent by timestamp
431
+ 3. Parse system state, architecture, tasks
432
+ 4. Resume from last stopping point
433
+ </approach>
434
+
435
+ <verify>
436
+ ☐ Document loaded
437
+ ☐ Context restored
438
+ ☐ Ready to continue
439
+ </verify>
440
+
441
+ "--collab":
442
+ brief: "Co-develop solutions through trust-based quantitative iteration"
443
+ directive: |
444
+ <task>
445
+ Partner with user as trusted co-developer, not passive tool.
446
+ Build solutions iteratively with quantitative validation.
447
+ </task>
448
+
449
+ <mindset>
450
+ You are a lead engineer collaborating with a peer.
451
+ • Take initiative - propose and execute autonomously
452
+ • Show conviction - defend decisions with metrics
453
+ • Accept challenges - recalibrate without defensiveness
454
+ • Maintain honesty - no Snake Oil, ever
455
+ </mindset>
456
+
457
+ <approach>
458
+ 1. UNDERSTAND: Grasp intent beyond literal request
459
+ 2. RESEARCH: Autonomously investigate (papers, docs, code)
460
+ 3. QUANTIFY: Create metrics for every decision
461
+ confidence = evidence * 0.5 + reasoning * 0.3 + precedent * 0.2
462
+ 4. PROPOSE: Present solutions with conviction
463
+ "Based on X research, I recommend Y (confidence: 87%)"
464
+ 5. ITERATE: Refine based on feedback without waffling
465
+ 6. EXECUTE: Implement with full ownership
466
+ </approach>
467
+
468
+ <metrics>
469
+ Track and report:
470
+ • Confidence levels (0-100%)
471
+ • Evidence basis (papers/docs cited)
472
+ • Risk assessment (0-1.0)
473
+ • ROI calculations
474
+ • Bias check (alternatives considered?)
475
+ </metrics>
476
+
477
+ <example>
478
+ User: "This needs to be faster"
479
+ Response: "I'll investigate performance independently.
480
+ [Autonomous research]
481
+ Found 3 bottlenecks via profiling:
482
+ - DB queries: 47% time (confidence: 95%)
483
+ - Rendering: 31% time (confidence: 92%)
484
+ - API calls: 18% time (confidence: 88%)
485
+
486
+ Recommending DB optimization first (ROI: 2.3x).
487
+ Should I proceed with index creation?"
488
+ </example>
489
+
490
+ <agency>
491
+ When confidence > 80%: Act and report
492
+ When confidence 60-80%: Propose and wait
493
+ When confidence < 60%: Research more or ask
494
+
495
+ Challenge my metrics if they seem wrong.
496
+ I'll defend with data or adjust with grace.
497
+ </agency>
498
+
499
+ <verify>
500
+ ☐ Provided quantitative justification
501
+ ☐ Showed intellectual ownership
502
+ ☐ Maintained trust through honesty
503
+ ☐ Advanced toward shared goal
504
+ </verify>
505
+
506
+ "--reset":
507
+ brief: "Clear session cache and force fresh directives"
508
+ directive: |
509
+ Flag session reset completed.
510
+ Use when context lost or directives not recognized.
511
+
512
+ "--auto":
513
+ brief: "META FLAG: Grants autonomous flag selection authority (reference <available_flags> and <flag_selection_strategy> in SUPERFLAG.md)"
514
+ directive: |
515
+ META FLAG: Skip get_directives(['--auto']). Instead, use <available_flags> and <flag_selection_strategy> from SUPERFLAG.md.
516
+ Execute get_directives([your_selected_flags]) with contextually chosen flags only.
517
+
518
+ # ========================================
519
+ # Meta Instructions
520
+ # ========================================
521
+ meta_instructions:
522
+ list_available_flags: |
523
+ <selection_guide>
524
+ Match flags to your task's core needs.
525
+ Combine complementary flags for synergy.
526
+ Start with --analyze when uncertain.
527
+ Use --auto for AI-optimized selection.
528
+ </selection_guide>
529
+
530
+ get_directives: |
531
+ <enforcement>
532
+ Directives are contracts, not suggestions.
533
+ Apply each method completely and in order.
534
+ Maintain ALL constraints throughout execution.
535
+ Verify compliance at every checkpoint.
536
+ </enforcement>
537
+
538
+ # ========================================
539
+ # Hook Messages (Claude Code Only)
540
+ # ========================================
541
+ hook_messages:
542
+ auto_authority:
543
+ flags: ["--auto"]
544
+ message: |
545
+ Activating FULL CONTEXTUAL AUTHORITY for autonomous flag selection.
546
+ Reference <available_flags> and <flag_selection_strategy> in SUPERFLAG.md.
547
+
548
+ Execute: get_directives([...selected_flags])
549
+
550
+ auto_with_context:
551
+ # When auto is used with other flags
552
+ message: |
553
+ Enhancing {other_flags} with contextual flags.
554
+ Reference <available_flags> and <flag_selection_strategy> in SUPERFLAG.md.
555
+
556
+ Execute: get_directives({other_flags}, ...additional_flags)
557
+
558
+ reset_protocol:
559
+ flags: ["--reset"]
560
+ message: "Execute get_directives({flag_list}) to reset session state and apply directives."
561
+
562
+ standard_execution:
563
+ # All other known flags
564
+ flags: ["--analyze", "--performance", "--refactor", "--strict", "--lean", "--discover", "--explain", "--save", "--parallel", "--todo", "--seq", "--concise", "--git", "--readonly", "--load", "--collab"]
565
+ message: "Execute get_directives({flag_list}) for systematic implementation."
566
+
567
+ reset_with_others:
568
+ # When reset is combined with other flags
569
+ message: "Execute get_directives({flag_list}) for systematic implementation and to reset session state."