agileflow 3.3.0 → 3.4.1
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/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/skill-loader.js +0 -1
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +81 -0
- package/scripts/agileflow-welcome.js +79 -0
- package/scripts/claude-tmux.sh +90 -23
- package/scripts/claude-watchdog.sh +225 -0
- package/scripts/generators/agent-registry.js +14 -1
- package/scripts/generators/inject-babysit.js +22 -9
- package/scripts/generators/inject-help.js +19 -9
- package/scripts/lib/ac-test-matcher.js +452 -0
- package/scripts/lib/audit-cleanup.js +250 -0
- package/scripts/lib/audit-registry.js +304 -0
- package/scripts/lib/configure-features.js +35 -0
- package/scripts/lib/feature-catalog.js +3 -3
- package/scripts/lib/gate-enforcer.js +295 -0
- package/scripts/lib/model-profiles.js +118 -0
- package/scripts/lib/quality-gates.js +163 -0
- package/scripts/lib/signal-detectors.js +44 -1
- package/scripts/lib/skill-catalog.js +557 -0
- package/scripts/lib/skill-recommender.js +311 -0
- package/scripts/lib/status-writer.js +255 -0
- package/scripts/lib/story-claiming.js +128 -45
- package/scripts/lib/task-sync.js +32 -38
- package/scripts/lib/tdd-phase-manager.js +455 -0
- package/scripts/lib/team-events.js +34 -3
- package/scripts/lib/tmux-audit-monitor.js +611 -0
- package/scripts/lib/tmux-group-colors.js +113 -0
- package/scripts/lib/tool-registry.yaml +241 -0
- package/scripts/lib/tool-shed.js +441 -0
- package/scripts/messaging-bridge.js +209 -1
- package/scripts/native-team-observer.js +219 -0
- package/scripts/obtain-context.js +14 -0
- package/scripts/ralph-loop.js +30 -5
- package/scripts/smart-detect.js +21 -0
- package/scripts/spawn-audit-sessions.js +877 -0
- package/scripts/team-manager.js +56 -16
- package/scripts/tmux-close-windows.sh +180 -0
- package/src/core/agents/a11y-analyzer-aria.md +155 -0
- package/src/core/agents/a11y-analyzer-forms.md +162 -0
- package/src/core/agents/a11y-analyzer-keyboard.md +175 -0
- package/src/core/agents/a11y-analyzer-semantic.md +153 -0
- package/src/core/agents/a11y-analyzer-visual.md +158 -0
- package/src/core/agents/a11y-consensus.md +248 -0
- package/src/core/agents/ads-audit-budget.md +181 -0
- package/src/core/agents/ads-audit-compliance.md +169 -0
- package/src/core/agents/ads-audit-creative.md +164 -0
- package/src/core/agents/ads-audit-google.md +226 -0
- package/src/core/agents/ads-audit-meta.md +183 -0
- package/src/core/agents/ads-audit-tracking.md +197 -0
- package/src/core/agents/ads-consensus.md +396 -0
- package/src/core/agents/ads-generate.md +145 -0
- package/src/core/agents/ads-performance-tracker.md +197 -0
- package/src/core/agents/api-quality-analyzer-conventions.md +148 -0
- package/src/core/agents/api-quality-analyzer-docs.md +176 -0
- package/src/core/agents/api-quality-analyzer-errors.md +183 -0
- package/src/core/agents/api-quality-analyzer-pagination.md +171 -0
- package/src/core/agents/api-quality-analyzer-versioning.md +143 -0
- package/src/core/agents/api-quality-consensus.md +214 -0
- package/src/core/agents/arch-analyzer-circular.md +148 -0
- package/src/core/agents/arch-analyzer-complexity.md +171 -0
- package/src/core/agents/arch-analyzer-coupling.md +146 -0
- package/src/core/agents/arch-analyzer-layering.md +151 -0
- package/src/core/agents/arch-analyzer-patterns.md +162 -0
- package/src/core/agents/arch-consensus.md +227 -0
- package/src/core/agents/brainstorm-analyzer-features.md +169 -0
- package/src/core/agents/brainstorm-analyzer-growth.md +161 -0
- package/src/core/agents/brainstorm-analyzer-integration.md +172 -0
- package/src/core/agents/brainstorm-analyzer-market.md +147 -0
- package/src/core/agents/brainstorm-analyzer-ux.md +167 -0
- package/src/core/agents/brainstorm-consensus.md +237 -0
- package/src/core/agents/completeness-consensus.md +5 -5
- package/src/core/agents/perf-consensus.md +2 -2
- package/src/core/agents/security-consensus.md +2 -2
- package/src/core/agents/seo-analyzer-content.md +167 -0
- package/src/core/agents/seo-analyzer-images.md +187 -0
- package/src/core/agents/seo-analyzer-performance.md +206 -0
- package/src/core/agents/seo-analyzer-schema.md +176 -0
- package/src/core/agents/seo-analyzer-sitemap.md +172 -0
- package/src/core/agents/seo-analyzer-technical.md +144 -0
- package/src/core/agents/seo-consensus.md +289 -0
- package/src/core/agents/test-consensus.md +2 -2
- package/src/core/commands/adr.md +1 -0
- package/src/core/commands/ads/audit.md +375 -0
- package/src/core/commands/ads/budget.md +97 -0
- package/src/core/commands/ads/competitor.md +112 -0
- package/src/core/commands/ads/creative.md +85 -0
- package/src/core/commands/ads/generate.md +238 -0
- package/src/core/commands/ads/google.md +112 -0
- package/src/core/commands/ads/health.md +327 -0
- package/src/core/commands/ads/landing.md +119 -0
- package/src/core/commands/ads/linkedin.md +112 -0
- package/src/core/commands/ads/meta.md +91 -0
- package/src/core/commands/ads/microsoft.md +115 -0
- package/src/core/commands/ads/plan.md +321 -0
- package/src/core/commands/ads/test-plan.md +317 -0
- package/src/core/commands/ads/tiktok.md +129 -0
- package/src/core/commands/ads/track.md +288 -0
- package/src/core/commands/ads/youtube.md +124 -0
- package/src/core/commands/ads.md +140 -0
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/audit.md +43 -6
- package/src/core/commands/babysit.md +315 -1266
- package/src/core/commands/baseline.md +1 -0
- package/src/core/commands/blockers.md +1 -0
- package/src/core/commands/board.md +1 -0
- package/src/core/commands/changelog.md +1 -0
- package/src/core/commands/choose.md +1 -0
- package/src/core/commands/ci.md +1 -0
- package/src/core/commands/code/accessibility.md +347 -0
- package/src/core/commands/code/api.md +297 -0
- package/src/core/commands/code/architecture.md +297 -0
- package/src/core/commands/{audit → code}/completeness.md +72 -25
- package/src/core/commands/{audit → code}/legal.md +63 -16
- package/src/core/commands/{audit → code}/logic.md +64 -16
- package/src/core/commands/{audit → code}/performance.md +67 -20
- package/src/core/commands/{audit → code}/security.md +69 -19
- package/src/core/commands/{audit → code}/test.md +67 -20
- package/src/core/commands/configure.md +1 -0
- package/src/core/commands/council.md +1 -0
- package/src/core/commands/deploy.md +1 -0
- package/src/core/commands/diagnose.md +1 -0
- package/src/core/commands/docs.md +1 -0
- package/src/core/commands/epic/edit.md +213 -0
- package/src/core/commands/epic.md +1 -0
- package/src/core/commands/export.md +238 -0
- package/src/core/commands/help.md +16 -1
- package/src/core/commands/{discovery → ideate}/brief.md +12 -12
- package/src/core/commands/{discovery/new.md → ideate/discover.md} +20 -16
- package/src/core/commands/ideate/features.md +496 -0
- package/src/core/commands/ideate/new.md +158 -124
- package/src/core/commands/impact.md +1 -0
- package/src/core/commands/learn/explain.md +118 -0
- package/src/core/commands/learn/glossary.md +135 -0
- package/src/core/commands/learn/patterns.md +138 -0
- package/src/core/commands/learn/tour.md +126 -0
- package/src/core/commands/migrate/codemods.md +151 -0
- package/src/core/commands/migrate/plan.md +131 -0
- package/src/core/commands/migrate/scan.md +114 -0
- package/src/core/commands/migrate/validate.md +119 -0
- package/src/core/commands/multi-expert.md +1 -0
- package/src/core/commands/pr.md +1 -0
- package/src/core/commands/review.md +1 -0
- package/src/core/commands/seo/audit.md +373 -0
- package/src/core/commands/seo/competitor.md +174 -0
- package/src/core/commands/seo/content.md +107 -0
- package/src/core/commands/seo/geo.md +229 -0
- package/src/core/commands/seo/hreflang.md +140 -0
- package/src/core/commands/seo/images.md +96 -0
- package/src/core/commands/seo/page.md +198 -0
- package/src/core/commands/seo/plan.md +163 -0
- package/src/core/commands/seo/programmatic.md +131 -0
- package/src/core/commands/seo/references/cwv-thresholds.md +64 -0
- package/src/core/commands/seo/references/eeat-framework.md +110 -0
- package/src/core/commands/seo/references/quality-gates.md +91 -0
- package/src/core/commands/seo/references/schema-types.md +102 -0
- package/src/core/commands/seo/schema.md +183 -0
- package/src/core/commands/seo/sitemap.md +97 -0
- package/src/core/commands/seo/technical.md +100 -0
- package/src/core/commands/seo.md +107 -0
- package/src/core/commands/skill/list.md +68 -212
- package/src/core/commands/skill/recommend.md +216 -0
- package/src/core/commands/sprint.md +1 -0
- package/src/core/commands/status/undo.md +191 -0
- package/src/core/commands/status.md +1 -0
- package/src/core/commands/story/edit.md +204 -0
- package/src/core/commands/story/view.md +29 -7
- package/src/core/commands/story-validate.md +1 -0
- package/src/core/commands/story.md +1 -0
- package/src/core/commands/tdd-next.md +238 -0
- package/src/core/commands/tdd.md +211 -0
- package/src/core/commands/team/start.md +10 -6
- package/src/core/commands/tests.md +1 -0
- package/src/core/commands/verify.md +27 -1
- package/src/core/commands/workflow.md +2 -0
- package/src/core/experts/_core-expertise.yaml +105 -0
- package/src/core/experts/analytics/expertise.yaml +5 -99
- package/src/core/experts/codebase-query/expertise.yaml +3 -72
- package/src/core/experts/compliance/expertise.yaml +6 -72
- package/src/core/experts/database/expertise.yaml +9 -52
- package/src/core/experts/documentation/expertise.yaml +7 -140
- package/src/core/experts/integrations/expertise.yaml +7 -127
- package/src/core/experts/mentor/expertise.yaml +8 -35
- package/src/core/experts/monitoring/expertise.yaml +7 -49
- package/src/core/experts/performance/expertise.yaml +1 -26
- package/src/core/experts/security/expertise.yaml +9 -34
- package/src/core/experts/ui/expertise.yaml +6 -36
- package/src/core/knowledge/ads/ad-audit-checklist-scoring.md +424 -0
- package/src/core/knowledge/ads/ad-optimization-logic.md +590 -0
- package/src/core/knowledge/ads/ad-technical-specifications.md +385 -0
- package/src/core/knowledge/ads/definitive-advertising-reference-2026.md +506 -0
- package/src/core/knowledge/ads/paid-advertising-research-2026.md +445 -0
- package/src/core/teams/backend.json +41 -0
- package/src/core/teams/frontend.json +41 -0
- package/src/core/teams/qa.json +41 -0
- package/src/core/teams/solo.json +35 -0
- package/src/core/templates/agileflow-metadata.json +20 -1
- package/tools/cli/commands/setup.js +85 -3
- package/tools/cli/commands/update.js +42 -0
- package/tools/cli/installers/ide/_base-ide.js +42 -5
- package/tools/cli/installers/ide/claude-code.js +71 -3
- package/tools/cli/lib/content-injector.js +160 -12
- package/tools/cli/lib/docs-setup.js +1 -1
- package/src/core/commands/skill/create.md +0 -698
- package/src/core/commands/skill/delete.md +0 -316
- package/src/core/commands/skill/edit.md +0 -359
- package/src/core/commands/skill/test.md +0 -394
- package/src/core/commands/skill/upgrade.md +0 -552
- package/src/core/templates/skill-template.md +0 -117
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Auto-generate domain terminology glossary from code identifiers, comments, and documentation with definitions and context
|
|
3
|
+
argument-hint: "[file|directory] [--update] [--format=table|definitions]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:learn:glossary
|
|
7
|
+
|
|
8
|
+
Auto-generate a domain terminology glossary by analyzing code identifiers, comments, and documentation. Maps domain-specific terms to their meaning in the codebase context.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/agileflow:learn:glossary # Generate from entire project
|
|
16
|
+
/agileflow:learn:glossary src/ # Generate from specific directory
|
|
17
|
+
/agileflow:learn:glossary --update # Update existing glossary
|
|
18
|
+
/agileflow:learn:glossary --format=definitions # Definition-style output
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## How It Works
|
|
24
|
+
|
|
25
|
+
1. **Extract identifiers** - Collect class names, function names, type names, constants
|
|
26
|
+
2. **Analyze comments** - Find inline documentation and JSDoc descriptions
|
|
27
|
+
3. **Detect domain terms** - Identify business/domain-specific vocabulary
|
|
28
|
+
4. **Generate definitions** - Create clear, contextual definitions
|
|
29
|
+
5. **Organize alphabetically** - Create a browsable reference
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step-by-Step Process
|
|
34
|
+
|
|
35
|
+
### STEP 1: Parse Arguments
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
TARGET = file or directory (default: current directory)
|
|
39
|
+
UPDATE = --update flag to merge with existing glossary
|
|
40
|
+
FORMAT = table (default) or definitions
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### STEP 2: Extract Domain Terms
|
|
44
|
+
|
|
45
|
+
Scan the codebase for domain-specific terms:
|
|
46
|
+
|
|
47
|
+
**Sources**:
|
|
48
|
+
- Class and interface names (e.g., `OrderFulfillment`, `PricingTier`)
|
|
49
|
+
- Type aliases and enums (e.g., `type OrderStatus = 'pending' | 'shipped'`)
|
|
50
|
+
- Constants (e.g., `MAX_RETRY_ATTEMPTS`, `DEFAULT_CURRENCY`)
|
|
51
|
+
- Database table/column names
|
|
52
|
+
- API endpoint names and parameters
|
|
53
|
+
- JSDoc comments with @description
|
|
54
|
+
- README and documentation files
|
|
55
|
+
|
|
56
|
+
**Filtering**:
|
|
57
|
+
- Exclude common programming terms (get, set, handle, process)
|
|
58
|
+
- Exclude framework terms (useState, useEffect, middleware)
|
|
59
|
+
- Focus on business/domain-specific vocabulary
|
|
60
|
+
|
|
61
|
+
### STEP 3: Generate Definitions
|
|
62
|
+
|
|
63
|
+
For each term, generate a definition:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
### {Term}
|
|
67
|
+
|
|
68
|
+
**Type**: {class | type | function | constant | concept}
|
|
69
|
+
**Found in**: `{file_path}`
|
|
70
|
+
**Definition**: {clear, contextual definition}
|
|
71
|
+
**Example**: `{code usage example}`
|
|
72
|
+
**Related terms**: {list of related terms}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### STEP 4: Organize and Output
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
# Domain Glossary
|
|
79
|
+
|
|
80
|
+
**Project**: {project name}
|
|
81
|
+
**Generated**: {date}
|
|
82
|
+
**Terms**: {N}
|
|
83
|
+
|
|
84
|
+
## A
|
|
85
|
+
|
|
86
|
+
### Account
|
|
87
|
+
**Type**: model
|
|
88
|
+
**Found in**: `src/models/Account.ts`
|
|
89
|
+
**Definition**: A registered user entity with authentication credentials and profile information.
|
|
90
|
+
**Related**: User, Session, Subscription
|
|
91
|
+
|
|
92
|
+
### ACL (Access Control List)
|
|
93
|
+
**Type**: concept
|
|
94
|
+
**Found in**: `src/auth/acl.ts`
|
|
95
|
+
**Definition**: Permission rules mapping roles to allowed operations on resources.
|
|
96
|
+
**Related**: Role, Permission, Authorization
|
|
97
|
+
|
|
98
|
+
## B
|
|
99
|
+
...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Save to `docs/08-project/glossary.md`
|
|
103
|
+
|
|
104
|
+
### STEP 5: Offer Follow-Up
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Glossary generated: [N] domain terms extracted from [M] files.
|
|
108
|
+
|
|
109
|
+
Options:
|
|
110
|
+
- Add/edit specific term definitions
|
|
111
|
+
- Generate glossary for specific module
|
|
112
|
+
- Explain a specific term in depth
|
|
113
|
+
- Done
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Output Formats
|
|
119
|
+
|
|
120
|
+
**Table format** (default):
|
|
121
|
+
| Term | Type | Definition | File |
|
|
122
|
+
|------|------|------------|------|
|
|
123
|
+
| Account | model | Registered user entity | models/Account.ts |
|
|
124
|
+
|
|
125
|
+
**Definitions format** (--format=definitions):
|
|
126
|
+
Full definition blocks with examples and related terms.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Related Commands
|
|
131
|
+
|
|
132
|
+
- `/agileflow:learn:tour` - Guided codebase walkthrough
|
|
133
|
+
- `/agileflow:learn:explain` - Deep code explanation
|
|
134
|
+
- `/agileflow:learn:patterns` - Design patterns catalog
|
|
135
|
+
- `/agileflow:docs` - Documentation synchronization
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Catalog and explain design patterns actually used in the codebase with real code examples and rationale
|
|
3
|
+
argument-hint: "[pattern-name|category] [--generate]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:learn:patterns
|
|
7
|
+
|
|
8
|
+
Discover and catalog the design patterns actually used in the codebase. Shows real code examples, explains why each pattern was chosen, and documents the project's architectural vocabulary.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/agileflow:learn:patterns # Discover all patterns
|
|
16
|
+
/agileflow:learn:patterns "repository" # Find repository pattern usage
|
|
17
|
+
/agileflow:learn:patterns --generate # Generate full pattern catalog
|
|
18
|
+
/agileflow:learn:patterns "error handling" # How errors are handled
|
|
19
|
+
/agileflow:learn:patterns creational # Creational patterns only
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
1. **Scan codebase** - Identify design patterns in use
|
|
27
|
+
2. **Extract examples** - Find real code examples of each pattern
|
|
28
|
+
3. **Document rationale** - Explain why each pattern was chosen
|
|
29
|
+
4. **Categorize** - Group by pattern category
|
|
30
|
+
5. **Generate catalog** - Create a reference document
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step-by-Step Process
|
|
35
|
+
|
|
36
|
+
### STEP 1: Parse Arguments
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
TARGET = specific pattern name, category, or "all"
|
|
40
|
+
GENERATE = --generate flag to create/update catalog file
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### STEP 2: Scan for Patterns
|
|
44
|
+
|
|
45
|
+
Use `Explore` agent to identify patterns:
|
|
46
|
+
|
|
47
|
+
| Category | Patterns to Detect |
|
|
48
|
+
|----------|-------------------|
|
|
49
|
+
| **Creational** | Factory, Builder, Singleton, Module |
|
|
50
|
+
| **Structural** | Adapter, Facade, Proxy, Decorator, Composite |
|
|
51
|
+
| **Behavioral** | Observer/PubSub, Strategy, Command, Middleware, State Machine |
|
|
52
|
+
| **Architectural** | MVC, Repository, Service Layer, CQRS, Event Sourcing |
|
|
53
|
+
| **Frontend** | Container/Presenter, HOC, Render Props, Custom Hooks, Compound Components |
|
|
54
|
+
| **Error Handling** | Error Boundary, Result Type, Error Middleware, Retry |
|
|
55
|
+
| **Data** | DAO, Active Record, Data Mapper, Unit of Work |
|
|
56
|
+
|
|
57
|
+
### STEP 3: Extract Examples
|
|
58
|
+
|
|
59
|
+
For each detected pattern:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## {Pattern Name}
|
|
63
|
+
|
|
64
|
+
**Category**: {Creational/Structural/Behavioral/etc.}
|
|
65
|
+
**Used in**: {N} places
|
|
66
|
+
**Key files**: {list}
|
|
67
|
+
|
|
68
|
+
### What It Is
|
|
69
|
+
{Brief pattern description}
|
|
70
|
+
|
|
71
|
+
### How We Use It
|
|
72
|
+
{Explanation specific to this codebase}
|
|
73
|
+
|
|
74
|
+
### Real Example
|
|
75
|
+
\`\`\`{language}
|
|
76
|
+
// {file_path}:{line}
|
|
77
|
+
{actual code from the project}
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
### Why This Pattern
|
|
81
|
+
{Rationale for choosing this pattern over alternatives}
|
|
82
|
+
|
|
83
|
+
### When to Use
|
|
84
|
+
{Guidelines for when to apply this pattern in new code}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### STEP 4: Generate Catalog (if --generate)
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
# Design Patterns Catalog
|
|
91
|
+
|
|
92
|
+
**Project**: {project name}
|
|
93
|
+
**Generated**: {date}
|
|
94
|
+
**Patterns Found**: {N}
|
|
95
|
+
|
|
96
|
+
## Pattern Overview
|
|
97
|
+
|
|
98
|
+
| Pattern | Category | Usage Count | Key File |
|
|
99
|
+
|---------|----------|-------------|----------|
|
|
100
|
+
| {name} | {category} | {count} | {file} |
|
|
101
|
+
|
|
102
|
+
## Detailed Patterns
|
|
103
|
+
|
|
104
|
+
{Each pattern with full documentation}
|
|
105
|
+
|
|
106
|
+
## Patterns NOT Used (and Why)
|
|
107
|
+
|
|
108
|
+
| Pattern | Reason |
|
|
109
|
+
|---------|--------|
|
|
110
|
+
| {name} | {why it's not used or not appropriate} |
|
|
111
|
+
|
|
112
|
+
## Conventions
|
|
113
|
+
|
|
114
|
+
{Project-specific conventions for applying patterns}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Save to `docs/08-project/patterns/pattern-catalog-{YYYYMMDD}.md`
|
|
118
|
+
|
|
119
|
+
### STEP 5: Offer Follow-Up
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Pattern catalog: [N] patterns found across [M] files.
|
|
123
|
+
|
|
124
|
+
Options:
|
|
125
|
+
- Explain a specific pattern in more detail
|
|
126
|
+
- See where to apply a pattern in new code
|
|
127
|
+
- Generate full catalog document
|
|
128
|
+
- Done
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Related Commands
|
|
134
|
+
|
|
135
|
+
- `/agileflow:learn:tour` - Guided codebase walkthrough
|
|
136
|
+
- `/agileflow:learn:explain` - Deep code explanation
|
|
137
|
+
- `/agileflow:learn:glossary` - Domain terminology
|
|
138
|
+
- `/agileflow:code:architecture` - Architecture health audit
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guided interactive codebase walkthrough with annotated stops explaining architecture, data flow, and key design decisions
|
|
3
|
+
argument-hint: "[topic|feature] [DEPTH=overview|detailed|deep-dive]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:learn:tour
|
|
7
|
+
|
|
8
|
+
Take an interactive guided tour through the codebase. The tour visits key files and explains architecture, data flow, and design decisions with annotated stops.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/agileflow:learn:tour # Full architecture tour
|
|
16
|
+
/agileflow:learn:tour authentication # Tour the auth system
|
|
17
|
+
/agileflow:learn:tour "data flow" # Follow data through the system
|
|
18
|
+
/agileflow:learn:tour api DEPTH=deep-dive # Deep dive into API layer
|
|
19
|
+
/agileflow:learn:tour "new developer" # Onboarding tour
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
1. **Discover project structure** - Map the codebase architecture
|
|
27
|
+
2. **Generate tour route** - Plan stops based on topic and depth
|
|
28
|
+
3. **Interactive walkthrough** - Visit each stop with explanation
|
|
29
|
+
4. **Ask questions** - Pause at each stop for user questions
|
|
30
|
+
5. **Generate tour notes** - Save the tour as a reference document
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step-by-Step Process
|
|
35
|
+
|
|
36
|
+
### STEP 1: Parse Arguments
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
TOPIC = specific feature/area or "full" for complete tour
|
|
40
|
+
DEPTH = overview (5-8 stops) | detailed (10-15 stops) | deep-dive (15-25 stops)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### STEP 2: Discover Project Structure
|
|
44
|
+
|
|
45
|
+
Use `Explore` agent to:
|
|
46
|
+
- Map directory structure and architecture pattern
|
|
47
|
+
- Identify entry points (main, index, app)
|
|
48
|
+
- Find key configuration files
|
|
49
|
+
- Detect framework and key libraries
|
|
50
|
+
|
|
51
|
+
### STEP 3: Plan Tour Route
|
|
52
|
+
|
|
53
|
+
Generate a sequence of stops based on topic:
|
|
54
|
+
|
|
55
|
+
**Full Tour Route**:
|
|
56
|
+
1. Entry point (main app file)
|
|
57
|
+
2. Configuration and environment
|
|
58
|
+
3. Routing/navigation structure
|
|
59
|
+
4. Data models/schema
|
|
60
|
+
5. API/service layer
|
|
61
|
+
6. UI components (key ones)
|
|
62
|
+
7. State management
|
|
63
|
+
8. Authentication/authorization
|
|
64
|
+
9. Testing approach
|
|
65
|
+
|
|
66
|
+
**Feature-Specific Tour**: Follow the feature through:
|
|
67
|
+
1. Entry point (where user triggers it)
|
|
68
|
+
2. Route/handler
|
|
69
|
+
3. Business logic
|
|
70
|
+
4. Data access
|
|
71
|
+
5. Side effects (email, queue, etc.)
|
|
72
|
+
6. UI rendering
|
|
73
|
+
|
|
74
|
+
### STEP 4: Interactive Walkthrough
|
|
75
|
+
|
|
76
|
+
At each stop:
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
## Stop {N}/{Total}: {Title}
|
|
80
|
+
📍 `{file_path}`
|
|
81
|
+
|
|
82
|
+
{Read and explain the key code in this file}
|
|
83
|
+
|
|
84
|
+
**Why it matters**: {explanation of role in the system}
|
|
85
|
+
**Key patterns**: {design patterns used}
|
|
86
|
+
**Connected to**: {what files/modules this connects to}
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
Continue to next stop? [Next | Ask a question | Jump to specific stop | End tour]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### STEP 5: Generate Tour Notes
|
|
93
|
+
|
|
94
|
+
Save a reference document:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# Codebase Tour: {Topic}
|
|
98
|
+
|
|
99
|
+
**Date**: {date}
|
|
100
|
+
**Stops**: {N}
|
|
101
|
+
**Coverage**: {files visited}
|
|
102
|
+
|
|
103
|
+
## Tour Map
|
|
104
|
+
1. {file} - {one-line summary}
|
|
105
|
+
2. {file} - {one-line summary}
|
|
106
|
+
...
|
|
107
|
+
|
|
108
|
+
## Key Takeaways
|
|
109
|
+
- {insight 1}
|
|
110
|
+
- {insight 2}
|
|
111
|
+
...
|
|
112
|
+
|
|
113
|
+
## Architecture Diagram
|
|
114
|
+
{Mermaid diagram of the system}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Save to `docs/08-project/tours/tour-{topic}-{YYYYMMDD}.md`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Related Commands
|
|
122
|
+
|
|
123
|
+
- `/agileflow:learn:explain` - Deep "why" explanation of specific code
|
|
124
|
+
- `/agileflow:learn:patterns` - Catalog of design patterns used
|
|
125
|
+
- `/agileflow:learn:glossary` - Domain terminology reference
|
|
126
|
+
- `/agileflow:context:full` - Generate full project context
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate and execute AST-based codemods for automated code transformations with dry-run preview and rollback support
|
|
3
|
+
argument-hint: "[transformation] [file|directory] [--dry-run]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:migrate:codemods
|
|
7
|
+
|
|
8
|
+
Generate AST-based codemods for automated code transformations. Preview changes with dry-run before applying, with full rollback support.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/agileflow:migrate:codemods "CommonJS to ESM" src/ # Generate CJS->ESM codemod
|
|
16
|
+
/agileflow:migrate:codemods "class to function components" # React class->function
|
|
17
|
+
/agileflow:migrate:codemods "enzyme to testing-library" # Test migration
|
|
18
|
+
/agileflow:migrate:codemods "require to import" --dry-run # Preview only
|
|
19
|
+
/agileflow:migrate:codemods "update API v2 to v3" src/api/ # API migration
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
1. **Analyze transformation** - Understand the before/after patterns
|
|
27
|
+
2. **Scan target files** - Find all instances of the "before" pattern
|
|
28
|
+
3. **Generate transformation** - Create the codemod logic (using regex, AST, or direct edit)
|
|
29
|
+
4. **Dry-run preview** - Show what would change without modifying files
|
|
30
|
+
5. **Apply changes** - Execute the transformation with backup
|
|
31
|
+
6. **Verify** - Run tests to confirm nothing broke
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step-by-Step Process
|
|
36
|
+
|
|
37
|
+
### STEP 1: Parse Arguments
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
TRANSFORMATION = description of the transformation
|
|
41
|
+
TARGET = file or directory (default: current directory)
|
|
42
|
+
DRY_RUN = --dry-run flag present (default: false, always dry-run first)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### STEP 2: Analyze Transformation
|
|
46
|
+
|
|
47
|
+
Delegate to `agileflow-refactor` agent:
|
|
48
|
+
- Understand the source and target patterns
|
|
49
|
+
- Identify edge cases and exceptions
|
|
50
|
+
- Determine if transformation is safe (reversible, no logic change)
|
|
51
|
+
|
|
52
|
+
### STEP 3: Find All Instances
|
|
53
|
+
|
|
54
|
+
Scan target files for the source pattern:
|
|
55
|
+
- Count total instances
|
|
56
|
+
- Group by file
|
|
57
|
+
- Flag edge cases that need manual review
|
|
58
|
+
|
|
59
|
+
### STEP 4: Generate Codemod
|
|
60
|
+
|
|
61
|
+
Create the transformation logic:
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
## Codemod: {Transformation Name}
|
|
65
|
+
|
|
66
|
+
**Source Pattern**:
|
|
67
|
+
\`\`\`javascript
|
|
68
|
+
{before pattern}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
**Target Pattern**:
|
|
72
|
+
\`\`\`javascript
|
|
73
|
+
{after pattern}
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
**Files Affected**: {N} files, {M} instances
|
|
77
|
+
**Edge Cases**: {list of cases needing manual review}
|
|
78
|
+
**Safety**: {safe/review-needed}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### STEP 5: Dry-Run Preview
|
|
82
|
+
|
|
83
|
+
**ALWAYS show dry-run first** before applying:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Codemod Preview: "CommonJS to ESM"
|
|
87
|
+
═══════════════════════════════════
|
|
88
|
+
|
|
89
|
+
Files affected: 15
|
|
90
|
+
Total transformations: 42
|
|
91
|
+
Edge cases (manual review): 3
|
|
92
|
+
|
|
93
|
+
Example transformation:
|
|
94
|
+
src/utils.js:1
|
|
95
|
+
- const { readFile } = require('fs');
|
|
96
|
+
+ import { readFile } from 'fs';
|
|
97
|
+
|
|
98
|
+
src/utils.js:5
|
|
99
|
+
- module.exports = { helper };
|
|
100
|
+
+ export { helper };
|
|
101
|
+
|
|
102
|
+
Edge cases (skipped):
|
|
103
|
+
src/dynamic-loader.js:12 - dynamic require()
|
|
104
|
+
src/config.js:8 - conditional require()
|
|
105
|
+
src/legacy.js:1 - require with side effects
|
|
106
|
+
|
|
107
|
+
Apply transformations? [Y/n/review-edge-cases]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### STEP 6: Apply and Verify
|
|
111
|
+
|
|
112
|
+
After user approval:
|
|
113
|
+
1. Create git stash or backup
|
|
114
|
+
2. Apply transformations file by file
|
|
115
|
+
3. Run linter to fix formatting
|
|
116
|
+
4. Run tests to verify
|
|
117
|
+
5. Show summary of changes
|
|
118
|
+
|
|
119
|
+
### STEP 7: Offer Next Steps
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Codemod applied: [N] transformations in [M] files. [E] edge cases need manual review.
|
|
123
|
+
|
|
124
|
+
Options:
|
|
125
|
+
- Run tests to verify changes (Recommended)
|
|
126
|
+
- Review edge cases manually
|
|
127
|
+
- Undo all changes (git checkout)
|
|
128
|
+
- Continue with next migration step
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Common Codemods
|
|
134
|
+
|
|
135
|
+
| Transformation | Description |
|
|
136
|
+
|---------------|-------------|
|
|
137
|
+
| CJS to ESM | `require()` -> `import`, `module.exports` -> `export` |
|
|
138
|
+
| Class to function | React class components -> function components with hooks |
|
|
139
|
+
| Enzyme to RTL | Enzyme test assertions -> React Testing Library |
|
|
140
|
+
| PropTypes to TypeScript | Runtime PropTypes -> TypeScript interfaces |
|
|
141
|
+
| Callbacks to async/await | Callback-based code -> async/await |
|
|
142
|
+
| var to const/let | `var` declarations -> `const`/`let` |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Related Commands
|
|
147
|
+
|
|
148
|
+
- `/agileflow:migrate:scan` - Detect migration opportunities
|
|
149
|
+
- `/agileflow:migrate:plan` - Generate migration roadmap
|
|
150
|
+
- `/agileflow:migrate:validate` - Post-migration verification
|
|
151
|
+
- `/agileflow:verify` - Run tests after transformation
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate step-by-step migration roadmap with risk assessment, rollback strategy, and execution order from scan results
|
|
3
|
+
argument-hint: "[scan-report|package-name] [SCOPE=full|incremental]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:migrate:plan
|
|
7
|
+
|
|
8
|
+
Generate a detailed migration plan with step-by-step execution order, risk assessment, rollback strategies, and dependency mapping from scan results or specific upgrade targets.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/agileflow:migrate:plan # Plan from latest scan report
|
|
16
|
+
/agileflow:migrate:plan react # Plan React upgrade specifically
|
|
17
|
+
/agileflow:migrate:plan next@15 # Plan Next.js 15 migration
|
|
18
|
+
/agileflow:migrate:plan . SCOPE=incremental # Incremental migration (phase by phase)
|
|
19
|
+
/agileflow:migrate:plan typescript@5.5 # Plan TypeScript upgrade
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
1. **Read scan results** or analyze specific upgrade target
|
|
27
|
+
2. **Map dependencies** between migration steps
|
|
28
|
+
3. **Assess risk** for each step (data loss, downtime, breaking changes)
|
|
29
|
+
4. **Design rollback** strategy for each step
|
|
30
|
+
5. **Order execution** by dependency and risk (safest first)
|
|
31
|
+
6. **Estimate effort** per step
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step-by-Step Process
|
|
36
|
+
|
|
37
|
+
### STEP 1: Parse Arguments
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
TARGET = scan report path, package name, or package@version
|
|
41
|
+
SCOPE = full (all at once) or incremental (phased)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### STEP 2: Research Migration Path
|
|
45
|
+
|
|
46
|
+
Delegate to `agileflow-research` agent:
|
|
47
|
+
- Read official migration guides for the target upgrade
|
|
48
|
+
- Find known issues and workarounds
|
|
49
|
+
- Check community experience (GitHub issues, blog posts)
|
|
50
|
+
- Identify breaking changes between current and target versions
|
|
51
|
+
|
|
52
|
+
### STEP 3: Map Dependencies
|
|
53
|
+
|
|
54
|
+
Build a dependency graph of migration steps:
|
|
55
|
+
- Which steps must happen before others
|
|
56
|
+
- Which steps can run in parallel
|
|
57
|
+
- Which steps affect shared code
|
|
58
|
+
|
|
59
|
+
### STEP 4: Assess Risk
|
|
60
|
+
|
|
61
|
+
For each migration step:
|
|
62
|
+
|
|
63
|
+
| Risk Level | Criteria |
|
|
64
|
+
|------------|----------|
|
|
65
|
+
| **High** | Data migration, schema changes, auth changes |
|
|
66
|
+
| **Medium** | API changes, dependency swaps, config changes |
|
|
67
|
+
| **Low** | Syntax updates, import changes, type updates |
|
|
68
|
+
|
|
69
|
+
### STEP 5: Generate Migration Plan
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
# Migration Plan: {Target}
|
|
73
|
+
|
|
74
|
+
**Generated**: {date}
|
|
75
|
+
**Current State**: {current versions/patterns}
|
|
76
|
+
**Target State**: {target versions/patterns}
|
|
77
|
+
**Estimated Effort**: {total estimate}
|
|
78
|
+
**Risk Level**: {overall risk}
|
|
79
|
+
|
|
80
|
+
## Pre-Migration Checklist
|
|
81
|
+
- [ ] Full test suite passing
|
|
82
|
+
- [ ] Database backup created
|
|
83
|
+
- [ ] Feature flags for gradual rollout
|
|
84
|
+
- [ ] Rollback procedure documented
|
|
85
|
+
|
|
86
|
+
## Phase 1: {Name} (Risk: Low)
|
|
87
|
+
### Step 1.1: {Action}
|
|
88
|
+
- **What**: {specific change}
|
|
89
|
+
- **Files affected**: {list}
|
|
90
|
+
- **Risk**: {description}
|
|
91
|
+
- **Rollback**: {how to undo}
|
|
92
|
+
- **Verification**: {how to confirm success}
|
|
93
|
+
|
|
94
|
+
### Step 1.2: {Action}
|
|
95
|
+
...
|
|
96
|
+
|
|
97
|
+
## Phase 2: {Name} (Risk: Medium)
|
|
98
|
+
...
|
|
99
|
+
|
|
100
|
+
## Phase 3: {Name} (Risk: High)
|
|
101
|
+
...
|
|
102
|
+
|
|
103
|
+
## Post-Migration Verification
|
|
104
|
+
- [ ] All tests passing
|
|
105
|
+
- [ ] No deprecated API warnings
|
|
106
|
+
- [ ] Performance benchmarks stable
|
|
107
|
+
- [ ] Monitoring shows no regressions
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Save to `docs/08-project/migrations/plan-{target}-{YYYYMMDD}.md`
|
|
111
|
+
|
|
112
|
+
### STEP 6: Offer Next Steps
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Migration plan generated: [N] phases, [M] steps. Estimated effort: [estimate].
|
|
116
|
+
|
|
117
|
+
Options:
|
|
118
|
+
- Generate codemods for Phase 1 (Recommended)
|
|
119
|
+
- Create stories from migration steps
|
|
120
|
+
- Review plan in detail
|
|
121
|
+
- Save plan and done
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Related Commands
|
|
127
|
+
|
|
128
|
+
- `/agileflow:migrate:scan` - Detect migration opportunities
|
|
129
|
+
- `/agileflow:migrate:codemods` - Generate AST-based codemods
|
|
130
|
+
- `/agileflow:migrate:validate` - Post-migration verification
|
|
131
|
+
- `/agileflow:research:ask` - Deep research on specific migration topics
|