@fro.bot/systematic 1.22.7 → 1.23.0
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/package.json +1 -1
- package/skills/agent-browser/SKILL.md +511 -170
- package/skills/agent-browser/references/authentication.md +303 -0
- package/skills/agent-browser/references/commands.md +266 -0
- package/skills/agent-browser/references/profiling.md +120 -0
- package/skills/agent-browser/references/proxy-support.md +194 -0
- package/skills/agent-browser/references/session-management.md +193 -0
- package/skills/agent-browser/references/snapshot-refs.md +194 -0
- package/skills/agent-browser/references/video-recording.md +173 -0
- package/skills/agent-browser/templates/authenticated-session.sh +105 -0
- package/skills/agent-browser/templates/capture-workflow.sh +69 -0
- package/skills/agent-browser/templates/form-automation.sh +62 -0
- package/skills/agent-native-audit/SKILL.md +279 -0
- package/skills/ce-brainstorm/SKILL.md +146 -0
- package/skills/ce-compound/SKILL.md +317 -0
- package/skills/ce-plan/SKILL.md +642 -0
- package/skills/ce-review/SKILL.md +559 -0
- package/skills/ce-work/SKILL.md +471 -0
- package/skills/changelog/SKILL.md +139 -0
- package/skills/create-agent-skill/SKILL.md +10 -0
- package/skills/create-agent-skills/SKILL.md +3 -14
- package/skills/deepen-plan/SKILL.md +545 -0
- package/skills/deploy-docs/SKILL.md +113 -0
- package/skills/feature-video/SKILL.md +352 -0
- package/skills/generate_command/SKILL.md +163 -0
- package/skills/heal-skill/SKILL.md +148 -0
- package/skills/lfg/SKILL.md +34 -0
- package/skills/report-bug/SKILL.md +151 -0
- package/skills/reproduce-bug/SKILL.md +101 -0
- package/skills/resolve_parallel/SKILL.md +35 -0
- package/skills/resolve_todo_parallel/SKILL.md +38 -0
- package/skills/slfg/SKILL.md +33 -0
- package/skills/test-browser/SKILL.md +394 -0
- package/skills/test-xcode/SKILL.md +333 -0
- package/skills/triage/SKILL.md +312 -0
- package/skills/workflows-brainstorm/SKILL.md +11 -0
- package/skills/workflows-compound/SKILL.md +10 -0
- package/skills/workflows-plan/SKILL.md +10 -0
- package/skills/workflows-review/SKILL.md +10 -0
- package/skills/workflows-work/SKILL.md +10 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Video Recording
|
|
2
|
+
|
|
3
|
+
Capture browser automation as video for debugging, documentation, or verification.
|
|
4
|
+
|
|
5
|
+
**Related**: [commands.md](commands.md) for full command reference, [SKILL.md](../SKILL.md) for quick start.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [Basic Recording](#basic-recording)
|
|
10
|
+
- [Recording Commands](#recording-commands)
|
|
11
|
+
- [Use Cases](#use-cases)
|
|
12
|
+
- [Best Practices](#best-practices)
|
|
13
|
+
- [Output Format](#output-format)
|
|
14
|
+
- [Limitations](#limitations)
|
|
15
|
+
|
|
16
|
+
## Basic Recording
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Start recording
|
|
20
|
+
agent-browser record start ./demo.webm
|
|
21
|
+
|
|
22
|
+
# Perform actions
|
|
23
|
+
agent-browser open https://example.com
|
|
24
|
+
agent-browser snapshot -i
|
|
25
|
+
agent-browser click @e1
|
|
26
|
+
agent-browser fill @e2 "test input"
|
|
27
|
+
|
|
28
|
+
# Stop and save
|
|
29
|
+
agent-browser record stop
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Recording Commands
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Start recording to file
|
|
36
|
+
agent-browser record start ./output.webm
|
|
37
|
+
|
|
38
|
+
# Stop current recording
|
|
39
|
+
agent-browser record stop
|
|
40
|
+
|
|
41
|
+
# Restart with new file (stops current + starts new)
|
|
42
|
+
agent-browser record restart ./take2.webm
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Use Cases
|
|
46
|
+
|
|
47
|
+
### Debugging Failed Automation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
#!/bin/bash
|
|
51
|
+
# Record automation for debugging
|
|
52
|
+
|
|
53
|
+
agent-browser record start ./debug-$(date +%Y%m%d-%H%M%S).webm
|
|
54
|
+
|
|
55
|
+
# Run your automation
|
|
56
|
+
agent-browser open https://app.example.com
|
|
57
|
+
agent-browser snapshot -i
|
|
58
|
+
agent-browser click @e1 || {
|
|
59
|
+
echo "Click failed - check recording"
|
|
60
|
+
agent-browser record stop
|
|
61
|
+
exit 1
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
agent-browser record stop
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Documentation Generation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
#!/bin/bash
|
|
71
|
+
# Record workflow for documentation
|
|
72
|
+
|
|
73
|
+
agent-browser record start ./docs/how-to-login.webm
|
|
74
|
+
|
|
75
|
+
agent-browser open https://app.example.com/login
|
|
76
|
+
agent-browser wait 1000 # Pause for visibility
|
|
77
|
+
|
|
78
|
+
agent-browser snapshot -i
|
|
79
|
+
agent-browser fill @e1 "demo@example.com"
|
|
80
|
+
agent-browser wait 500
|
|
81
|
+
|
|
82
|
+
agent-browser fill @e2 "password"
|
|
83
|
+
agent-browser wait 500
|
|
84
|
+
|
|
85
|
+
agent-browser click @e3
|
|
86
|
+
agent-browser wait --load networkidle
|
|
87
|
+
agent-browser wait 1000 # Show result
|
|
88
|
+
|
|
89
|
+
agent-browser record stop
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### CI/CD Test Evidence
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
#!/bin/bash
|
|
96
|
+
# Record E2E test runs for CI artifacts
|
|
97
|
+
|
|
98
|
+
TEST_NAME="${1:-e2e-test}"
|
|
99
|
+
RECORDING_DIR="./test-recordings"
|
|
100
|
+
mkdir -p "$RECORDING_DIR"
|
|
101
|
+
|
|
102
|
+
agent-browser record start "$RECORDING_DIR/$TEST_NAME-$(date +%s).webm"
|
|
103
|
+
|
|
104
|
+
# Run test
|
|
105
|
+
if run_e2e_test; then
|
|
106
|
+
echo "Test passed"
|
|
107
|
+
else
|
|
108
|
+
echo "Test failed - recording saved"
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
agent-browser record stop
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Best Practices
|
|
115
|
+
|
|
116
|
+
### 1. Add Pauses for Clarity
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Slow down for human viewing
|
|
120
|
+
agent-browser click @e1
|
|
121
|
+
agent-browser wait 500 # Let viewer see result
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 2. Use Descriptive Filenames
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Include context in filename
|
|
128
|
+
agent-browser record start ./recordings/login-flow-2024-01-15.webm
|
|
129
|
+
agent-browser record start ./recordings/checkout-test-run-42.webm
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 3. Handle Recording in Error Cases
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
#!/bin/bash
|
|
136
|
+
set -e
|
|
137
|
+
|
|
138
|
+
cleanup() {
|
|
139
|
+
agent-browser record stop 2>/dev/null || true
|
|
140
|
+
agent-browser close 2>/dev/null || true
|
|
141
|
+
}
|
|
142
|
+
trap cleanup EXIT
|
|
143
|
+
|
|
144
|
+
agent-browser record start ./automation.webm
|
|
145
|
+
# ... automation steps ...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 4. Combine with Screenshots
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Record video AND capture key frames
|
|
152
|
+
agent-browser record start ./flow.webm
|
|
153
|
+
|
|
154
|
+
agent-browser open https://example.com
|
|
155
|
+
agent-browser screenshot ./screenshots/step1-homepage.png
|
|
156
|
+
|
|
157
|
+
agent-browser click @e1
|
|
158
|
+
agent-browser screenshot ./screenshots/step2-after-click.png
|
|
159
|
+
|
|
160
|
+
agent-browser record stop
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Output Format
|
|
164
|
+
|
|
165
|
+
- Default format: WebM (VP8/VP9 codec)
|
|
166
|
+
- Compatible with all modern browsers and video players
|
|
167
|
+
- Compressed but high quality
|
|
168
|
+
|
|
169
|
+
## Limitations
|
|
170
|
+
|
|
171
|
+
- Recording adds slight overhead to automation
|
|
172
|
+
- Large recordings can consume significant disk space
|
|
173
|
+
- Some headless environments may have codec limitations
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Template: Authenticated Session Workflow
|
|
3
|
+
# Purpose: Login once, save state, reuse for subsequent runs
|
|
4
|
+
# Usage: ./authenticated-session.sh <login-url> [state-file]
|
|
5
|
+
#
|
|
6
|
+
# RECOMMENDED: Use the auth vault instead of this template:
|
|
7
|
+
# echo "<pass>" | agent-browser auth save myapp --url <login-url> --username <user> --password-stdin
|
|
8
|
+
# agent-browser auth login myapp
|
|
9
|
+
# The auth vault stores credentials securely and the LLM never sees passwords.
|
|
10
|
+
#
|
|
11
|
+
# Environment variables:
|
|
12
|
+
# APP_USERNAME - Login username/email
|
|
13
|
+
# APP_PASSWORD - Login password
|
|
14
|
+
#
|
|
15
|
+
# Two modes:
|
|
16
|
+
# 1. Discovery mode (default): Shows form structure so you can identify refs
|
|
17
|
+
# 2. Login mode: Performs actual login after you update the refs
|
|
18
|
+
#
|
|
19
|
+
# Setup steps:
|
|
20
|
+
# 1. Run once to see form structure (discovery mode)
|
|
21
|
+
# 2. Update refs in LOGIN FLOW section below
|
|
22
|
+
# 3. Set APP_USERNAME and APP_PASSWORD
|
|
23
|
+
# 4. Delete the DISCOVERY section
|
|
24
|
+
|
|
25
|
+
set -euo pipefail
|
|
26
|
+
|
|
27
|
+
LOGIN_URL="${1:?Usage: $0 <login-url> [state-file]}"
|
|
28
|
+
STATE_FILE="${2:-./auth-state.json}"
|
|
29
|
+
|
|
30
|
+
echo "Authentication workflow: $LOGIN_URL"
|
|
31
|
+
|
|
32
|
+
# ================================================================
|
|
33
|
+
# SAVED STATE: Skip login if valid saved state exists
|
|
34
|
+
# ================================================================
|
|
35
|
+
if [[ -f "$STATE_FILE" ]]; then
|
|
36
|
+
echo "Loading saved state from $STATE_FILE..."
|
|
37
|
+
if agent-browser --state "$STATE_FILE" open "$LOGIN_URL" 2>/dev/null; then
|
|
38
|
+
agent-browser wait --load networkidle
|
|
39
|
+
|
|
40
|
+
CURRENT_URL=$(agent-browser get url)
|
|
41
|
+
if [[ "$CURRENT_URL" != *"login"* ]] && [[ "$CURRENT_URL" != *"signin"* ]]; then
|
|
42
|
+
echo "Session restored successfully"
|
|
43
|
+
agent-browser snapshot -i
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
echo "Session expired, performing fresh login..."
|
|
47
|
+
agent-browser close 2>/dev/null || true
|
|
48
|
+
else
|
|
49
|
+
echo "Failed to load state, re-authenticating..."
|
|
50
|
+
fi
|
|
51
|
+
rm -f "$STATE_FILE"
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# ================================================================
|
|
55
|
+
# DISCOVERY MODE: Shows form structure (delete after setup)
|
|
56
|
+
# ================================================================
|
|
57
|
+
echo "Opening login page..."
|
|
58
|
+
agent-browser open "$LOGIN_URL"
|
|
59
|
+
agent-browser wait --load networkidle
|
|
60
|
+
|
|
61
|
+
echo ""
|
|
62
|
+
echo "Login form structure:"
|
|
63
|
+
echo "---"
|
|
64
|
+
agent-browser snapshot -i
|
|
65
|
+
echo "---"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "Next steps:"
|
|
68
|
+
echo " 1. Note the refs: username=@e?, password=@e?, submit=@e?"
|
|
69
|
+
echo " 2. Update the LOGIN FLOW section below with your refs"
|
|
70
|
+
echo " 3. Set: export APP_USERNAME='...' APP_PASSWORD='...'"
|
|
71
|
+
echo " 4. Delete this DISCOVERY MODE section"
|
|
72
|
+
echo ""
|
|
73
|
+
agent-browser close
|
|
74
|
+
exit 0
|
|
75
|
+
|
|
76
|
+
# ================================================================
|
|
77
|
+
# LOGIN FLOW: Uncomment and customize after discovery
|
|
78
|
+
# ================================================================
|
|
79
|
+
# : "${APP_USERNAME:?Set APP_USERNAME environment variable}"
|
|
80
|
+
# : "${APP_PASSWORD:?Set APP_PASSWORD environment variable}"
|
|
81
|
+
#
|
|
82
|
+
# agent-browser open "$LOGIN_URL"
|
|
83
|
+
# agent-browser wait --load networkidle
|
|
84
|
+
# agent-browser snapshot -i
|
|
85
|
+
#
|
|
86
|
+
# # Fill credentials (update refs to match your form)
|
|
87
|
+
# agent-browser fill @e1 "$APP_USERNAME"
|
|
88
|
+
# agent-browser fill @e2 "$APP_PASSWORD"
|
|
89
|
+
# agent-browser click @e3
|
|
90
|
+
# agent-browser wait --load networkidle
|
|
91
|
+
#
|
|
92
|
+
# # Verify login succeeded
|
|
93
|
+
# FINAL_URL=$(agent-browser get url)
|
|
94
|
+
# if [[ "$FINAL_URL" == *"login"* ]] || [[ "$FINAL_URL" == *"signin"* ]]; then
|
|
95
|
+
# echo "Login failed - still on login page"
|
|
96
|
+
# agent-browser screenshot /tmp/login-failed.png
|
|
97
|
+
# agent-browser close
|
|
98
|
+
# exit 1
|
|
99
|
+
# fi
|
|
100
|
+
#
|
|
101
|
+
# # Save state for future runs
|
|
102
|
+
# echo "Saving state to $STATE_FILE"
|
|
103
|
+
# agent-browser state save "$STATE_FILE"
|
|
104
|
+
# echo "Login successful"
|
|
105
|
+
# agent-browser snapshot -i
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Template: Content Capture Workflow
|
|
3
|
+
# Purpose: Extract content from web pages (text, screenshots, PDF)
|
|
4
|
+
# Usage: ./capture-workflow.sh <url> [output-dir]
|
|
5
|
+
#
|
|
6
|
+
# Outputs:
|
|
7
|
+
# - page-full.png: Full page screenshot
|
|
8
|
+
# - page-structure.txt: Page element structure with refs
|
|
9
|
+
# - page-text.txt: All text content
|
|
10
|
+
# - page.pdf: PDF version
|
|
11
|
+
#
|
|
12
|
+
# Optional: Load auth state for protected pages
|
|
13
|
+
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
TARGET_URL="${1:?Usage: $0 <url> [output-dir]}"
|
|
17
|
+
OUTPUT_DIR="${2:-.}"
|
|
18
|
+
|
|
19
|
+
echo "Capturing: $TARGET_URL"
|
|
20
|
+
mkdir -p "$OUTPUT_DIR"
|
|
21
|
+
|
|
22
|
+
# Optional: Load authentication state
|
|
23
|
+
# if [[ -f "./auth-state.json" ]]; then
|
|
24
|
+
# echo "Loading authentication state..."
|
|
25
|
+
# agent-browser state load "./auth-state.json"
|
|
26
|
+
# fi
|
|
27
|
+
|
|
28
|
+
# Navigate to target
|
|
29
|
+
agent-browser open "$TARGET_URL"
|
|
30
|
+
agent-browser wait --load networkidle
|
|
31
|
+
|
|
32
|
+
# Get metadata
|
|
33
|
+
TITLE=$(agent-browser get title)
|
|
34
|
+
URL=$(agent-browser get url)
|
|
35
|
+
echo "Title: $TITLE"
|
|
36
|
+
echo "URL: $URL"
|
|
37
|
+
|
|
38
|
+
# Capture full page screenshot
|
|
39
|
+
agent-browser screenshot --full "$OUTPUT_DIR/page-full.png"
|
|
40
|
+
echo "Saved: $OUTPUT_DIR/page-full.png"
|
|
41
|
+
|
|
42
|
+
# Get page structure with refs
|
|
43
|
+
agent-browser snapshot -i > "$OUTPUT_DIR/page-structure.txt"
|
|
44
|
+
echo "Saved: $OUTPUT_DIR/page-structure.txt"
|
|
45
|
+
|
|
46
|
+
# Extract all text content
|
|
47
|
+
agent-browser get text body > "$OUTPUT_DIR/page-text.txt"
|
|
48
|
+
echo "Saved: $OUTPUT_DIR/page-text.txt"
|
|
49
|
+
|
|
50
|
+
# Save as PDF
|
|
51
|
+
agent-browser pdf "$OUTPUT_DIR/page.pdf"
|
|
52
|
+
echo "Saved: $OUTPUT_DIR/page.pdf"
|
|
53
|
+
|
|
54
|
+
# Optional: Extract specific elements using refs from structure
|
|
55
|
+
# agent-browser get text @e5 > "$OUTPUT_DIR/main-content.txt"
|
|
56
|
+
|
|
57
|
+
# Optional: Handle infinite scroll pages
|
|
58
|
+
# for i in {1..5}; do
|
|
59
|
+
# agent-browser scroll down 1000
|
|
60
|
+
# agent-browser wait 1000
|
|
61
|
+
# done
|
|
62
|
+
# agent-browser screenshot --full "$OUTPUT_DIR/page-scrolled.png"
|
|
63
|
+
|
|
64
|
+
# Cleanup
|
|
65
|
+
agent-browser close
|
|
66
|
+
|
|
67
|
+
echo ""
|
|
68
|
+
echo "Capture complete:"
|
|
69
|
+
ls -la "$OUTPUT_DIR"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Template: Form Automation Workflow
|
|
3
|
+
# Purpose: Fill and submit web forms with validation
|
|
4
|
+
# Usage: ./form-automation.sh <form-url>
|
|
5
|
+
#
|
|
6
|
+
# This template demonstrates the snapshot-interact-verify pattern:
|
|
7
|
+
# 1. Navigate to form
|
|
8
|
+
# 2. Snapshot to get element refs
|
|
9
|
+
# 3. Fill fields using refs
|
|
10
|
+
# 4. Submit and verify result
|
|
11
|
+
#
|
|
12
|
+
# Customize: Update the refs (@e1, @e2, etc.) based on your form's snapshot output
|
|
13
|
+
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
FORM_URL="${1:?Usage: $0 <form-url>}"
|
|
17
|
+
|
|
18
|
+
echo "Form automation: $FORM_URL"
|
|
19
|
+
|
|
20
|
+
# Step 1: Navigate to form
|
|
21
|
+
agent-browser open "$FORM_URL"
|
|
22
|
+
agent-browser wait --load networkidle
|
|
23
|
+
|
|
24
|
+
# Step 2: Snapshot to discover form elements
|
|
25
|
+
echo ""
|
|
26
|
+
echo "Form structure:"
|
|
27
|
+
agent-browser snapshot -i
|
|
28
|
+
|
|
29
|
+
# Step 3: Fill form fields (customize these refs based on snapshot output)
|
|
30
|
+
#
|
|
31
|
+
# Common field types:
|
|
32
|
+
# agent-browser fill @e1 "John Doe" # Text input
|
|
33
|
+
# agent-browser fill @e2 "user@example.com" # Email input
|
|
34
|
+
# agent-browser fill @e3 "SecureP@ss123" # Password input
|
|
35
|
+
# agent-browser select @e4 "Option Value" # Dropdown
|
|
36
|
+
# agent-browser check @e5 # Checkbox
|
|
37
|
+
# agent-browser click @e6 # Radio button
|
|
38
|
+
# agent-browser fill @e7 "Multi-line text" # Textarea
|
|
39
|
+
# agent-browser upload @e8 /path/to/file.pdf # File upload
|
|
40
|
+
#
|
|
41
|
+
# Uncomment and modify:
|
|
42
|
+
# agent-browser fill @e1 "Test User"
|
|
43
|
+
# agent-browser fill @e2 "test@example.com"
|
|
44
|
+
# agent-browser click @e3 # Submit button
|
|
45
|
+
|
|
46
|
+
# Step 4: Wait for submission
|
|
47
|
+
# agent-browser wait --load networkidle
|
|
48
|
+
# agent-browser wait --url "**/success" # Or wait for redirect
|
|
49
|
+
|
|
50
|
+
# Step 5: Verify result
|
|
51
|
+
echo ""
|
|
52
|
+
echo "Result:"
|
|
53
|
+
agent-browser get url
|
|
54
|
+
agent-browser snapshot -i
|
|
55
|
+
|
|
56
|
+
# Optional: Capture evidence
|
|
57
|
+
agent-browser screenshot /tmp/form-result.png
|
|
58
|
+
echo "Screenshot saved: /tmp/form-result.png"
|
|
59
|
+
|
|
60
|
+
# Cleanup
|
|
61
|
+
agent-browser close
|
|
62
|
+
echo "Done"
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-native-audit
|
|
3
|
+
description: Run comprehensive agent-native architecture review with scored principles
|
|
4
|
+
argument-hint: '[optional: specific principle to audit]'
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent-Native Architecture Audit
|
|
9
|
+
|
|
10
|
+
Conduct a comprehensive review of the codebase against agent-native architecture principles, launching parallel sub-agents for each principle and producing a scored report.
|
|
11
|
+
|
|
12
|
+
## Core Principles to Audit
|
|
13
|
+
|
|
14
|
+
1. **Action Parity** - "Whatever the user can do, the agent can do"
|
|
15
|
+
2. **Tools as Primitives** - "Tools provide capability, not behavior"
|
|
16
|
+
3. **Context Injection** - "System prompt includes dynamic context about app state"
|
|
17
|
+
4. **Shared Workspace** - "Agent and user work in the same data space"
|
|
18
|
+
5. **CRUD Completeness** - "Every entity has full CRUD (Create, Read, Update, Delete)"
|
|
19
|
+
6. **UI Integration** - "Agent actions immediately reflected in UI"
|
|
20
|
+
7. **Capability Discovery** - "Users can discover what the agent can do"
|
|
21
|
+
8. **Prompt-Native Features** - "Features are prompts defining outcomes, not code"
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Step 1: Load the Agent-Native Skill
|
|
26
|
+
|
|
27
|
+
First, invoke the agent-native-architecture skill to understand all principles:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
/systematic:agent-native-architecture
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Select option 7 (action parity) to load the full reference material.
|
|
34
|
+
|
|
35
|
+
### Step 2: Launch Parallel Sub-Agents
|
|
36
|
+
|
|
37
|
+
Launch 8 parallel sub-agents using the task tool with `subagent_type: Explore`, one for each principle. Each agent should:
|
|
38
|
+
|
|
39
|
+
1. Enumerate ALL instances in the codebase (user actions, tools, contexts, data stores, etc.)
|
|
40
|
+
2. Check compliance against the principle
|
|
41
|
+
3. Provide a SPECIFIC SCORE like "X out of Y (percentage%)"
|
|
42
|
+
4. List specific gaps and recommendations
|
|
43
|
+
|
|
44
|
+
<sub-agents>
|
|
45
|
+
|
|
46
|
+
**Agent 1: Action Parity**
|
|
47
|
+
```
|
|
48
|
+
Audit for ACTION PARITY - "Whatever the user can do, the agent can do."
|
|
49
|
+
|
|
50
|
+
Tasks:
|
|
51
|
+
1. Enumerate ALL user actions in frontend (API calls, button clicks, form submissions)
|
|
52
|
+
- Search for API service files, fetch calls, form handlers
|
|
53
|
+
- Check routes and components for user interactions
|
|
54
|
+
2. Check which have corresponding agent tools
|
|
55
|
+
- Search for agent tool definitions
|
|
56
|
+
- Map user actions to agent capabilities
|
|
57
|
+
3. Score: "Agent can do X out of Y user actions"
|
|
58
|
+
|
|
59
|
+
Format:
|
|
60
|
+
## Action Parity Audit
|
|
61
|
+
### User Actions Found
|
|
62
|
+
| Action | Location | Agent Tool | Status |
|
|
63
|
+
### Score: X/Y (percentage%)
|
|
64
|
+
### Missing Agent Tools
|
|
65
|
+
### Recommendations
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Agent 2: Tools as Primitives**
|
|
69
|
+
```
|
|
70
|
+
Audit for TOOLS AS PRIMITIVES - "Tools provide capability, not behavior."
|
|
71
|
+
|
|
72
|
+
Tasks:
|
|
73
|
+
1. Find and read ALL agent tool files
|
|
74
|
+
2. Classify each as:
|
|
75
|
+
- PRIMITIVE (good): read, write, store, list - enables capability without business logic
|
|
76
|
+
- WORKFLOW (bad): encodes business logic, makes decisions, orchestrates steps
|
|
77
|
+
3. Score: "X out of Y tools are proper primitives"
|
|
78
|
+
|
|
79
|
+
Format:
|
|
80
|
+
## Tools as Primitives Audit
|
|
81
|
+
### Tool Analysis
|
|
82
|
+
| Tool | File | Type | Reasoning |
|
|
83
|
+
### Score: X/Y (percentage%)
|
|
84
|
+
### Problematic Tools (workflows that should be primitives)
|
|
85
|
+
### Recommendations
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Agent 3: Context Injection**
|
|
89
|
+
```
|
|
90
|
+
Audit for CONTEXT INJECTION - "System prompt includes dynamic context about app state"
|
|
91
|
+
|
|
92
|
+
Tasks:
|
|
93
|
+
1. Find context injection code (search for "context", "system prompt", "inject")
|
|
94
|
+
2. Read agent prompts and system messages
|
|
95
|
+
3. Enumerate what IS injected vs what SHOULD be:
|
|
96
|
+
- Available resources (files, drafts, documents)
|
|
97
|
+
- User preferences/settings
|
|
98
|
+
- Recent activity
|
|
99
|
+
- Available capabilities listed
|
|
100
|
+
- Session history
|
|
101
|
+
- Workspace state
|
|
102
|
+
|
|
103
|
+
Format:
|
|
104
|
+
## Context Injection Audit
|
|
105
|
+
### Context Types Analysis
|
|
106
|
+
| Context Type | Injected? | Location | Notes |
|
|
107
|
+
### Score: X/Y (percentage%)
|
|
108
|
+
### Missing Context
|
|
109
|
+
### Recommendations
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Agent 4: Shared Workspace**
|
|
113
|
+
```
|
|
114
|
+
Audit for SHARED WORKSPACE - "Agent and user work in the same data space"
|
|
115
|
+
|
|
116
|
+
Tasks:
|
|
117
|
+
1. Identify all data stores/tables/models
|
|
118
|
+
2. Check if agents read/write to SAME tables or separate ones
|
|
119
|
+
3. Look for sandbox isolation anti-pattern (agent has separate data space)
|
|
120
|
+
|
|
121
|
+
Format:
|
|
122
|
+
## Shared Workspace Audit
|
|
123
|
+
### Data Store Analysis
|
|
124
|
+
| Data Store | User Access | Agent Access | Shared? |
|
|
125
|
+
### Score: X/Y (percentage%)
|
|
126
|
+
### Isolated Data (anti-pattern)
|
|
127
|
+
### Recommendations
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Agent 5: CRUD Completeness**
|
|
131
|
+
```
|
|
132
|
+
Audit for CRUD COMPLETENESS - "Every entity has full CRUD"
|
|
133
|
+
|
|
134
|
+
Tasks:
|
|
135
|
+
1. Identify all entities/models in the codebase
|
|
136
|
+
2. For each entity, check if agent tools exist for:
|
|
137
|
+
- Create
|
|
138
|
+
- Read
|
|
139
|
+
- Update
|
|
140
|
+
- Delete
|
|
141
|
+
3. Score per entity and overall
|
|
142
|
+
|
|
143
|
+
Format:
|
|
144
|
+
## CRUD Completeness Audit
|
|
145
|
+
### Entity CRUD Analysis
|
|
146
|
+
| Entity | Create | Read | Update | Delete | Score |
|
|
147
|
+
### Overall Score: X/Y entities with full CRUD (percentage%)
|
|
148
|
+
### Incomplete Entities (list missing operations)
|
|
149
|
+
### Recommendations
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Agent 6: UI Integration**
|
|
153
|
+
```
|
|
154
|
+
Audit for UI INTEGRATION - "Agent actions immediately reflected in UI"
|
|
155
|
+
|
|
156
|
+
Tasks:
|
|
157
|
+
1. Check how agent writes/changes propagate to frontend
|
|
158
|
+
2. Look for:
|
|
159
|
+
- Streaming updates (SSE, WebSocket)
|
|
160
|
+
- Polling mechanisms
|
|
161
|
+
- Shared state/services
|
|
162
|
+
- Event buses
|
|
163
|
+
- File watching
|
|
164
|
+
3. Identify "silent actions" anti-pattern (agent changes state but UI doesn't update)
|
|
165
|
+
|
|
166
|
+
Format:
|
|
167
|
+
## UI Integration Audit
|
|
168
|
+
### Agent Action → UI Update Analysis
|
|
169
|
+
| Agent Action | UI Mechanism | Immediate? | Notes |
|
|
170
|
+
### Score: X/Y (percentage%)
|
|
171
|
+
### Silent Actions (anti-pattern)
|
|
172
|
+
### Recommendations
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Agent 7: Capability Discovery**
|
|
176
|
+
```
|
|
177
|
+
Audit for CAPABILITY DISCOVERY - "Users can discover what the agent can do"
|
|
178
|
+
|
|
179
|
+
Tasks:
|
|
180
|
+
1. Check for these 7 discovery mechanisms:
|
|
181
|
+
- Onboarding flow showing agent capabilities
|
|
182
|
+
- Help documentation
|
|
183
|
+
- Capability hints in UI
|
|
184
|
+
- Agent self-describes in responses
|
|
185
|
+
- Suggested prompts/actions
|
|
186
|
+
- Empty state guidance
|
|
187
|
+
- Slash commands (/help, /tools)
|
|
188
|
+
2. Score against 7 mechanisms
|
|
189
|
+
|
|
190
|
+
Format:
|
|
191
|
+
## Capability Discovery Audit
|
|
192
|
+
### Discovery Mechanism Analysis
|
|
193
|
+
| Mechanism | Exists? | Location | Quality |
|
|
194
|
+
### Score: X/7 (percentage%)
|
|
195
|
+
### Missing Discovery
|
|
196
|
+
### Recommendations
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Agent 8: Prompt-Native Features**
|
|
200
|
+
```
|
|
201
|
+
Audit for PROMPT-NATIVE FEATURES - "Features are prompts defining outcomes, not code"
|
|
202
|
+
|
|
203
|
+
Tasks:
|
|
204
|
+
1. Read all agent prompts
|
|
205
|
+
2. Classify each feature/behavior as defined in:
|
|
206
|
+
- PROMPT (good): outcomes defined in natural language
|
|
207
|
+
- CODE (bad): business logic hardcoded
|
|
208
|
+
3. Check if behavior changes require prompt edit vs code change
|
|
209
|
+
|
|
210
|
+
Format:
|
|
211
|
+
## Prompt-Native Features Audit
|
|
212
|
+
### Feature Definition Analysis
|
|
213
|
+
| Feature | Defined In | Type | Notes |
|
|
214
|
+
### Score: X/Y (percentage%)
|
|
215
|
+
### Code-Defined Features (anti-pattern)
|
|
216
|
+
### Recommendations
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
</sub-agents>
|
|
220
|
+
|
|
221
|
+
### Step 3: Compile Summary Report
|
|
222
|
+
|
|
223
|
+
After all agents complete, compile a summary with:
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
## Agent-Native Architecture Review: [Project Name]
|
|
227
|
+
|
|
228
|
+
### Overall Score Summary
|
|
229
|
+
|
|
230
|
+
| Core Principle | Score | Percentage | Status |
|
|
231
|
+
|----------------|-------|------------|--------|
|
|
232
|
+
| Action Parity | X/Y | Z% | ✅/⚠️/❌ |
|
|
233
|
+
| Tools as Primitives | X/Y | Z% | ✅/⚠️/❌ |
|
|
234
|
+
| Context Injection | X/Y | Z% | ✅/⚠️/❌ |
|
|
235
|
+
| Shared Workspace | X/Y | Z% | ✅/⚠️/❌ |
|
|
236
|
+
| CRUD Completeness | X/Y | Z% | ✅/⚠️/❌ |
|
|
237
|
+
| UI Integration | X/Y | Z% | ✅/⚠️/❌ |
|
|
238
|
+
| Capability Discovery | X/Y | Z% | ✅/⚠️/❌ |
|
|
239
|
+
| Prompt-Native Features | X/Y | Z% | ✅/⚠️/❌ |
|
|
240
|
+
|
|
241
|
+
**Overall Agent-Native Score: X%**
|
|
242
|
+
|
|
243
|
+
### Status Legend
|
|
244
|
+
- ✅ Excellent (80%+)
|
|
245
|
+
- ⚠️ Partial (50-79%)
|
|
246
|
+
- ❌ Needs Work (<50%)
|
|
247
|
+
|
|
248
|
+
### Top 10 Recommendations by Impact
|
|
249
|
+
|
|
250
|
+
| Priority | Action | Principle | Effort |
|
|
251
|
+
|----------|--------|-----------|--------|
|
|
252
|
+
|
|
253
|
+
### What's Working Excellently
|
|
254
|
+
|
|
255
|
+
[List top 5 strengths]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Success Criteria
|
|
259
|
+
|
|
260
|
+
- [ ] All 8 sub-agents complete their audits
|
|
261
|
+
- [ ] Each principle has a specific numeric score (X/Y format)
|
|
262
|
+
- [ ] Summary table shows all scores and status indicators
|
|
263
|
+
- [ ] Top 10 recommendations are prioritized by impact
|
|
264
|
+
- [ ] Report identifies both strengths and gaps
|
|
265
|
+
|
|
266
|
+
## Optional: Single Principle Audit
|
|
267
|
+
|
|
268
|
+
If $ARGUMENTS specifies a single principle (e.g., "action parity"), only run that sub-agent and provide detailed findings for that principle alone.
|
|
269
|
+
|
|
270
|
+
Valid arguments:
|
|
271
|
+
- `action parity` or `1`
|
|
272
|
+
- `tools` or `primitives` or `2`
|
|
273
|
+
- `context` or `injection` or `3`
|
|
274
|
+
- `shared` or `workspace` or `4`
|
|
275
|
+
- `crud` or `5`
|
|
276
|
+
- `ui` or `integration` or `6`
|
|
277
|
+
- `discovery` or `7`
|
|
278
|
+
- `prompt` or `features` or `8`
|
|
279
|
+
|