wogiflow 1.0.21 → 1.0.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 (121) hide show
  1. package/.claude/commands/wogi-bug.md +43 -0
  2. package/.claude/commands/wogi-bulk.md +144 -0
  3. package/.claude/commands/wogi-changelog.md +36 -0
  4. package/.claude/commands/wogi-compact.md +99 -0
  5. package/.claude/commands/wogi-config.md +50 -0
  6. package/.claude/commands/wogi-context.md +68 -0
  7. package/.claude/commands/wogi-correction.md +73 -0
  8. package/.claude/commands/wogi-debt.md +128 -0
  9. package/.claude/commands/wogi-deps.md +32 -0
  10. package/.claude/commands/wogi-epics.md +145 -0
  11. package/.claude/commands/wogi-export.md +100 -0
  12. package/.claude/commands/wogi-feature.md +149 -0
  13. package/.claude/commands/wogi-guided-edit.md +83 -0
  14. package/.claude/commands/wogi-health.md +43 -0
  15. package/.claude/commands/wogi-help.md +96 -0
  16. package/.claude/commands/wogi-hybrid-edit.md +36 -0
  17. package/.claude/commands/wogi-hybrid-off.md +24 -0
  18. package/.claude/commands/wogi-hybrid-setup.md +79 -0
  19. package/.claude/commands/wogi-hybrid-status.md +45 -0
  20. package/.claude/commands/wogi-hybrid.md +54 -0
  21. package/.claude/commands/wogi-import.md +44 -0
  22. package/.claude/commands/wogi-init.md +618 -0
  23. package/.claude/commands/wogi-log.md +38 -0
  24. package/.claude/commands/wogi-map-add.md +29 -0
  25. package/.claude/commands/wogi-map-check.md +35 -0
  26. package/.claude/commands/wogi-map-index.md +98 -0
  27. package/.claude/commands/wogi-map-scan.md +38 -0
  28. package/.claude/commands/wogi-map-sync.md +91 -0
  29. package/.claude/commands/wogi-map.md +33 -0
  30. package/.claude/commands/wogi-morning.md +65 -0
  31. package/.claude/commands/wogi-onboard.md +99 -0
  32. package/.claude/commands/wogi-plan.md +173 -0
  33. package/.claude/commands/wogi-ready.md +84 -0
  34. package/.claude/commands/wogi-resume.md +95 -0
  35. package/.claude/commands/wogi-review.md +636 -0
  36. package/.claude/commands/wogi-roadmap.md +241 -0
  37. package/.claude/commands/wogi-rules.md +104 -0
  38. package/.claude/commands/wogi-search.md +33 -0
  39. package/.claude/commands/wogi-session-end.md +49 -0
  40. package/.claude/commands/wogi-setup-stack.md +151 -0
  41. package/.claude/commands/wogi-skill-learn.md +66 -0
  42. package/.claude/commands/wogi-skills.md +87 -0
  43. package/.claude/commands/wogi-standup.md +28 -0
  44. package/.claude/commands/wogi-start.md +465 -0
  45. package/.claude/commands/wogi-status.md +41 -0
  46. package/.claude/commands/wogi-statusline-setup/skill.md +109 -0
  47. package/.claude/commands/wogi-story.md +98 -0
  48. package/.claude/commands/wogi-suspend.md +87 -0
  49. package/.claude/commands/wogi-test-browser.md +43 -0
  50. package/.claude/commands/wogi-trace.md +198 -0
  51. package/.claude/docs/architecture.md +37 -0
  52. package/.claude/docs/commands.md +343 -0
  53. package/.claude/docs/knowledge-base/01-setup-onboarding/README.md +177 -0
  54. package/.claude/docs/knowledge-base/01-setup-onboarding/component-indexing.md +341 -0
  55. package/.claude/docs/knowledge-base/01-setup-onboarding/framework-detection.md +269 -0
  56. package/.claude/docs/knowledge-base/01-setup-onboarding/installation.md +146 -0
  57. package/.claude/docs/knowledge-base/01-setup-onboarding/onboarding-existing.md +317 -0
  58. package/.claude/docs/knowledge-base/01-setup-onboarding/team-setup.md +346 -0
  59. package/.claude/docs/knowledge-base/02-task-execution/01-task-planning.md +259 -0
  60. package/.claude/docs/knowledge-base/02-task-execution/02-execution-loop.md +443 -0
  61. package/.claude/docs/knowledge-base/02-task-execution/03-verification.md +417 -0
  62. package/.claude/docs/knowledge-base/02-task-execution/04-completion.md +374 -0
  63. package/.claude/docs/knowledge-base/02-task-execution/05-session-review.md +170 -0
  64. package/.claude/docs/knowledge-base/02-task-execution/README.md +173 -0
  65. package/.claude/docs/knowledge-base/02-task-execution/external-integrations.md +133 -0
  66. package/.claude/docs/knowledge-base/02-task-execution/model-management.md +202 -0
  67. package/.claude/docs/knowledge-base/02-task-execution/specification-mode.md +292 -0
  68. package/.claude/docs/knowledge-base/02-task-execution/sync-daemon.md +96 -0
  69. package/.claude/docs/knowledge-base/02-task-execution/trade-offs.md +345 -0
  70. package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +357 -0
  71. package/.claude/docs/knowledge-base/03-self-improvement/README.md +199 -0
  72. package/.claude/docs/knowledge-base/03-self-improvement/long-input-processing.md +160 -0
  73. package/.claude/docs/knowledge-base/03-self-improvement/model-learning.md +334 -0
  74. package/.claude/docs/knowledge-base/03-self-improvement/project-learning.md +301 -0
  75. package/.claude/docs/knowledge-base/03-self-improvement/skill-learning.md +372 -0
  76. package/.claude/docs/knowledge-base/03-self-improvement/skill-matching.md +304 -0
  77. package/.claude/docs/knowledge-base/03-self-improvement/team-learning.md +342 -0
  78. package/.claude/docs/knowledge-base/04-memory-context/README.md +189 -0
  79. package/.claude/docs/knowledge-base/04-memory-context/context-management.md +308 -0
  80. package/.claude/docs/knowledge-base/04-memory-context/memory-commands.md +176 -0
  81. package/.claude/docs/knowledge-base/04-memory-context/memory-systems.md +359 -0
  82. package/.claude/docs/knowledge-base/04-memory-context/prd-management.md +115 -0
  83. package/.claude/docs/knowledge-base/04-memory-context/session-persistence.md +359 -0
  84. package/.claude/docs/knowledge-base/04-memory-context/team-history.md +317 -0
  85. package/.claude/docs/knowledge-base/05-development-tools/README.md +84 -0
  86. package/.claude/docs/knowledge-base/05-development-tools/code-traces.md +278 -0
  87. package/.claude/docs/knowledge-base/05-development-tools/figma-analyzer.md +253 -0
  88. package/.claude/docs/knowledge-base/05-development-tools/guided-edit.md +173 -0
  89. package/.claude/docs/knowledge-base/05-development-tools/mcp-integrations.md +286 -0
  90. package/.claude/docs/knowledge-base/06-safety-guardrails/README.md +153 -0
  91. package/.claude/docs/knowledge-base/06-safety-guardrails/checkpoint-rollback.md +302 -0
  92. package/.claude/docs/knowledge-base/06-safety-guardrails/commit-gates.md +309 -0
  93. package/.claude/docs/knowledge-base/06-safety-guardrails/damage-control.md +292 -0
  94. package/.claude/docs/knowledge-base/06-safety-guardrails/security-scanning.md +291 -0
  95. package/.claude/docs/knowledge-base/README.md +92 -0
  96. package/.claude/docs/knowledge-base/configuration/README.md +228 -0
  97. package/.claude/docs/knowledge-base/configuration/all-options.md +1632 -0
  98. package/.claude/docs/knowledge-base/future-features.md +277 -0
  99. package/.claude/docs/stack.md +25 -0
  100. package/.claude/docs/testing.md +71 -0
  101. package/.claude/rules/README.md +60 -0
  102. package/.claude/rules/architecture/component-reuse.md +38 -0
  103. package/.claude/rules/architecture/document-structure.md +76 -0
  104. package/.claude/rules/architecture/feature-refactoring-cleanup.md +87 -0
  105. package/.claude/rules/architecture/model-management.md +35 -0
  106. package/.claude/rules/code-style/naming-conventions.md +55 -0
  107. package/.claude/rules/security/security-patterns.md +116 -0
  108. package/.claude/skills/.gitkeep +0 -0
  109. package/.claude/skills/README.md +131 -0
  110. package/.claude/skills/_template/commands/.gitkeep +0 -0
  111. package/.claude/skills/_template/knowledge/anti-patterns.md +49 -0
  112. package/.claude/skills/_template/knowledge/learnings.md +60 -0
  113. package/.claude/skills/_template/knowledge/patterns.md +45 -0
  114. package/.claude/skills/_template/rules/.gitkeep +0 -0
  115. package/.claude/skills/_template/skill.md +99 -0
  116. package/.claude/skills/_template/templates/.gitkeep +0 -0
  117. package/.claude/skills/figma-analyzer/knowledge/anti-patterns.md +216 -0
  118. package/.claude/skills/figma-analyzer/knowledge/patterns.md +144 -0
  119. package/.claude/skills/figma-analyzer/skill.md +236 -0
  120. package/lib/installer.js +59 -19
  121. package/package.json +5 -1
