diff --git a/assets/CONTEXT.md b/assets/CONTEXT.md index 02c77e21..f424ed42 100644 --- a/assets/CONTEXT.md +++ b/assets/CONTEXT.md @@ -7,7 +7,7 @@ Engineering rules for every task, as `quest context` prints them. The repository - Pull the latest origin changes before working. - Before editing a file, read every `AGENTS.md` on its path from the root; not every agent loads nested ones. - Read the repository's `CONTRIBUTING.md` before a PR, and its `REVIEW.md`, if any, before a review. -- Fix bugs at the root cause. Never work around one with a retry, sleep, or timeout. +- Fix bugs, flaky tests included, at the root cause. Never work around one with a retry, sleep, timeout, or looser assertion. - Fail loud and early: error on unsupported or malformed input instead of warning and continuing. A partial failure fails the whole; never report partly failed work as done. - Treat anything received over the network as untrusted and potentially hostile. Bound what a peer can make you hold by design, not with a constant. Run no code from a PR whose author lacks write access: it runs with your credentials. - Reproduce bugs before fixing them. @@ -31,6 +31,7 @@ Engineering rules for every task, as `quest context` prints them. The repository - Tests cover edge cases, not old bugs or trivial values. - Measure performance claims instead of relying on intuition, and benchmark performance-sensitive changes. +- Match the code's existing conventions, patterns, and naming. - Inline simple helpers. - Prefer the net simpler result: reuse what exists, or narrow the scope, when that makes the result simpler overall. Say what was dropped. - Say it once, in the fewest words that hold up. @@ -45,7 +46,7 @@ Engineering rules for every task, as `quest context` prints them. The repository - Let the type system make misuse unrepresentable. - Decide a supported path at setup from known capabilities, and error otherwise. Never try a path at runtime and silently fall back. - Avoid callback parameters and 4+ arguments. Return a handle; take a struct. -- Name by role, not today's implementation. +- Name by role, not today's implementation. Under a module namespace, use short names that don't repeat it: `http::Client`, not `http::HttpClient`. - Document every export in one plain line, the way you'd say it out loud. ## Workspace diff --git a/quest/m0/context-rules.md b/quest/m0/context-rules.md deleted file mode 100644 index 605dc72a..00000000 --- a/quest/m0/context-rules.md +++ /dev/null @@ -1,34 +0,0 @@ -# [S] Three generic rules in the shared context - -## Goal - -`quest context` gives every repository three engineering rules that moq-dev/rust2 used to -carry itself, each said once in the section it belongs to: - -- Match the code's existing conventions, patterns, and naming. -- Never pass a flaky test by loosening its assertion; fix the cause. -- Short names under a module namespace, rather than repeating the module in each name. - -## Plan - -[moq-dev/rust2#553](https://github.com/moq-dev/rust2/pull/553) replaced rust2's own copies -of the shared rules with `quest context`, dropping these because `assets/CONTEXT.md` had -no equivalent. Word each to fit its neighbors, such as "Name by role" under Public API and -the root-cause rule under Required, and follow `quest guide prompting`. -The context is hook context, capped at `CONTEXT_LIMIT` (10,000 characters, `src/cli/hooks.ts`), -and had 3 to spare when [moq-dev/quest#517](https://github.com/moq-dev/quest/pull/517) -merged, so make room in the same PR where the three rules do not fit. - -Decided 2026-11-07 (maintainer, moq-dev/rust2 /quest-complete): - -- Which dropped rules join the shared context? - - ✅ Match existing conventions, patterns, and naming - - ✅ Never pass a flaky test by loosening its assertion - - ✅ Short names under a module namespace - - Rejected: "keep the PR to one problem, no drive-by changes", which clashes with - fixing bugs in the code a PR touches and outdated docs inline - - Rejected: "if a skill's usage is unclear, offer to update it" -- Where does this quest go? - - ✅ m0 (recommended) - - m1 - - m2