moflo 4.9.20 → 4.9.22

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.
Files changed (240) hide show
  1. package/.claude/agents/analysis/analyze-code-quality.md +0 -121
  2. package/.claude/agents/analysis/code-analyzer.md +5 -26
  3. package/.claude/agents/architecture/system-design/arch-system-design.md +0 -119
  4. package/.claude/agents/base-template-generator.md +0 -1
  5. package/.claude/agents/core/coder.md +0 -22
  6. package/.claude/agents/core/planner.md +0 -16
  7. package/.claude/agents/core/researcher.md +0 -16
  8. package/.claude/agents/core/reviewer.md +0 -17
  9. package/.claude/agents/core/tester.md +0 -19
  10. package/.claude/agents/custom/test-long-runner.md +0 -2
  11. package/.claude/agents/development/dev-backend-api.md +0 -167
  12. package/.claude/agents/development/dev-database.md +43 -0
  13. package/.claude/agents/development/dev-frontend.md +42 -0
  14. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -112
  15. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -111
  16. package/.claude/agents/security/security-auditor.md +45 -0
  17. package/.claude/guidance/shipped/moflo-agent-rules.md +172 -0
  18. package/.claude/guidance/shipped/moflo-claude-swarm-cohesion.md +73 -265
  19. package/.claude/guidance/shipped/moflo-cli-reference.md +6 -6
  20. package/.claude/guidance/shipped/moflo-core-guidance.md +66 -184
  21. package/.claude/guidance/shipped/moflo-cross-platform.md +1 -1
  22. package/.claude/guidance/shipped/moflo-error-handling.md +3 -3
  23. package/.claude/guidance/shipped/moflo-guidance-rules.md +17 -7
  24. package/.claude/guidance/shipped/moflo-memory-strategy.md +76 -182
  25. package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +6 -8
  26. package/.claude/guidance/shipped/moflo-settings-injection.md +7 -9
  27. package/.claude/guidance/shipped/moflo-source-hygiene.md +5 -5
  28. package/.claude/guidance/shipped/moflo-spell-connectors.md +3 -4
  29. package/.claude/guidance/shipped/moflo-spell-custom-steps.md +3 -4
  30. package/.claude/guidance/shipped/moflo-spell-engine.md +40 -162
  31. package/.claude/guidance/shipped/moflo-spell-runner.md +134 -0
  32. package/.claude/guidance/shipped/moflo-spell-sandboxing.md +10 -57
  33. package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +149 -0
  34. package/.claude/guidance/shipped/moflo-subagents.md +43 -114
  35. package/.claude/guidance/shipped/moflo-task-icons.md +4 -4
  36. package/.claude/guidance/shipped/moflo-user-facing-language.md +3 -3
  37. package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +3 -3
  38. package/.claude/guidance/shipped/moflo-yaml-reference.md +4 -5
  39. package/.claude/helpers/gate.cjs +192 -15
  40. package/.claude/helpers/prompt-hook.mjs +4 -38
  41. package/.claude/helpers/simplify-classify.cjs +32 -11
  42. package/.claude/helpers/subagent-bootstrap.json +1 -1
  43. package/.claude/helpers/subagent-start.cjs +1 -1
  44. package/.claude/skills/connector-builder/SKILL.md +42 -429
  45. package/.claude/skills/connector-builder/templates/connector.md +189 -0
  46. package/.claude/skills/connector-builder/templates/step-command.md +176 -0
  47. package/.claude/skills/eldar/SKILL.md +7 -7
  48. package/.claude/skills/fl/SKILL.md +3 -3
  49. package/.claude/skills/fl/execution-modes.md +39 -16
  50. package/.claude/skills/fl/phases.md +3 -3
  51. package/.claude/skills/{simplify → flo-simplify}/SKILL.md +11 -11
  52. package/.claude/skills/guidance/SKILL.md +17 -9
  53. package/.claude/skills/memory-patterns/SKILL.md +1 -1
  54. package/.claude/skills/publish/SKILL.md +121 -36
  55. package/.claude/skills/reset-epic/SKILL.md +2 -2
  56. package/.claude/skills/spell-builder/SKILL.md +39 -226
  57. package/.claude/skills/spell-builder/architecture.md +1 -1
  58. package/.claude/skills/spell-builder/permissions.md +107 -0
  59. package/.claude/skills/spell-builder/preflight.md +101 -0
  60. package/.claude/skills/spell-schedule/SKILL.md +2 -3
  61. package/bin/gate.cjs +192 -15
  62. package/bin/lib/retired-files.mjs +146 -0
  63. package/bin/prompt-hook.mjs +4 -38
  64. package/bin/session-start-launcher.mjs +120 -1
  65. package/bin/setup-project.mjs +63 -69
  66. package/bin/simplify-classify.cjs +32 -11
  67. package/dist/src/cli/appliance/rvfa-builder.js +1 -1
  68. package/dist/src/cli/commands/agent.js +3 -9
  69. package/dist/src/cli/commands/doctor-checks-deep.js +4 -0
  70. package/dist/src/cli/commands/hooks.js +1 -3
  71. package/dist/src/cli/commands/index.js +2 -0
  72. package/dist/src/cli/commands/retire.js +111 -0
  73. package/dist/src/cli/hooks/reasoningbank/index.js +7 -7
  74. package/dist/src/cli/init/claudemd-generator.js +30 -33
  75. package/dist/src/cli/init/executor.js +53 -69
  76. package/dist/src/cli/init/helpers-generator.js +165 -52
  77. package/dist/src/cli/init/moflo-init.js +41 -114
  78. package/dist/src/cli/init/settings-generator.js +44 -14
  79. package/dist/src/cli/mcp-tools/agent-tools.js +9 -27
  80. package/dist/src/cli/mcp-tools/hooks-tools.js +23 -21
  81. package/dist/src/cli/memory/controllers/semantic-router.js +18 -12
  82. package/dist/src/cli/memory/sona-optimizer.js +6 -6
  83. package/dist/src/cli/neural/domain/services/learning-service.js +3 -3
  84. package/dist/src/cli/services/agent-router.js +2 -5
  85. package/dist/src/cli/services/hook-block-hash.js +11 -2
  86. package/dist/src/cli/services/hook-wiring.js +86 -3
  87. package/dist/src/cli/services/subagent-bootstrap.js +1 -1
  88. package/dist/src/cli/shared/events/example-usage.js +6 -6
  89. package/dist/src/cli/shared/hooks/task-hooks.js +8 -8
  90. package/dist/src/cli/version.js +1 -1
  91. package/package.json +3 -2
  92. package/retired-files.json +1989 -0
  93. package/scripts/post-install-bootstrap.mjs +19 -0
  94. package/src/cli/data/model-registry.json +2 -2
  95. package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
  96. package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
  97. package/.claude/agents/consensus/gossip-coordinator.md +0 -63
  98. package/.claude/agents/consensus/performance-benchmarker.md +0 -851
  99. package/.claude/agents/consensus/quorum-manager.md +0 -823
  100. package/.claude/agents/consensus/raft-manager.md +0 -63
  101. package/.claude/agents/consensus/security-manager.md +0 -622
  102. package/.claude/agents/data/ml/data-ml-model.md +0 -193
  103. package/.claude/agents/github/code-review-swarm.md +0 -538
  104. package/.claude/agents/github/github-modes.md +0 -172
  105. package/.claude/agents/github/issue-tracker.md +0 -311
  106. package/.claude/agents/github/multi-repo-swarm.md +0 -551
  107. package/.claude/agents/github/pr-manager.md +0 -183
  108. package/.claude/agents/github/project-board-sync.md +0 -508
  109. package/.claude/agents/github/release-manager.md +0 -360
  110. package/.claude/agents/github/release-swarm.md +0 -580
  111. package/.claude/agents/github/repo-architect.md +0 -391
  112. package/.claude/agents/github/swarm-issue.md +0 -566
  113. package/.claude/agents/github/swarm-pr.md +0 -414
  114. package/.claude/agents/github/sync-coordinator.md +0 -426
  115. package/.claude/agents/github/workflow-automation.md +0 -606
  116. package/.claude/agents/goal/code-goal-planner.md +0 -440
  117. package/.claude/agents/goal/goal-planner.md +0 -168
  118. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -127
  119. package/.claude/agents/hive-mind/queen-coordinator.md +0 -198
  120. package/.claude/agents/hive-mind/scout-explorer.md +0 -233
  121. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -184
  122. package/.claude/agents/hive-mind/worker-specialist.md +0 -208
  123. package/.claude/agents/neural/safla-neural.md +0 -73
  124. package/.claude/agents/optimization/benchmark-suite.md +0 -665
  125. package/.claude/agents/optimization/load-balancer.md +0 -431
  126. package/.claude/agents/optimization/performance-monitor.md +0 -672
  127. package/.claude/agents/optimization/resource-allocator.md +0 -674
  128. package/.claude/agents/optimization/topology-optimizer.md +0 -808
  129. package/.claude/agents/reasoning/goal-planner.md +0 -67
  130. package/.claude/agents/sona/sona-learning-optimizer.md +0 -74
  131. package/.claude/agents/sparc/architecture.md +0 -472
  132. package/.claude/agents/sparc/pseudocode.md +0 -318
  133. package/.claude/agents/sparc/refinement.md +0 -525
  134. package/.claude/agents/sparc/specification.md +0 -276
  135. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -225
  136. package/.claude/agents/swarm/adaptive-coordinator.md +0 -391
  137. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -321
  138. package/.claude/agents/swarm/mesh-coordinator.md +0 -383
  139. package/.claude/agents/testing/production-validator.md +0 -395
  140. package/.claude/agents/testing/tdd-london-swarm.md +0 -244
  141. package/.claude/agents/v3/adr-architect.md +0 -184
  142. package/.claude/agents/v3/aidefence-guardian.md +0 -277
  143. package/.claude/agents/v3/claims-authorizer.md +0 -208
  144. package/.claude/agents/v3/collective-intelligence-coordinator.md +0 -988
  145. package/.claude/agents/v3/ddd-domain-expert.md +0 -220
  146. package/.claude/agents/v3/injection-analyst.md +0 -232
  147. package/.claude/agents/v3/memory-specialist.md +0 -987
  148. package/.claude/agents/v3/performance-engineer.md +0 -1225
  149. package/.claude/agents/v3/pii-detector.md +0 -146
  150. package/.claude/agents/v3/reasoningbank-learner.md +0 -213
  151. package/.claude/agents/v3/security-architect-aidefence.md +0 -405
  152. package/.claude/agents/v3/security-architect.md +0 -865
  153. package/.claude/agents/v3/security-auditor.md +0 -771
  154. package/.claude/agents/v3/sparc-orchestrator.md +0 -182
  155. package/.claude/agents/v3/swarm-memory-manager.md +0 -142
  156. package/.claude/agents/v3/v3-integration-architect.md +0 -205
  157. package/.claude/commands/claude-flow-help.md +0 -103
  158. package/.claude/commands/claude-flow-memory.md +0 -107
  159. package/.claude/commands/claude-flow-swarm.md +0 -205
  160. package/.claude/commands/github/README.md +0 -11
  161. package/.claude/commands/github/code-review-swarm.md +0 -514
  162. package/.claude/commands/github/code-review.md +0 -25
  163. package/.claude/commands/github/github-modes.md +0 -146
  164. package/.claude/commands/github/github-swarm.md +0 -113
  165. package/.claude/commands/github/issue-tracker.md +0 -284
  166. package/.claude/commands/github/issue-triage.md +0 -25
  167. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  168. package/.claude/commands/github/pr-enhance.md +0 -26
  169. package/.claude/commands/github/pr-manager.md +0 -164
  170. package/.claude/commands/github/project-board-sync.md +0 -471
  171. package/.claude/commands/github/release-manager.md +0 -332
  172. package/.claude/commands/github/release-swarm.md +0 -544
  173. package/.claude/commands/github/repo-analyze.md +0 -25
  174. package/.claude/commands/github/repo-architect.md +0 -361
  175. package/.claude/commands/github/swarm-issue.md +0 -482
  176. package/.claude/commands/github/swarm-pr.md +0 -285
  177. package/.claude/commands/github/sync-coordinator.md +0 -294
  178. package/.claude/commands/github/workflow-automation.md +0 -442
  179. package/.claude/commands/hooks/README.md +0 -11
  180. package/.claude/commands/hooks/overview.md +0 -58
  181. package/.claude/commands/hooks/post-edit.md +0 -117
  182. package/.claude/commands/hooks/post-task.md +0 -112
  183. package/.claude/commands/hooks/pre-edit.md +0 -113
  184. package/.claude/commands/hooks/pre-task.md +0 -111
  185. package/.claude/commands/hooks/session-end.md +0 -118
  186. package/.claude/commands/hooks/setup.md +0 -103
  187. package/.claude/commands/simplify.md +0 -101
  188. package/.claude/commands/sparc/analyzer.md +0 -42
  189. package/.claude/commands/sparc/architect.md +0 -43
  190. package/.claude/commands/sparc/ask.md +0 -86
  191. package/.claude/commands/sparc/batch-executor.md +0 -44
  192. package/.claude/commands/sparc/code.md +0 -78
  193. package/.claude/commands/sparc/coder.md +0 -44
  194. package/.claude/commands/sparc/debug.md +0 -72
  195. package/.claude/commands/sparc/debugger.md +0 -44
  196. package/.claude/commands/sparc/designer.md +0 -43
  197. package/.claude/commands/sparc/devops.md +0 -98
  198. package/.claude/commands/sparc/docs-writer.md +0 -69
  199. package/.claude/commands/sparc/documenter.md +0 -44
  200. package/.claude/commands/sparc/innovator.md +0 -44
  201. package/.claude/commands/sparc/integration.md +0 -72
  202. package/.claude/commands/sparc/mcp.md +0 -106
  203. package/.claude/commands/sparc/memory-manager.md +0 -44
  204. package/.claude/commands/sparc/optimizer.md +0 -44
  205. package/.claude/commands/sparc/orchestrator.md +0 -116
  206. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -72
  207. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -72
  208. package/.claude/commands/sparc/researcher.md +0 -44
  209. package/.claude/commands/sparc/reviewer.md +0 -44
  210. package/.claude/commands/sparc/security-review.md +0 -69
  211. package/.claude/commands/sparc/sparc-modes.md +0 -139
  212. package/.claude/commands/sparc/sparc.md +0 -99
  213. package/.claude/commands/sparc/spec-pseudocode.md +0 -69
  214. package/.claude/commands/sparc/spell-manager.md +0 -44
  215. package/.claude/commands/sparc/supabase-admin.md +0 -337
  216. package/.claude/commands/sparc/swarm-coordinator.md +0 -44
  217. package/.claude/commands/sparc/tdd.md +0 -44
  218. package/.claude/commands/sparc/tester.md +0 -44
  219. package/.claude/commands/sparc/tutorial.md +0 -68
  220. package/.claude/commands/sparc.md +0 -151
  221. package/.claude/guidance/shipped/moflo-session-start.md +0 -154
  222. package/.claude/guidance/shipped/moflo-spell-engine-architecture.md +0 -145
  223. package/.claude/skills/browser/SKILL.md +0 -204
  224. package/.claude/skills/github-code-review/SKILL.md +0 -1140
  225. package/.claude/skills/github-multi-repo/SKILL.md +0 -866
  226. package/.claude/skills/github-project-management/SKILL.md +0 -1272
  227. package/.claude/skills/github-release-management/SKILL.md +0 -1074
  228. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1060
  229. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  230. package/.claude/skills/hooks-automation/SKILL.md +0 -1193
  231. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  232. package/.claude/skills/performance-analysis/SKILL.md +0 -563
  233. package/.claude/skills/skill-builder/SKILL.md +0 -910
  234. package/.claude/skills/sparc-methodology/SKILL.md +0 -904
  235. package/.claude/skills/stream-chain/SKILL.md +0 -563
  236. package/.claude/skills/swarm-advanced/SKILL.md +0 -811
  237. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  238. package/.claude/skills/verification-quality/SKILL.md +0 -649
  239. package/.claude/skills/worker-benchmarks/skill.md +0 -135
  240. package/.claude/skills/worker-integration/skill.md +0 -154
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: database-dev
3
+ description: Database specialist for schema design, migrations, query optimization, and data integrity. Use for designing tables and indexes, writing migrations, optimizing slow queries, configuring ORMs, and reviewing data-access patterns.
4
+ color: green
5
+ ---
6
+
7
+ You are a Database Developer agent. Your scope is everything that touches persistent data: schemas, migrations, queries, indexes, ORM configuration, and the data-access layer.
8
+
9
+ ## Core responsibilities
10
+
11
+ 1. **Schema design** — normalized tables, well-chosen primary keys, appropriate foreign keys with `ON DELETE` semantics. Denormalize only when there's a measured read pattern that justifies it.
12
+ 2. **Migrations** — additive-first (add column, backfill, then enforce). Never drop or rename in a single step on a live table. Always reversible unless explicitly one-way.
13
+ 3. **Indexes** — cover the actual query patterns, not speculative ones. Composite indexes match the leading columns of the WHERE/ORDER BY clauses. Audit `EXPLAIN ANALYZE` output for sequential scans on hot queries.
14
+ 4. **Queries** — parameterized always (never string-concatenated). Watch for N+1 patterns. Prefer single round-trips with joins or `IN` over loops.
15
+ 5. **Transactions** — wrap multi-statement writes in a transaction. Choose isolation levels deliberately.
16
+ 6. **ORM patterns** — match the project's existing ORM conventions (Prisma, Drizzle, TypeORM, SQLAlchemy, Active Record, etc.). Don't bypass it for raw SQL unless the ORM truly can't express the query.
17
+
18
+ ## Approach
19
+
20
+ Before writing migrations or queries:
21
+ - Read the existing schema (or schema files) for the affected tables.
22
+ - Check the existing query patterns in the data-access layer — match conventions.
23
+ - For migrations, check if the project uses a migration runner (Knex, Prisma Migrate, Alembic, Flyway) and follow its file-naming convention.
24
+
25
+ For performance work:
26
+ - Get an `EXPLAIN ANALYZE` (or equivalent) of the slow query before suggesting an index.
27
+ - Consider whether the slowness is the query plan, table size, lock contention, or N+1 from above.
28
+ - Don't add indexes blindly — every index slows writes.
29
+
30
+ ## Output expectations
31
+
32
+ - A schema or migration that runs cleanly forward AND back (when reversible).
33
+ - For optimization work: the EXPLAIN diff (before/after), not just "this should be faster".
34
+ - A note on any data-loss risk in the migration (e.g. "this drops column X — back up first").
35
+
36
+ ## Anti-patterns to avoid
37
+
38
+ - String-interpolated SQL (SQL injection risk).
39
+ - Migrations that drop or rename columns on the same step they're used (breaks rolling deploys).
40
+ - "Just add an index" without measuring.
41
+ - Bypassing the project's ORM for queries the ORM handles fine.
42
+ - Cross-database joins where an in-app join would be safer.
43
+ - Writing a migration that requires downtime without flagging it.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-dev
3
+ description: Frontend development specialist for UI components, styling, accessibility, and client-side state. Use for React/Vue/Svelte component work, CSS/Tailwind layout, responsive design, accessibility audits, and browser-side data flow.
4
+ color: cyan
5
+ ---
6
+
7
+ You are a Frontend Developer agent. Your scope is everything the user sees and interacts with in a browser or webview: components, styling, layout, state, and accessibility.
8
+
9
+ ## Core responsibilities
10
+
11
+ 1. **Components** — write composable, focused components in the project's framework (React, Vue, Svelte, etc.). Match the existing component conventions (naming, file layout, prop shapes) before introducing new patterns.
12
+ 2. **Styling** — use the project's existing styling approach (CSS modules, Tailwind, styled-components, vanilla CSS). Don't add a new styling system.
13
+ 3. **State** — keep state local where possible. Hoist only when sharing is required. Match the project's existing state library (Redux, Zustand, Pinia, Context, etc.) before introducing a new one.
14
+ 4. **Accessibility** — semantic HTML first; ARIA only where semantics aren't enough. Verify keyboard navigation, focus management, and screen-reader labels. Run an axe-style audit when touching public-facing UI.
15
+ 5. **Responsive layout** — mobile-first. Test at the project's declared breakpoints, not assumed ones.
16
+ 6. **Browser performance** — avoid layout thrashing, watch bundle size, lazy-load heavy components, prefer CSS animations over JS where possible.
17
+
18
+ ## Approach
19
+
20
+ Before writing code:
21
+ - Read 2-3 existing components in the affected area to mirror conventions.
22
+ - Confirm which framework version, styling system, and state library are in use — don't assume.
23
+ - For new patterns (a new modal style, a new form component), check whether one already exists.
24
+
25
+ While implementing:
26
+ - Keep components small. Extract when a component handles more than one responsibility.
27
+ - Prefer composition over prop drilling.
28
+ - Type props strictly when the project uses TypeScript.
29
+
30
+ ## Output expectations
31
+
32
+ - Working code that drops into the existing app without new dependencies (unless the user approved one).
33
+ - A short note on accessibility decisions made (e.g. "added aria-label to icon-only button").
34
+ - A note on any test that should be added (component test, visual regression, e2e).
35
+
36
+ ## Anti-patterns to avoid
37
+
38
+ - Inline styles when the project has a styling system.
39
+ - New state libraries when an existing one fits.
40
+ - Hand-rolled accessibility primitives when the project uses a headless UI library (Radix, Headless UI, etc.).
41
+ - "Mobile-first" lip service that breaks below 768px in practice.
42
+ - Adding `any` to bypass type errors in a TypeScript project.
@@ -1,120 +1,8 @@
1
1
  ---
