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,109 @@
|
|
|
1
|
+
# Status Line Setup
|
|
2
|
+
|
|
3
|
+
Configure Claude Code's status line to show WogiFlow task information and context usage.
|
|
4
|
+
|
|
5
|
+
## What This Does
|
|
6
|
+
|
|
7
|
+
This command helps you configure Claude Code's status line (shown at the bottom of the terminal) to display:
|
|
8
|
+
- Current task ID and title
|
|
9
|
+
- Context window usage percentage
|
|
10
|
+
- Active skill (if any)
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Claude Code v1.0.52+ (January 2026 or later)
|
|
15
|
+
- The `context_window.used_percentage` field is available in status line input
|
|
16
|
+
|
|
17
|
+
## Setup Instructions
|
|
18
|
+
|
|
19
|
+
The status line is configured in your **global** Claude settings at `~/.claude/settings.json`.
|
|
20
|
+
|
|
21
|
+
### Step 1: Check Current Settings
|
|
22
|
+
|
|
23
|
+
First, let me check if you have existing status line settings:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cat ~/.claude/settings.json | grep -A5 statusLine || echo "No statusLine config found"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Add Status Line Configuration
|
|
30
|
+
|
|
31
|
+
Add or update the `statusLine` section in `~/.claude/settings.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"statusLine": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"format": "{{#if task}}[{{task.id}}] {{/if}}{{model}} | Ctx: {{context_window.used_percentage}}%{{#if skill}} | Skill: {{skill}}{{/if}}"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Format Options
|
|
43
|
+
|
|
44
|
+
| Format | Display Example |
|
|
45
|
+
|--------|-----------------|
|
|
46
|
+
| **Compact** | `opus | 45%` |
|
|
47
|
+
| **Standard** | `[wf-123] opus | Ctx: 45%` |
|
|
48
|
+
| **Detailed** | `[wf-123] My Task | opus | Ctx: 45% (85k remaining) | Skill: nestjs` |
|
|
49
|
+
|
|
50
|
+
### Available Variables
|
|
51
|
+
|
|
52
|
+
| Variable | Description |
|
|
53
|
+
|----------|-------------|
|
|
54
|
+
| `{{model}}` | Current model name |
|
|
55
|
+
| `{{context_window.used_percentage}}` | Context used as percentage |
|
|
56
|
+
| `{{context_window.remaining_percentage}}` | Context remaining as percentage |
|
|
57
|
+
| `{{task.id}}` | Current WogiFlow task ID (if any) |
|
|
58
|
+
| `{{task.title}}` | Current task title |
|
|
59
|
+
| `{{skill}}` | Currently active skill |
|
|
60
|
+
|
|
61
|
+
### Recommended Formats
|
|
62
|
+
|
|
63
|
+
**Minimal** (lowest overhead):
|
|
64
|
+
```json
|
|
65
|
+
"format": "{{model}} | {{context_window.used_percentage}}%"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**With Task** (recommended for WogiFlow users):
|
|
69
|
+
```json
|
|
70
|
+
"format": "{{#if task}}[{{task.id}}] {{/if}}{{model}} | Ctx: {{context_window.used_percentage}}%"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Full Context** (detailed):
|
|
74
|
+
```json
|
|
75
|
+
"format": "[{{task.id}}] {{model}} | {{context_window.used_percentage}}% used | {{#if skill}}{{skill}}{{/if}}"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## WogiFlow Integration
|
|
79
|
+
|
|
80
|
+
To have WogiFlow automatically update the status line with current task info, we need to:
|
|
81
|
+
|
|
82
|
+
1. **Session Start Hook**: Reads current task from `ready.json` and exports to status line
|
|
83
|
+
2. **Task Start/Complete**: Updates status line when tasks change
|
|
84
|
+
|
|
85
|
+
This is handled by the existing session-start hook if the status line is enabled.
|
|
86
|
+
|
|
87
|
+
## Troubleshooting
|
|
88
|
+
|
|
89
|
+
### Status Line Not Showing
|
|
90
|
+
- Ensure `statusLine.enabled` is `true`
|
|
91
|
+
- Restart Claude Code after changing settings
|
|
92
|
+
- Check for JSON syntax errors in settings.json
|
|
93
|
+
|
|
94
|
+
### Variables Not Resolving
|
|
95
|
+
- `{{task.*}}` variables require WogiFlow integration
|
|
96
|
+
- `{{context_window.*}}` requires Claude Code v1.0.52+
|
|
97
|
+
|
|
98
|
+
## Manual Configuration
|
|
99
|
+
|
|
100
|
+
If you prefer to manually edit your settings:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Open settings in editor
|
|
104
|
+
code ~/.claude/settings.json
|
|
105
|
+
# or
|
|
106
|
+
nano ~/.claude/settings.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Add the statusLine section and restart Claude Code.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Create a detailed story with acceptance criteria. Provide title: `/wogi-story Add login form`
|
|
2
|
+
|
|
3
|
+
Run `./scripts/flow story "<title>"` to create a story.
|
|
4
|
+
|
|
5
|
+
Load `agents/story-writer.md` for the full story format.
|
|
6
|
+
|
|
7
|
+
## Options
|
|
8
|
+
|
|
9
|
+
- `--deep` - Enable deep decomposition mode (auto-generate granular sub-tasks)
|
|
10
|
+
- `--priority <P>` - Set priority P0-P4 (default: P2 from config)
|
|
11
|
+
- `--json` - Output JSON for programmatic access
|
|
12
|
+
|
|
13
|
+
Examples:
|
|
14
|
+
```bash
|
|
15
|
+
flow story "Add user login"
|
|
16
|
+
flow story "Add user login" --deep
|
|
17
|
+
flow story "Add user login" --priority P1
|
|
18
|
+
flow story "Add user login" authentication --deep --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Standard Mode
|
|
22
|
+
|
|
23
|
+
Create a story with:
|
|
24
|
+
1. **User Story**: As a [user], I want [action], so that [benefit]
|
|
25
|
+
2. **Description**: 2-4 sentences of context
|
|
26
|
+
3. **Acceptance Criteria** using Given/When/Then (Gherkin):
|
|
27
|
+
- Happy path scenario
|
|
28
|
+
- Alternative path scenarios
|
|
29
|
+
- Error handling scenarios
|
|
30
|
+
4. **Technical Notes**:
|
|
31
|
+
- Check `.workflow/state/app-map.md` for existing components
|
|
32
|
+
- List components to use vs create
|
|
33
|
+
- Note API endpoints if relevant
|
|
34
|
+
5. **Test Strategy**: Unit, Integration, E2E
|
|
35
|
+
6. **Dependencies**: What must be done first
|
|
36
|
+
7. **Complexity**: Low/Medium/High
|
|
37
|
+
|
|
38
|
+
## Deep Decomposition Mode (`--deep`)
|
|
39
|
+
|
|
40
|
+
When `--deep` flag is used, OR when Claude detects a complex story:
|
|
41
|
+
|
|
42
|
+
1. Create the parent story as above
|
|
43
|
+
2. Analyze complexity factors:
|
|
44
|
+
- Number of acceptance criteria (>5 triggers decomposition)
|
|
45
|
+
- Distinct UI components needed (>3 triggers)
|
|
46
|
+
- API endpoints involved (>2 triggers)
|
|
47
|
+
- Files likely to change (>10 triggers)
|
|
48
|
+
3. Auto-decompose into granular sub-tasks:
|
|
49
|
+
- Each acceptance scenario → separate sub-task
|
|
50
|
+
- Each UI component → separate sub-task
|
|
51
|
+
- Each error state → separate sub-task
|
|
52
|
+
- Each loading state → separate sub-task
|
|
53
|
+
- Each API integration → separate sub-task
|
|
54
|
+
|
|
55
|
+
### Sub-Task Format
|
|
56
|
+
|
|
57
|
+
Parent: `wf-a1b2c3d4` (the main story, hash-based ID)
|
|
58
|
+
Children: `wf-a1b2c3d4-01`, `wf-a1b2c3d4-02`, etc.
|
|
59
|
+
|
|
60
|
+
Each sub-task includes:
|
|
61
|
+
- Single focused objective
|
|
62
|
+
- Clear done criteria
|
|
63
|
+
- Dependencies on other sub-tasks
|
|
64
|
+
- Priority (inherits from parent)
|
|
65
|
+
- Estimated scope (XS/S/M)
|
|
66
|
+
|
|
67
|
+
### Auto-Suggest Behavior
|
|
68
|
+
|
|
69
|
+
Check `config.json → storyDecomposition`:
|
|
70
|
+
- `autoDetect: true` - Claude suggests when beneficial (default)
|
|
71
|
+
- `autoDecompose: true` - Auto-decompose without asking
|
|
72
|
+
- `autoDecompose: false` - Only decompose with `--deep` flag
|
|
73
|
+
|
|
74
|
+
When `autoDetect` is enabled and complexity is detected, Claude will ask:
|
|
75
|
+
> "This looks like a complex story with [X scenarios]. Would you like me to decompose it into granular sub-tasks?"
|
|
76
|
+
|
|
77
|
+
## Output
|
|
78
|
+
|
|
79
|
+
Save the story to `.workflow/changes/[feature]/wf-XXXXXXXX.md`
|
|
80
|
+
|
|
81
|
+
Example output:
|
|
82
|
+
```
|
|
83
|
+
Created story: wf-a1b2c3d4
|
|
84
|
+
|
|
85
|
+
File: .workflow/changes/general/wf-a1b2c3d4.md
|
|
86
|
+
Title: Add user login
|
|
87
|
+
Feature: general
|
|
88
|
+
Priority: P1
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If decomposed, also create:
|
|
92
|
+
- `.workflow/changes/[feature]/wf-a1b2c3d4-01.md` (sub-task 1)
|
|
93
|
+
- `.workflow/changes/[feature]/wf-a1b2c3d4-02.md` (sub-task 2)
|
|
94
|
+
- etc.
|
|
95
|
+
|
|
96
|
+
Update `ready.json` with parent task (with priority) and all sub-tasks.
|
|
97
|
+
|
|
98
|
+
Ask clarifying questions if needed to write good acceptance criteria.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Suspend the current task with a resume condition.
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/wogi-suspend [options]
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Options
|
|
10
|
+
|
|
11
|
+
| Option | Description |
|
|
12
|
+
|--------|-------------|
|
|
13
|
+
| `--wait-ci "<command>"` | Wait for CI/CD (polls command until "completed") |
|
|
14
|
+
| `--rate-limit <seconds>` | Wait for N seconds (rate limiting) |
|
|
15
|
+
| `--review "<message>"` | Wait for human review/approval |
|
|
16
|
+
| `--wait-file "<path>"` | Wait for file to exist |
|
|
17
|
+
| `--schedule "<datetime>"` | Wait until specific time (ISO 8601) |
|
|
18
|
+
| `--long-running "<msg>"` | Long-running task with manual progress |
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
### Wait for CI/CD Pipeline
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/wogi-suspend --wait-ci "gh run view 1234 --json status -q '.status'"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The task will resume when the command returns "completed".
|
|
29
|
+
|
|
30
|
+
### Rate Limiting
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/wogi-suspend --rate-limit 60
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Waits 60 seconds before allowing resume. Useful for API rate limits.
|
|
37
|
+
|
|
38
|
+
### Human Review
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
/wogi-suspend --review "Check PR #456 before continuing"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Requires explicit approval with `/wogi-resume --approve`.
|
|
45
|
+
|
|
46
|
+
### Wait for File
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/wogi-suspend --wait-file ".workflow/state/deploy-ready.json"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Resumes when the file exists.
|
|
53
|
+
|
|
54
|
+
### Scheduled Resume
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
/wogi-suspend --schedule "2024-01-06T09:00:00"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Resumes after the specified time.
|
|
61
|
+
|
|
62
|
+
### Long-Running Tasks
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
/wogi-suspend --long-running "Multi-day implementation"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For tasks that span multiple sessions. Resume manually.
|
|
69
|
+
|
|
70
|
+
## How It Works
|
|
71
|
+
|
|
72
|
+
1. Suspends the current durable session
|
|
73
|
+
2. Records the resume condition
|
|
74
|
+
3. On next `/wogi-start`, checks if condition is met
|
|
75
|
+
4. Auto-resumes if condition met, otherwise shows status
|
|
76
|
+
|
|
77
|
+
## Resuming
|
|
78
|
+
|
|
79
|
+
- `/wogi-resume` - Resume if condition is met
|
|
80
|
+
- `/wogi-resume --approve` - Approve human review
|
|
81
|
+
- `/wogi-resume --force` - Force resume regardless
|
|
82
|
+
- `/wogi-resume --status` - Check suspension status
|
|
83
|
+
|
|
84
|
+
## Requirements
|
|
85
|
+
|
|
86
|
+
- Durable steps must be enabled in config (default: true)
|
|
87
|
+
- Active task session (started with `/wogi-start`)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Execute browser tests using Claude's browser extension.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- `/wogi-test-browser [flow-name]` - Run specific flow
|
|
5
|
+
- `/wogi-test-browser all` - Run all flows
|
|
6
|
+
|
|
7
|
+
Load test flow from `.workflow/tests/flows/[name].json`
|
|
8
|
+
|
|
9
|
+
For each step in the flow:
|
|
10
|
+
1. **navigate** - Open the URL in browser
|
|
11
|
+
2. **wait** - Wait for selector to appear
|
|
12
|
+
3. **type** - Enter text in input field
|
|
13
|
+
4. **click** - Click element
|
|
14
|
+
5. **verify** - Check element exists or contains text
|
|
15
|
+
6. **screenshot** - Capture current state
|
|
16
|
+
|
|
17
|
+
Output:
|
|
18
|
+
```
|
|
19
|
+
🧪 Running: login-flow
|
|
20
|
+
|
|
21
|
+
1. ✓ Navigate to /login
|
|
22
|
+
2. ✓ Wait for .login-form
|
|
23
|
+
3. ✓ Type email: test@example.com
|
|
24
|
+
4. ✓ Type password: ********
|
|
25
|
+
5. ✓ Click submit button
|
|
26
|
+
6. ✓ Verify .dashboard exists
|
|
27
|
+
7. ✓ Screenshot: login-success
|
|
28
|
+
|
|
29
|
+
Result: PASS ✓
|
|
30
|
+
|
|
31
|
+
All 7 steps completed successfully.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If a step fails:
|
|
35
|
+
```
|
|
36
|
+
5. ✗ Verify .dashboard exists
|
|
37
|
+
Expected: Element to exist
|
|
38
|
+
Actual: Element not found after 5s timeout
|
|
39
|
+
|
|
40
|
+
Result: FAIL ✗
|
|
41
|
+
|
|
42
|
+
Screenshot saved: login-flow-failure.png
|
|
43
|
+
```
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Generate a task-focused code trace showing how code flows for a specific feature or behavior.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- `/wogi-trace [prompt]` - Generate new trace
|
|
5
|
+
- `/wogi-trace list` - List saved traces
|
|
6
|
+
- `/wogi-trace [name]` - Load existing trace
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
/wogi-trace "user authentication flow"
|
|
12
|
+
/wogi-trace "how does payment processing work"
|
|
13
|
+
/wogi-trace "data flow from form submit to database"
|
|
14
|
+
/wogi-trace "the checkout process"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What It Generates
|
|
18
|
+
|
|
19
|
+
A task-focused map showing:
|
|
20
|
+
1. **Flow overview** - High-level summary of how the feature works
|
|
21
|
+
2. **Components involved** - Each file/function with line numbers
|
|
22
|
+
3. **Execution order** - The sequence of how code runs
|
|
23
|
+
4. **Diagram** - Visual mermaid flowchart
|
|
24
|
+
5. **Related files** - Other files that might be relevant
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# Code Trace: Authentication Flow
|
|
30
|
+
|
|
31
|
+
> Generated: 2024-01-15 10:30
|
|
32
|
+
> Query: "user authentication flow"
|
|
33
|
+
|
|
34
|
+
## Flow Overview
|
|
35
|
+
|
|
36
|
+
User submits login form → API validates credentials → JWT generated →
|
|
37
|
+
Session created → User redirected to dashboard
|
|
38
|
+
|
|
39
|
+
## Execution Flow
|
|
40
|
+
|
|
41
|
+
### 1. Entry Point: Login Form
|
|
42
|
+
**File**: `src/components/auth/LoginForm.tsx`
|
|
43
|
+
**Lines**: 45-89
|
|
44
|
+
**Role**: Captures user credentials and initiates login
|
|
45
|
+
|
|
46
|
+
Key code:
|
|
47
|
+
```tsx
|
|
48
|
+
const handleSubmit = async (data: LoginData) => {
|
|
49
|
+
const result = await authService.login(data);
|
|
50
|
+
// ...
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. API Route: POST /api/auth/login
|
|
55
|
+
**File**: `src/pages/api/auth/login.ts`
|
|
56
|
+
**Lines**: 12-67
|
|
57
|
+
**Role**: Validates request, calls auth service
|
|
58
|
+
|
|
59
|
+
Key code:
|
|
60
|
+
```ts
|
|
61
|
+
export default async function handler(req, res) {
|
|
62
|
+
const { email, password } = req.body;
|
|
63
|
+
const user = await AuthService.authenticate(email, password);
|
|
64
|
+
// ...
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. Auth Service
|
|
69
|
+
**File**: `src/services/auth.service.ts`
|
|
70
|
+
**Lines**: 34-78
|
|
71
|
+
**Role**: Core authentication logic
|
|
72
|
+
|
|
73
|
+
Key code:
|
|
74
|
+
```ts
|
|
75
|
+
async authenticate(email: string, password: string) {
|
|
76
|
+
const user = await this.userRepo.findByEmail(email);
|
|
77
|
+
const valid = await bcrypt.compare(password, user.passwordHash);
|
|
78
|
+
// ...
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 4. JWT Generation
|
|
83
|
+
**File**: `src/services/auth.service.ts`
|
|
84
|
+
**Lines**: 80-95
|
|
85
|
+
**Role**: Creates signed JWT token
|
|
86
|
+
|
|
87
|
+
### 5. Session Storage
|
|
88
|
+
**File**: `src/services/session.service.ts`
|
|
89
|
+
**Lines**: 20-45
|
|
90
|
+
**Role**: Stores session in Redis
|
|
91
|
+
|
|
92
|
+
## Diagram
|
|
93
|
+
|
|
94
|
+
```mermaid
|
|
95
|
+
flowchart LR
|
|
96
|
+
A[LoginForm] -->|POST /api/auth/login| B[API Route]
|
|
97
|
+
B -->|authenticate| C[AuthService]
|
|
98
|
+
C -->|findByEmail| D[UserRepository]
|
|
99
|
+
D -->|user| C
|
|
100
|
+
C -->|compare| E[bcrypt]
|
|
101
|
+
E -->|valid| C
|
|
102
|
+
C -->|generateToken| F[JWT]
|
|
103
|
+
C -->|createSession| G[SessionService]
|
|
104
|
+
G -->|store| H[Redis]
|
|
105
|
+
B -->|token + session| A
|
|
106
|
+
A -->|redirect| I[Dashboard]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Related Files
|
|
110
|
+
|
|
111
|
+
| File | Relevance |
|
|
112
|
+
|------|-----------|
|
|
113
|
+
| `src/middleware/auth.ts` | JWT verification middleware |
|
|
114
|
+
| `src/hooks/useAuth.ts` | Client-side auth state |
|
|
115
|
+
| `src/context/AuthContext.tsx` | Auth context provider |
|
|
116
|
+
| `src/types/auth.ts` | Type definitions |
|
|
117
|
+
|
|
118
|
+
## Security Notes
|
|
119
|
+
|
|
120
|
+
- Passwords hashed with bcrypt (cost factor 12)
|
|
121
|
+
- JWT expires in 24 hours
|
|
122
|
+
- Refresh token rotation enabled
|
|
123
|
+
- Rate limiting: 5 attempts per minute
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
*Trace saved to: .workflow/traces/authentication-flow.md*
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## How Traces Work
|
|
130
|
+
|
|
131
|
+
1. **Parse prompt** - Understand what flow/feature to trace
|
|
132
|
+
2. **Search codebase** - Find entry points and related files
|
|
133
|
+
3. **Analyze dependencies** - Follow imports and function calls
|
|
134
|
+
4. **Build execution graph** - Determine order of operations
|
|
135
|
+
5. **Generate documentation** - Create readable trace with code snippets
|
|
136
|
+
6. **Create diagram** - Generate mermaid flowchart
|
|
137
|
+
7. **Save trace** - Store for future reference
|
|
138
|
+
|
|
139
|
+
## Trace Storage
|
|
140
|
+
|
|
141
|
+
Traces are saved to `.workflow/traces/[name].md`:
|
|
142
|
+
- Reusable across sessions
|
|
143
|
+
- Shareable with team
|
|
144
|
+
- Can be referenced in Cascade/Claude
|
|
145
|
+
|
|
146
|
+
## Using Traces
|
|
147
|
+
|
|
148
|
+
### Reference in context
|
|
149
|
+
```
|
|
150
|
+
/wogi-context TASK-050
|
|
151
|
+
# Also loads relevant traces
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Before starting a task
|
|
155
|
+
```
|
|
156
|
+
/wogi-trace "the feature I'm about to modify"
|
|
157
|
+
# Understand before editing
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Onboarding
|
|
161
|
+
```
|
|
162
|
+
/wogi-trace "core user flows"
|
|
163
|
+
/wogi-trace "data models and relationships"
|
|
164
|
+
/wogi-trace "API architecture"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Debugging
|
|
168
|
+
```
|
|
169
|
+
/wogi-trace "how errors propagate in the payment flow"
|
|
170
|
+
/wogi-trace "where user data gets validated"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Configuration
|
|
174
|
+
|
|
175
|
+
In `config.json`:
|
|
176
|
+
```json
|
|
177
|
+
"traces": {
|
|
178
|
+
"saveTo": ".workflow/traces",
|
|
179
|
+
"generateDiagrams": true
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Difference from App Map
|
|
184
|
+
|
|
185
|
+
| App Map | Trace |
|
|
186
|
+
|---------|-------|
|
|
187
|
+
| Static registry | Dynamic, task-focused |
|
|
188
|
+
| What exists | How it executes |
|
|
189
|
+
| All components | Only relevant ones |
|
|
190
|
+
| No flow info | Shows execution order |
|
|
191
|
+
| Manual updates | Generated on demand |
|
|
192
|
+
|
|
193
|
+
## Tips
|
|
194
|
+
|
|
195
|
+
- Be specific: "user login flow" > "authentication"
|
|
196
|
+
- Ask about behaviors: "what happens when X"
|
|
197
|
+
- Focus on one flow at a time
|
|
198
|
+
- Re-trace after major refactors
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/
|
|
7
|
+
├── scripts/ # CLI commands (flow-*.js)
|
|
8
|
+
├── agents/ # Agent personas (*.md)
|
|
9
|
+
├── .workflow/ # Configuration and state
|
|
10
|
+
│ ├── config.json # Main configuration
|
|
11
|
+
│ ├── state/ # Runtime state files
|
|
12
|
+
│ ├── bridges/ # CLI bridge implementations
|
|
13
|
+
│ ├── models/ # Model registry
|
|
14
|
+
│ ├── templates/ # File templates
|
|
15
|
+
│ └── lib/ # Shared libraries
|
|
16
|
+
├── .claude/ # Claude Code integration
|
|
17
|
+
│ └── skills/ # Installed skills
|
|
18
|
+
└── CLAUDE.md # Claude Code instructions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Key Patterns
|
|
22
|
+
|
|
23
|
+
1. **CLI-Agnostic Core**: All logic in `.workflow/`, CLI-specific files generated by bridges
|
|
24
|
+
2. **State Files as Memory**: JSON/Markdown files in `.workflow/state/` persist context
|
|
25
|
+
3. **Skills System**: Modular skill packages with patterns, anti-patterns, learnings
|
|
26
|
+
4. **Hash-Based Task IDs**: `wf-XXXXXXXX` format for unique task identification
|
|
27
|
+
|
|
28
|
+
## Data Flow
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
User Command → flow CLI → flow-*.js script → state files → response
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
Generated: 2026-01-11
|
|
37
|
+
Last synced: 2026-01-11
|