moflo 4.9.21 → 4.9.23
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/.claude/agents/analysis/analyze-code-quality.md +0 -121
- package/.claude/agents/analysis/code-analyzer.md +5 -26
- package/.claude/agents/architecture/system-design/arch-system-design.md +0 -119
- package/.claude/agents/base-template-generator.md +0 -1
- package/.claude/agents/core/coder.md +0 -22
- package/.claude/agents/core/planner.md +0 -16
- package/.claude/agents/core/researcher.md +0 -16
- package/.claude/agents/core/reviewer.md +0 -17
- package/.claude/agents/core/tester.md +0 -19
- package/.claude/agents/custom/test-long-runner.md +0 -2
- package/.claude/agents/development/dev-backend-api.md +0 -167
- package/.claude/agents/development/dev-database.md +43 -0
- package/.claude/agents/development/dev-frontend.md +42 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -112
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -111
- package/.claude/agents/security/security-auditor.md +45 -0
- package/.claude/guidance/shipped/moflo-cli-reference.md +19 -16
- package/.claude/guidance/shipped/moflo-core-guidance.md +0 -2
- package/.claude/guidance/shipped/moflo-guidance-rules.md +5 -5
- package/.claude/guidance/shipped/moflo-spell-runner.md +1 -0
- package/.claude/guidance/shipped/moflo-spell-scheduling.md +225 -0
- package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +1 -0
- package/.claude/helpers/gate.cjs +70 -3
- package/.claude/skills/fl/execution-modes.md +38 -15
- package/.claude/skills/fl/phases.md +67 -0
- package/.claude/skills/spell-schedule/SKILL.md +18 -5
- package/README.md +1 -1
- package/bin/gate.cjs +70 -3
- package/bin/index-guidance.mjs +32 -6
- package/bin/lib/retired-files.mjs +146 -0
- package/bin/session-start-launcher.mjs +116 -8
- package/dist/src/cli/appliance/rvfa-builder.js +1 -1
- package/dist/src/cli/commands/agent.js +3 -9
- package/dist/src/cli/commands/daemon.js +13 -17
- package/dist/src/cli/commands/hooks.js +4 -9
- package/dist/src/cli/commands/index.js +2 -0
- package/dist/src/cli/commands/retire.js +111 -0
- package/dist/src/cli/commands/spell-schedule.js +237 -49
- package/dist/src/cli/hooks/reasoningbank/index.js +7 -7
- package/dist/src/cli/init/executor.js +26 -54
- package/dist/src/cli/init/helpers-generator.js +66 -3
- package/dist/src/cli/init/settings-generator.js +17 -6
- package/dist/src/cli/mcp-tools/agent-tools.js +9 -27
- package/dist/src/cli/mcp-tools/hooks-tools.js +23 -21
- package/dist/src/cli/mcp-tools/memory-tools.js +16 -5
- package/dist/src/cli/memory/bridge-embedder.js +26 -6
- package/dist/src/cli/memory/bridge-entries.js +33 -15
- package/dist/src/cli/memory/controllers/semantic-router.js +18 -12
- package/dist/src/cli/memory/sona-optimizer.js +6 -6
- package/dist/src/cli/neural/domain/services/learning-service.js +3 -3
- package/dist/src/cli/services/agent-router.js +2 -5
- package/dist/src/cli/services/daemon-autostart-lifecycle.js +62 -0
- package/dist/src/cli/services/daemon-dashboard.js +187 -18
- package/dist/src/cli/services/daemon-readiness.js +19 -31
- package/dist/src/cli/services/ephemeral-namespace-purge.js +61 -33
- package/dist/src/cli/services/headless-worker-executor.js +7 -94
- package/dist/src/cli/services/hook-block-hash.js +4 -0
- package/dist/src/cli/services/worker-daemon.js +40 -66
- package/dist/src/cli/shared/events/example-usage.js +6 -6
- package/dist/src/cli/shared/hooks/task-hooks.js +8 -8
- package/dist/src/cli/spells/core/runner.js +12 -0
- package/dist/src/cli/spells/scheduler/scheduler.js +24 -9
- package/dist/src/cli/spells/schema/validator.js +2 -1
- package/dist/src/cli/spells/schema/validators/top-level.js +18 -0
- package/dist/src/cli/version.js +1 -1
- package/package.json +5 -2
- package/retired-files.json +1989 -0
- package/src/cli/data/model-registry.json +2 -2
- package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
- package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
- package/.claude/agents/consensus/gossip-coordinator.md +0 -63
- package/.claude/agents/consensus/performance-benchmarker.md +0 -851
- package/.claude/agents/consensus/quorum-manager.md +0 -823
- package/.claude/agents/consensus/raft-manager.md +0 -63
- package/.claude/agents/consensus/security-manager.md +0 -622
- package/.claude/agents/data/ml/data-ml-model.md +0 -193
- package/.claude/agents/github/code-review-swarm.md +0 -538
- package/.claude/agents/github/github-modes.md +0 -172
- package/.claude/agents/github/issue-tracker.md +0 -311
- package/.claude/agents/github/multi-repo-swarm.md +0 -551
- package/.claude/agents/github/pr-manager.md +0 -183
- package/.claude/agents/github/project-board-sync.md +0 -508
- package/.claude/agents/github/release-manager.md +0 -360
- package/.claude/agents/github/release-swarm.md +0 -580
- package/.claude/agents/github/repo-architect.md +0 -391
- package/.claude/agents/github/swarm-issue.md +0 -566
- package/.claude/agents/github/swarm-pr.md +0 -414
- package/.claude/agents/github/sync-coordinator.md +0 -426
- package/.claude/agents/github/workflow-automation.md +0 -606
- package/.claude/agents/goal/code-goal-planner.md +0 -440
- package/.claude/agents/goal/goal-planner.md +0 -168
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -127
- package/.claude/agents/hive-mind/queen-coordinator.md +0 -198
- package/.claude/agents/hive-mind/scout-explorer.md +0 -233
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -184
- package/.claude/agents/hive-mind/worker-specialist.md +0 -208
- package/.claude/agents/neural/safla-neural.md +0 -73
- package/.claude/agents/optimization/benchmark-suite.md +0 -665
- package/.claude/agents/optimization/load-balancer.md +0 -431
- package/.claude/agents/optimization/performance-monitor.md +0 -672
- package/.claude/agents/optimization/resource-allocator.md +0 -674
- package/.claude/agents/optimization/topology-optimizer.md +0 -808
- package/.claude/agents/reasoning/goal-planner.md +0 -67
- package/.claude/agents/sona/sona-learning-optimizer.md +0 -74
- package/.claude/agents/sparc/architecture.md +0 -472
- package/.claude/agents/sparc/pseudocode.md +0 -318
- package/.claude/agents/sparc/refinement.md +0 -525
- package/.claude/agents/sparc/specification.md +0 -276
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -225
- package/.claude/agents/swarm/adaptive-coordinator.md +0 -391
- package/.claude/agents/swarm/hierarchical-coordinator.md +0 -321
- package/.claude/agents/swarm/mesh-coordinator.md +0 -383
- package/.claude/agents/testing/production-validator.md +0 -395
- package/.claude/agents/testing/tdd-london-swarm.md +0 -244
- package/.claude/agents/v3/adr-architect.md +0 -184
- package/.claude/agents/v3/aidefence-guardian.md +0 -277
- package/.claude/agents/v3/claims-authorizer.md +0 -208
- package/.claude/agents/v3/collective-intelligence-coordinator.md +0 -988
- package/.claude/agents/v3/ddd-domain-expert.md +0 -220
- package/.claude/agents/v3/injection-analyst.md +0 -232
- package/.claude/agents/v3/memory-specialist.md +0 -987
- package/.claude/agents/v3/performance-engineer.md +0 -1225
- package/.claude/agents/v3/pii-detector.md +0 -146
- package/.claude/agents/v3/reasoningbank-learner.md +0 -213
- package/.claude/agents/v3/security-architect-aidefence.md +0 -405
- package/.claude/agents/v3/security-architect.md +0 -865
- package/.claude/agents/v3/security-auditor.md +0 -771
- package/.claude/agents/v3/sparc-orchestrator.md +0 -182
- package/.claude/agents/v3/swarm-memory-manager.md +0 -142
- package/.claude/agents/v3/v3-integration-architect.md +0 -205
- package/.claude/commands/claude-flow-help.md +0 -103
- package/.claude/commands/claude-flow-memory.md +0 -107
- package/.claude/commands/claude-flow-swarm.md +0 -205
- package/.claude/commands/flo-simplify.md +0 -101
- package/.claude/commands/github/README.md +0 -11
- package/.claude/commands/github/code-review-swarm.md +0 -514
- package/.claude/commands/github/code-review.md +0 -25
- package/.claude/commands/github/github-modes.md +0 -146
- package/.claude/commands/github/github-swarm.md +0 -113
- package/.claude/commands/github/issue-tracker.md +0 -284
- package/.claude/commands/github/issue-triage.md +0 -25
- package/.claude/commands/github/multi-repo-swarm.md +0 -519
- package/.claude/commands/github/pr-enhance.md +0 -26
- package/.claude/commands/github/pr-manager.md +0 -164
- package/.claude/commands/github/project-board-sync.md +0 -471
- package/.claude/commands/github/release-manager.md +0 -332
- package/.claude/commands/github/release-swarm.md +0 -544
- package/.claude/commands/github/repo-analyze.md +0 -25
- package/.claude/commands/github/repo-architect.md +0 -361
- package/.claude/commands/github/swarm-issue.md +0 -482
- package/.claude/commands/github/swarm-pr.md +0 -285
- package/.claude/commands/github/sync-coordinator.md +0 -294
- package/.claude/commands/github/workflow-automation.md +0 -442
- package/.claude/commands/hooks/README.md +0 -11
- package/.claude/commands/hooks/overview.md +0 -58
- package/.claude/commands/hooks/post-edit.md +0 -117
- package/.claude/commands/hooks/post-task.md +0 -112
- package/.claude/commands/hooks/pre-edit.md +0 -113
- package/.claude/commands/hooks/pre-task.md +0 -111
- package/.claude/commands/hooks/session-end.md +0 -118
- package/.claude/commands/hooks/setup.md +0 -103
- package/.claude/commands/sparc/analyzer.md +0 -42
- package/.claude/commands/sparc/architect.md +0 -43
- package/.claude/commands/sparc/ask.md +0 -86
- package/.claude/commands/sparc/batch-executor.md +0 -44
- package/.claude/commands/sparc/code.md +0 -78
- package/.claude/commands/sparc/coder.md +0 -44
- package/.claude/commands/sparc/debug.md +0 -72
- package/.claude/commands/sparc/debugger.md +0 -44
- package/.claude/commands/sparc/designer.md +0 -43
- package/.claude/commands/sparc/devops.md +0 -98
- package/.claude/commands/sparc/docs-writer.md +0 -69
- package/.claude/commands/sparc/documenter.md +0 -44
- package/.claude/commands/sparc/innovator.md +0 -44
- package/.claude/commands/sparc/integration.md +0 -72
- package/.claude/commands/sparc/mcp.md +0 -106
- package/.claude/commands/sparc/memory-manager.md +0 -44
- package/.claude/commands/sparc/optimizer.md +0 -44
- package/.claude/commands/sparc/orchestrator.md +0 -116
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -72
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -72
- package/.claude/commands/sparc/researcher.md +0 -44
- package/.claude/commands/sparc/reviewer.md +0 -44
- package/.claude/commands/sparc/security-review.md +0 -69
- package/.claude/commands/sparc/sparc-modes.md +0 -139
- package/.claude/commands/sparc/sparc.md +0 -99
- package/.claude/commands/sparc/spec-pseudocode.md +0 -69
- package/.claude/commands/sparc/spell-manager.md +0 -44
- package/.claude/commands/sparc/supabase-admin.md +0 -337
- package/.claude/commands/sparc/swarm-coordinator.md +0 -44
- package/.claude/commands/sparc/tdd.md +0 -44
- package/.claude/commands/sparc/tester.md +0 -44
- package/.claude/commands/sparc/tutorial.md +0 -68
- package/.claude/commands/sparc.md +0 -151
|
@@ -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).
|
|
@@ -130,22 +130,25 @@ npx flo daemon start
|
|
|
130
130
|
| `coverage-suggest` | Suggest coverage improvements | `--path` |
|
|
131
131
|
| `coverage-gaps` | List coverage gaps with priorities | `--format`, `--limit` |
|
|
132
132
|
|
|
133
|
-
###
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
|
142
|
-
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
133
|
+
### Background Workers
|
|
134
|
+
|
|
135
|
+
The daemon ships nine workers — four scheduled by default plus five
|
|
136
|
+
manual-trigger only. The pre-#970 `audit`, `predict`, and `document`
|
|
137
|
+
workers were removed because they ran without a surfacing layer for
|
|
138
|
+
findings; if AI-driven security scanning returns it should be an opt-in
|
|
139
|
+
`flo doctor` one-shot, not a recurring background task.
|
|
140
|
+
|
|
141
|
+
| Worker | Priority | Default | Description |
|
|
142
|
+
|---------------|----------|---------------|----------------------------|
|
|
143
|
+
| `map` | normal | scheduled 15m | Codebase mapping |
|
|
144
|
+
| `optimize` | high | scheduled 15m | Performance optimization |
|
|
145
|
+
| `consolidate` | low | scheduled 30m | Memory consolidation |
|
|
146
|
+
| `testgaps` | normal | scheduled 20m | Test coverage analysis |
|
|
147
|
+
| `ultralearn` | normal | manual | Deep knowledge acquisition |
|
|
148
|
+
| `refactor` | normal | manual | Refactoring suggestions |
|
|
149
|
+
| `deepdive` | normal | manual | Deep code analysis |
|
|
150
|
+
| `benchmark` | normal | manual | Performance benchmarking |
|
|
151
|
+
| `preload` | low | manual | Resource preloading |
|
|
149
152
|
|
|
150
153
|
### Essential Hook Commands (MCP Preferred)
|
|
151
154
|
|
|
@@ -126,8 +126,6 @@ For the full `moflo.yaml` schema, gate toggles, model routing, and sandbox confi
|
|
|
126
126
|
|---------|--------|---------|
|
|
127
127
|
| After major refactor | `optimize` | Performance optimization |
|
|
128
128
|
| After adding features | `testgaps` | Find missing test coverage |
|
|
129
|
-
| After security changes | `audit` | Security analysis |
|
|
130
|
-
| After API changes | `document` | Update documentation |
|
|
131
129
|
| Every 5+ file changes | `map` | Update codebase map |
|
|
132
130
|
| Complex debugging | `deepdive` | Deep code analysis |
|
|
133
131
|
|
|
@@ -74,23 +74,23 @@ TaskCreate({
|
|
|
74
74
|
|
|
75
75
|
## 5. Keep Files Under 500 Lines
|
|
76
76
|
|
|
77
|
-
**The 500-line cap applies to every `.claude/guidance/**/*.md` file AND every `.claude/skills/*/SKILL.md` entry file.** The same RAG/attention math applies to
|
|
77
|
+
**The 500-line cap applies to every `.claude/guidance/**/*.md` file AND every `.claude/skills/*/SKILL.md` entry file AND every `.claude/agents/**/*.md` entry file.** The same RAG/attention math applies to all three:
|
|
78
78
|
|
|
79
79
|
- RAG chunking splits long files, and chunks lose cross-section context
|
|
80
80
|
- Claude deprioritizes content deep in a long document
|
|
81
81
|
- Competing chunks from the same file dilute search relevance
|
|
82
|
-
- For SKILL.md, the **entire file is loaded into context on every invocation** — every extra line is a per-invocation token cost across all consumers
|
|
82
|
+
- For SKILL.md and agent .md, the **entire file is loaded into context on every invocation** (or on every `Agent({subagent_type})` spawn) — every extra line is a per-invocation token cost across all consumers
|
|
83
83
|
|
|
84
84
|
If a doc exceeds 500 lines, split by concern. Two patterns:
|
|
85
85
|
|
|
86
86
|
| Pattern | Where it fits | Example |
|
|
87
87
|
|---------|---------------|---------|
|
|
88
88
|
| **Sibling files** (guidance) | Topical split — each file owns one concern | `moflo-spell-engine.md` + `moflo-spell-runner.md` + `moflo-spell-troubleshooting.md` |
|
|
89
|
-
| **Progressive disclosure** (skills) | Entry SKILL.md links to companions in the same
|
|
89
|
+
| **Progressive disclosure** (skills, agents) | Entry SKILL.md or agent .md links to companions in the same directory | `spell-builder/SKILL.md` (entry) + `architecture.md` + `permissions.md` + `preflight.md` (companions); `agents/<cat>/<name>.md` (entry, has frontmatter) + `<name>-protocols.md` (companion, no frontmatter) |
|
|
90
90
|
|
|
91
|
-
Companion files are NOT auto-loaded — Claude reads them only when the
|
|
91
|
+
Companion files are NOT auto-loaded — Claude reads them only when the entry directs it to. This keeps the per-invocation cost low while preserving the depth.
|
|
92
92
|
|
|
93
|
-
A gating test (`skill-and-guidance-size-drift.test.ts`) enforces the cap and will fail CI if a guidance doc
|
|
93
|
+
A gating test (`skill-and-guidance-size-drift.test.ts`) enforces the cap and will fail CI if a guidance doc, SKILL.md entry, or agent entry exceeds 500 lines. Companion files (agent .md without YAML frontmatter, or any .md inside a skill directory other than SKILL.md) are exempt because they only load on demand.
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
@@ -128,6 +128,7 @@ Credential values listed in `RunnerOptions.credentialValues` are automatically r
|
|
|
128
128
|
|
|
129
129
|
- `.claude/guidance/moflo-spell-engine.md` — Definition format, step types, variable interpolation
|
|
130
130
|
- `.claude/guidance/moflo-spell-sandboxing.md` — Capability-based security and permission levels
|
|
131
|
+
- `.claude/guidance/moflo-spell-scheduling.md` — Cron / interval / one-time scheduling, daemon lifecycle, catch-up window, `schedule-executions` audit trail
|
|
131
132
|
- `.claude/guidance/moflo-spell-troubleshooting.md` — Common failure modes when running spells
|
|
132
133
|
- `.claude/guidance/moflo-spell-custom-steps.md` — Pluggable step commands
|
|
133
134
|
- `.claude/guidance/moflo-spell-connectors.md` — Resource connectors and the registry
|