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.
- package/.claude/commands/wogi-bug.md +43 -0
- package/.claude/commands/wogi-bulk.md +144 -0
- package/.claude/commands/wogi-changelog.md +36 -0
- package/.claude/commands/wogi-compact.md +99 -0
- package/.claude/commands/wogi-config.md +50 -0
- package/.claude/commands/wogi-context.md +68 -0
- package/.claude/commands/wogi-correction.md +73 -0
- package/.claude/commands/wogi-debt.md +128 -0
- package/.claude/commands/wogi-deps.md +32 -0
- package/.claude/commands/wogi-epics.md +145 -0
- package/.claude/commands/wogi-export.md +100 -0
- package/.claude/commands/wogi-feature.md +149 -0
- package/.claude/commands/wogi-guided-edit.md +83 -0
- package/.claude/commands/wogi-health.md +43 -0
- package/.claude/commands/wogi-help.md +96 -0
- package/.claude/commands/wogi-hybrid-edit.md +36 -0
- package/.claude/commands/wogi-hybrid-off.md +24 -0
- package/.claude/commands/wogi-hybrid-setup.md +79 -0
- package/.claude/commands/wogi-hybrid-status.md +45 -0
- package/.claude/commands/wogi-hybrid.md +54 -0
- package/.claude/commands/wogi-import.md +44 -0
- package/.claude/commands/wogi-init.md +618 -0
- package/.claude/commands/wogi-log.md +38 -0
- package/.claude/commands/wogi-map-add.md +29 -0
- package/.claude/commands/wogi-map-check.md +35 -0
- package/.claude/commands/wogi-map-index.md +98 -0
- package/.claude/commands/wogi-map-scan.md +38 -0
- package/.claude/commands/wogi-map-sync.md +91 -0
- package/.claude/commands/wogi-map.md +33 -0
- package/.claude/commands/wogi-morning.md +65 -0
- package/.claude/commands/wogi-onboard.md +99 -0
- package/.claude/commands/wogi-plan.md +173 -0
- package/.claude/commands/wogi-ready.md +84 -0
- package/.claude/commands/wogi-resume.md +95 -0
- package/.claude/commands/wogi-review.md +636 -0
- package/.claude/commands/wogi-roadmap.md +241 -0
- package/.claude/commands/wogi-rules.md +104 -0
- package/.claude/commands/wogi-search.md +33 -0
- package/.claude/commands/wogi-session-end.md +49 -0
- package/.claude/commands/wogi-setup-stack.md +151 -0
- package/.claude/commands/wogi-skill-learn.md +66 -0
- package/.claude/commands/wogi-skills.md +87 -0
- package/.claude/commands/wogi-standup.md +28 -0
- package/.claude/commands/wogi-start.md +465 -0
- package/.claude/commands/wogi-status.md +41 -0
- package/.claude/commands/wogi-statusline-setup/skill.md +109 -0
- package/.claude/commands/wogi-story.md +98 -0
- package/.claude/commands/wogi-suspend.md +87 -0
- package/.claude/commands/wogi-test-browser.md +43 -0
- package/.claude/commands/wogi-trace.md +198 -0
- package/.claude/docs/architecture.md +37 -0
- package/.claude/docs/commands.md +343 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/README.md +177 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/component-indexing.md +341 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/framework-detection.md +269 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/installation.md +146 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/onboarding-existing.md +317 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/team-setup.md +346 -0
- package/.claude/docs/knowledge-base/02-task-execution/01-task-planning.md +259 -0
- package/.claude/docs/knowledge-base/02-task-execution/02-execution-loop.md +443 -0
- package/.claude/docs/knowledge-base/02-task-execution/03-verification.md +417 -0
- package/.claude/docs/knowledge-base/02-task-execution/04-completion.md +374 -0
- package/.claude/docs/knowledge-base/02-task-execution/05-session-review.md +170 -0
- package/.claude/docs/knowledge-base/02-task-execution/README.md +173 -0
- package/.claude/docs/knowledge-base/02-task-execution/external-integrations.md +133 -0
- package/.claude/docs/knowledge-base/02-task-execution/model-management.md +202 -0
- package/.claude/docs/knowledge-base/02-task-execution/specification-mode.md +292 -0
- package/.claude/docs/knowledge-base/02-task-execution/sync-daemon.md +96 -0
- package/.claude/docs/knowledge-base/02-task-execution/trade-offs.md +345 -0
- package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +357 -0
- package/.claude/docs/knowledge-base/03-self-improvement/README.md +199 -0
- package/.claude/docs/knowledge-base/03-self-improvement/long-input-processing.md +160 -0
- package/.claude/docs/knowledge-base/03-self-improvement/model-learning.md +334 -0
- package/.claude/docs/knowledge-base/03-self-improvement/project-learning.md +301 -0
- package/.claude/docs/knowledge-base/03-self-improvement/skill-learning.md +372 -0
- package/.claude/docs/knowledge-base/03-self-improvement/skill-matching.md +304 -0
- package/.claude/docs/knowledge-base/03-self-improvement/team-learning.md +342 -0
- package/.claude/docs/knowledge-base/04-memory-context/README.md +189 -0
- package/.claude/docs/knowledge-base/04-memory-context/context-management.md +308 -0
- package/.claude/docs/knowledge-base/04-memory-context/memory-commands.md +176 -0
- package/.claude/docs/knowledge-base/04-memory-context/memory-systems.md +359 -0
- package/.claude/docs/knowledge-base/04-memory-context/prd-management.md +115 -0
- package/.claude/docs/knowledge-base/04-memory-context/session-persistence.md +359 -0
- package/.claude/docs/knowledge-base/04-memory-context/team-history.md +317 -0
- package/.claude/docs/knowledge-base/05-development-tools/README.md +84 -0
- package/.claude/docs/knowledge-base/05-development-tools/code-traces.md +278 -0
- package/.claude/docs/knowledge-base/05-development-tools/figma-analyzer.md +253 -0
- package/.claude/docs/knowledge-base/05-development-tools/guided-edit.md +173 -0
- package/.claude/docs/knowledge-base/05-development-tools/mcp-integrations.md +286 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/README.md +153 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/checkpoint-rollback.md +302 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/commit-gates.md +309 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/damage-control.md +292 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/security-scanning.md +291 -0
- package/.claude/docs/knowledge-base/README.md +92 -0
- package/.claude/docs/knowledge-base/configuration/README.md +228 -0
- package/.claude/docs/knowledge-base/configuration/all-options.md +1632 -0
- package/.claude/docs/knowledge-base/future-features.md +277 -0
- package/.claude/docs/stack.md +25 -0
- package/.claude/docs/testing.md +71 -0
- package/.claude/rules/README.md +60 -0
- package/.claude/rules/architecture/component-reuse.md +38 -0
- package/.claude/rules/architecture/document-structure.md +76 -0
- package/.claude/rules/architecture/feature-refactoring-cleanup.md +87 -0
- package/.claude/rules/architecture/model-management.md +35 -0
- package/.claude/rules/code-style/naming-conventions.md +55 -0
- package/.claude/rules/security/security-patterns.md +116 -0
- package/.claude/skills/.gitkeep +0 -0
- package/.claude/skills/README.md +131 -0
- package/.claude/skills/_template/commands/.gitkeep +0 -0
- package/.claude/skills/_template/knowledge/anti-patterns.md +49 -0
- package/.claude/skills/_template/knowledge/learnings.md +60 -0
- package/.claude/skills/_template/knowledge/patterns.md +45 -0
- package/.claude/skills/_template/rules/.gitkeep +0 -0
- package/.claude/skills/_template/skill.md +99 -0
- package/.claude/skills/_template/templates/.gitkeep +0 -0
- package/.claude/skills/figma-analyzer/knowledge/anti-patterns.md +216 -0
- package/.claude/skills/figma-analyzer/knowledge/patterns.md +144 -0
- package/.claude/skills/figma-analyzer/skill.md +236 -0
- package/lib/installer.js +59 -19
- package/package.json +5 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Damage Control
|
|
2
|
+
|
|
3
|
+
Pattern-based protection against destructive operations.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Damage control prevents:
|
|
10
|
+
- Accidental file deletions
|
|
11
|
+
- Destructive git operations
|
|
12
|
+
- Dangerous system commands
|
|
13
|
+
- Configuration overwrites
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"damageControl": {
|
|
22
|
+
"enabled": false,
|
|
23
|
+
"patternsFile": ".workflow/damage-control.yaml",
|
|
24
|
+
"promptHook": {
|
|
25
|
+
"enabled": false,
|
|
26
|
+
"model": "haiku",
|
|
27
|
+
"timeout": 5000,
|
|
28
|
+
"skipSafeCommands": true
|
|
29
|
+
},
|
|
30
|
+
"onBlock": "error",
|
|
31
|
+
"onAsk": "prompt",
|
|
32
|
+
"logging": true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Pattern File
|
|
40
|
+
|
|
41
|
+
Define patterns in `.workflow/damage-control.yaml`:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
# Damage Control Patterns
|
|
45
|
+
|
|
46
|
+
block:
|
|
47
|
+
# Block destructive git commands
|
|
48
|
+
- pattern: "git push.*--force"
|
|
49
|
+
message: "Force push is blocked. Use --force-with-lease instead."
|
|
50
|
+
|
|
51
|
+
# Block mass deletions
|
|
52
|
+
- pattern: "rm -rf /"
|
|
53
|
+
message: "Root deletion is always blocked."
|
|
54
|
+
|
|
55
|
+
- pattern: "rm -rf \\*"
|
|
56
|
+
message: "Wildcard deletion requires explicit approval."
|
|
57
|
+
|
|
58
|
+
# Block config overwrites
|
|
59
|
+
- pattern: "config\\.json.*--overwrite"
|
|
60
|
+
message: "Config overwrite requires approval."
|
|
61
|
+
|
|
62
|
+
ask:
|
|
63
|
+
# Require confirmation for these
|
|
64
|
+
- pattern: "git reset --hard"
|
|
65
|
+
message: "Hard reset will lose uncommitted changes. Continue?"
|
|
66
|
+
|
|
67
|
+
- pattern: "drop.*table"
|
|
68
|
+
message: "Dropping database table. Are you sure?"
|
|
69
|
+
|
|
70
|
+
- pattern: "rm -rf node_modules"
|
|
71
|
+
message: "Removing node_modules. Reinstall will be needed."
|
|
72
|
+
|
|
73
|
+
allow:
|
|
74
|
+
# Explicitly allow safe patterns
|
|
75
|
+
- pattern: "git push origin"
|
|
76
|
+
- pattern: "rm -rf dist"
|
|
77
|
+
- pattern: "rm -rf build"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## How It Works
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Command Detected
|
|
86
|
+
↓
|
|
87
|
+
┌─────────────────────────────────────────┐
|
|
88
|
+
│ Check against block patterns │
|
|
89
|
+
├─────────────────────────────────────────┤
|
|
90
|
+
│ Match? → Block with error │
|
|
91
|
+
└─────────────────────────────────────────┘
|
|
92
|
+
↓
|
|
93
|
+
┌─────────────────────────────────────────┐
|
|
94
|
+
│ Check against ask patterns │
|
|
95
|
+
├─────────────────────────────────────────┤
|
|
96
|
+
│ Match? → Prompt for confirmation │
|
|
97
|
+
└─────────────────────────────────────────┘
|
|
98
|
+
↓
|
|
99
|
+
┌─────────────────────────────────────────┐
|
|
100
|
+
│ Check against allow patterns │
|
|
101
|
+
├─────────────────────────────────────────┤
|
|
102
|
+
│ Match? → Allow immediately │
|
|
103
|
+
└─────────────────────────────────────────┘
|
|
104
|
+
↓
|
|
105
|
+
Execute command
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Actions
|
|
111
|
+
|
|
112
|
+
### Block
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"onBlock": "error" // Options: "error" | "warn" | "log"
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
| Setting | Behavior |
|
|
121
|
+
|---------|----------|
|
|
122
|
+
| `error` | Stop execution, show error |
|
|
123
|
+
| `warn` | Show warning, continue |
|
|
124
|
+
| `log` | Log silently, continue |
|
|
125
|
+
|
|
126
|
+
### Ask
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"onAsk": "prompt" // Options: "prompt" | "block" | "allow"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
| Setting | Behavior |
|
|
135
|
+
|---------|----------|
|
|
136
|
+
| `prompt` | Ask user for confirmation |
|
|
137
|
+
| `block` | Treat ask patterns as blocks |
|
|
138
|
+
| `allow` | Treat ask patterns as allowed |
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Prompt Hook
|
|
143
|
+
|
|
144
|
+
For advanced protection, enable AI-powered review:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"damageControl": {
|
|
149
|
+
"promptHook": {
|
|
150
|
+
"enabled": true,
|
|
151
|
+
"model": "haiku", // Fast model for quick checks
|
|
152
|
+
"timeout": 5000, // Max wait time
|
|
153
|
+
"skipSafeCommands": true // Skip obvious safe commands
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### How Prompt Hook Works
|
|
160
|
+
|
|
161
|
+
1. Command intercepted
|
|
162
|
+
2. Sent to AI for risk assessment
|
|
163
|
+
3. AI returns: safe, risky, or blocked
|
|
164
|
+
4. Action taken based on result
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Common Patterns
|
|
169
|
+
|
|
170
|
+
### Git Protection
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
block:
|
|
174
|
+
- pattern: "git push.*--force$"
|
|
175
|
+
message: "Use --force-with-lease for safer force push"
|
|
176
|
+
|
|
177
|
+
- pattern: "git reset --hard HEAD~[0-9]+"
|
|
178
|
+
message: "Multiple commit reset blocked"
|
|
179
|
+
|
|
180
|
+
ask:
|
|
181
|
+
- pattern: "git reset --hard"
|
|
182
|
+
- pattern: "git clean -fd"
|
|
183
|
+
- pattern: "git checkout -- \\."
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### File Protection
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
block:
|
|
190
|
+
- pattern: "rm -rf /$"
|
|
191
|
+
- pattern: "rm -rf ~"
|
|
192
|
+
- pattern: "> /dev/sd"
|
|
193
|
+
|
|
194
|
+
ask:
|
|
195
|
+
- pattern: "rm -rf"
|
|
196
|
+
- pattern: "chmod 777"
|
|
197
|
+
- pattern: "chown -R"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Database Protection
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
block:
|
|
204
|
+
- pattern: "DROP DATABASE"
|
|
205
|
+
- pattern: "TRUNCATE.*CASCADE"
|
|
206
|
+
|
|
207
|
+
ask:
|
|
208
|
+
- pattern: "DROP TABLE"
|
|
209
|
+
- pattern: "DELETE FROM.*WHERE 1"
|
|
210
|
+
- pattern: "UPDATE.*SET.*WHERE 1"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Logging
|
|
216
|
+
|
|
217
|
+
When `logging` is enabled:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
.workflow/logs/damage-control.log
|
|
221
|
+
|
|
222
|
+
2024-01-15 10:30:00 | BLOCKED | git push --force | Force push blocked
|
|
223
|
+
2024-01-15 10:31:00 | ASKED | rm -rf dist | User approved
|
|
224
|
+
2024-01-15 10:32:00 | ALLOWED | git push origin | Safe pattern
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Integration with Auto-Inference
|
|
230
|
+
|
|
231
|
+
Damage control can work with auto-inference verification:
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"damageControl": {
|
|
236
|
+
"enabled": true,
|
|
237
|
+
"integrateWithVerification": true
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Commands run during verification are also checked.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Best Practices
|
|
247
|
+
|
|
248
|
+
1. **Start Conservative**: Block more, ask for the rest
|
|
249
|
+
2. **Customize Patterns**: Add project-specific dangers
|
|
250
|
+
3. **Review Logs**: Check what's being caught
|
|
251
|
+
4. **Whitelist Safe Ops**: Avoid prompt fatigue
|
|
252
|
+
5. **Test Patterns**: Verify regex matches correctly
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Troubleshooting
|
|
257
|
+
|
|
258
|
+
### Pattern Not Matching
|
|
259
|
+
|
|
260
|
+
Test regex:
|
|
261
|
+
```bash
|
|
262
|
+
echo "git push --force" | grep -E "git push.*--force"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Too Many Prompts
|
|
266
|
+
|
|
267
|
+
Add common safe operations to allow:
|
|
268
|
+
```yaml
|
|
269
|
+
allow:
|
|
270
|
+
- pattern: "npm install"
|
|
271
|
+
- pattern: "npm run build"
|
|
272
|
+
- pattern: "git status"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Blocking Safe Commands
|
|
276
|
+
|
|
277
|
+
Check pattern specificity:
|
|
278
|
+
```yaml
|
|
279
|
+
# Too broad:
|
|
280
|
+
- pattern: "rm"
|
|
281
|
+
|
|
282
|
+
# Better:
|
|
283
|
+
- pattern: "rm -rf /"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Related
|
|
289
|
+
|
|
290
|
+
- [Security Scanning](./security-scanning.md) - Code security
|
|
291
|
+
- [Checkpoint/Rollback](./checkpoint-rollback.md) - Recovery
|
|
292
|
+
- [Configuration](../configuration/all-options.md) - All settings
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# Security Scanning
|
|
2
|
+
|
|
3
|
+
Pre-commit security checks for vulnerabilities.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Security scanning detects:
|
|
10
|
+
- Hardcoded secrets
|
|
11
|
+
- SQL/XSS injection patterns
|
|
12
|
+
- Known npm vulnerabilities
|
|
13
|
+
- Sensitive data exposure
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"security": {
|
|
22
|
+
"scanBeforeCommit": true,
|
|
23
|
+
"blockOnHigh": true,
|
|
24
|
+
"checkPatterns": {
|
|
25
|
+
"secrets": true,
|
|
26
|
+
"injection": true,
|
|
27
|
+
"npmAudit": true
|
|
28
|
+
},
|
|
29
|
+
"ignoreFiles": ["*.test.ts", "*.spec.ts"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Scan Types
|
|
37
|
+
|
|
38
|
+
### Secrets Detection
|
|
39
|
+
|
|
40
|
+
Finds hardcoded credentials:
|
|
41
|
+
|
|
42
|
+
| Pattern | Example |
|
|
43
|
+
|---------|---------|
|
|
44
|
+
| API Keys | `api_key: "sk-..."` |
|
|
45
|
+
| Passwords | `password = "secret123"` |
|
|
46
|
+
| Tokens | `AUTH_TOKEN=eyJhbG...` |
|
|
47
|
+
| Private Keys | `-----BEGIN RSA PRIVATE KEY-----` |
|
|
48
|
+
|
|
49
|
+
### Injection Patterns
|
|
50
|
+
|
|
51
|
+
Detects vulnerable code:
|
|
52
|
+
|
|
53
|
+
| Type | Example |
|
|
54
|
+
|------|---------|
|
|
55
|
+
| SQL Injection | `query("SELECT * FROM users WHERE id=" + userId)` |
|
|
56
|
+
| XSS | `innerHTML = userInput` |
|
|
57
|
+
| Command Injection | `exec(userInput)` |
|
|
58
|
+
|
|
59
|
+
### NPM Audit
|
|
60
|
+
|
|
61
|
+
Checks dependencies for known vulnerabilities:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm audit --production
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## When Scans Run
|
|
70
|
+
|
|
71
|
+
| Trigger | Condition |
|
|
72
|
+
|---------|-----------|
|
|
73
|
+
| Before Commit | `scanBeforeCommit: true` |
|
|
74
|
+
| Quality Gates | `security` in qualityGates |
|
|
75
|
+
| Manual | `flow security scan` |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Scan Results
|
|
80
|
+
|
|
81
|
+
### Clean Scan
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Security scan results:
|
|
85
|
+
✓ No secrets detected
|
|
86
|
+
✓ No injection patterns found
|
|
87
|
+
✓ npm audit: 0 vulnerabilities
|
|
88
|
+
|
|
89
|
+
All checks passed!
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Issues Found
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Security scan results:
|
|
96
|
+
|
|
97
|
+
⚠️ Potential secret detected:
|
|
98
|
+
src/config.ts:15
|
|
99
|
+
const API_KEY = "sk-abc123..."
|
|
100
|
+
|
|
101
|
+
⚠️ SQL injection pattern:
|
|
102
|
+
src/services/UserService.ts:42
|
|
103
|
+
const query = "SELECT * FROM users WHERE id=" + id;
|
|
104
|
+
|
|
105
|
+
❌ npm audit: 3 vulnerabilities
|
|
106
|
+
2 moderate, 1 high
|
|
107
|
+
Run: npm audit fix
|
|
108
|
+
|
|
109
|
+
Block commit? Yes (blockOnHigh: true)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Severity Levels
|
|
115
|
+
|
|
116
|
+
| Level | Blocking | Description |
|
|
117
|
+
|-------|----------|-------------|
|
|
118
|
+
| Critical | Always | Severe vulnerability |
|
|
119
|
+
| High | If `blockOnHigh` | Significant risk |
|
|
120
|
+
| Moderate | Warning | Should fix |
|
|
121
|
+
| Low | Info | Minor issue |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Ignoring Files
|
|
126
|
+
|
|
127
|
+
Exclude test files and other non-production code:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"security": {
|
|
132
|
+
"ignoreFiles": [
|
|
133
|
+
"*.test.ts",
|
|
134
|
+
"*.spec.ts",
|
|
135
|
+
"*.mock.ts",
|
|
136
|
+
"fixtures/*",
|
|
137
|
+
"cypress/*"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## False Positives
|
|
146
|
+
|
|
147
|
+
### Inline Ignore
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
// security-ignore: example API key for tests
|
|
151
|
+
const EXAMPLE_KEY = "sk-example-not-real";
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Pattern Whitelist
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"security": {
|
|
159
|
+
"whitelist": [
|
|
160
|
+
"EXAMPLE_KEY",
|
|
161
|
+
"TEST_TOKEN"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Custom Patterns
|
|
170
|
+
|
|
171
|
+
Add project-specific patterns:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"security": {
|
|
176
|
+
"customPatterns": [
|
|
177
|
+
{
|
|
178
|
+
"name": "internal-token",
|
|
179
|
+
"pattern": "INTERNAL_.*=\\w{32,}",
|
|
180
|
+
"severity": "high",
|
|
181
|
+
"message": "Internal token should not be hardcoded"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Fixing Issues
|
|
191
|
+
|
|
192
|
+
### Secrets
|
|
193
|
+
|
|
194
|
+
Replace with environment variables:
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
// Before
|
|
198
|
+
const API_KEY = "sk-abc123...";
|
|
199
|
+
|
|
200
|
+
// After
|
|
201
|
+
const API_KEY = process.env.API_KEY;
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### SQL Injection
|
|
205
|
+
|
|
206
|
+
Use parameterized queries:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
// Before
|
|
210
|
+
const query = "SELECT * FROM users WHERE id=" + id;
|
|
211
|
+
|
|
212
|
+
// After
|
|
213
|
+
const query = "SELECT * FROM users WHERE id = ?";
|
|
214
|
+
db.query(query, [id]);
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### NPM Vulnerabilities
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Auto-fix
|
|
221
|
+
npm audit fix
|
|
222
|
+
|
|
223
|
+
# Force fix (may include breaking changes)
|
|
224
|
+
npm audit fix --force
|
|
225
|
+
|
|
226
|
+
# Manual update
|
|
227
|
+
npm update vulnerable-package
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Integration with CI/CD
|
|
233
|
+
|
|
234
|
+
Run scans in pipeline:
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
# .github/workflows/security.yml
|
|
238
|
+
- name: Security Scan
|
|
239
|
+
run: ./scripts/flow security scan --ci
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### CI Mode
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
flow security scan --ci
|
|
246
|
+
|
|
247
|
+
# Exit code 1 if high severity found
|
|
248
|
+
# JSON output for parsing
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Best Practices
|
|
254
|
+
|
|
255
|
+
1. **Scan Before Commit**: Catch issues early
|
|
256
|
+
2. **Block on High**: Don't let serious issues through
|
|
257
|
+
3. **Update Dependencies**: Run npm audit regularly
|
|
258
|
+
4. **Use .env Files**: Never commit secrets
|
|
259
|
+
5. **Review False Positives**: Update whitelist
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Troubleshooting
|
|
264
|
+
|
|
265
|
+
### Too Many False Positives
|
|
266
|
+
|
|
267
|
+
- Add to ignoreFiles
|
|
268
|
+
- Update whitelist
|
|
269
|
+
- Use inline ignores
|
|
270
|
+
|
|
271
|
+
### Scan Too Slow
|
|
272
|
+
|
|
273
|
+
- Reduce files scanned
|
|
274
|
+
- Disable npmAudit for each commit
|
|
275
|
+
- Run full scan on CI only
|
|
276
|
+
|
|
277
|
+
### npm audit Fails
|
|
278
|
+
|
|
279
|
+
Check npm is installed and node_modules exists:
|
|
280
|
+
```bash
|
|
281
|
+
npm install
|
|
282
|
+
npm audit
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Related
|
|
288
|
+
|
|
289
|
+
- [Damage Control](./damage-control.md) - Command protection
|
|
290
|
+
- [Commit Gates](./commit-gates.md) - Approval workflow
|
|
291
|
+
- [Quality Gates](../02-task-execution/03-verification.md) - Verification
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# WogiFlow Knowledge Base
|
|
2
|
+
|
|
3
|
+
Welcome to the comprehensive knowledge base for WogiFlow, an AI workflow framework that ensures structured, high-quality code execution.
|
|
4
|
+
|
|
5
|
+
## Quick Navigation
|
|
6
|
+
|
|
7
|
+
| Category | Purpose | Start Here |
|
|
8
|
+
|----------|---------|------------|
|
|
9
|
+
| [Setup & Onboarding](./01-setup-onboarding/) | Initial setup, codebase analysis, populating workflow files | [Installation](./01-setup-onboarding/installation.md) |
|
|
10
|
+
| [Task Execution](./02-task-execution/) | The `/wogi-start` pipeline - how tasks are enforced and completed | [Execution Flow](./02-task-execution/README.md) |
|
|
11
|
+
| [Self-Improvement](./03-self-improvement/) | How WogiFlow learns and improves over time | [Learning Overview](./03-self-improvement/README.md) |
|
|
12
|
+
| [Memory & Context](./04-memory-context/) | Preventing hallucinations, managing context, session persistence | [Context Management](./04-memory-context/context-management.md) |
|
|
13
|
+
| [Development Tools](./05-development-tools/) | Figma analyzer, code traces, MCP integrations | [Tools Overview](./05-development-tools/README.md) |
|
|
14
|
+
| [Safety & Guardrails](./06-safety-guardrails/) | Damage control, security scanning, checkpoint/rollback | [Safety Overview](./06-safety-guardrails/README.md) |
|
|
15
|
+
| [Configuration](./configuration/) | Complete reference for all 200+ config options | [All Options](./configuration/all-options.md) |
|
|
16
|
+
| [Future Features](./future-features.md) | Roadmap and planned features | [Roadmap](./future-features.md) |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### Install
|
|
23
|
+
```bash
|
|
24
|
+
npm install wogiflow
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Analyze Existing Project
|
|
28
|
+
```bash
|
|
29
|
+
npx flow onboard
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Start Working
|
|
33
|
+
```bash
|
|
34
|
+
/wogi-ready # See available tasks
|
|
35
|
+
/wogi-start TASK-XXX # Start a task
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## How This Knowledge Base Is Organized
|
|
41
|
+
|
|
42
|
+
Unlike feature-by-feature documentation, this knowledge base is organized by **purpose** - what you're trying to accomplish:
|
|
43
|
+
|
|
44
|
+
### 1. Setting Up (Once per project)
|
|
45
|
+
Everything in [01-setup-onboarding](./01-setup-onboarding/) helps you get WogiFlow configured for your project. This includes analyzing your codebase, populating decisions and component registries, and setting up team sync.
|
|
46
|
+
|
|
47
|
+
### 2. Executing Tasks (Daily workflow)
|
|
48
|
+
The [02-task-execution](./02-task-execution/) category is the heart of WogiFlow. It explains the entire execution pipeline from task selection through completion, including:
|
|
49
|
+
- Why task gating prevents incomplete work
|
|
50
|
+
- How loops ensure acceptance criteria are met
|
|
51
|
+
- Trade-offs between thoroughness and token consumption
|
|
52
|
+
|
|
53
|
+
### 3. Getting Smarter Over Time
|
|
54
|
+
[03-self-improvement](./03-self-improvement/) explains how WogiFlow learns from corrections and improves at four levels: project, skill, model, and team.
|
|
55
|
+
|
|
56
|
+
### 4. Managing Context & Memory
|
|
57
|
+
[04-memory-context](./04-memory-context/) addresses the biggest challenge in AI coding: context window limits and session persistence. These features prevent hallucinations and preserve history.
|
|
58
|
+
|
|
59
|
+
### 5. Accelerating Development
|
|
60
|
+
[05-development-tools](./05-development-tools/) covers additional tools that speed up specific workflows like design-to-code and understanding codebases.
|
|
61
|
+
|
|
62
|
+
### 6. Staying Safe
|
|
63
|
+
[06-safety-guardrails](./06-safety-guardrails/) documents protections against mistakes, including pattern-based damage control, security scanning, and recovery systems.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Common Tasks
|
|
68
|
+
|
|
69
|
+
| I want to... | Read this |
|
|
70
|
+
|--------------|-----------|
|
|
71
|
+
| Set up WogiFlow for the first time | [Installation](./01-setup-onboarding/installation.md) |
|
|
72
|
+
| Understand how task execution works | [Execution Flow](./02-task-execution/README.md) |
|
|
73
|
+
| Configure loops and verification | [Execution Loop](./02-task-execution/02-execution-loop.md) |
|
|
74
|
+
| Reduce token consumption | [Trade-offs](./02-task-execution/trade-offs.md) |
|
|
75
|
+
| Set up hybrid mode (local LLM) | [Execution Loop](./02-task-execution/02-execution-loop.md#hybrid-mode) |
|
|
76
|
+
| Understand how learning works | [Self-Improvement](./03-self-improvement/README.md) |
|
|
77
|
+
| Fix context/hallucination issues | [Context Management](./04-memory-context/context-management.md) |
|
|
78
|
+
| Use Figma-to-code | [Figma Analyzer](./05-development-tools/figma-analyzer.md) |
|
|
79
|
+
| Set up safety guardrails | [Damage Control](./06-safety-guardrails/damage-control.md) |
|
|
80
|
+
| Find a specific config option | [All Options](./configuration/all-options.md) |
|
|
81
|
+
| Import tasks from Jira/Linear | [External Integrations](./02-task-execution/external-integrations.md) |
|
|
82
|
+
| Load PRD/specs for context | [PRD Management](./04-memory-context/prd-management.md) |
|
|
83
|
+
| Manage memory & entropy | [Memory Commands](./04-memory-context/memory-commands.md) |
|
|
84
|
+
| Configure multiple models | [Model Management](./02-task-execution/model-management.md) |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Related Resources
|
|
89
|
+
|
|
90
|
+
- [Command Reference](../commands.md) - All slash commands
|
|
91
|
+
- [Main README](../../../README.md) - Project overview
|
|
92
|
+
- [CLAUDE.md](../../../CLAUDE.md) - Workflow methodology
|