devrites 4.5.0 → 4.6.0

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/NOTICE.md +0 -13
  3. package/README.md +1 -1
  4. package/pack/.claude/agents/devrites-retrospector.md +2 -0
  5. package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +4 -7
  6. package/pack/.claude/skills/devrites-frontend-craft/reference/quality-standards.md +2 -2
  7. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +5 -7
  8. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +1 -1
  9. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +3 -6
  10. package/pack/.claude/skills/devrites-lib/reference/standards/development-workflow.md +8 -0
  11. package/pack/.claude/skills/devrites-lib/reference/standards/documentation.md +6 -0
  12. package/pack/.claude/skills/devrites-lib/reference/standards/error-handling.md +11 -0
  13. package/pack/.claude/skills/devrites-lib/reference/standards/performance.md +4 -0
  14. package/pack/.claude/skills/devrites-lib/reference/standards/security.md +1 -2
  15. package/pack/.claude/skills/devrites-lib/reference/standards/skill-authoring.md +3 -0
  16. package/pack/.claude/skills/devrites-lib/reference/standards/spec-grammar.md +5 -6
  17. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +2 -2
  18. package/pack/.claude/skills/rite-define/reference/plan-template.md +5 -2
  19. package/pack/.claude/skills/rite-learn/SKILL.md +2 -0
  20. package/pack/.claude/skills/rite-polish/reference/anti-ai-slop.md +12 -53
  21. package/pack/.claude/skills/rite-pr-feedback/SKILL.md +7 -2
  22. package/pack/.claude/skills/rite-spec/reference/spec-template.md +5 -4
  23. package/pack/.claude/skills/rite-status/SKILL.md +2 -0
  24. package/pack/generated/claude/agents/devrites-retrospector.md +2 -0
  25. package/pack/generated/claude/skills/devrites-frontend-craft/SKILL.md +4 -7
  26. package/pack/generated/claude/skills/devrites-frontend-craft/reference/quality-standards.md +2 -2
  27. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +5 -7
  28. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +1 -1
  29. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +3 -6
  30. package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md +8 -0
  31. package/pack/generated/claude/skills/devrites-lib/reference/standards/documentation.md +6 -0
  32. package/pack/generated/claude/skills/devrites-lib/reference/standards/error-handling.md +11 -0
  33. package/pack/generated/claude/skills/devrites-lib/reference/standards/performance.md +4 -0
  34. package/pack/generated/claude/skills/devrites-lib/reference/standards/security.md +1 -2
  35. package/pack/generated/claude/skills/devrites-lib/reference/standards/skill-authoring.md +3 -0
  36. package/pack/generated/claude/skills/devrites-lib/reference/standards/spec-grammar.md +5 -6
  37. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +2 -2
  38. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +5 -2
  39. package/pack/generated/claude/skills/rite-learn/SKILL.md +2 -0
  40. package/pack/generated/claude/skills/rite-polish/reference/anti-ai-slop.md +12 -53
  41. package/pack/generated/claude/skills/rite-pr-feedback/SKILL.md +7 -2
  42. package/pack/generated/claude/skills/rite-spec/reference/spec-template.md +5 -4
  43. package/pack/generated/claude/skills/rite-status/SKILL.md +2 -0
  44. package/pack/generated/codex/agents/devrites-retrospector.toml +2 -0
  45. package/pack/generated/codex/skills/devrites-frontend-craft/SKILL.md +4 -7
  46. package/pack/generated/codex/skills/devrites-frontend-craft/reference/quality-standards.md +2 -2
  47. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +5 -7
  48. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +1 -1
  49. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +3 -6
  50. package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md +8 -0
  51. package/pack/generated/codex/skills/devrites-lib/reference/standards/documentation.md +6 -0
  52. package/pack/generated/codex/skills/devrites-lib/reference/standards/error-handling.md +11 -0
  53. package/pack/generated/codex/skills/devrites-lib/reference/standards/performance.md +4 -0
  54. package/pack/generated/codex/skills/devrites-lib/reference/standards/security.md +1 -2
  55. package/pack/generated/codex/skills/devrites-lib/reference/standards/skill-authoring.md +3 -0
  56. package/pack/generated/codex/skills/devrites-lib/reference/standards/spec-grammar.md +5 -6
  57. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +2 -2
  58. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +5 -2
  59. package/pack/generated/codex/skills/rite-learn/SKILL.md +2 -0
  60. package/pack/generated/codex/skills/rite-polish/reference/anti-ai-slop.md +12 -53
  61. package/pack/generated/codex/skills/rite-pr-feedback/SKILL.md +7 -2
  62. package/pack/generated/codex/skills/rite-spec/reference/spec-template.md +5 -4
  63. package/pack/generated/codex/skills/rite-status/SKILL.md +2 -0
  64. package/package.json +1 -1
  65. package/docs/markdown-instruction-upgrade-2026-08-27.md +0 -127
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
4
4
 
