You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply these ignore rules during the dogfood session:
39
38
-`/federated-tabs/failing` — intentionally throws to exercise error boundaries. The error boundary UI is expected.
40
39
- MSW (Mock Service Worker) console warnings — expected in this mock-data app.
41
40
- React warnings and deprecation notices — only flag actual JS errors/exceptions.
@@ -47,19 +46,27 @@ After the skill completes, read the generated report at `/tmp/dogfood-output/rep
47
46
-**If the report contains zero issues**: end with "DOGFOOD PASSED — no issues found" and stop.
48
47
-**If the report contains issues**:
49
48
50
-
1.**Identify referenced evidence** — Using the Grep tool, find all `screenshots/*.png` and `videos/*.webm` paths referenced in the report. Only these files should be uploaded (ignore exploration screenshots not cited in the report).
49
+
1.**Identify referenced evidence** — Using the Grep tool (parameter is `path`, not `file_path`), find all `screenshots/*.png` and `videos/*.webm` paths referenced in the report. Only these files should be uploaded (ignore exploration screenshots not cited in the report).
51
50
52
51
2.**Push evidence to the `dogfood-evidence` branch** — Evidence is stored in date-stamped directories (`YYYY-MM-DD/screenshots/`, `YYYY-MM-DD/videos/`) so each run's evidence persists and old issue links keep working.
53
-
- Configure git auth:
52
+
- Configure git auth (use `--global` so it applies to any repo or clone):
- **Prune old evidence** — Delete any date directories older than 60 days using `find` and `rm`, then commit the deletions (if any).
61
+
- **Prune old evidence** — This step is mandatory even if you expect nothing to prune. Delete date directories older than 60 days, then commit the deletions if any files were removed:
62
+
```bash
63
+
CUTOFF=$(date -d '60 days ago' +%Y-%m-%d)
64
+
fordin ./[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/;do
65
+
name=$(basename "$d")
66
+
[[ "$name"<"$CUTOFF" ]] && rm -rf "$d"
67
+
done
68
+
git add -A && git diff --cached --quiet || git commit -m "Prune evidence older than 60 days"
69
+
```
63
70
- **Add new evidence** — Create `YYYY-MM-DD/screenshots/` and `YYYY-MM-DD/videos/`, copy only the referenced files, stage, commit, push.
64
71
65
72
3. **Rewrite evidence paths**in the report — Replace relative asset paths with absolute GitHub URLs so images render in the issue. First, capture today's date into a variable, then use it in the sed replacements:
Copy file name to clipboardExpand all lines: .github/prompts/update-agent-docs.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The prompt includes a mode indicator (e.g., `mode: full-audit` or `mode: last-co
34
34
35
35
For `push` triggers, read the diff and determine which documentation files are affected by the changes. For `workflow_dispatch` triggers, review all documentation files against the current codebase.
36
36
37
-
Also check whether recent changes contain architectural decisions that lack an ADR. Read existing ADRs in `agent-docs/adr/` first. If you find a new pattern, a replaced dependency, an infrastructure change, or a choice between viable approaches — and no existing ADR covers it — write a new ADR following the process in `agent-docs/adr/README.md`. Set its status to `proposed`.
37
+
Also check whether recent changes contain architectural decisions that lack an ADR. Read existing ADRs in `agent-docs/adr/` first. If you find a new pattern, a replaced dependency, an infrastructure change, or a choice between viable approaches — and no existing ADR covers it — write a new ADR following the process in `agent-docs/adr/README.md`. Set its status to `proposed`. When writing the ADR, follow the ADR vs docs boundary rules below — record the decision rationale, not operational details.
38
38
39
39
### Context
40
40
@@ -84,6 +84,20 @@ When documenting Squide:
84
84
- ONLY modify files under `agent-docs/` and `AGENTS.md` at the root. Modifying files outside this set will cause an infinite workflow loop.
85
85
- Do NOT modify `CLAUDE.md`.
86
86
87
+
### ADR vs docs boundary
88
+
89
+
ADRs record **why** a decision was made (the problem, the alternatives, the chosen option, and the trade-offs accepted). Operational details about **how** the decision is implemented belong in `agent-docs/docs/`.
90
+
91
+
-**Belongs in an ADR:** the problem that motivated the decision, options evaluated, which option was chosen and why, architectural trade-offs accepted.
92
+
-**Belongs in `agent-docs/docs/`:** file paths and storage locations, URL rewriting patterns, CLI commands and flags, permissions and access controls, step-by-step operational procedures, server start/build commands.
93
+
94
+
Examples:
95
+
96
+
-**Good ADR sentence:** "Evidence is stored on an orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../docs/references/ci-cd.md) for operational details."
97
+
-**Bad ADR sentence:** "Evidence files are pushed to the `dogfood-evidence` branch using `git push --force`, and URLs are rewritten from `./screenshots/` to `https://raw.githubusercontent.com/...`."
98
+
99
+
**Never put operational details (commands, paths, configs, permissions, URL patterns) into an ADR.** State the decision and its rationale, then link to the relevant `agent-docs/docs/` file for implementation specifics. Operational content in ADRs drifts from the actual implementation and misleads agents into following stale procedures instead of reading the source of truth.
100
+
87
101
### AGENTS.md requirements
88
102
89
103
AGENTS.md must stay between 80–150 lines. It must contain:
Copy file name to clipboardExpand all lines: agent-docs/adr/0008-environment-variables-on-runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Variables are provided at initialization time via the `environmentVariables` opt
22
22
23
23
TypeScript type safety is achieved through module augmentation: consumers declare their variable names and types by augmenting the empty `EnvironmentVariables` interface exported from `@squide/env-vars`. This gives compile-time checking on `useEnvironmentVariable("apiUrl")` — both the key name and the return type are validated.
24
24
25
-
Evidence: `packages/env-vars/src/EnvironmentVariablesPlugin.ts` creates the plugin and stores variables in `EnvironmentVariablesRegistry`. `packages/env-vars/src/EnvironmentVariablesRegistry.ts` implements the duplicate-key detection logic. `packages/firefly/src/initializeFirefly.ts` (lines 167-184) always instantiates the plugin. The TypeScript module augmentation pattern is documented in `docs/reference/runtime/runtime-class.md`.
25
+
Evidence: `packages/env-vars/src/EnvironmentVariablesPlugin.ts` creates the plugin and stores variables in `EnvironmentVariablesRegistry`. `packages/env-vars/src/EnvironmentVariablesRegistry.ts` implements the duplicate-key detection logic. `packages/firefly/src/initializeFirefly.ts` (lines 167-184) always instantiates the plugin. The TypeScript module augmentation pattern is documented in `docs/reference/runtime/FireflyRuntime.md`.
The remaining workflows (`ci.yml`, `pr-pkg.yml`, `changeset.yml`, `retype-action.yml`) are traditional CI pipelines without agents. `claude.yml` is a generic claude-code-action step without a dedicated prompt file (used for ad-hoc PR interactions).
Copy file name to clipboardExpand all lines: agent-docs/adr/0031-ai-driven-browser-qa-in-ci.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Two separate QA needs were identified:
24
24
Option 2, with the two use cases split into separate workflows:
25
25
26
26
-**`smoke-test.yml` + `smoke-test.md`** (ADR-0015 lean YML + prompt pattern): triggered on PRs to main affecting packages or the endpoints app. The agent navigates a fixed list of pages, captures `agent-browser snapshot -i` (text) and `agent-browser console` output, and ends with `SMOKE TEST PASSED` or `SMOKE TEST FAILED`. Max 50 turns. No screenshots.
27
-
-**`dogfood.yml` + `dogfood.md`** (same pattern): triggered on a monthly schedule (15th of each month) and on-demand. Invokes the `/dogfood` agent skill for exploratory QA. Max 200 turns. Files a GitHub issue if issues are found, stops silently if none.
27
+
-**`dogfood.yml` + `dogfood.md`** (same pattern): triggered on a monthly schedule (15th of each month) and on-demand. Runs an `agent-browser` dogfood session following the skill instructions in `SKILL.md` against a production-like build (`pnpm serve-endpoints`). Max 200 turns. Evidence (screenshots, videos) is persisted on a Git orphan branch for linkability from GitHub issues. Files a GitHub issue if issues are found, stops silently if none.
- No test code to maintain — the smoke test is defined as a page list in `smoke-test.md`. Adding a new page means adding one line to the prompt file.
34
34
- The dogfood session can discover issues outside the fixed page list, providing broader coverage.
35
35
- AI-driven tests are less deterministic than scripted tests. False positives (AI misreads the UI) are possible but expected to be rare for binary PASS/FAIL outcomes.
36
-
- Both workflows use `agent-browser install --with-deps` and start the dev server before the agent runs, adding setup time (~2 min for smoke test, ~5 min for dogfood including QA time).
36
+
- Both workflows use `agent-browser install --with-deps`. Smoke test starts the dev server (`pnpm dev-endpoints`); dogfood builds and serves a production-like build (`pnpm serve-endpoints`), adding extra build time (~5–10 min for dogfood including build and QA time).
37
+
- Dogfood evidence is stored on the `dogfood-evidence` orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../docs/references/ci-cd.md#dogfood-workflow) for operational details.
37
38
- Dogfood findings are filed as GitHub issues for human triage — the workflow does not block PRs or deployments.
Copy file name to clipboardExpand all lines: agent-docs/docs/quality/testing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ pnpm turbo run test --filter=@squide/core
20
20
21
21
Use **agent-browser** (see `.agents/skills/agent-browser/`) to validate sample apps. It is installed as a workspace devDependency. A build alone is not sufficient — you must start the dev server and verify pages in a real browser.
1. Start the dev server in the background: `pnpm dev-endpoints`
25
+
1. Start the dev server in the background: `pnpm dev-endpoints` (for local validation) or `pnpm serve-endpoints` (for production-like validation, used by the CI dogfood workflow)
26
26
2. The app listens on port **8080**. Wait for it to be ready: `curl --retry 30 --retry-delay 5 --retry-connrefused --silent --output /dev/null http://localhost:8080`
27
27
3. The app has a mock login page. Use username `temp` and password `temp` to authenticate.
28
28
4. Navigate to each page and verify it renders without errors:
Copy file name to clipboardExpand all lines: agent-docs/docs/references/ci-cd.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,23 @@
17
17
| Smoke Test |`.github/workflows/smoke-test.yml`| PRs to main (packages, endpoints, workflow changes) | Automated smoke test of endpoints app |
18
18
| Dogfood |`.github/workflows/dogfood.yml`| 15th of month | Exploratory QA of endpoints app |
19
19
20
+
## Dogfood Workflow
21
+
22
+
The dogfood workflow (`dogfood.yml` + `dogfood.md`) runs monthly exploratory QA on the endpoints sample app. Key operational details:
23
+
24
+
**Server**: Uses `pnpm serve-endpoints` (production-like build), not `pnpm dev-endpoints`. This tests built output rather than dev mode.
25
+
26
+
**Evidence handling**: Screenshots and videos produced during the session are stored on the `dogfood-evidence` orphan branch in date-stamped directories (`YYYY-MM-DD/screenshots/`, `YYYY-MM-DD/videos/`). The workflow:
27
+
1. Fetches or creates the `dogfood-evidence` orphan branch
28
+
2. Prunes evidence directories older than 60 days
29
+
3. Copies only report-referenced screenshots/videos into the date directory
30
+
4. Force-pushes the branch (requires `contents: write` permission)
31
+
5. Rewrites relative asset paths in the report to `https://raw.githubusercontent.com/workleap/wl-squide/dogfood-evidence/YYYY-MM-DD/...` so images render in GitHub issues
32
+
33
+
**Issue creation**: If issues are found, files a GitHub issue with the rewritten report via `gh issue create` (requires `issues: write` permission). Stops silently if no issues.
34
+
35
+
**Prompt file**: `.github/prompts/dogfood.md` contains the full operational steps.
36
+
20
37
## CI Pipeline Details
21
38
22
39
The main CI workflow (`ci.yml`) runs on `ubuntu-latest` with:
0 commit comments