Skip to content

Commit db563c4

Browse files
authored
Merge pull request #8716 from QwikDev/v2-ai-iteration-loop
docs: add agent iteration loop and consolidate AI setup pointers
2 parents f84193f + 856cd7d commit db563c4

4 files changed

Lines changed: 34 additions & 22 deletions

File tree

.ruler/AGENTS.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,32 @@ compatibility override code.
5151
- pnpm: `>=10.14.0`
5252
- Package manager: pnpm only
5353

54-
Install dependencies with:
54+
## Setup And Iteration Loop
55+
56+
This is the canonical loop for nearly all framework work. Default to it; do not substitute broader
57+
commands:
5558

5659
```bash
60+
# 1. Setup — once per checkout, and again after dependency changes
5761
pnpm install
62+
63+
# 2. Fast dev build — required once before any tests can run, and again after framework
64+
# source changes when the verification consumes build output (all e2e suites do)
65+
pnpm build.core.dev
66+
67+
# 3. Closest focused unit/spec test
68+
pnpm vitest run packages/qwik/src/core/tests/use-task.spec.tsx
69+
70+
# 4. Focused e2e test
71+
pnpm playwright test e2e/qwik-e2e/tests/events.e2e.ts --browser=chromium --config e2e/qwik-e2e/playwright.config.ts
5872
```
5973

74+
`pnpm build.core.dev` is not optional: the Vitest config itself loads the built optimizer, and e2e
75+
apps run against build output, so tests are only as fresh as the last build.
76+
77+
For Qwik e2e tests, use `--browser=chromium` with `e2e/qwik-e2e/playwright.config.ts`; do not use
78+
`--project chromium` with that config.
79+
6080
## Command Rules
6181

6282
- Prefer focused commands over repo-wide commands.
@@ -66,23 +86,11 @@ pnpm install
6686
- Use `pnpm build.core.dev` for fast Qwik + Router rebuilds during most framework work.
6787
- Use `pnpm build.local` for a fresh full local build without rebuilding Rust.
6888
- Use `pnpm build.full` only when Rust/optimizer changes require it.
89+
- Run `pnpm tsc.check` for type-level verification when no focused test covers the change.
6990
- Run `pnpm api.update` after public API changes.
7091
- Run `pnpm lint` only when the change scope justifies broad linting; otherwise prefer focused
7192
tests and formatting checks.
7293

73-
Common focused commands:
74-
75-
```bash
76-
pnpm build.core.dev
77-
pnpm vitest run packages/qwik/src/core/tests/use-task.spec.tsx
78-
pnpm playwright test e2e/qwik-e2e/tests/events.e2e.ts --browser=chromium --config e2e/qwik-e2e/playwright.config.ts
79-
pnpm tsc.check
80-
pnpm api.update
81-
```
82-
83-
For Qwik e2e tests, use `--browser=chromium` with `e2e/qwik-e2e/playwright.config.ts`; do not use
84-
`--project chromium` with that config.
85-
8694
## Source Rules
8795

8896
Dedicated source rules live under `.ruler/rules/` and are part of the always-on guidance generated

.ruler/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ Ruler concatenates that bundle and writes it to each selected assistant's native
7878
Use source markers in the generated file to verify inclusion. Do not bypass Ruler by copying these
7979
Markdown files into a tool-specific directory whose format has not been verified.
8080

81+
If you are an AI assistant building local config for a target tool, research that tool's current
82+
native guidance, skill, config, and policy formats before adding any tool-specific output. Map
83+
`.ruler` files by what they mean, not by filename: Markdown guidance belongs in the assistant's
84+
native AI guidance surface, skills belong in native skills if supported, and command-permission
85+
policy belongs only in a separately researched policy format. For Codex, Ruler includes all
86+
`.ruler` Markdown guidance in generated `AGENTS.md`; `.codex/rules/*.rules` is command policy, not
87+
Markdown guidance.
88+
8189
### Worked Example: Codex
8290

8391
Current Ruler and OpenAI Codex behavior maps this repo's sources as follows:

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ Furthermore, to build the optimizer you optionally need Rust.
161161
> On Windows, Rust requires [C++ build tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). You can also select _Desktop development with C++_
162162
> while installing Visual Studio.
163163
164+
### AI assistants
165+
166+
If you contribute with an AI assistant, read the [AI setup guide](./README.md#ai-assistant-setup) first.
167+
164168
---
165169

166170
## Development

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ Use `.ruler/AGENTS.md` for short repo-wide AI instructions, `.ruler/rules/` for
7272
rules, `.ruler/skills/` for reusable prompts or task-specific skills, and `~/.config/ruler/` for
7373
personal settings such as local MCP servers or workflow preferences.
7474

75-
If you are an AI assistant building local config for a target tool, research that tool's current
76-
native guidance, skill, config, and policy formats before adding any tool-specific output. Map
77-
`.ruler` files by what they mean, not by filename: Markdown guidance belongs in the assistant's
78-
native AI guidance surface, skills belong in native skills if supported, and command-permission
79-
policy belongs only in a separately researched policy format. For Codex, Ruler includes all
80-
`.ruler` Markdown guidance in generated `AGENTS.md`; `.codex/rules/*.rules` is command policy, not
81-
Markdown guidance.
82-
8375
Do not edit generated files like `AGENTS.md`, `CLAUDE.md`, `.codex/`, `.claude/`, or `.cursor/`
8476
by hand. Update `.ruler/` and rerun `ruler apply`.
8577

0 commit comments

Comments
 (0)