create-harness-vibe-coding 0.1.8 → 0.1.10
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/README.md +95 -1
- package/package.json +5 -2
- package/src/generator.js +347 -53
- package/src/index.js +212 -17
- package/templates/common/.claude/rules/ecc/common.md +9 -0
- package/templates/common/CLAUDE.md +5 -3
- package/templates/common/MEMORY.md +12 -8
- package/templates/common/SETUP.md +87 -2
- package/templates/common/docs/README.md +8 -0
- package/templates/common/docs/features/_template.md +24 -1
- package/templates/common/docs/harness/agent-workflow.md +3 -7
- package/templates/common/docs/harness/context-loading.md +3 -0
- package/templates/common/docs/harness/dispatch.md +3 -0
- package/templates/common/docs/harness/extension.md +12 -0
- package/templates/common/memory/agent-lessons-patterns.md +21 -0
- package/templates/common/memory/tool-usage-reflections.md +21 -0
- package/templates/common/memory/user-corrections-preferences.md +21 -0
- package/templates/common/scripts/validate-harness.mjs +99 -3
- package/templates/optional/catalog.json +43 -0
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -0
- package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +42 -0
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -0
- package/templates/optional/skills/github-pr-review/docs/workflows/github-pr-review.md +28 -0
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -0
- package/templates/optional/skills/python-backend/docs/workflows/python-backend.md +34 -0
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -0
- package/templates/optional/skills/ts-react-frontend/docs/workflows/ts-react-frontend.md +35 -0
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -0
- package/templates/optional/skills/ui-ux-review/docs/workflows/ui-ux-review.md +26 -0
|
@@ -4,6 +4,17 @@ Purpose: keep stack-specific agents, skills, rules, and hooks compatible with th
|
|
|
4
4
|
|
|
5
5
|
Use during setup whenever adding assets from ECC, SuperClaude, toolboxes, or local project conventions.
|
|
6
6
|
|
|
7
|
+
## Non-Invasive Extension Rules
|
|
8
|
+
|
|
9
|
+
Extensions must preserve project and harness ownership boundaries.
|
|
10
|
+
|
|
11
|
+
- Preserve existing `.claude/`, `CLAUDE.md`, `AGENTS.md`, `.gitignore`, `docs/README.md`, `docs/workflows/*.md`, settings, hooks, and local rules unless the user explicitly requests an overwrite.
|
|
12
|
+
- Treat existing project config as project fact. Read it before adding assets, then adapt new assets to the project instead of replacing the project.
|
|
13
|
+
- Register added agents, skills, workflows, rules, and hooks in `MEMORY.md` and this docs router where applicable.
|
|
14
|
+
- Added assets may extend `.claude/skills/`, `.claude/agents/`, `.claude/rules/`, or `docs/workflows/`, but they must not replace core harness docs.
|
|
15
|
+
- Core harness docs are `docs/README.md`, `docs/harness/PLAN.md`, `docs/harness/context-loading.md`, `docs/harness/dispatch.md`, `docs/harness/agent-workflow.md`, and this file.
|
|
16
|
+
- If an optional workflow needs a new command or tool, document the command and fallback in `docs/workflows/<name>.md` instead of changing core harness behavior.
|
|
17
|
+
|
|
7
18
|
## Agent Contract
|
|
8
19
|
|
|
9
20
|
Every added agent must have frontmatter:
|
|
@@ -63,5 +74,6 @@ After adding assets:
|
|
|
63
74
|
|
|
64
75
|
- list agents in `MEMORY.md#Agents`
|
|
65
76
|
- list skills in `MEMORY.md#Skills`
|
|
77
|
+
- list workflows by path in `MEMORY.md` or `docs/README.md`
|
|
66
78
|
- update `docs/harness/PLAN.md` when the asset affects current work
|
|
67
79
|
- run `node scripts/validate-harness.mjs`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Agent Lessons And Patterns
|
|
2
|
+
|
|
3
|
+
Purpose: record reusable lessons from review, debugging, validation, and handoff loops.
|
|
4
|
+
|
|
5
|
+
Write here when:
|
|
6
|
+
- A review/debug loop reveals a reusable prevention pattern.
|
|
7
|
+
- A validation failure exposes a missing regression check.
|
|
8
|
+
- A handoff, dispatch, or context-loading pattern should be repeated or avoided.
|
|
9
|
+
|
|
10
|
+
Entry format, newest first:
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
## YYYY-MM-DD - Short Lesson Name
|
|
14
|
+
|
|
15
|
+
- Lesson: the reusable pattern.
|
|
16
|
+
- Source: review finding, debug loop, failed verification, or handoff.
|
|
17
|
+
- Apply when: the task shape or files where this matters.
|
|
18
|
+
- Regression guard: test, validator check, docs update, or manual evidence to keep it from recurring.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Keep entries lightweight and actionable. Avoid secrets and speculative lessons.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tool Usage Reflections
|
|
2
|
+
|
|
3
|
+
Purpose: record repeated tool failures, better command patterns, and environment-specific fixes.
|
|
4
|
+
|
|
5
|
+
Write here when:
|
|
6
|
+
- The same tool/use pattern fails 3+ times in one task or across repeated tasks.
|
|
7
|
+
- A more reliable command pattern replaces a brittle one.
|
|
8
|
+
- The environment needs a durable fix, flag, path rule, shell syntax, or startup sequence.
|
|
9
|
+
|
|
10
|
+
Entry format, newest first:
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
## YYYY-MM-DD - Short Pattern Name
|
|
14
|
+
|
|
15
|
+
- Trigger: what failed or repeated.
|
|
16
|
+
- Better pattern: the command, tool usage, or sequence to use next time.
|
|
17
|
+
- Evidence: command output summary, error text, or affected environment.
|
|
18
|
+
- Scope: when this applies and when it does not.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Keep entries concise. Do not record secrets, credentials, private tokens, or one-off noise.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# User Corrections And Preferences
|
|
2
|
+
|
|
3
|
+
Purpose: record repeated user corrections, durable preferences, and common-sense course corrections.
|
|
4
|
+
|
|
5
|
+
Write here when:
|
|
6
|
+
- The user says "remember", "never", "next time", "always", or "I prefer".
|
|
7
|
+
- The user corrects the same assumption/pattern 2+ times.
|
|
8
|
+
- A correction changes how future work should be scoped, explained, verified, or handed off.
|
|
9
|
+
|
|
10
|
+
Entry format, newest first:
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
## YYYY-MM-DD - Short Preference Name
|
|
14
|
+
|
|
15
|
+
- Correction/preference: the durable instruction.
|
|
16
|
+
- Trigger: what prompted the correction.
|
|
17
|
+
- Apply when: future contexts where this should guide behavior.
|
|
18
|
+
- Avoid: contexts where this should not be over-applied.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Do not record ordinary chat. If the preference is ambiguous, ask before writing it. Never store secrets.
|
|
@@ -10,7 +10,8 @@ if (args.has('--help') || args.has('-h')) {
|
|
|
10
10
|
console.log(`Usage: node scripts/validate-harness.mjs [--strict]
|
|
11
11
|
|
|
12
12
|
Default mode checks scaffold structure, links, agents, and skills.
|
|
13
|
-
--strict also fails when project fact docs still contain {{
|
|
13
|
+
--strict also fails when project fact docs still contain unresolved {{TOKEN}} placeholders.
|
|
14
|
+
Literal explanatory {{...}} text is allowed.`);
|
|
14
15
|
process.exit(0);
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -34,10 +35,17 @@ const commonSkills = [
|
|
|
34
35
|
'harness-build-loop',
|
|
35
36
|
];
|
|
36
37
|
|
|
38
|
+
const memoryFiles = [
|
|
39
|
+
'memory/tool-usage-reflections.md',
|
|
40
|
+
'memory/user-corrections-preferences.md',
|
|
41
|
+
'memory/agent-lessons-patterns.md',
|
|
42
|
+
];
|
|
43
|
+
|
|
37
44
|
const required = [
|
|
38
45
|
'AGENTS.md',
|
|
39
46
|
'CLAUDE.md',
|
|
40
47
|
'MEMORY.md',
|
|
48
|
+
...memoryFiles,
|
|
41
49
|
'.claude/settings.json',
|
|
42
50
|
'.claude/rules/ecc/common.md',
|
|
43
51
|
...commonAgents.map(agent => `.claude/agents/${agent}.md`),
|
|
@@ -80,6 +88,12 @@ const contextPacks = [
|
|
|
80
88
|
'Verifier:',
|
|
81
89
|
];
|
|
82
90
|
|
|
91
|
+
const durableCommunicationDocs = [
|
|
92
|
+
'docs/README.md',
|
|
93
|
+
'docs/harness/dispatch.md',
|
|
94
|
+
'docs/harness/context-loading.md',
|
|
95
|
+
];
|
|
96
|
+
|
|
83
97
|
const errors = [];
|
|
84
98
|
|
|
85
99
|
function read(rel) {
|
|
@@ -97,6 +111,36 @@ function frontmatterField(text, field) {
|
|
|
97
111
|
return match ? match[1].trim() : '';
|
|
98
112
|
}
|
|
99
113
|
|
|
114
|
+
function listDirectories(rel) {
|
|
115
|
+
const dir = path.join(root, rel);
|
|
116
|
+
if (!fs.existsSync(dir)) return [];
|
|
117
|
+
return fs.readdirSync(dir, { withFileTypes: true })
|
|
118
|
+
.filter(entry => entry.isDirectory())
|
|
119
|
+
.map(entry => entry.name);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function listMarkdownFiles(rel) {
|
|
123
|
+
const dir = path.join(root, rel);
|
|
124
|
+
if (!fs.existsSync(dir)) return [];
|
|
125
|
+
const normalizedRel = rel.replaceAll(path.sep, '/');
|
|
126
|
+
return fs.readdirSync(dir, { withFileTypes: true })
|
|
127
|
+
.filter(entry => entry.isFile() && entry.name.endsWith('.md'))
|
|
128
|
+
.map(entry => `${normalizedRel}/${entry.name}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function unresolvedTemplatePlaceholders(text) {
|
|
132
|
+
const placeholders = [];
|
|
133
|
+
const pattern = /\{\{([^{}\r\n]+)\}\}/g;
|
|
134
|
+
|
|
135
|
+
for (const match of text.matchAll(pattern)) {
|
|
136
|
+
const token = match[1].trim();
|
|
137
|
+
if (token === '...') continue;
|
|
138
|
+
placeholders.push(`{{${token}}}`);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return [...new Set(placeholders)];
|
|
142
|
+
}
|
|
143
|
+
|
|
100
144
|
for (const rel of required) {
|
|
101
145
|
if (!fs.existsSync(path.join(root, rel))) {
|
|
102
146
|
errors.push(`missing required file: ${rel}`);
|
|
@@ -108,10 +152,15 @@ if (fs.existsSync(path.join(root, 'docs/research/scaffolds.md'))) {
|
|
|
108
152
|
}
|
|
109
153
|
|
|
110
154
|
if (strict) {
|
|
155
|
+
console.log('Strict placeholder scope:');
|
|
156
|
+
for (const rel of projectFacts) {
|
|
157
|
+
console.log(`- ${rel}`);
|
|
158
|
+
}
|
|
159
|
+
|
|
111
160
|
for (const rel of projectFacts) {
|
|
112
161
|
const text = read(rel);
|
|
113
|
-
|
|
114
|
-
errors.push(`template
|
|
162
|
+
for (const placeholder of unresolvedTemplatePlaceholders(text)) {
|
|
163
|
+
errors.push(`template placeholder remains in project fact file: ${rel}: ${placeholder}`);
|
|
115
164
|
}
|
|
116
165
|
}
|
|
117
166
|
}
|
|
@@ -123,6 +172,14 @@ if (docsReadme) {
|
|
|
123
172
|
}
|
|
124
173
|
}
|
|
125
174
|
|
|
175
|
+
for (const rel of durableCommunicationDocs) {
|
|
176
|
+
requireText(rel, 'project files are the only durable communication channel', 'durable filesystem communication invariant');
|
|
177
|
+
requireText(rel, 'chat/subagent transcript state is non-authoritative', 'non-authoritative transcript invariant');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
requireText('CLAUDE.md', 'same tool/use pattern fails 3+ times', 'tool reflection trigger');
|
|
181
|
+
requireText('CLAUDE.md', 'user corrects the same assumption/pattern 2+ times', 'user correction reflection trigger');
|
|
182
|
+
|
|
126
183
|
const plan = read('docs/harness/PLAN.md');
|
|
127
184
|
if (plan) {
|
|
128
185
|
for (const heading of ['## Current Goal', '## Phase', '## Success Criteria', '## Loaded Context', '## Tasks', '## Parallel Dispatch', '## Verification']) {
|
|
@@ -158,8 +215,36 @@ if (memory) {
|
|
|
158
215
|
const rel = `.claude/skills/${skill}/SKILL.md`;
|
|
159
216
|
if (!memory.includes(rel)) errors.push(`MEMORY.md missing skill registration: ${rel}`);
|
|
160
217
|
}
|
|
218
|
+
for (const rel of memoryFiles) {
|
|
219
|
+
if (!memory.includes(rel)) errors.push(`MEMORY.md missing memory file registration: ${rel}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
for (const workflow of listMarkdownFiles('docs/workflows')) {
|
|
224
|
+
if (!docsReadme.includes(workflow) && !memory.includes(workflow)) {
|
|
225
|
+
errors.push(`workflow is not registered in docs/README.md or MEMORY.md: ${workflow}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function requireUiSelectorContract(rel) {
|
|
230
|
+
const text = read(rel);
|
|
231
|
+
if (!text) return;
|
|
232
|
+
|
|
233
|
+
const markers = [
|
|
234
|
+
'data-testid',
|
|
235
|
+
'accessible labels/roles',
|
|
236
|
+
'inputs, buttons, filters, rows, empty/error/loading states',
|
|
237
|
+
];
|
|
238
|
+
|
|
239
|
+
if (markers.some(marker => !text.includes(marker))) {
|
|
240
|
+
errors.push(`${rel} missing stable UI selector contract`);
|
|
241
|
+
}
|
|
161
242
|
}
|
|
162
243
|
|
|
244
|
+
requireUiSelectorContract('docs/workflows/browser-e2e.md');
|
|
245
|
+
requireUiSelectorContract('docs/workflows/ts-react-frontend.md');
|
|
246
|
+
requireUiSelectorContract('docs/features/_template.md');
|
|
247
|
+
|
|
163
248
|
for (const skill of commonSkills) {
|
|
164
249
|
const rel = `.claude/skills/${skill}/SKILL.md`;
|
|
165
250
|
const text = read(rel);
|
|
@@ -168,6 +253,17 @@ for (const skill of commonSkills) {
|
|
|
168
253
|
if (!frontmatterField(text, 'description')) errors.push(`${rel} missing frontmatter field: description`);
|
|
169
254
|
}
|
|
170
255
|
|
|
256
|
+
for (const skill of listDirectories('.claude/skills')) {
|
|
257
|
+
if (commonSkills.includes(skill)) continue;
|
|
258
|
+
|
|
259
|
+
const rel = `.claude/skills/${skill}/SKILL.md`;
|
|
260
|
+
const text = read(rel);
|
|
261
|
+
if (!text) continue;
|
|
262
|
+
|
|
263
|
+
if (frontmatterField(text, 'name') !== skill) errors.push(`${rel} frontmatter name does not match directory`);
|
|
264
|
+
if (!frontmatterField(text, 'description')) errors.push(`${rel} missing frontmatter field: description`);
|
|
265
|
+
}
|
|
266
|
+
|
|
171
267
|
for (const agent of commonAgents) {
|
|
172
268
|
const rel = `.claude/agents/${agent}.md`;
|
|
173
269
|
const text = read(rel);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skills": [
|
|
3
|
+
{
|
|
4
|
+
"id": "browser-e2e",
|
|
5
|
+
"title": "Browser E2E",
|
|
6
|
+
"description": "Mandatory real-browser smoke workflow using Playwright, Chrome DevTools/CDP, or documented manual evidence.",
|
|
7
|
+
"files": ["skills/browser-e2e"],
|
|
8
|
+
"tags": ["e2e", "browser", "playwright", "cdp"]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "ui-ux-review",
|
|
12
|
+
"title": "UI/UX Review",
|
|
13
|
+
"description": "Screenshot-driven responsive, accessibility, and visual polish review workflow.",
|
|
14
|
+
"files": ["skills/ui-ux-review"],
|
|
15
|
+
"tags": ["ui", "ux", "accessibility", "review"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "github-pr-review",
|
|
19
|
+
"title": "GitHub PR Review",
|
|
20
|
+
"description": "GitHub CLI based PR diff, checks, review findings, and CI evidence workflow.",
|
|
21
|
+
"files": ["skills/github-pr-review"],
|
|
22
|
+
"tags": ["github", "pr", "review", "ci"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "python-backend",
|
|
26
|
+
"title": "Python Backend",
|
|
27
|
+
"description": "Python backend workflow for FastAPI or similar APIs with unittest or pytest verification.",
|
|
28
|
+
"files": ["skills/python-backend"],
|
|
29
|
+
"tags": ["python", "fastapi", "unittest", "pytest", "api"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "ts-react-frontend",
|
|
33
|
+
"title": "TypeScript React Frontend",
|
|
34
|
+
"description": "TypeScript React workflow for typecheck, component tests, builds, and browser smoke.",
|
|
35
|
+
"files": ["skills/ts-react-frontend"],
|
|
36
|
+
"tags": ["typescript", "react", "vite", "frontend"]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"presets": {
|
|
40
|
+
"web-app": ["ts-react-frontend", "browser-e2e", "ui-ux-review"],
|
|
41
|
+
"fullstack": ["ts-react-frontend", "python-backend", "browser-e2e", "github-pr-review"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: browser-e2e
|
|
3
|
+
description: Mandatory real-browser smoke and end-to-end verification using Playwright, Chrome DevTools/CDP, or documented manual browser evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Browser E2E
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a change affects browser-visible behavior, navigation, forms, routing, layout, or client-side integration. Web/UI acceptance requires loading the app in a real browser before claiming the UI is done.
|
|
11
|
+
|
|
12
|
+
## Docs To Load
|
|
13
|
+
|
|
14
|
+
- `docs/workflows/browser-e2e.md`
|
|
15
|
+
- `docs/harness/PLAN.md`
|
|
16
|
+
- Existing project test, build, and run instructions.
|
|
17
|
+
|
|
18
|
+
## Required Inputs
|
|
19
|
+
|
|
20
|
+
- Target URL or command to start the app.
|
|
21
|
+
- User flows or pages to verify.
|
|
22
|
+
- Expected behavior and supported viewport/browser scope.
|
|
23
|
+
- Selector contract: stable accessible labels/roles and `data-testid` hooks for critical inputs, buttons, filters, rows, empty/error/loading states, and other targetable UI states.
|
|
24
|
+
|
|
25
|
+
## Allowed Writes
|
|
26
|
+
|
|
27
|
+
- Browser test files in the project's existing test locations.
|
|
28
|
+
- Evidence artifacts such as screenshots, traces, or reports in existing artifact folders.
|
|
29
|
+
- Notes in `docs/harness/PLAN.md` when the active task asks for plan tracking.
|
|
30
|
+
|
|
31
|
+
## Output Format
|
|
32
|
+
|
|
33
|
+
Return changed files, commands run, browser evidence paths, verified flows, failures, and follow-up risks.
|
|
34
|
+
Include the selectors used for CDP/Playwright/manual verification.
|
|
35
|
+
|
|
36
|
+
## PLAN.md Updates
|
|
37
|
+
|
|
38
|
+
Update `docs/harness/PLAN.md` only when executing a tracked plan item or recording evidence requested by the current task.
|
|
39
|
+
|
|
40
|
+
## dispatch.md Usage
|
|
41
|
+
|
|
42
|
+
Use `docs/harness/dispatch.md` only when splitting independent browser checks across workers is explicitly useful.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Browser E2E Workflow
|
|
2
|
+
|
|
3
|
+
## Required Evidence
|
|
4
|
+
|
|
5
|
+
- App start command and URL.
|
|
6
|
+
- Real-browser load of the changed app before any web/UI acceptance claim.
|
|
7
|
+
- Console, runtime, and network check result, including whether React/Vite/client startup errors or failed requests appeared.
|
|
8
|
+
- Stable accessible labels/roles and stable test hooks such as `data-testid` are required for critical UI controls and states: inputs, buttons, filters, rows, empty/error/loading states.
|
|
9
|
+
- CDP, Playwright, and manual verification must target those selectors for the critical interaction path instead of brittle DOM paths.
|
|
10
|
+
- Viewports and browsers checked.
|
|
11
|
+
- Screenshot, trace, video, or documented manual screenshot artifact for each critical UI flow.
|
|
12
|
+
- Final pass/fail result with exact command output summary.
|
|
13
|
+
|
|
14
|
+
## Chrome DevTools / CDP / MCP Checklist
|
|
15
|
+
|
|
16
|
+
- Start the app with the project command and record the URL and port.
|
|
17
|
+
- Open a real browser target through available CDP, MCP, browser automation, or manual tooling.
|
|
18
|
+
- Wait for a stable app selector, route, or page-ready state, not just HTTP 200.
|
|
19
|
+
- Capture runtime exceptions, console errors, and failed network requests before and after the flow.
|
|
20
|
+
- Interact through stable accessible labels/roles or `data-testid`, not brittle DOM paths.
|
|
21
|
+
- Verify at least one critical flow end-to-end in the real browser target.
|
|
22
|
+
- Save screenshot, trace, video, or result artifact paths and record them in `docs/harness/PLAN.md` or the feature doc.
|
|
23
|
+
- Clean up any dev server or browser processes started for verification.
|
|
24
|
+
|
|
25
|
+
## Common Commands
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
npm run dev
|
|
29
|
+
npx playwright test
|
|
30
|
+
npx playwright test --headed
|
|
31
|
+
npx playwright show-report
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If Playwright is not installed, prefer an existing browser test command from `package.json`. Chrome DevTools/CDP, manual screenshot evidence, or framework-specific tools are acceptable when the method, URL, flow, console/runtime/network result, and artifacts are documented.
|
|
35
|
+
|
|
36
|
+
## Fallback
|
|
37
|
+
|
|
38
|
+
When no browser automation is available, run the app locally in a real browser, inspect critical flows manually, capture screenshots, and report console or network errors. Do not claim web/UI acceptance from typecheck, build, or unit tests alone. Do not install new dependencies unless the user approves.
|
|
39
|
+
|
|
40
|
+
## Windows Notes
|
|
41
|
+
|
|
42
|
+
Use PowerShell syntax for environment variables, for example `$env:PORT='3000'; npm run dev`. Quote paths that contain spaces.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-pr-review
|
|
3
|
+
description: GitHub pull request review workflow using available GitHub CLI, local git diff, checks, and CI evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitHub PR Review
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when reviewing a GitHub pull request, responding to PR feedback, checking CI status, or summarizing review findings.
|
|
11
|
+
|
|
12
|
+
## Docs To Load
|
|
13
|
+
|
|
14
|
+
- `docs/workflows/github-pr-review.md`
|
|
15
|
+
- `docs/harness/PLAN.md`
|
|
16
|
+
- Repository contribution, test, and review guidelines.
|
|
17
|
+
|
|
18
|
+
## Required Inputs
|
|
19
|
+
|
|
20
|
+
- PR number, branch, or comparison range.
|
|
21
|
+
- Review goal: bug hunt, approval readiness, CI diagnosis, or feedback response.
|
|
22
|
+
- Expected test and check requirements.
|
|
23
|
+
|
|
24
|
+
## Allowed Writes
|
|
25
|
+
|
|
26
|
+
- Local files needed to address approved review feedback.
|
|
27
|
+
- Review notes or evidence in existing docs only when requested.
|
|
28
|
+
- `docs/harness/PLAN.md` when tracking review work.
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
Return findings first by severity with file and line references, then open questions, tests/checks run, and change summary if edits were made.
|
|
33
|
+
|
|
34
|
+
## PLAN.md Updates
|
|
35
|
+
|
|
36
|
+
Update `docs/harness/PLAN.md` only when the PR review is part of a tracked implementation plan.
|
|
37
|
+
|
|
38
|
+
## dispatch.md Usage
|
|
39
|
+
|
|
40
|
+
Use `docs/harness/dispatch.md` when independent review areas can be assigned separately, such as backend, frontend, and CI.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GitHub PR Review Workflow
|
|
2
|
+
|
|
3
|
+
## Required Evidence
|
|
4
|
+
|
|
5
|
+
- PR URL or number and base/head refs.
|
|
6
|
+
- Diff or changed-file summary.
|
|
7
|
+
- CI/check status and relevant failing logs.
|
|
8
|
+
- Review findings with exact file and line references when available.
|
|
9
|
+
|
|
10
|
+
## Common Commands
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
gh pr view --web
|
|
14
|
+
gh pr view --json number,title,baseRefName,headRefName,mergeStateStatus,statusCheckRollup
|
|
15
|
+
gh pr diff
|
|
16
|
+
git diff --stat
|
|
17
|
+
npm test
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use repository-specific test commands when they differ from npm.
|
|
21
|
+
|
|
22
|
+
## Fallback
|
|
23
|
+
|
|
24
|
+
If `gh` is unavailable or unauthenticated, use local git refs, remote URLs, and `git diff` against the target branch. Ask for missing PR context only when it cannot be inferred.
|
|
25
|
+
|
|
26
|
+
## Windows Notes
|
|
27
|
+
|
|
28
|
+
Quote branch names containing special characters. In PowerShell, pipe JSON output to tools that are available locally, or read it directly if `jq` is not installed.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-backend
|
|
3
|
+
description: Python backend workflow for API changes, service logic, FastAPI-style routes, and unittest or pytest verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Python Backend
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when changing Python API routes, service logic, persistence boundaries, background jobs, or backend tests.
|
|
11
|
+
|
|
12
|
+
## Docs To Load
|
|
13
|
+
|
|
14
|
+
- `docs/workflows/python-backend.md`
|
|
15
|
+
- `docs/harness/PLAN.md`
|
|
16
|
+
- Project backend README, API docs, dependency files, and test configuration.
|
|
17
|
+
|
|
18
|
+
## Required Inputs
|
|
19
|
+
|
|
20
|
+
- Target behavior, endpoint, service, or bug.
|
|
21
|
+
- Existing test command and runtime setup.
|
|
22
|
+
- Database, environment variable, or fixture constraints.
|
|
23
|
+
|
|
24
|
+
## Allowed Writes
|
|
25
|
+
|
|
26
|
+
- Python source, tests, fixtures, and backend docs in the task scope.
|
|
27
|
+
- Local evidence artifacts such as test output snippets.
|
|
28
|
+
- `docs/harness/PLAN.md` when the task requires plan tracking.
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
Return files changed, API or behavior summary, tests run, important logs, migration/config notes, and remaining risks.
|
|
33
|
+
|
|
34
|
+
## PLAN.md Updates
|
|
35
|
+
|
|
36
|
+
Update `docs/harness/PLAN.md` only when executing a tracked plan item or recording required validation evidence.
|
|
37
|
+
|
|
38
|
+
## dispatch.md Usage
|
|
39
|
+
|
|
40
|
+
Use `docs/harness/dispatch.md` for separable backend work such as API implementation, database changes, and test coverage.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python Backend Workflow
|
|
2
|
+
|
|
3
|
+
## Required Evidence
|
|
4
|
+
|
|
5
|
+
- Python executable, version, and dependency manager detected.
|
|
6
|
+
- Unit/integration test command and result.
|
|
7
|
+
- API smoke evidence for changed endpoints when applicable.
|
|
8
|
+
- Migration, fixture, or environment assumptions.
|
|
9
|
+
|
|
10
|
+
## Common Commands
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
python --version
|
|
14
|
+
py --version
|
|
15
|
+
python3 --version
|
|
16
|
+
python -m unittest discover -s tests
|
|
17
|
+
py -m unittest discover -s tests
|
|
18
|
+
python3 -m unittest discover -s tests
|
|
19
|
+
python -m pytest
|
|
20
|
+
python -m pytest tests
|
|
21
|
+
uv run pytest
|
|
22
|
+
poetry run pytest
|
|
23
|
+
python -m uvicorn app.main:app --reload
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Prefer commands already documented by the project. When no project-specific command is documented, detect an available Python executable in the current shell (`python`, then `py`, then `python3`) and run the matching `-m unittest discover -s tests` or pytest command. `unittest` is first-class for standard-library test suites; do not require pytest when the project already uses unittest.
|
|
27
|
+
|
|
28
|
+
## Fallback
|
|
29
|
+
|
|
30
|
+
If unittest, pytest, or the app runner is unavailable, run targeted Python modules, import checks, or framework-specific tests that already exist. Do not create or install a new backend stack without approval.
|
|
31
|
+
|
|
32
|
+
## Windows Notes
|
|
33
|
+
|
|
34
|
+
Virtual environment activation is usually `.\\.venv\\Scripts\\Activate.ps1`. If script execution is blocked, use the environment's Python executable directly, for example `.\\.venv\\Scripts\\python.exe -m unittest discover -s tests` or `.\\.venv\\Scripts\\python.exe -m pytest`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-react-frontend
|
|
3
|
+
description: TypeScript React frontend workflow for components, state, routing, typecheck, tests, builds, and browser smoke evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TypeScript React Frontend
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when changing React components, hooks, routes, client state, styling, build configuration, or frontend tests.
|
|
11
|
+
For user-visible changes, typecheck, build, and unit tests are not enough; include real-browser smoke or screenshot evidence before claiming acceptance.
|
|
12
|
+
|
|
13
|
+
## Docs To Load
|
|
14
|
+
|
|
15
|
+
- `docs/workflows/ts-react-frontend.md`
|
|
16
|
+
- `docs/harness/PLAN.md`
|
|
17
|
+
- Existing frontend README, package scripts, design system, and test setup.
|
|
18
|
+
|
|
19
|
+
## Required Inputs
|
|
20
|
+
|
|
21
|
+
- Screen, component, or flow being changed.
|
|
22
|
+
- Expected behavior and acceptance criteria.
|
|
23
|
+
- Existing package manager and verification commands.
|
|
24
|
+
- Selector contract: stable accessible labels/roles and `data-testid` hooks for critical inputs, buttons, filters, rows, empty/error/loading states, and other targetable UI states.
|
|
25
|
+
|
|
26
|
+
## Allowed Writes
|
|
27
|
+
|
|
28
|
+
- Frontend source, styles, tests, and focused docs in task scope.
|
|
29
|
+
- Generated evidence such as screenshots or test reports in existing artifact paths.
|
|
30
|
+
- `docs/harness/PLAN.md` when tracking a plan item.
|
|
31
|
+
|
|
32
|
+
## Output Format
|
|
33
|
+
|
|
34
|
+
Return changed files, UI behavior summary, commands run, browser or test evidence, and unresolved risks.
|
|
35
|
+
Include selectors added or verified for CDP/Playwright/manual checks.
|
|
36
|
+
|
|
37
|
+
## PLAN.md Updates
|
|
38
|
+
|
|
39
|
+
Update `docs/harness/PLAN.md` only when executing a tracked task or recording required validation evidence.
|
|
40
|
+
|
|
41
|
+
## dispatch.md Usage
|
|
42
|
+
|
|
43
|
+
Use `docs/harness/dispatch.md` when independent frontend tasks can run in parallel, such as components, tests, and browser checks.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# TypeScript React Frontend Workflow
|
|
2
|
+
|
|
3
|
+
## Required Evidence
|
|
4
|
+
|
|
5
|
+
- Package manager and scripts detected.
|
|
6
|
+
- Typecheck, lint, test, or build results according to project conventions.
|
|
7
|
+
- Real-browser smoke or screenshot evidence for user-visible changes.
|
|
8
|
+
- Console/runtime error check result for the changed screen or flow.
|
|
9
|
+
- Notes on responsive behavior and important interaction states.
|
|
10
|
+
- Stable accessible labels/roles and stable test hooks such as `data-testid` are required for critical UI controls and states: inputs, buttons, filters, rows, empty/error/loading states.
|
|
11
|
+
|
|
12
|
+
Typecheck, build, and unit tests are necessary signals but are not enough for user-visible React changes. Before claiming UI acceptance, load the app in a real browser by Playwright, Chrome DevTools/CDP, or a documented manual run and capture screenshot/trace/console evidence.
|
|
13
|
+
For TS/React UI work, capture the selector contract in the feature doc before implementation so tests and manual checks can target stable selectors instead of component internals or brittle DOM paths.
|
|
14
|
+
|
|
15
|
+
## Common Commands
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
npm run typecheck
|
|
19
|
+
npm run lint
|
|
20
|
+
npm test
|
|
21
|
+
npm run build
|
|
22
|
+
npm run dev
|
|
23
|
+
pnpm test
|
|
24
|
+
yarn test
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use the package manager and scripts already present in the repository.
|
|
28
|
+
|
|
29
|
+
## Fallback
|
|
30
|
+
|
|
31
|
+
If no formal checks exist, run the closest available build or dev command, inspect the changed UI manually, and document the missing automation. Do not add dependencies unless the task requires it and the user approves.
|
|
32
|
+
|
|
33
|
+
## Windows Notes
|
|
34
|
+
|
|
35
|
+
Use PowerShell syntax for environment variables: `$env:VITE_API_URL='http://localhost:8000'; npm run dev`. Quote paths and prefer package scripts over shell-specific command chains.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-review
|
|
3
|
+
description: Screenshot-driven UI and UX review for responsive behavior, accessibility, visual polish, and task clarity.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI/UX Review
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when reviewing or changing user-facing screens, layouts, visual hierarchy, interaction states, accessibility, or responsive behavior.
|
|
11
|
+
|
|
12
|
+
## Docs To Load
|
|
13
|
+
|
|
14
|
+
- `docs/workflows/ui-ux-review.md`
|
|
15
|
+
- `docs/harness/PLAN.md`
|
|
16
|
+
- Existing design system, component, or style documentation.
|
|
17
|
+
|
|
18
|
+
## Required Inputs
|
|
19
|
+
|
|
20
|
+
- Screens, routes, or components under review.
|
|
21
|
+
- Target users and primary tasks.
|
|
22
|
+
- Breakpoints, themes, and accessibility expectations.
|
|
23
|
+
|
|
24
|
+
## Allowed Writes
|
|
25
|
+
|
|
26
|
+
- UI code and style files already in scope for the task.
|
|
27
|
+
- Screenshot or audit artifacts in existing evidence folders.
|
|
28
|
+
- `docs/harness/PLAN.md` when the review is part of a tracked plan.
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
Return prioritized findings with file or screen references, evidence, recommended fixes, commands run, and residual risks.
|
|
33
|
+
|
|
34
|
+
## PLAN.md Updates
|
|
35
|
+
|
|
36
|
+
Update `docs/harness/PLAN.md` only for tracked review tasks or when recording required evidence.
|
|
37
|
+
|
|
38
|
+
## dispatch.md Usage
|
|
39
|
+
|
|
40
|
+
Use `docs/harness/dispatch.md` only for independent review streams such as separate routes or breakpoints.
|