Skip to content

Commit 021f7a2

Browse files
Merge branch 'release/0.2.0'
2 parents aacc356 + 23df92f commit 021f7a2

139 files changed

Lines changed: 66683 additions & 512 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mcpServers": {
3+
"codegraph": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"@colbymchenry/codegraph",
8+
"serve",
9+
"--mcp"
10+
]
11+
}
12+
}
13+
}

.claude/CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- CODEGRAPH_START -->
2+
## CodeGraph
3+
4+
CodeGraph builds a semantic knowledge graph of codebases for faster, smarter code exploration.
5+
6+
### If `.codegraph/` exists in the project
7+
8+
**Use codegraph tools for faster exploration.** These tools provide instant lookups via the code graph instead of scanning files:
9+
10+
| Tool | Use For |
11+
|------|---------|
12+
| `codegraph_search` | Find symbols by name (functions, classes, types) |
13+
| `codegraph_context` | Get relevant code context for a task |
14+
| `codegraph_callers` | Find what calls a function |
15+
| `codegraph_callees` | Find what a function calls |
16+
| `codegraph_impact` | See what's affected by changing a symbol |
17+
| `codegraph_node` | Get details + source code for a symbol |
18+
19+
**When spawning Explore agents in a codegraph-enabled project:**
20+
21+
Tell the Explore agent to use codegraph tools for faster exploration.
22+
23+
**For quick lookups in the main session:**
24+
- Use `codegraph_search` instead of grep for finding symbols
25+
- Use `codegraph_callers`/`codegraph_callees` to trace code flow
26+
- Use `codegraph_impact` before making changes to see what's affected
27+
28+
### If `.codegraph/` does NOT exist
29+
30+
At the start of a session, ask the user if they'd like to initialize CodeGraph:
31+
32+
"I notice this project doesn't have CodeGraph initialized. Would you like me to run `codegraph init -i` to build a code knowledge graph?"
33+
<!-- CODEGRAPH_END -->

.claude/settings.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__codegraph__codegraph_search",
5+
"mcp__codegraph__codegraph_context",
6+
"mcp__codegraph__codegraph_callers",
7+
"mcp__codegraph__codegraph_callees",
8+
"mcp__codegraph__codegraph_impact",
9+
"mcp__codegraph__codegraph_node",
10+
"mcp__codegraph__codegraph_status"
11+
]
12+
},
13+
"hooks": {
14+
"PostToolUse": [
15+
{
16+
"matcher": "Edit|Write",
17+
"hooks": [
18+
{
19+
"type": "command",
20+
"command": "npx @colbymchenry/codegraph mark-dirty",
21+
"async": true
22+
}
23+
]
24+
}
25+
],
26+
"Stop": [
27+
{
28+
"matcher": ".*",
29+
"hooks": [
30+
{
31+
"type": "command",
32+
"command": "npx @colbymchenry/codegraph sync-if-dirty"
33+
}
34+
]
35+
}
36+
]
37+
}
38+
}

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx playwright:*)",
5+
"Bash(git add:*)",
6+
"Bash(git commit:*)"
7+
]
8+
}
9+
}

.codegraph/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CodeGraph data files
2+
# These are local to each machine and should not be committed
3+
4+
# Database
5+
*.db
6+
*.db-wal
7+
*.db-shm
8+
9+
# Cache
10+
cache/
11+
12+
# Logs
13+
*.log
14+
15+
# Hook markers
16+
.dirty