@@ -0,0 +1,173 @@
1
+ # Guided Edit Mode
2
+
3
+ Step-by-step guided editing for multi-file changes.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Guided Edit solves the challenge of large refactors:
10
+ - **Visibility**: See exactly which files will change
11
+ - **Control**: Approve or reject each change individually
12
+ - **Safety**: No bulk changes without review
13
+ - **Persistence**: Resume interrupted sessions
14
+
15
+ ---
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Start a guided edit session
21
+ /wogi-guided-edit "rename Button to BaseButton"
22
+
23
+ # Review files one by one
24
+ # Use: approve / reject / skip for each file
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Use Cases
30
+
31
+ ### Large Refactors
32
+
33
+ Rename a component across many files:
34
+
35
+ ```bash
36
+ /wogi-guided-edit "rename UserService to UserManager"
37
+ ```
38
+
39
+ ### Library Upgrades
40
+
41
+ Update imports everywhere:
42
+
43
+ ```bash
44
+ /wogi-guided-edit "replace import { X } from 'old-lib' with import { X } from 'new-lib'"
45
+ ```
46
+
47
+ ### Code Cleanup
48
+
49
+ Find and review deprecated patterns:
50
+
51
+ ```bash
52
+ /wogi-guided-edit "find componentWillMount"
53
+ ```
54
+
55
+ ### Schema Changes
56
+
57
+ After modifying an entity, find all usages:
58
+
59
+ ```bash
60
+ /wogi-guided-edit "find UserEntity"
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Session Commands
66
+
67
+ Once a session starts:
68
+
69
+ | Command | Shortcut | Action |
70
+ |---------|----------|--------|
71
+ | `next` | `n` | Show next file to review |
72
+ | `approve` | `a`, `y` | Approve and apply changes |
73
+ | `reject` | `r` | Reject file, skip changes |
74
+ | `skip` | `s` | Skip for now |
75
+ | `status` | - | Show progress |
76
+ | `abort` | `q` | Cancel session |
77
+
78
+ ---
79
+
80
+ ## Workflow
81
+
82
+ ```
83
+ 1. Start Session
84
+ └── Analyze description (rename/replace/find)
85
+ └── Search codebase for matches
86
+ └── Show file list with match counts
87
+
88
+ 2. Review Loop
89
+ └── Show file with match locations
90
+ └── Show proposed diff (if replace)
91
+ └── Wait for: approve / reject / skip
92
+
93
+ 3. Complete
94
+ └── Show summary (approved/rejected/skipped)
95
+ └── Changes already applied to approved files
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Configuration
101
+
102
+ ```json
103
+ {
104
+ "guidedEdit": {
105
+ "enabled": true,
106
+ "sessionFile": ".workflow/state/guided-edit-session.json",
107
+ "extensions": ["ts", "tsx", "js", "jsx", "vue", "svelte"],
108
+ "srcDir": null // null = auto-detect (src/ or project root)
109
+ }
110
+ }
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Session Persistence
116
+
117
+ Progress is saved to `.workflow/state/guided-edit-session.json`:
118
+
119
+ ```json
120
+ {
121
+ "id": "ge-1704729600000",
122
+ "description": "rename Button to BaseButton",
123
+ "type": "rename",
124
+ "search": "Button",
125
+ "replace": "BaseButton",
126
+ "files": [
127
+ { "path": "src/components/Button.tsx", "status": "approved" },
128
+ { "path": "src/pages/Home.tsx", "status": "pending" }
129
+ ],
130
+ "currentIndex": 1,
131
+ "stats": { "approved": 1, "rejected": 0, "skipped": 0 }
132
+ }
133
+ ```
134
+
135
+ You can:
136
+ - Close Claude and resume later
137
+ - Run `status` to see where you left off
138
+ - Run `abort` to cancel and start fresh
139
+
140
+ ---
141
+
142
+ ## Pattern Recognition
143
+
144
+ The tool recognizes common patterns:
145
+
146
+ | Pattern | Type | Example |
147
+ |---------|------|---------|
148
+ | `rename X to Y` | rename | "rename Button to BaseButton" |
149
+ | `replace X with Y` | replace | "replace console.log with logger.debug" |
150
+ | `find X` | find | "find deprecated API" |
151
+ | `update X` | update | "update imports from old-lib" |
152
+
153
+ ---
154
+
155
+ ## CLI Usage
156
+
157
+ ```bash
158
+ # Via flow script
159
+ node scripts/flow-guided-edit.js start "description"
160
+ node scripts/flow-guided-edit.js next
161
+ node scripts/flow-guided-edit.js approve
162
+ node scripts/flow-guided-edit.js reject
163
+ node scripts/flow-guided-edit.js status
164
+ node scripts/flow-guided-edit.js abort
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Related
170
+
171
+ - [Code Traces](./code-traces.md) - Understanding code flow
172
+ - [Task Execution](../02-task-execution/) - Task workflow
173
+ - [Configuration](../configuration/all-options.md) - All options
@@ -0,0 +1,286 @@
1
+ # MCP Integrations
2
+
3
+ <!-- PINS: overview, figma-integration, context7-docs, lsp-integration, custom-servers, auto-search, troubleshooting -->
4
+
5
+ Connect external tools via Model Context Protocol servers.
6
+
7
+ ---
8
+
9
+ ## Overview
10
+ <!-- PIN: overview -->
11
+
12
+ MCP (Model Context Protocol) allows WogiFlow to:
13
+ - Connect to external services
14
+ - Access additional tools
15
+ - Extend functionality
16
+ - Integrate with IDEs
17
+
18
+ ---
19
+
20
+ ## Available Integrations
21
+
22
+ ### Figma MCP
23
+
24
+ Design-to-code integration:
25
+
26
+ ```json
27
+ {
28
+ "figmaAnalyzer": {
29
+ "mcpServer": {
30
+ "port": 3847,
31
+ "autoStart": false
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### Context7 Documentation
38
+
39
+ Library documentation lookup:
40
+
41
+ ```bash
42
+ # Find library ID
43
+ mcp-find "react hooks"
44
+
45
+ # Get documentation
46
+ mcp-get-library-docs "/vercel/next.js" --topic "routing"
47
+ ```
48
+
49
+ ### Custom Servers
50
+
51
+ Configure additional MCP servers in Claude settings.
52
+
53
+ ---
54
+
55
+ ## Using MCP Tools
56
+
57
+ ### List Available Tools
58
+
59
+ ```bash
60
+ mcp-find "search query"
61
+ ```
62
+
63
+ ### Add a Server
64
+
65
+ ```bash
66
+ mcp-add server-name
67
+ ```
68
+
69
+ ### Enable/Disable Servers
70
+
71
+ Use Claude Code's MCP commands to manage servers:
72
+
73
+ ```bash
74
+ # Enable a server
75
+ /mcp enable <server-name>
76
+
77
+ # Disable a server
78
+ /mcp disable <server-name>
79
+
80
+ # List all servers
81
+ /mcp list
82
+ ```
83
+
84
+ > **Note**: The @-mention syntax for enabling/disabling MCP servers has been removed. Use `/mcp enable <name>` instead.
85
+
86
+ ### MCP Tool Auto-Search Mode (Claude Code 2.1.7+)
87
+ <!-- PIN: auto-search -->
88
+
89
+ Claude Code automatically manages MCP tools to optimize context usage:
90
+
91
+ - **When enabled**: If MCP tool descriptions exceed 10% of the context window, tools are automatically deferred
92
+ - **Discovery**: Deferred tools are discovered via the `MCPSearch` tool instead of being loaded upfront
93
+ - **Default**: Enabled by default for all users
94
+
95
+ **Implications for WogiFlow users:**
96
+ - Keep tool descriptions concise (under 100 words recommended)
97
+ - Tools with verbose descriptions may not appear in initial tool list
98
+ - Use `MCPSearch` to find deferred tools when needed
99
+
100
+ **To disable** (not recommended):
101
+ ```json
102
+ // In Claude Code settings
103
+ {
104
+ "disallowedTools": ["MCPSearch"]
105
+ }
106
+ ```
107
+
108
+ **Best practice**: Design MCP tool descriptions to be concise and searchable. Front-load the most important keywords.
109
+
110
+ ### Configure Server
111
+
112
+ ```bash
113
+ mcp-config-set server-name {config}
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Figma Integration
119
+ <!-- PIN: figma-integration -->
120
+
121
+ ### Setup
122
+
123
+ 1. Configure MCP server:
124
+ ```json
125
+ {
126
+ "figmaAnalyzer": {
127
+ "mcpServer": {
128
+ "port": 3847,
129
+ "autoStart": true
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ 2. Install Figma plugin (if available)
136
+
137
+ 3. Connect to server
138
+
139
+ ### Commands
140
+
141
+ | Command | Purpose |
142
+ |---------|---------|
143
+ | `figma-analyze` | Analyze frame |
144
+ | `figma-export` | Export assets |
145
+ | `figma-compare` | Compare to code |
146
+
147
+ ---
148
+
149
+ ## Documentation Integration
150
+ <!-- PIN: context7-docs -->
151
+
152
+ ### Context7 Lookup
153
+
154
+ ```bash
155
+ # Find library
156
+ mcp-resolve-library-id "react"
157
+
158
+ # Get docs
159
+ mcp-get-library-docs "/facebook/react" --topic "hooks"
160
+ ```
161
+
162
+ ### Automatic Docs
163
+
164
+ With `skillLearning.fetchOfficialDocs`:
165
+
166
+ ```json
167
+ {
168
+ "skillLearning": {
169
+ "fetchOfficialDocs": true,
170
+ "officialDocsUrls": {
171
+ "react": "https://react.dev"
172
+ }
173
+ }
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## LSP Integration
180
+ <!-- PIN: lsp-integration -->
181
+
182
+ Language Server Protocol for type information:
183
+
184
+ ```json
185
+ {
186
+ "lsp": {
187
+ "enabled": true,
188
+ "server": "typescript-language-server",
189
+ "timeout": 5000,
190
+ "cacheTypes": true
191
+ }
192
+ }
193
+ ```
194
+
195
+ ### Benefits
196
+
197
+ - Type-aware completions
198
+ - Import suggestions
199
+ - Error detection
200
+ - Go-to-definition
201
+
202
+ ---
203
+
204
+ ## Building Custom MCP Servers
205
+ <!-- PIN: custom-servers -->
206
+
207
+ ### Code Mode
208
+
209
+ Create JavaScript tools combining multiple servers:
210
+
211
+ ```bash
212
+ mcp-code-mode --servers "figma,context7" --name "design-docs"
213
+ ```
214
+
215
+ ### Server Structure
216
+
217
+ ```javascript
218
+ // Custom MCP server
219
+ module.exports = {
220
+ name: "my-server",
221
+ tools: {
222
+ "my-tool": {
223
+ description: "Does something useful",
224
+ parameters: {...},
225
+ handler: async (params) => {
226
+ // Implementation
227
+ }
228
+ }
229
+ }
230
+ };
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Resource Access
236
+
237
+ Read resources from MCP servers:
238
+
239
+ ```bash
240
+ # List resources
241
+ mcp-list-resources
242
+
243
+ # Read resource
244
+ mcp-read-resource "server-name" "resource://path"
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Best Practices
250
+
251
+ 1. **Start with Built-in**: Use provided integrations first
252
+ 2. **Configure Once**: Set up profiles for common configs
253
+ 3. **Check Availability**: Verify server is running
254
+ 4. **Cache Wisely**: Enable caching for slow services
255
+ 5. **Security**: Don't expose sensitive servers publicly
256
+
257
+ ---
258
+
259
+ ## Troubleshooting
260
+ <!-- PIN: troubleshooting -->
261
+
262
+ ### Server Not Responding
263
+
264
+ - Check server is running
265
+ - Verify port is correct
266
+ - Check firewall settings
267
+
268
+ ### Tool Not Found
269
+
270
+ - Ensure server is added
271
+ - Check tool name spelling
272
+ - Verify server supports the tool
273
+
274
+ ### Timeout Errors
275
+
276
+ - Increase timeout settings
277
+ - Check network connectivity
278
+ - Verify server performance
279
+
280
+ ---
281
+
282
+ ## Related
283
+
284
+ - [Figma Analyzer](./figma-analyzer.md) - Design integration
285
+ - [Configuration](../configuration/all-options.md) - All settings
286
+ - [Hybrid Mode](../02-task-execution/02-execution-loop.md#hybrid-mode) - Local LLM execution
@@ -0,0 +1,153 @@
1
+ # Safety & Guardrails
2
+
3
+ Protecting your codebase from mistakes.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ Safety features prevent:
10
+ - Accidental destructive changes
11
+ - Security vulnerabilities
12
+ - Lost work
13
+ - Unreviewed commits
14
+
15
+ ---
16
+
17
+ ## Features
18
+
19
+ | Feature | Purpose |
20
+ |---------|---------|
21
+ | [Damage Control](./damage-control.md) | Pattern-based protection |
22
+ | [Security Scanning](./security-scanning.md) | Pre-commit security checks |
23
+ | [Checkpoint/Rollback](./checkpoint-rollback.md) | Recovery system |
24
+ | [Commit Gates](./commit-gates.md) | Approval workflow |
25
+
26
+ ---
27
+
28
+ ## Quick Start
29
+
30
+ ### Enable Damage Control
31
+
32
+ ```json
33
+ {
34
+ "damageControl": {
35
+ "enabled": true,
36
+ "onBlock": "error"
37
+ }
38
+ }
39
+ ```
40
+
41
+ ### Enable Security Scanning
42
+
43
+ ```json
44
+ {
45
+ "security": {
46
+ "scanBeforeCommit": true,
47
+ "blockOnHigh": true
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Enable Checkpoints
53
+
54
+ ```json
55
+ {
56
+ "checkpoint": {
57
+ "enabled": true,
58
+ "interval": 5
59
+ }
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Key Configuration
66
+
67
+ ```json
68
+ {
69
+ "damageControl": {
70
+ "enabled": false,
71
+ "patternsFile": ".workflow/damage-control.yaml",
72
+ "onBlock": "error",
73
+ "onAsk": "prompt",
74
+ "logging": true
75
+ },
76
+ "security": {
77
+ "scanBeforeCommit": true,
78
+ "blockOnHigh": true,
79
+ "checkPatterns": {
80
+ "secrets": true,
81
+ "injection": true,
82
+ "npmAudit": true
83
+ }
84
+ },
85
+ "checkpoint": {
86
+ "enabled": true,
87
+ "interval": 5,
88
+ "maxCheckpoints": 20,
89
+ "autoCommit": true
90
+ }
91
+ }
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Protection Layers
97
+
98
+ ```
99
+ ┌─────────────────────────────────────────────────────────────┐
100
+ │ PROTECTION LAYERS │
101
+ ├─────────────────────────────────────────────────────────────┤
102
+ │ │
103
+ │ Layer 1: Damage Control │
104
+ │ ├── Block destructive commands │
105
+ │ ├── Require approval for risky ops │
106
+ │ └── Log suspicious activity │
107
+ │ │
108
+ │ Layer 2: Security Scanning │
109
+ │ ├── Detect secrets in code │
110
+ │ ├── Find injection vulnerabilities │
111
+ │ └── Check npm audit │
112
+ │ │
113
+ │ Layer 3: Checkpoints │
114
+ │ ├── Periodic snapshots │
115
+ │ ├── Git commits │
116
+ │ └── State backups │
117
+ │ │
118
+ │ Layer 4: Commit Gates │
119
+ │ ├── Approval workflow │
120
+ │ ├── Quality gates │
121
+ │ └── Review requirements │
122
+ │ │
123
+ └─────────────────────────────────────────────────────────────┘
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Commands
129
+
130
+ | Command | Purpose |
131
+ |---------|---------|
132
+ | `flow checkpoint create` | Manual checkpoint |
133
+ | `flow checkpoint rollback` | Restore checkpoint |
134
+ | `flow checkpoint list` | View checkpoints |
135
+ | `flow security scan` | Manual security scan |
136
+
137
+ ---
138
+
139
+ ## Best Practices
140
+
141
+ 1. **Enable Damage Control**: For production projects
142
+ 2. **Regular Checkpoints**: Before risky operations
143
+ 3. **Security Scan Always**: Block high-severity issues
144
+ 4. **Review Before Commit**: Use approval workflow
145
+ 5. **Keep Backup Checkpoints**: Don't rely on just git
146
+
147
+ ---
148
+
149
+ ## Related
150
+
151
+ - [Task Execution](../02-task-execution/) - Where gates apply
152
+ - [Verification](../02-task-execution/03-verification.md) - Quality gates
153
+ - [Configuration](../configuration/all-options.md) - All settings