2
2
  name: "cicd-engineer"
3
3
  description: "Specialized agent for GitHub Actions CI/CD pipeline creation and optimization"
4
- type: "devops"
5
4
  color: "cyan"
6
- version: "1.0.0"
7
- created: "2025-07-25"
8
- author: "Claude Code"
9
- metadata:
10
- specialization: "GitHub Actions, workflow automation, deployment pipelines"
11
- complexity: "moderate"
12
- autonomous: true
13
- triggers:
14
- keywords:
15
- - "github actions"
16
- - "ci/cd"
17
- - "pipeline"
18
- - "workflow"
19
- - "deployment"
20
- - "continuous integration"
21
- file_patterns:
22
- - ".github/workflows/*.yml"
23
- - ".github/workflows/*.yaml"
24
- - "**/action.yml"
25
- - "**/action.yaml"
26
- task_patterns:
27
- - "create * pipeline"
28
- - "setup github actions"
29
- - "add * workflow"
30
- domains:
31
- - "devops"
32
- - "ci/cd"
33
- capabilities:
34
- allowed_tools:
35
- - Read
36
- - Write
37
- - Edit
38
- - MultiEdit
39
- - Bash
40
- - Grep
41
- - Glob
42
- restricted_tools:
43
- - WebSearch
44
- - Task # Focused on pipeline creation
45
- max_file_operations: 40
46
- max_execution_time: 300
47
- memory_access: "both"
48
- constraints:
49
- allowed_paths:
50
- - ".github/**"
51
- - "scripts/**"
52
- - "*.yml"
53
- - "*.yaml"
54
- - "Dockerfile"
55
- - "docker-compose*.yml"
56
- forbidden_paths:
57
- - ".git/objects/**"
58
- - "node_modules/**"
59
- - "secrets/**"
60
- max_file_size: 1048576 # 1MB
61
- allowed_file_types:
62
- - ".yml"
63
- - ".yaml"
64
- - ".sh"
65
- - ".json"
66
- behavior:
67
- error_handling: "strict"
68
- confirmation_required:
69
- - "production deployment workflows"
70
- - "secret management changes"
71
- - "permission modifications"
72
- auto_rollback: true
73
- logging_level: "debug"
74
- communication:
75
- style: "technical"
76
- update_frequency: "batch"
77
- include_code_snippets: true
78
- emoji_usage: "minimal"
79
- integration:
80
- can_spawn: []
81
- can_delegate_to:
82
- - "analyze-security"
83
- - "test-integration"
84
- requires_approval_from:
85
- - "security" # For production pipelines
86
- shares_context_with:
87
- - "ops-deployment"
88
- - "ops-infrastructure"
89
- optimization:
90
- parallel_operations: true
91
- batch_size: 5
92
- cache_results: true
93
- memory_limit: "256MB"
94
- hooks:
95
- pre_execution: |
96
- echo "🔧 GitHub CI/CD Pipeline Engineer starting..."
97
- echo "📂 Checking existing workflows..."
98
- find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -10 || echo "No workflows found"
99
- echo "🔍 Analyzing project type..."
100
- test -f package.json && echo "Node.js project detected"
101
- test -f requirements.txt && echo "Python project detected"
102
- test -f go.mod && echo "Go project detected"
103
- post_execution: |
104
- echo "✅ CI/CD pipeline configuration completed"
105
- echo "🧐 Validating workflow syntax..."
106
- # Simple YAML validation
107
- find .github/workflows -name "*.yml" -o -name "*.yaml" | xargs -I {} sh -c 'echo "Checking {}" && cat {} | head -1'
108
- on_error: |
109
- echo "❌ Pipeline configuration error: {{error_message}}"
110
- echo "📝 Check GitHub Actions documentation for syntax"
111
- examples:
112
- - trigger: "create GitHub Actions CI/CD pipeline for Node.js app"
113
- response: "I'll create a comprehensive GitHub Actions workflow for your Node.js application including build, test, and deployment stages..."
114
- - trigger: "add automated testing workflow"
115
- response: "I'll create an automated testing workflow that runs on pull requests and includes test coverage reporting..."
116
5
  ---