5
+ ## [4.6.0](https://github.com/ViktorsBaikers/DevRites/compare/v4.5.0...v4.6.0) (2026-08-28)
6
+
7
+ ### Added
8
+
9
+ * **skills:** markdown knowledge-layer round 4 ([#48](https://github.com/ViktorsBaikers/DevRites/issues/48)) ([9dab7af](https://github.com/ViktorsBaikers/DevRites/commit/9dab7af644c219ab3f3411b4a701947b9da9108b))
10
+
5
11
  ## [4.5.0](https://github.com/ViktorsBaikers/DevRites/compare/v4.4.2...v4.5.0) (2026-08-27)
6
12
 
7
13
  ### Added
package/NOTICE.md CHANGED
@@ -7,19 +7,6 @@ The Nielsen heuristics 0–4 scoring rubric in
7
7
  `pack/.claude/skills/rite-review/reference/nielsen-heuristics.md` references the heuristics themselves
8
8
  (Jakob Nielsen, 1994 / 2020 — public usability canon).
9
9
 
10
- ## Research attribution (2026-08-27 instruction upgrade)
11
-
12
- The 2026-08-27 Markdown methodology round adapted *concepts* (not text) from external,
13
- untrusted-at-research-time repositories. Adaptations below are rewritten in DevRites language;
14
- no upstream prose ships in this pack.
15
-
16
- - [rebelytics/one-skill-to-rule-them-all](https://github.com/rebelytics/one-skill-to-rule-them-all) — CC BY 4.0: its capture/promotion/self-improvement loop **structure** informed `rite-learn` and `devrites-retrospector` guardrails (qualification contract, consolidation duty, growth cap, rejection persistence). Attribution required by license and hereby given.
17
- - [mukul975/Anthropic-Cybersecurity-Skills](https://github.com/mukul975/Anthropic-Cybersecurity-Skills) — Apache 2.0: its change-type→domain routing shape and co-located framework-identifier binding method informed `standards/security.md`. Concept-level adaptation; catalog not imported.
18
- - [pbakaus/impeccable](https://github.com/pbakaus/impeccable) — Apache 2.0: earlier derivative material remains in-tree; this round's Verify-vs-Refuse framing influenced the browser-proof checklist rewrite. Concept-level adaptation.
19
- - [netresearch/file-search-skill](https://github.com/netresearch/file-search-skill) — MIT AND CC BY-SA 4.0: only the *idea* of a question-type→tool matrix was used; `standards/tooling.md`'s table was rebuilt natively from DevRites tools (no structural transplant, honoring share-alike).
20
- - [Nutlope/hallmark](https://github.com/Nutlope/hallmark), [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill), [educlopez/ui-craft](https://github.com/educlopez/ui-craft), [Weizhena/Deep-Research-skills](https://github.com/Weizhena/Deep-Research-skills) — MIT: viewport/state-capture checks, mechanical slop counters, coverage markers, and research checkpoint ideas, adapted concept-level.
21
-
22
-
23
10
  ## License
24
11
  Free to use. Modification is permitted **for personal use**; any other use —
25
12
  distributing it, distributing modified versions, or commercial/organizational use —
package/README.md CHANGED
@@ -28,7 +28,7 @@ project-conventional push, tag, or PR action, and archive the workspace.
28
28
  Unattended runs may create local WIP checkpoint commits along the way, but they
29
29
  remain local unless Ship's disclosed plan includes an approved remote action.
30
30
 
31
- **Status:** [`v4.5.0`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.5.0): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
31
+ **Status:** [`v4.6.0`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.6.0): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
32
32
 
33
33
  This is the latest published release; `main` may contain unreleased work.
34
34
 
@@ -16,6 +16,8 @@ Use native file search; do not use engine miners, indexes, telemetry, or agents.
16
16
 
17
17
  - Keep two-feature corrections or one rationale-backed durable product/architecture decision.
18
18
  - Verify live claims; cite currentness. Unverifiable = `unknown`, not false.
19
+ - Source order: live repository source outranks an archive's recorded claim; where they
20
+ conflict, follow live and record the delta as part of the finding.
19
21
  - Name trigger/non-trigger; drop generic, stale, one-off, unbounded advice.
20
22
  - Search instructions/standards/ADRs for duplicate, contrary, or superseded guidance;
21
23
  choose one canonical home + discovery route.
@@ -85,13 +85,10 @@ through the layers (DB → service → API → UI) one capability at a time, app
85
85
  engineering rules to the backend and this craft to the frontend, map every contract error
86
86
  to a real UI state, and **prove both layers** (contract tests + browser proof).
87
87
 
88
- ## Anti-AI-slop (banned defaults unless the project's system uses them)
89
- Purple/blue gradients · gradient text · glassmorphism by default · cards-in-cards ·
90
- identical card grids everywhere · rounded-square icon tile above every heading ·
91
- gray-on-color text · hero-metric cliché · decorative bounce/elastic easing · random
92
- Inter-for-everything · modal-first thinking · ghost-card (border + big shadow) · fake
93
- UI-in-a-div · placeholder copy/data. Full list + the countable mechanical pre-flight:
94
- `rite-polish/reference/anti-ai-slop.md`.
88
+ ## Anti-AI-slop
89
+ The banned-defaults list and the countable mechanical pre-flight live in
90
+ `rite-polish/reference/anti-ai-slop.md` (canonical owner): run both at build and polish
91
+ time a slop pattern in the slice is a polish finding.
95
92
 
96
93
  ## Default vs departure
97
94
  Preserve the existing identity (default, ~90%). Reject it only on an explicit signal (a
@@ -26,8 +26,8 @@ these are the floor, not the ceiling.
26
26
  - **Test** with keyboard, a screen reader, and an automated checker (e.g. axe): early.
27
27
 
28
28
  ## Motion
29
- - Purposeful only; UI feedback ~≤200 ms, transitions ~≤500 ms. Never animate to mask slow
30
- loading. Honor `prefers-reduced-motion` (reduce/remove non-essential motion).
29
+ - Purposeful only; UI feedback ~≤200 ms, transitions ~≤500 ms (class table below). Never
30
+ animate to mask slow loading; honor `prefers-reduced-motion`.
31
31
 
32
32
  ## Responsive
33
33
  - Fluid layouts; no fixed widths that break. Verify at **320 / 768 / 1024 / 1440** px; no
@@ -65,13 +65,11 @@ Claims such as proved, reviewed, sealed, shipped, or complete must point to real
65
65
  output or an artifact. Use exactly one recommended next action except for
66
66
  terminal agent-owned technical exhaustion, which has no runnable action.
67
67
 
68
- Use that terminal case only after three recorded no-progress corrections of the
69
- exact fingerprint, or when required evidence was irretrievably absent **and** no safe in-scope diagnostic-amplification seam exists. Loss from the
70
- past attempt alone is not terminal: repair and Vet a boundary-discriminating
71
- evidence design, then request fresh authorization for its acquisition attempt. A spent
72
- consumptive-action authorization plus a retained new fingerprint is not terminal;
73
- it continues offline recovery and waits for fresh authorization only after repair.
74
- For a true terminal case use:
68
+ Use that terminal case only per [`one-shot-actions.md`](standards/one-shot-actions.md):
69
+ three recorded no-progress corrections of the exact fingerprint, or required evidence
70
+ irretrievably absent with **no safe in-scope diagnostic-amplification seam**. A spent
71
+ consumptive-action authorization plus a retained new fingerprint is not terminal. For a
72
+ true terminal case use:
75
73
 
76
74
  ```text
77
75
  Stopped: Technical recovery exhausted
@@ -45,7 +45,7 @@ Claude grants only wright `acceptEdits`; Codex root is workspace-capable (childr
45
45
 
46
46
  Isolated-worktree pilot only under [`wright-dispatch.md`](../../../rite-build/reference/wright-dispatch.md#isolated-writer-worktree-pilot): one writer, committed/clean baseline, non-submodule parent, exact transfer commit, candidate reconciliation — never parallel writers nor weaker exact-path admission. Root may materialize only exact Vet-ready workflow-artifact paths per [`workflow-artifacts.md`](workflow-artifacts.md) — not a writer dispatch or candidate mutation.
47
47
 
48
- Each job gets objective/exclusions, exact paths/immutable candidate, rubric/result shape. Briefs MUST NOT seed verdict/severity cap/conclusion/suppression. Results state status/scope, outcome, commands/escalation; wright adds paths, changed files, gates, stood decisions; results never widen scope.
48
+ Each job gets objective/exclusions, exact paths/immutable candidate, rubric/result shape, a **stop condition** (when to return), and the exact result shape; a dispatch missing them is malformed and re-issued. Briefs MUST NOT seed verdict/severity cap/conclusion/suppression. Results state status/scope, outcome, commands/escalation; wright adds paths, changed files, gates, stood decisions; results never widen scope.
49
49
 
50
50
  ## Independence
51
51
 
@@ -43,14 +43,11 @@ Before advancing a phase, run `devrites-engine check readiness <slug>` for struc
43
43
 
44
44
  ### Gate contract
45
45
 
46
- Each gate is declared as **Name · Precondition · Satisfying observation (exact command/artifact state) · Pass/Fail · What failure blocks**, with one type: `preflight`, `revision`, `escalation` (human-only), `abort`. Engine gates keep exit codes; semantic gates are judged by their owner against this contract. A gate whose failure consequence cannot be named is decoration — sharpen or delete it.
47
- ## Caller-owned technical backtracking
46
+ Each gate is declared as **Name · Precondition · Satisfying observation (exact command/artifact state) · Pass/Fail · What failure blocks**, with one type: `preflight`, `revision`, `escalation` (human-only), `abort`. Engine gates keep exit codes; semantic gates are judged by their owner against this contract. A gate whose failure consequence cannot be named is decoration — sharpen or delete it. A mechanical gate's satisfying observation is a command or artifact state a reviewer can re-run or re-read — narrative-only passes are unproven.
48
47
 
49
- When a rite invokes an earlier rite inline to repair an agent-owned technical gap, the original rite stays the controlling caller: a nested `STOP` is a phase boundary, not user-facing. The caller re-reads `state.md`, follows the return cursor/`next_action`, and resumes unless a human-owned, safety, access, budget, or exhausted-recovery stop is active ([Persistence before stopping](#persistence-before-stopping-handoff-discipline)). Derive `exhausted-recovery` from the fingerprint's recorded no-progress attempts; one consumed authorization doesn't exhaust offline recovery from retained new evidence.
48
+ ## Caller-owned technical backtracking
50
49
 
51
- Derive `exhausted-recovery` from the exact fingerprint's recorded no-progress
52
- attempts, not from a stale `state.md` label. A consumed authorization for one
53
- real action does not exhaust offline recovery from its retained new evidence.
50
+ When a rite invokes an earlier rite inline to repair an agent-owned technical gap, the original rite stays the controlling caller: a nested `STOP` is a phase boundary, not user-facing. The caller re-reads `state.md`, follows the return cursor/`next_action`, and resumes unless a human-owned, safety, access, budget, or exhausted-recovery stop is active ([Persistence before stopping](#persistence-before-stopping-handoff-discipline)). Derive `exhausted-recovery` from the fingerprint's recorded no-progress attempts, not from a stale `state.md` label; one consumed authorization doesn't exhaust offline recovery from retained new evidence.
54
51
 
55
52
  An intermediate `Next step` is cold-resume metadata. Do not ask the human to
56
53
  copy routine `/rite-plan repair`, `/rite-vet`, `/rite-build`, or proof-rerun
@@ -10,9 +10,17 @@ Ship small, integrate often, and keep the main branch releasable. Workflow phase
10
10
  - Prefer short-lived branches off the main branch.
11
11
  - The main branch is **always in a releasable state**. Validate every change through a
12
12
  **fast, reliable CI pipeline** (tests + build) before it merges.
13
+ - **Trunk broken?** Revert first (default repair); fix forward only when revert is harder. Red trunk blocks all merges.
13
14
  - Hide incomplete work behind a **feature flag / toggle** rather than a long branch, so
14
15
  partial work can land without blocking releases or breaking the trunk.
15
16
 
17
+ ## Feature-flag lifecycle
18
+
19
+ - Name the **removal trigger** at flag creation; delete the flag once the work ships — a
20
+ flag past its trigger is **flag debt**, a review finding. Prove **both states**
21
+ ([`testing.md`](testing.md)); widen rollout only with the rollback path recorded
22
+ ([`data-integrity.md`](data-integrity.md)).
23
+
16
24
  ## Review gate
17
25
  - A human reviews every change before merge; `code-review.md` owns review scope and evidence.
18
26
 
@@ -4,6 +4,12 @@ Document intent/decisions; public inputs, outputs, errors, and gotchas; non-obvi
4
4
  constraints; and real build/test/run commands. Update with behavior; prefer one runnable
5
5
  example. Do not restate code or types.
6
6
 
7
+ ## Drift check (docs describe what runs)
8
+
9
+ A documented command/example that no longer runs is a **documentation-drift finding** at
10
+ review/polish: run it — failure plus output is the evidence. A behavior change updates the
11
+ doc or records the divergence; doc and code never hold contradictory "truths".
12
+
7
13
  ## Record decisions
8
14
 
9
15
  - Capture significant context, decision, consequences, accepted trade-off, change trigger,
@@ -16,6 +16,17 @@ recoverable.
16
16
  - If you catch, either recover meaningfully, or rethrow/wrap with added context. Don't
17
17
  log-and-continue past an error you didn't handle.
18
18
 
19
+ ## Classify the outcome before retrying
20
+
21
+ Never retry blind — match the outcome first:
22
+
23
+ - **Rejected** (refused: validation/authz/conflict): fix input; unchanged retry fails again.
24
+ - **Unknown** (timed out mid-call): check state at the source before any retry.
25
+ - **Partial** (half-committed): [`data-integrity.md`](data-integrity.md) § partial failure — reconcile or roll back, never resume blind.
26
+ - **Clean failure** (not started / fully rolled back): safe to retry after fixing the cause.
27
+
28
+ **Failing case:** an **Unknown** outcome retried unchanged double-applies (duplicate charge). Idempotency: [`data-integrity.md`](data-integrity.md); outcome taxonomies: [`integration-reliability.md`](integration-reliability.md). Not provable → `cannot_verify` and stop.
29
+
19
30
  ## Meaningful messages
20
31
  - Error messages state what failed, the relevant context (ids, inputs, not secrets),
21
32
  and ideally how to recover. Cryptic messages cost hours.
@@ -11,6 +11,10 @@ Measure first. An optimization without a measurement is a guess that adds comple
11
11
  ## Optimize responsibly
12
12
  - Fix the **measured** bottleneck, then **re-measure** to prove the win (before/after).
13
13
  An optimization that doesn't move the number is just added complexity: revert it.
14
+ - **Measurement not reproducible in CI** (noisy host, external dependency): label the claim
15
+ `Lab (<named command/environment>)` — never an elapsed-time assertion in shared CI (a
16
+ flaking wall-clock test is a flaky test, [`testing.md`](testing.md)). Budget regression:
17
+ re-measure; fix to budget or record the accepted regression with reason and owner.
14
18
 
15
19
  ## Frontend: Core Web Vitals
16
20
  For UI work, measure-first means LCP / INP / CLS judged against real numbers, each labeled
@@ -101,5 +101,4 @@ Conditional on a model/RAG/tool surface; prompt-injection rules above always app
101
101
  - **LLM06 unbounded consumption:** rate-limit, cap tokens/cost/time; an open loop is DoS and bill.
102
102
 
103
103
  ## Framework references on findings
104
-
105
- Bind findings to framework identifiers **where written**: ATT&CK technique ids for adversary behavior, D3FEND countermeasures when a mitigation is named, NIST CSF function-categories for governance framing, ATLAS ids for model-facing techniques. Rules carry ids at authorship; summaries derive from those citations later. Annotation, not busywork — omit when no identifier strengthens remediation. Severity follows [`code-review.md`](code-review.md); Critical blocks Seal.
104
+ Bind findings to framework identifiers **where written**: ATT&CK technique ids for adversary behavior, D3FEND countermeasures when a mitigation is named, NIST CSF function-categories for governance framing, ATLAS ids or ASI ids (OWASP Agentic Applications / Agentic Skills Top 10) for model/agent-facing techniques. Rules carry ids at authorship; summaries derive from those citations later. Annotation, not busywork — omit when no identifier strengthens remediation. Severity follows [`code-review.md`](code-review.md); Critical blocks Seal.
@@ -28,6 +28,9 @@ Description routes; it is not documentation.
28
28
  - State the nearest sibling's **defining constraint** (Seal decides; Ship mutates
29
29
  Git). Routing evals test it.
30
30
  - A routing/tie-breaker change cites the mis-route it fixes and passes trigger corpora; no failing case, no change.
31
+ - Descriptions stay **mutually exclusive** across the pack: two skills claiming one trigger
32
+ phrase is a routing defect fixed in the same change; rising wrong-skill fires signal a
33
+ rotted trigger.
31
34
  - Put examples/edges/rationale/procedure in body/reference—not frontmatter.
32
35
 
33
36
  ### Activation order
@@ -85,11 +85,10 @@ a separate **`## Success metrics`** heading:
85
85
  - Support tickets about export drop by half within a quarter
86
86
  ```
87
87
 
88
- Why the split earns its place: an outcome metric tagged `AC-###` poisons traceability in
89
- both directions. No slice can honestly `Satisfies:` a quarterly KPI, and no feature test can
90
- observe a quarter of production traffic. The metric still matters (it is *why* the feature
91
- exists) but belongs to intent (`brief.md` / `spec.md` overview), not criteria the lifecycle
92
- proves. The load-bearing test: **can one slice make this true and one test show it?** If no,
88
+ Why the split: an outcome metric tagged `AC-###` poisons traceability both ways — no slice
89
+ can honestly `Satisfies:` a quarterly KPI and no test observes a quarter of traffic. The
90
+ metric matters (it is *why* the feature exists) but belongs to intent, not provable
91
+ criteria. The load-bearing test: **can one slice make this true and one test show it?** If no,
93
92
  it is a success metric, not an acceptance criterion. Native traceability reviews map only
94
93
  buildable `AC-###` IDs and meanings.
95
94
 
@@ -190,7 +189,7 @@ readiness.
190
189
 
191
190
  ## Unresolved-question markers (fail closed)
192
191
 
193
- - `spec.md` may mark an unknown in place as `` `[NEEDS DECISION: q-YYYY-MM-DD-NNN]` `` beside the affected requirement/criterion; released workspaces use their recorded `Q-###` form.
192
+ - `spec.md` may mark an unknown in place as `` `[NEEDS DECISION: q-YYYY-MM-DD-NNN]` `` beside the affected requirement/criterion; released workspaces use their recorded `Q-###` form. A free-text `` `[NEEDS CLARIFICATION: <question>]` `` placeholder is the drafting form from the spec template; it converts to the id-bound marker before readiness.
194
193
  - The id must exist in `questions.md`, status open, with a `gate:` naming the resolving phase. Spec readiness treats any surviving marker as an open-question blocker (fail closed).
195
194
  - Resolution removes the marker in the same edit that records the answer; markers pointing at resolved/dropped ids block too.
196
195
  - Markers are forbidden in plan-stage artifacts and inside acceptance-criteria rows — unresolved criteria get reclassified or removed, not fenced.
@@ -114,8 +114,8 @@ Test code optimizes for a different reader than production code: someone staring
114
114
  needs the whole scenario in front of them. A test should read like a spec: arrange, act, assert,
115
115
  visible in one screen. Prefer a little repetition over a clever shared helper that hides what the
116
116
  test exercises; **D**escriptive **A**nd **M**eaningful **P**hrases beat **D**on't **R**epeat **Y**ourself
117
- here. (This trades against production `coding-style.md` reuse-first on purpose: a shared fixture
118
- that makes the reader scroll away to understand the case has cost more than the duplication saved.)
117
+ here. (Deliberately trades against production reuse-first: a fixture that makes the reader
118
+ scroll away to understand the case costs more than the duplication saved.)
119
119
 
120
120
  ## Test doubles: reach for the real thing first
121
121
  Prefer, in order: **real > fake > stub > mock**. Use the real collaborator when it's fast and
@@ -115,7 +115,10 @@ otherwise simplify.
115
115
  | <e.g. new dependency X> | <reason> | <why the in-repo option won't work> |
116
116
 
117
117
  ## Rollback
118
- Risky-step backout: migration/flag/revert/backup.
118
+ Every risky step (migration, destructive write, flag widening, contract change) names its
119
+ backout before Build: **trigger** (what aborts it), **procedure** (down-migration / flag
120
+ off / revert / restore), and **rollback-verification proof** (command + observed state).
121
+ "Revert if needed" is not a rollback plan.
119
122
 
120
123
  ## Scope boundaries
121
124
  Untouched scope; copy spec “Ask first”/“Never do.”
@@ -130,7 +133,7 @@ Framework/library sources (triggers source-driven).
130
133
  - [ ] Applicability matches live evidence; outputs name owner, recovery, slice, proof
131
134
  - [ ] `MVP cut` is shippable/self-contained: ACs proven, no dependency below
132
135
  - [ ] Deviations are justified
133
- - [ ] Destructive/migration steps have rollback
136
+ - [ ] Destructive/migration steps have rollback (trigger + procedure + verification proof); spec Prohibitions carry into slices verbatim
134
137
  - [ ] Each `Mode: HITL` slice has `Gate`, `SLA`, `Checkpoint`
135
138
  - [ ] Human choices resolved; checkpoints need unavailable pre-code evidence/action approval
136
139
  - [ ] All horizon items remain; blockers/planning items resolved or validly spiked;
@@ -35,6 +35,8 @@ of one authority; it cannot promote a rule alone.
35
35
  - Never create a learning ledger/index/queue, score, timeline, or parallel authority; rejected directions return only when evidence changes their rationale.
36
36
  - A declined lesson persists as a declined decision entry (reason recorded) in the nearest owning decisions file — not re-litigated without new evidence.
37
37
  - Contradiction outranks staleness: actively misleading guidance outranks merely old guidance.
38
+ - A proposal names the **retrospective failing case**: the concrete past feature/artifact the
39
+ rule would have caught. None → generic advice — drop.
38
40
  - ≤3 accepted lessons per round; proposals extend/narrow but never lower an existing bar (revisions show old text beside new); duplicates consolidate into one canonical edit — simplification (deletions/merges) counts toward the cap.
39
41
 
40
42
  ## Output
@@ -52,13 +52,10 @@ match the neighbors.
52
52
  dots as set dressing.
53
53
 
54
54
  ### Copy & data realism
55
- Placeholder content is a tell even when the layout is clean:
56
- - **Fake-perfect numbers** — `99.99%`, `10,000+`, `$1M`. Real data is ragged: `47.2%`, `1,283`.
57
- - **Placeholder people/brands** "John Doe", "Acme", "Nexus". Invent specific, plausible ones.
58
- - **Filler verbs** Elevate / Seamless / Unleash / Supercharge / Next-Gen. Say what it does.
59
- - **Copy self-audit** — re-read every visible string before shipping; anything grammatically
60
- broken, referent-unclear, or "an LLM trying to sound thoughtful" gets rewritten. AI-cute
61
- copy is worse than boring copy.
55
+ Placeholder content is a tell even when the layout is clean: fake-perfect numbers
56
+ (`99.99%`, `10,000+` real data is ragged), placeholder people/brands ("John Doe",
57
+ "Acme"), filler verbs (Elevate / Seamless / Unleash). Re-read every visible string before
58
+ shipping; AI-cute copy is worse than boring copy.
62
59
 
63
60
  ### Category-reflex check — run at two altitudes
64
61
 
@@ -160,49 +157,11 @@ Each is pass/fail by counting or grep, not judgment:
160
157
  Reuse → extend → build new (`coding-style.md`, `patterns.md`); duplication beats the *wrong*
161
158
  abstraction, but pasted clones are slop, not a deliberate AHA call.
162
159
 
163
- ### Comment density before / after
164
-
165
- ```js
166
- // Before (slop): a comment narrating almost every line
167
- function calculateTotal(items) {
168
- // initialize the total to zero
169
- let total = 0;
170
- // loop through each item in the items array
171
- for (const item of items) {
172
- // add the item price to the total
173
- total += item.price;
174
- }
175
- // return the final total
176
- return total;
177
- }
178
-
179
- // After: the names carry it; no comment needed
180
- function sumPrices(items) {
181
- return items.reduce((total, item) => total + item.price, 0);
182
- }
183
-
184
- // A comment that earns its place — it explains WHY, not what:
185
- // Prices are in minor units (cents); the gateway rejects fractional amounts.
186
- const total = sumPrices(items);
187
- ```
188
-
189
- ## Why these are banned
190
- They signal "a model generated this" rather than "this team designed/wrote this." They
191
- ignore the product's register and the project's idiom, add noise, hide bugs (defensive
192
- catches), bloat the diff (over-engineering, beyond-spec), and often fail accessibility
193
- or correctness review. They're cargo-cult, not craft.
194
-
195
- ## What to do instead
196
- - **UI**: project tokens / shared components / consistent type & spacing
197
- (`design-system-discovery.md`); content shapes layout; motion serves feedback;
198
- reserve modals for focused interrupting tasks.
199
- - **Code**: validate at trust boundaries (don't sprinkle null checks); catch narrow,
200
- recover or rethrow; one clear name per concept; one responsibility per function;
201
- reuse before write (`coding-style.md`); implement exactly the spec; let inherent
202
- complexity be — don't pad with ceremony.
203
- - If the project **does** use one of these intentionally, follow the project. Consistency
204
- beats the rule.
205
-
206
- ## When in doubt: ask
207
- A "robust" check or shiny abstraction you can't justify in one sentence is probably slop.
208
- Delete it; or ask the user if it should exist.
160
+ ## Why banned, what instead
161
+ They signal model-generated rather than team-designed work: they ignore register and
162
+ idiom, add noise, hide bugs (defensive catches), bloat diffs, and often fail a11y or
163
+ correctness review. Instead: project tokens/components, validate at trust boundaries,
164
+ catch narrow and rethrow, one clear name per concept, reuse first (`coding-style.md`),
165
+ implement exactly the spec. If the project intentionally uses one of these, follow the
166
+ project consistency beats the rule. A check or abstraction you can't justify in one
167
+ sentence is slop: delete it or ask.
@@ -24,8 +24,13 @@ Step 0: Read `.claude/skills/devrites-lib/reference/standards/core.md`, plus `gi
24
24
  2. **Fetch.** Use GitHub GraphQL/CLI to collect unresolved review threads with file, line, author, body, and thread id. Completion: every unresolved thread is represented once, or the fetch error is reported.
25
25
  3. **Legitimacy gate.** For each item, read the surrounding code and classify: `fix`, `not-addressing`, `declined`, `reply-only`, or `needs-human`. Deduplicate overlapping items.
26
26
  4. **Fix approved items.** Apply contained fixes, add/update tests when behavior changes, and run targeted checks. Larger product/API/security calls become `needs-human`.
27
- 5. **Commit/push.** Stage only touched files. Commit only if changes exist; push the branch.
28
- **Completion:** changed files are committed/pushed with SHA evidence, or no commit is created because the diff is empty.
27
+ 5. **Commit/push.** Stage only touched files; commit only if changes exist; push the branch.
28
+ Push rejected (protected branch, non-fast-forward, hooks): stop and report the exact
29
+ rejection — never force-push or rewrite a shared branch. Post-push checks fail: record
30
+ the failing check, choose fix-forward or revert, put the choice + reason in the thread
31
+ reply — never a silent red push.
32
+ **Completion:** committed/pushed with SHA evidence and green checks, or no commit (empty
33
+ diff), or the push failure reported verbatim.
29
34
  6. **Reply and resolve.** Reply to every thread with outcome and evidence. Resolve only `fix`, `not-addressing`, `declined`, and `reply-only`; leave `needs-human` open.
30
35
  **Completion:** every thread has one recorded outcome and only permitted terminal outcomes are resolved.
31
36
  7. **Verify.** Fetch unresolved threads again and report remaining intentional opens.
@@ -3,9 +3,10 @@
3
3
  Contract WHAT users get, WHY, success, and scope. HOW belongs in `plan.md`,
4
4
  topology in `architecture.md`/`flows.md`, coverage in `traceability.md`.
5
5
 
6
- Use `[NEEDS CLARIFICATION: <question>]` (blocking stops `/rite-clarify`) and
7
- stable `REQ-001`/`AC-001` IDs. Link, never duplicate, source artifacts. Over
8
- schema budget requires `Budget override: <reason>`.
6
+ Use `[NEEDS CLARIFICATION: <question>]` (blocking stops `/rite-clarify`); before readiness
7
+ every surviving marker converts to a gated `Q-###` open question (`spec-grammar.md` §
8
+ Unresolved-question markers fail closed). Stable `REQ-001`/`AC-001` IDs; link, never
9
+ duplicate, source artifacts; over-budget requires `Budget override: <reason>`.
9
10
 
10
11
  ```markdown
11
12
  # Spec: <Feature>
@@ -110,7 +111,7 @@ status routes Define/Vet/Build/Prove to the named standard without copying it he
110
111
  - Model/RAG/agent/eval/LLM-output scope: `ai-spec.md` from `ai-spec-template.md`.
111
112
  - Otherwise: not applicable.
112
113
 
113
- ## Measurable success
114
+ ## Success metrics
114
115
  - <Metric or observable proof.>
115
116
 
116
117
  ## Scope boundaries
@@ -18,6 +18,8 @@ artifacts only as needed. Never infer lifecycle state from `README.md` or chat.
18
18
 
19
19
  If no workspace exists, recommend `/rite-spec <feature>` and stop.
20
20
 
21
+ If `state.md` is unreadable/malformed: report a gap with the defect and stop — never infer the phase from other files; `/rite-doctor`/`/rite-upgrade` own repair.
22
+
21
23
  ## Report
22
24
 
23
25
  1. feature and one-line objective;
@@ -16,6 +16,8 @@ Use native file search; do not use engine miners, indexes, telemetry, or agents.
16
16
 
17
17
  - Keep two-feature corrections or one rationale-backed durable product/architecture decision.
18
18
  - Verify live claims; cite currentness. Unverifiable = `unknown`, not false.
19
+ - Source order: live repository source outranks an archive's recorded claim; where they
20
+ conflict, follow live and record the delta as part of the finding.
19
21
  - Name trigger/non-trigger; drop generic, stale, one-off, unbounded advice.
20
22
  - Search instructions/standards/ADRs for duplicate, contrary, or superseded guidance;
21
23
  choose one canonical home + discovery route.
@@ -85,13 +85,10 @@ through the layers (DB → service → API → UI) one capability at a time, app
85
85
  engineering rules to the backend and this craft to the frontend, map every contract error
86
86
  to a real UI state, and **prove both layers** (contract tests + browser proof).
87
87
 
88
- ## Anti-AI-slop (banned defaults unless the project's system uses them)
89
- Purple/blue gradients · gradient text · glassmorphism by default · cards-in-cards ·
90
- identical card grids everywhere · rounded-square icon tile above every heading ·
91
- gray-on-color text · hero-metric cliché · decorative bounce/elastic easing · random
92
- Inter-for-everything · modal-first thinking · ghost-card (border + big shadow) · fake
93
- UI-in-a-div · placeholder copy/data. Full list + the countable mechanical pre-flight:
94
- `rite-polish/reference/anti-ai-slop.md`.
88
+ ## Anti-AI-slop
89
+ The banned-defaults list and the countable mechanical pre-flight live in
90
+ `rite-polish/reference/anti-ai-slop.md` (canonical owner): run both at build and polish
91
+ time a slop pattern in the slice is a polish finding.
95
92
 
96
93
  ## Default vs departure
97
94
  Preserve the existing identity (default, ~90%). Reject it only on an explicit signal (a
@@ -26,8 +26,8 @@ these are the floor, not the ceiling.
26
26
  - **Test** with keyboard, a screen reader, and an automated checker (e.g. axe): early.
27
27
 
28
28
  ## Motion
29
- - Purposeful only; UI feedback ~≤200 ms, transitions ~≤500 ms. Never animate to mask slow
30
- loading. Honor `prefers-reduced-motion` (reduce/remove non-essential motion).
29
+ - Purposeful only; UI feedback ~≤200 ms, transitions ~≤500 ms (class table below). Never
30
+ animate to mask slow loading; honor `prefers-reduced-motion`.
31
31
 
32
32
  ## Responsive
33
33
  - Fluid layouts; no fixed widths that break. Verify at **320 / 768 / 1024 / 1440** px; no
@@ -65,13 +65,11 @@ Claims such as proved, reviewed, sealed, shipped, or complete must point to real
65
65
  output or an artifact. Use exactly one recommended next action except for
66
66
  terminal agent-owned technical exhaustion, which has no runnable action.
67
67
 
68
- Use that terminal case only after three recorded no-progress corrections of the
69
- exact fingerprint, or when required evidence was irretrievably absent **and** no safe in-scope diagnostic-amplification seam exists. Loss from the
70
- past attempt alone is not terminal: repair and Vet a boundary-discriminating
71
- evidence design, then request fresh authorization for its acquisition attempt. A spent
72
- consumptive-action authorization plus a retained new fingerprint is not terminal;
73
- it continues offline recovery and waits for fresh authorization only after repair.
74
- For a true terminal case use:
68
+ Use that terminal case only per [`one-shot-actions.md`](standards/one-shot-actions.md):
69
+ three recorded no-progress corrections of the exact fingerprint, or required evidence
70
+ irretrievably absent with **no safe in-scope diagnostic-amplification seam**. A spent
71
+ consumptive-action authorization plus a retained new fingerprint is not terminal. For a
72
+ true terminal case use:
75
73
 
76
74
  ```text
77
75
  Stopped: Technical recovery exhausted
@@ -45,7 +45,7 @@ Claude grants only wright `acceptEdits`; Codex root is workspace-capable (childr
45
45
 
46
46
  Isolated-worktree pilot only under [`wright-dispatch.md`](../../../rite-build/reference/wright-dispatch.md#isolated-writer-worktree-pilot): one writer, committed/clean baseline, non-submodule parent, exact transfer commit, candidate reconciliation — never parallel writers nor weaker exact-path admission. Root may materialize only exact Vet-ready workflow-artifact paths per [`workflow-artifacts.md`](workflow-artifacts.md) — not a writer dispatch or candidate mutation.
47
47
 
48
- Each job gets objective/exclusions, exact paths/immutable candidate, rubric/result shape. Briefs MUST NOT seed verdict/severity cap/conclusion/suppression. Results state status/scope, outcome, commands/escalation; wright adds paths, changed files, gates, stood decisions; results never widen scope.
48
+ Each job gets objective/exclusions, exact paths/immutable candidate, rubric/result shape, a **stop condition** (when to return), and the exact result shape; a dispatch missing them is malformed and re-issued. Briefs MUST NOT seed verdict/severity cap/conclusion/suppression. Results state status/scope, outcome, commands/escalation; wright adds paths, changed files, gates, stood decisions; results never widen scope.
49
49
 
50
50
  ## Independence
51
51
 
@@ -43,14 +43,11 @@ Before advancing a phase, run `devrites-engine check readiness <slug>` for struc
43
43
 
44
44
  ### Gate contract
45
45
 
46
- Each gate is declared as **Name · Precondition · Satisfying observation (exact command/artifact state) · Pass/Fail · What failure blocks**, with one type: `preflight`, `revision`, `escalation` (human-only), `abort`. Engine gates keep exit codes; semantic gates are judged by their owner against this contract. A gate whose failure consequence cannot be named is decoration — sharpen or delete it.
47
- ## Caller-owned technical backtracking
46
+ Each gate is declared as **Name · Precondition · Satisfying observation (exact command/artifact state) · Pass/Fail · What failure blocks**, with one type: `preflight`, `revision`, `escalation` (human-only), `abort`. Engine gates keep exit codes; semantic gates are judged by their owner against this contract. A gate whose failure consequence cannot be named is decoration — sharpen or delete it. A mechanical gate's satisfying observation is a command or artifact state a reviewer can re-run or re-read — narrative-only passes are unproven.
48
47
 
49
- When a rite invokes an earlier rite inline to repair an agent-owned technical gap, the original rite stays the controlling caller: a nested `STOP` is a phase boundary, not user-facing. The caller re-reads `state.md`, follows the return cursor/`next_action`, and resumes unless a human-owned, safety, access, budget, or exhausted-recovery stop is active ([Persistence before stopping](#persistence-before-stopping-handoff-discipline)). Derive `exhausted-recovery` from the fingerprint's recorded no-progress attempts; one consumed authorization doesn't exhaust offline recovery from retained new evidence.
48
+ ## Caller-owned technical backtracking
50
49
 
51
- Derive `exhausted-recovery` from the exact fingerprint's recorded no-progress
52
- attempts, not from a stale `state.md` label. A consumed authorization for one
53
- real action does not exhaust offline recovery from its retained new evidence.
50
+ When a rite invokes an earlier rite inline to repair an agent-owned technical gap, the original rite stays the controlling caller: a nested `STOP` is a phase boundary, not user-facing. The caller re-reads `state.md`, follows the return cursor/`next_action`, and resumes unless a human-owned, safety, access, budget, or exhausted-recovery stop is active ([Persistence before stopping](#persistence-before-stopping-handoff-discipline)). Derive `exhausted-recovery` from the fingerprint's recorded no-progress attempts, not from a stale `state.md` label; one consumed authorization doesn't exhaust offline recovery from retained new evidence.
54
51
 
55
52
  An intermediate `Next step` is cold-resume metadata. Do not ask the human to
56
53
  copy routine `/rite-plan repair`, `/rite-vet`, `/rite-build`, or proof-rerun
@@ -10,9 +10,17 @@ Ship small, integrate often, and keep the main branch releasable. Workflow phase
10
10
  - Prefer short-lived branches off the main branch.
11
11
  - The main branch is **always in a releasable state**. Validate every change through a
12
12
  **fast, reliable CI pipeline** (tests + build) before it merges.
13
+ - **Trunk broken?** Revert first (default repair); fix forward only when revert is harder. Red trunk blocks all merges.
13
14
  - Hide incomplete work behind a **feature flag / toggle** rather than a long branch, so
14
15
  partial work can land without blocking releases or breaking the trunk.
15
16
 
17
+ ## Feature-flag lifecycle
18
+
19
+ - Name the **removal trigger** at flag creation; delete the flag once the work ships — a
20
+ flag past its trigger is **flag debt**, a review finding. Prove **both states**
21
+ ([`testing.md`](testing.md)); widen rollout only with the rollback path recorded
22
+ ([`data-integrity.md`](data-integrity.md)).
23
+
16
24
  ## Review gate
17
25
  - A human reviews every change before merge; `code-review.md` owns review scope and evidence.
18
26
 
@@ -4,6 +4,12 @@ Document intent/decisions; public inputs, outputs, errors, and gotchas; non-obvi
4
4
  constraints; and real build/test/run commands. Update with behavior; prefer one runnable
5
5
  example. Do not restate code or types.
6
6
 
7
+ ## Drift check (docs describe what runs)
8
+
9
+ A documented command/example that no longer runs is a **documentation-drift finding** at
10
+ review/polish: run it — failure plus output is the evidence. A behavior change updates the
11
+ doc or records the divergence; doc and code never hold contradictory "truths".
12
+
7
13
  ## Record decisions
8
14
 
9
15
  - Capture significant context, decision, consequences, accepted trade-off, change trigger,
@@ -16,6 +16,17 @@ recoverable.
16
16
  - If you catch, either recover meaningfully, or rethrow/wrap with added context. Don't
17
17
  log-and-continue past an error you didn't handle.
18
18
 
19
+ ## Classify the outcome before retrying
20
+
21
+ Never retry blind — match the outcome first:
22
+
23
+ - **Rejected** (refused: validation/authz/conflict): fix input; unchanged retry fails again.
24
+ - **Unknown** (timed out mid-call): check state at the source before any retry.
25
+ - **Partial** (half-committed): [`data-integrity.md`](data-integrity.md) § partial failure — reconcile or roll back, never resume blind.
26
+ - **Clean failure** (not started / fully rolled back): safe to retry after fixing the cause.
27
+
28
+ **Failing case:** an **Unknown** outcome retried unchanged double-applies (duplicate charge). Idempotency: [`data-integrity.md`](data-integrity.md); outcome taxonomies: [`integration-reliability.md`](integration-reliability.md). Not provable → `cannot_verify` and stop.
29
+
19
30
  ## Meaningful messages
20
31
  - Error messages state what failed, the relevant context (ids, inputs, not secrets),
21
32
  and ideally how to recover. Cryptic messages cost hours.
@@ -11,6 +11,10 @@ Measure first. An optimization without a measurement is a guess that adds comple
11
11
  ## Optimize responsibly
12
12
  - Fix the **measured** bottleneck, then **re-measure** to prove the win (before/after).
13
13
  An optimization that doesn't move the number is just added complexity: revert it.
14
+ - **Measurement not reproducible in CI** (noisy host, external dependency): label the claim
15
+ `Lab (<named command/environment>)` — never an elapsed-time assertion in shared CI (a
16
+ flaking wall-clock test is a flaky test, [`testing.md`](testing.md)). Budget regression:
17
+ re-measure; fix to budget or record the accepted regression with reason and owner.
14
18
 
15
19
  ## Frontend: Core Web Vitals
16
20
  For UI work, measure-first means LCP / INP / CLS judged against real numbers, each labeled
@@ -101,5 +101,4 @@ Conditional on a model/RAG/tool surface; prompt-injection rules above always app
101
101
  - **LLM06 unbounded consumption:** rate-limit, cap tokens/cost/time; an open loop is DoS and bill.
102
102
 
103
103
  ## Framework references on findings
104
-
105
- Bind findings to framework identifiers **where written**: ATT&CK technique ids for adversary behavior, D3FEND countermeasures when a mitigation is named, NIST CSF function-categories for governance framing, ATLAS ids for model-facing techniques. Rules carry ids at authorship; summaries derive from those citations later. Annotation, not busywork — omit when no identifier strengthens remediation. Severity follows [`code-review.md`](code-review.md); Critical blocks Seal.
104
+ Bind findings to framework identifiers **where written**: ATT&CK technique ids for adversary behavior, D3FEND countermeasures when a mitigation is named, NIST CSF function-categories for governance framing, ATLAS ids or ASI ids (OWASP Agentic Applications / Agentic Skills Top 10) for model/agent-facing techniques. Rules carry ids at authorship; summaries derive from those citations later. Annotation, not busywork — omit when no identifier strengthens remediation. Severity follows [`code-review.md`](code-review.md); Critical blocks Seal.