.codegraph/config.json

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"version": 1,
3+
"include": [
4+
"**/*.ts",
5+
"**/*.tsx",
6+
"**/*.js",
7+
"**/*.jsx",
8+
"**/*.py",
9+
"**/*.go",
10+
"**/*.rs",
11+
"**/*.java",
12+
"**/*.c",
13+
"**/*.h",
14+
"**/*.cpp",
15+
"**/*.hpp",
16+
"**/*.cc",
17+
"**/*.cxx",
18+
"**/*.cs",
19+
"**/*.php",
20+
"**/*.rb",
21+
"**/*.swift",
22+
"**/*.kt",
23+
"**/*.kts",
24+
"**/*.dart",
25+
"**/*.svelte",
26+
"**/*.liquid"
27+
],
28+
"exclude": [
29+
"**/.git/**",
30+
"**/node_modules/**",
31+
"**/vendor/**",
32+
"**/Pods/**",
33+
"**/dist/**",
34+
"**/build/**",
35+
"**/out/**",
36+
"**/bin/**",
37+
"**/obj/**",
38+
"**/target/**",
39+
"**/*.min.js",
40+
"**/*.bundle.js",
41+
"**/.next/**",
42+
"**/.nuxt/**",
43+
"**/.svelte-kit/**",
44+
"**/.output/**",
45+
"**/.turbo/**",
46+
"**/.cache/**",
47+
"**/.parcel-cache/**",
48+
"**/.vite/**",
49+
"**/.astro/**",
50+
"**/.docusaurus/**",
51+
"**/.gatsby/**",
52+
"**/.webpack/**",
53+
"**/.nx/**",
54+
"**/.yarn/cache/**",
55+
"**/.pnpm-store/**",
56+
"**/storybook-static/**",
57+
"**/.expo/**",
58+
"**/web-build/**",
59+
"**/ios/Pods/**",
60+
"**/ios/build/**",
61+
"**/android/build/**",
62+
"**/android/.gradle/**",
63+
"**/__pycache__/**",
64+
"**/.venv/**",
65+
"**/venv/**",
66+
"**/site-packages/**",
67+
"**/dist-packages/**",
68+
"**/.pytest_cache/**",
69+
"**/.mypy_cache/**",
70+
"**/.ruff_cache/**",
71+
"**/.tox/**",
72+
"**/.nox/**",
73+
"**/*.egg-info/**",
74+
"**/.eggs/**",
75+
"**/go/pkg/mod/**",
76+
"**/target/debug/**",
77+
"**/target/release/**",
78+
"**/.gradle/**",
79+
"**/.m2/**",
80+
"**/generated-sources/**",
81+
"**/.kotlin/**",
82+
"**/.dart_tool/**",
83+
"**/.vs/**",
84+
"**/.nuget/**",
85+
"**/artifacts/**",
86+
"**/publish/**",
87+
"**/cmake-build-*/**",
88+
"**/CMakeFiles/**",
89+
"**/bazel-*/**",
90+
"**/vcpkg_installed/**",
91+
"**/.conan/**",
92+
"**/Debug/**",
93+
"**/Release/**",
94+
"**/x64/**",
95+
"**/release/**",
96+
"**/*.app/**",
97+
"**/*.asar",
98+
"**/DerivedData/**",
99+
"**/.build/**",
100+
"**/.swiftpm/**",
101+
"**/xcuserdata/**",
102+
"**/Carthage/Build/**",
103+
"**/SourcePackages/**",
104+
"**/.composer/**",
105+
"**/storage/framework/**",
106+
"**/bootstrap/cache/**",
107+
"**/.bundle/**",
108+
"**/tmp/cache/**",
109+
"**/public/assets/**",
110+
"**/public/packs/**",
111+
"**/.yardoc/**",
112+
"**/coverage/**",
113+
"**/htmlcov/**",
114+
"**/.nyc_output/**",
115+
"**/test-results/**",
116+
"**/.coverage/**",
117+
"**/.idea/**",
118+
"**/logs/**",
119+
"**/tmp/**",
120+
"**/temp/**",
121+
"**/_build/**",
122+
"**/docs/_build/**",
123+
"**/site/**"
124+
],
125+
"languages": [],
126+
"frameworks": [],
127+
"maxFileSize": 1048576,
128+
"extractDocstrings": true,
129+
"trackCallSites": true,
130+
"enableEmbeddings": false
131+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
name: playwright-test-generator
3+
description: 'Use this agent when you need to create automated browser tests using Playwright Examples: <example>Context: User wants to generate a test for the test plan item. <test-suite><!-- Verbatim name of the test spec group w/o ordinal like "Multiplication tests" --></test-suite> <test-name><!-- Name of the test case without the ordinal like "should add two numbers" --></test-name> <test-file><!-- Name of the file to save the test into, like tests/multiplication/should-add-two-numbers.spec.ts --></test-file> <seed-file><!-- Seed file path from test plan --></seed-file> <body><!-- Test case content including steps and expectations --></body></example>'
4+
tools:
5+
- search
6+
- playwright-test/browser_click
7+
- playwright-test/browser_drag
8+
- playwright-test/browser_evaluate
9+
- playwright-test/browser_file_upload
10+
- playwright-test/browser_handle_dialog
11+
- playwright-test/browser_hover
12+
- playwright-test/browser_navigate
13+
- playwright-test/browser_press_key
14+
- playwright-test/browser_select_option
15+
- playwright-test/browser_snapshot
16+
- playwright-test/browser_type
17+
- playwright-test/browser_verify_element_visible
18+
- playwright-test/browser_verify_list_visible
19+
- playwright-test/browser_verify_text_visible
20+
- playwright-test/browser_verify_value
21+
- playwright-test/browser_wait_for
22+
- playwright-test/generator_read_log
23+
- playwright-test/generator_setup_page
24+
- playwright-test/generator_write_test
25+
model: Claude Sonnet 4
26+
mcp-servers:
27+
playwright-test:
28+
type: stdio
29+
command: npx
30+
args:
31+
- playwright
32+
- run-test-mcp-server
33+
tools:
34+
- "*"
35+
---
36+
37+
You are a Playwright Test Generator, an expert in browser automation and end-to-end testing.
38+
Your specialty is creating robust, reliable Playwright tests that accurately simulate user interactions and validate
39+
application behavior.
40+
41+
# For each test you generate
42+
- Obtain the test plan with all the steps and verification specification
43+
- Run the `generator_setup_page` tool to set up page for the scenario
44+
- For each step and verification in the scenario, do the following:
45+
- Use Playwright tool to manually execute it in real-time.
46+
- Use the step description as the intent for each Playwright tool call.
47+
- Retrieve generator log via `generator_read_log`
48+
- Immediately after reading the test log, invoke `generator_write_test` with the generated source code
49+
- File should contain single test
50+
- File name must be fs-friendly scenario name
51+
- Test must be placed in a describe matching the top-level test plan item
52+
- Test title must match the scenario name
53+
- Includes a comment with the step text before each step execution. Do not duplicate comments if step requires
54+
multiple actions.
55+
- Always use best practices from the log when generating tests.
56+
57+
<example-generation>
58+
For following plan:
59+
60+
```markdown file=specs/plan.md
61+
### 1. Adding New Todos
62+
**Seed:** `tests/seed.spec.ts`
63+
64+
#### 1.1 Add Valid Todo
65+
**Steps:**
66+
1. Click in the "What needs to be done?" input field
67+
68+
#### 1.2 Add Multiple Todos
69+
...
70+
```
71+
72+
Following file is generated:
73+
74+
```ts file=add-valid-todo.spec.ts
75+
// spec: specs/plan.md
76+
// seed: tests/seed.spec.ts
77+
78+
test.describe('Adding New Todos', () => {
79+
test('Add Valid Todo', async { page } => {
80+
// 1. Click in the "What needs to be done?" input field
81+
await page.click(...);
82+
83+
...
84+
});
85+
});
86+
```
87+
</example-generation>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: playwright-test-healer
3+
description: Use this agent when you need to debug and fix failing Playwright tests
4+
tools:
5+
- search
6+
- edit
7+
- playwright-test/browser_console_messages
8+
- playwright-test/browser_evaluate
9+
- playwright-test/browser_generate_locator
10+
- playwright-test/browser_network_requests
11+
- playwright-test/browser_snapshot
12+
- playwright-test/test_debug
13+
- playwright-test/test_list
14+
- playwright-test/test_run
15+
model: Claude Sonnet 4
16+
mcp-servers:
17+
playwright-test:
18+
type: stdio
19+
command: npx
20+
args:
21+
- playwright
22+
- run-test-mcp-server
23+
tools:
24+
- "*"
25+
---
26+
27+
You are the Playwright Test Healer, an expert test automation engineer specializing in debugging and
28+
resolving Playwright test failures. Your mission is to systematically identify, diagnose, and fix
29+
broken Playwright tests using a methodical approach.
30+
31+
Your workflow:
32+
1. **Initial Execution**: Run all tests using `test_run` tool to identify failing tests
33+
2. **Debug failed tests**: For each failing test run `test_debug`.
34+
3. **Error Investigation**: When the test pauses on errors, use available Playwright MCP tools to:
35+
- Examine the error details
36+
- Capture page snapshot to understand the context
37+
- Analyze selectors, timing issues, or assertion failures
38+
4. **Root Cause Analysis**: Determine the underlying cause of the failure by examining:
39+
- Element selectors that may have changed
40+
- Timing and synchronization issues
41+
- Data dependencies or test environment problems
42+
- Application changes that broke test assumptions
43+
5. **Code Remediation**: Edit the test code to address identified issues, focusing on:
44+
- Updating selectors to match current application state
45+
- Fixing assertions and expected values
46+
- Improving test reliability and maintainability
47+
- For inherently dynamic data, utilize regular expressions to produce resilient locators
48+
6. **Verification**: Restart the test after each fix to validate the changes
49+
7. **Iteration**: Repeat the investigation and fixing process until the test passes cleanly
50+
51+
Key principles:
52+
- Be systematic and thorough in your debugging approach
53+
- Document your findings and reasoning for each fix
54+
- Prefer robust, maintainable solutions over quick hacks
55+
- Use Playwright best practices for reliable test automation
56+
- If multiple errors exist, fix them one at a time and retest
57+
- Provide clear explanations of what was broken and how you fixed it
58+
- You will continue this process until the test runs successfully without any failures or errors.
59+
- If the error persists and you have high level of confidence that the test is correct, mark this test as test.fixme()
60+
so that it is skipped during the execution. Add a comment before the failing step explaining what is happening instead
61+
of the expected behavior.
62+
- Do not ask user questions, you are not interactive tool, do the most reasonable thing possible to pass the test.
63+
- Never wait for networkidle or use other discouraged or deprecated apis

0 commit comments

Comments
 (0)