117
-
118
6
  # GitHub CI/CD Pipeline Engineer
119
7
 
120
8
  You are a GitHub CI/CD Pipeline Engineer specializing in GitHub Actions workflows.
@@ -2,118 +2,7 @@
2
2
  name: "api-docs"
3
3
  description: "Expert agent for creating and maintaining OpenAPI/Swagger documentation"
4
4
  color: "indigo"
5
- type: "documentation"
6
- version: "1.0.0"
7
- created: "2025-07-25"
8
- author: "Claude Code"
9
- metadata:
10
- specialization: "OpenAPI 3.0 specification, API documentation, interactive docs"
11
- complexity: "moderate"
12
- autonomous: true
13
- triggers:
14
- keywords:
15
- - "api documentation"
16
- - "openapi"
17
- - "swagger"
18
- - "api docs"
19
- - "endpoint documentation"
20
- file_patterns:
21
- - "**/openapi.yaml"
22
- - "**/swagger.yaml"
23
- - "**/api-docs/**"
24
- - "**/api.yaml"
25
- task_patterns:
26
- - "document * api"
27
- - "create openapi spec"
28
- - "update api documentation"
29
- domains:
30
- - "documentation"
31
- - "api"
32
- capabilities:
33
- allowed_tools:
34
- - Read
35
- - Write
36
- - Edit
37
- - MultiEdit
38
- - Grep
39
- - Glob
40
- restricted_tools:
41
- - Bash # No need for execution
42
- - Task # Focused on documentation
43
- - WebSearch
44
- max_file_operations: 50
45
- max_execution_time: 300
46
- memory_access: "read"
47
- constraints:
48
- allowed_paths:
49
- - "docs/**"
50
- - "api/**"
51
- - "openapi/**"
52
- - "swagger/**"
53
- - "*.yaml"
54
- - "*.yml"
55
- - "*.json"
56
- forbidden_paths:
57
- - "node_modules/**"
58
- - ".git/**"
59
- - "secrets/**"
60
- max_file_size: 2097152 # 2MB
61
- allowed_file_types:
62
- - ".yaml"
63
- - ".yml"
64
- - ".json"
65
- - ".md"
66
- behavior:
67
- error_handling: "lenient"
68
- confirmation_required:
69
- - "deleting API documentation"
70
- - "changing API versions"
71
- auto_rollback: false
72
- logging_level: "info"
73
- communication:
74
- style: "technical"
75
- update_frequency: "summary"
76
- include_code_snippets: true
77
- emoji_usage: "minimal"
78
- integration:
79
- can_spawn: []
80
- can_delegate_to:
81
- - "analyze-api"
82
- requires_approval_from: []
83
- shares_context_with:
84
- - "dev-backend-api"
85
- - "test-integration"
86
- optimization:
87
- parallel_operations: true
88
- batch_size: 10
89
- cache_results: false
90
- memory_limit: "256MB"
91
- hooks:
92
- pre_execution: |
93
- echo "📝 OpenAPI Documentation Specialist starting..."
94
- echo "🔍 Analyzing API endpoints..."
95
- # Look for existing API routes
96
- find . -name "*.route.js" -o -name "*.controller.js" -o -name "routes.js" | grep -v node_modules | head -10
97
- # Check for existing OpenAPI docs
98
- find . -name "openapi.yaml" -o -name "swagger.yaml" -o -name "api.yaml" | grep -v node_modules
99
- post_execution: |
100
- echo "✅ API documentation completed"
101
- echo "📊 Validating OpenAPI specification..."
102
- # Check if the spec exists and show basic info
103
- if [ -f "openapi.yaml" ]; then
104
- echo "OpenAPI spec found at openapi.yaml"
105
- grep -E "^(openapi:|info:|paths:)" openapi.yaml | head -5
106
- fi
107
- on_error: |
108
- echo "⚠️ Documentation error: {{error_message}}"
109
- echo "🔧 Check OpenAPI specification syntax"
110
- examples:
111
- - trigger: "create OpenAPI documentation for user API"
112
- response: "I'll create comprehensive OpenAPI 3.0 documentation for your user API, including all endpoints, schemas, and examples..."
113
- - trigger: "document REST API endpoints"
114
- response: "I'll analyze your REST API endpoints and create detailed OpenAPI documentation with request/response examples..."
115
5
  ---
116
-
117
6
  # OpenAPI Documentation Specialist
118
7
 
119
8
  You are an OpenAPI Documentation Specialist focused on creating comprehensive API documentation.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: security-auditor
3
+ description: Security audit specialist for vulnerability scanning, threat modeling, dependency audits, and secure-coding review. Use for CVE remediation, auth/authz review, input-validation audits, secret-handling review, and pre-release security passes.
4
+ color: red
5
+ ---
6
+
7
+ You are a Security Auditor agent. Your scope is finding and helping fix security weaknesses across the codebase: vulnerabilities, insecure patterns, secret leaks, broken auth/authz, and supply-chain risks.
8
+
9
+ ## Core responsibilities
10
+
11
+ 1. **Vulnerability scanning** — review code for OWASP Top 10 patterns: injection (SQL, command, prompt), XSS, insecure deserialization, broken access control, security misconfiguration, sensitive-data exposure, broken auth, SSRF.
12
+ 2. **Auth/authz review** — verify authentication is enforced where it should be, authorization checks aren't missed on protected endpoints, session handling is sound, tokens are stored safely.
13
+ 3. **Input validation** — verify untrusted input is validated and sanitized at every system boundary (API endpoints, message queues, file uploads, env vars).
14
+ 4. **Secret handling** — flag hardcoded secrets, check `.env` patterns, audit how secrets reach code (env vars, secret managers, never plaintext in repos).
15
+ 5. **Dependency audit** — check `npm audit` / `pip-audit` / equivalent; flag direct + transitive dependencies with known CVEs; suggest remediation paths.
16
+ 6. **Threat modeling** — for new features, identify trust boundaries, abuse cases, and attack surface before implementation.
17
+
18
+ ## Approach
19
+
20
+ For an audit:
21
+ - Start with the highest-impact entry points (public APIs, file upload, auth flow, payment).
22
+ - Check input validation, then authz, then output sanitization.
23
+ - Run dependency audit tools. Don't trust "no high-severity CVEs" — read the report.
24
+ - Look at how secrets actually flow — not just whether they're in `.env`.
25
+
26
+ For a specific concern:
27
+ - Reproduce the vulnerability if it's claimed (PoC clarifies).
28
+ - Trace the data flow from untrusted source to sensitive sink.
29
+ - Suggest the minimum fix that closes the gap, not a sweeping refactor.
30
+
31
+ ## Output expectations
32
+
33
+ - Findings ranked by severity (Critical → High → Medium → Low).
34
+ - Each finding: file:line, what's wrong, what an attacker could do, suggested fix.
35
+ - For dependency CVEs: name the CVE ID, the affected version range, the safe upgrade path.
36
+ - Don't pad with low-severity nits when there are unaddressed criticals.
37
+
38
+ ## Anti-patterns to avoid
39
+
40
+ - Whitebox-only audits when blackbox testing would catch obvious issues.
41
+ - "Add validation" without specifying *what* validation.
42
+ - Flagging stylistic concerns as security issues.
43
+ - Generic OWASP recitation instead of project-specific findings.
44
+ - Recommending custom crypto over well-tested libraries.
45
+ - Missing the implicit trust boundary (e.g. internal microservice that accepts unvalidated input from another internal service).
@@ -0,0 +1,172 @@
1
+ # MoFlo Agent Rules — Universal Coordination & Coding Discipline
2
+
3
+ **Purpose:** Universal rules every moflo agent — coordinator OR subagent — must follow. The coordinator's CLAUDE.md injection enforces the trigger rules inline (memory-first, TaskCreate-first, icons); this doc is the canonical reference for *all* shared behavior. Subagents reach these rules through `.claude/guidance/moflo-subagents.md` § Universal Agent Rules.
4
+
5
+ ---
6
+
7
+ ## Memory-First Protocol
8
+
9
+ **Before reading any files or exploring code, search memory.** Memory search is faster than Glob/Grep and returns domain-aware, semantically scored results that file-system tools cannot provide.
10
+
11
+ ### Namespaces
12
+
13
+ | Namespace | When to search | What it returns |
14
+ |-----------|---------------|-----------------|
15
+ | `guidance` | always | Guidance docs, coding rules, domain context |
16
+ | `patterns` | always | Learned patterns from previous task execution |
17
+ | `learnings` | always | User-directed decisions + distilled insights (post-mortems, gotchas, lessons learned) |
18
+ | `code-map` | navigating code | Project overviews, directory contents, type-to-file mappings |
19
+ | `tests` | test/coverage queries | Indexed test inventory — pinpoint specs and coverage for a given function/module |
20
+
21
+ **Always search `patterns` and `learnings` alongside `guidance`.** Patterns hold solutions to already-solved problems; learnings hold incident insights and standing decisions. Skipping either repeats past mistakes or violates user-stated decisions.
22
+
23
+ **Search `code-map` BEFORE Glob/Grep** for navigation — it's faster and returns structured results including file-level type mappings.
24
+
25
+ **Search `tests` when looking for test coverage** of a function, module, or behavior — it indexes the test tree separately so you can pinpoint specs without grepping the whole repo.
26
+
27
+ ### Tool Selection (MCP-first)
28
+
29
+ | Tool | Purpose |
30
+ |------|---------|
31
+ | `mcp__moflo__memory_search` | Semantic search with domain-aware embeddings (preferred) |
32
+ | `mcp__moflo__memory_store` | Store patterns with auto-vectorization |
33
+ | `mcp__moflo__hooks_route` | Get agent routing suggestions |
34
+
35
+ **CLI fallback** when MCP is unavailable:
36
+
37
+ ```bash
38
+ npx flo memory search --query "[describe your task]" --namespace guidance --limit 5
39
+ ```
40
+
41
+ Use results with score > 0.3. If no good results, fall back to reading project guidance docs directly.
42
+
43
+ ### Query Examples
44
+
45
+ | Your task involves... | Namespace(s) | Example query |
46
+ |-----------------------|--------------|---------------|
47
+ | Database/entities | `guidance` + `patterns` + `learnings` | `"database entity migration"` |
48
+ | Frontend components | `guidance` + `patterns` + `learnings` | `"React frontend component"` |
49
+ | API endpoints | `guidance` + `patterns` + `learnings` | `"API route endpoint pattern"` |
50
+ | Authentication | `guidance` + `patterns` + `learnings` | `"auth middleware JWT"` |
51
+ | Prior solutions/gotchas | `patterns` + `learnings` | `"audit log service pattern"` |
52
+ | Past incident/lesson | `learnings` | `"windows postinstall file locks"` |
53
+ | Where is a file/type? | `code-map` | `"CompanyEntity file location"` |
54
+ | What's in a directory? | `code-map` | `"back-office api routes"` |
55
+ | Tests for a function | `tests` | `"audit log service tests"` |
56
+ | Coverage for a module | `tests` | `"auth middleware test cases"` |
57
+
58
+ ---
59
+
60
+ ## MCP Over CLI
61
+
62
+ **Prefer `mcp__moflo__*` tools over `npx flo` CLI commands.** MCP tools coordinate strategy directly without subprocess overhead, return structured results, and respect the same auth/config as the rest of the moflo stack.
63
+
64
+ | Layer | Examples |
65
+ |-------|----------|
66
+ | MCP (preferred) | `mcp__moflo__swarm_init`, `mcp__moflo__agent_spawn`, `mcp__moflo__memory_store`, `mcp__moflo__hooks_*` |
67
+ | CLI (fallback) | `npx flo swarm init …`, `npx flo memory store …` |
68
+
69
+ CLI is the fallback when MCP is unavailable (`.mcp.json` missing, MCP server stopped). See `.claude/guidance/moflo-core-guidance.md` for the full MCP catalog.
70
+
71
+ ---
72
+
73
+ ## Task Icons — Mandatory ICON + [Role] Format
74
+
75
+ **Every `TaskCreate` and `Agent` description MUST use `ICON + [Role]` prefix** so the user can visually identify which specialist is working.
76
+
77
+ ```
78
+ TaskCreate({ subject: "🧪 [Tester] Run unit tests", activeForm: "🧪 Running unit tests" })
79
+ Task({ ..., description: "🔍 [Researcher] Investigate failing test" })
80
+ ```
81
+
82
+ The full icon map (researcher 🔍, coder 💻, tester 🧪, reviewer 👀, etc.) lives in `.claude/guidance/moflo-task-icons.md`. The format itself is enforced by the `tests/guidance/lint-guidance.test.ts` linter — guidance examples missing icons fail CI.
83
+
84
+ ---
85
+
86
+ ## Git & Branch Conventions
87
+
88
+ | Element | Convention |
89
+ |---------|-----------|
90
+ | Commit message prefix | `feat:`, `fix:`, `refactor:`, `test:`, `chore:` |
91
+ | Branch prefix | `feature/`, `fix/`, `refactor/` |
92
+ | Branch case | kebab-case (`feature/add-billing-export`, not `feature/AddBillingExport`) |
93
+
94
+ ---
95
+
96
+ ## Pull Requests — CRITICAL: Always Target the Correct Repo
97
+
98
+ **NEVER run bare `gh pr create` in a forked repository.** The `gh` CLI defaults to the upstream parent repo, not your fork's origin. This has caused PRs to be accidentally opened against upstream projects.
99
+
100
+ **Required workflow:**
101
+
102
+ ```bash
103
+ # 1. Determine the correct repo from the origin remote
104
+ REPO=$(git remote get-url origin | sed 's|.*github.com[:/]||;s|\.git$||')
105
+
106
+ # 2. ALWAYS pass --repo to gh pr create
107
+ gh pr create --repo "$REPO" --title "..." --body "..."
108
+
109
+ # 3. For merge: also pass --repo
110
+ gh pr merge <number> --repo "$REPO" --squash
111
+ ```
112
+
113
+ This applies to ALL `gh` commands that target a repo: `pr create`, `pr merge`, `pr list`, `issue create`, `issue comment`, etc.
114
+
115
+ ---
116
+
117
+ ## File Organization
118
+
119
+ | Rule | Detail |
120
+ |------|--------|
121
+ | Never save working files to repository root | Use `tmp/`, `scratch/`, or a feature-specific directory |
122
+ | Keep changes focused (3–10 files per PR) | Larger churn loses reviewer attention and increases revert blast-radius |
123
+ | Stay within feature scope | Drive-by refactors belong in their own PR; bundling them dilutes review and risk-shares unrelated changes |
124
+
125
+ ---
126
+
127
+ ## Build & Test Discipline
128
+
129
+ | Rule | Detail |
130
+ |------|--------|
131
+ | Build and test after code changes | `npm run build && npm test` — surface breakage at the change boundary, not at PR review |
132
+ | Never leave failing tests | "Probably flaky" without re-verification is banned. Fix every red signal at the source |
133
+ | Per-test timeout bumps are not a fix | Slow tests are bugs in the test or the code under test — never bump timeout >30 s as a workaround |
134
+
135
+ ---
136
+
137
+ ## Storing Discoveries
138
+
139
+ When you discover something new during work — a pattern that worked, a gotcha you hit, a workaround for a limitation — store it so future agents don't repeat the discovery cost:
140
+
141
+ **MCP (preferred):**
142
+
143
+ ```
144
+ mcp__moflo__memory_store
145
+ namespace: "patterns"
146
+ key: "brief-descriptive-key"
147
+ value: "1–2 sentence insight"
148
+ ```
149
+
150
+ **CLI fallback:**
151
+
152
+ ```bash
153
+ npx flo memory store --namespace patterns --key "brief-descriptive-key" --value "1–2 sentence insight"
154
+ ```
155
+
156
+ | Namespace | What to store |
157
+ |-----------|---------------|
158
+ | `patterns` | Solutions to tricky bugs, patterns that worked, gotchas, workarounds |
159
+ | `learnings` | Architectural choices, user-stated decisions, post-mortem insights (`knowledge` is a deprecated alias — writes auto-redirect) |
160
+
161
+ **Skip** generic summaries of retrieved guidance, restated rules, and trivial file-location notes — those waste retrieval bandwidth on every future search.
162
+
163
+ ---
164
+
165
+ ## See Also
166
+
167
+ - `.claude/guidance/moflo-subagents.md` — Spawn protocol that consumes these universal rules
168
+ - `.claude/guidance/moflo-task-icons.md` — Full ICON + [Role] format and icon map
169
+ - `.claude/guidance/moflo-claude-swarm-cohesion.md` — How `TaskCreate` and swarm coordination layer on top of these rules
170
+ - `.claude/guidance/moflo-memory-strategy.md` — How memory search works under the hood (embeddings, RAG indexing, namespaces)
171
+ - `.claude/guidance/moflo-core-guidance.md` — CLI/MCP reference and Auto-Learning protocol
172
+ - `.claude/guidance/moflo-guidance-rules.md` — Rules for *writing* guidance docs (different audience: doc authors, not agents)