docs(standards): fold single-incident rules into the general rules they illustrate

Several clauses in the engineering standard and the contribution guide
recorded one incident each. Where the same file already states the general
rule, the instance leaves: relayed content limits, serialized recovery, the
per-item limit and late teardown are covered by the aggregate-bound, current
intent, identity and operation-rejection rules. Where an instance carried a
distinction the general rule lacked, that distinction now sits in the rule in
one sentence: saved preferences as a separate fact, missing measurements and
per-generation baselines, protocol rejection and satisfied teardown, a
cancellable effect boundary, one shared normalizer for canonical forms, error
facts localized at render, a healthy sibling in review, and partial
restoration with shared endpoints in tests.

In the contribution guide, source preparation and real-input platform checks
each keep one general rule, the local cleanup inbox leaves while the
rejected-cleanup rule stays, and the Cargo source-copy invalidation guidance
stays because the native build still needs it. No heading changes.
This commit is contained in:
AAA committed 2026-11-26 00:06:16 +08:00
1 parent 24dbe4bf94
commit 4cc5e2ec20
2 files changed
+43 -60

No files matched your search

+7 -10
View File
@@ -56,9 +56,8 @@ do not maintain a separate thanks list or manufacture empty credit commits.
This is the default for an ordinary scoped implementation or bug fix.
1. Start a new phase from clean, current canonical `main`; continue scoped work in that phase's existing worktree. Until cutover, the authorized isolated 3.0 prototype starts its phases from the current `feat/channel-prototype` commit. Preserve unrelated user work.
Temporary source preparation must stop on failure. Before checkout or edits,
verify the intended directory and Git root, then use that explicit working
directory; a failed directory change must not redirect work into the caller's checkout.
Temporary source preparation stops on failure: verify the intended directory
and Git root before checkout or edits, and work only in that explicit directory.
2. Inspect the affected code, current owner, and reachable evidence. Use the
repository's existing tools, commands and workflow; introduce another only
when the requested result needs it. Research primary sources when the issue
@@ -108,10 +107,8 @@ require a wire bump.
Clean up worktrees and branches only after semantic review and integration are complete and the normal merged-head, open-reference, clean-tree, and non-following link checks pass. Never merge an old branch wholesale after a newer truth checkpoint.
For owner-managed manual deletion, collect permitted retired artifacts in
`Desktop/Piik-cleanup` with their original paths. Keep worktrees under Git's cleanup
workflow. Targets of a policy-rejected cleanup stay in place and go in that path
index; do not substitute a move for the rejected deletion.
Keep worktrees under Git's cleanup workflow. Targets of a policy-rejected
cleanup stay in place; do not substitute a move for the rejected deletion.
## Working With A Second Agent
@@ -226,9 +223,9 @@ it does not publish changes or approve a dependency update.
## Verification Entrypoints
For user activation, focus and history checks, operate the visible control with
browser pointer, touch or keyboard input. Exercise Back through the tested
browser or device's control, following its
For user activation, focus and history checks, including Back, operate the
visible control of the tested browser or device with real pointer, touch or
keyboard input, following its
[history navigation behavior](https://chromium.googlesource.com/chromium/src/+/main/docs/history_manipulation_intervention.md).
Every retained test must be collected by a documented verification entry point.
+36 -50
View File
@@ -128,7 +128,9 @@ resources from its declaration alone. Measurements are observations, not resourc
requests: their range need not match a setting or estimated network budget.
An unusable optional metric should become unavailable without discarding valid
evidence or closing media control. Identity, generation, authority and required
state consistency remain strict; never clamp a measurement into an invented fact.
state consistency remain strict; never clamp a measurement into an invented fact
or read a missing one as zero, and accumulate observations only from a baseline
of the same resource generation.
Detect optional platform features through bounded capability checks and actual
operation results, not OS/browser version allowlists. Keep API availability,
@@ -136,14 +138,13 @@ permission and successful execution distinct; version data is diagnostic context
Preserve meaningful authorization and resource bounds; prove that a producer's
valid aggregate output fits its consumer, including serialization overhead.
A per-item limit alone does not establish that contract.
When extending a boundary, exercise a representative new value, a larger peer
capability and an unchanged consumer before calling the design extensible.
Check both acceptance and the effect of rejection. For media, include another source
orientation and distinguish encode, decode and forwarding support. Optional
presentation additions need a bounded unsupported-value policy separate from
authority violations, following [versioning](./versioning.md#extending-interfaces).
Check both acceptance and the effect of rejection. For media, distinguish
encode, decode and forwarding support. Optional presentation additions need a
bounded unsupported-value policy separate from authority violations, following
[versioning](./versioning.md#extending-interfaces).
Use the existing owner and concrete capability negotiation; these checks do not
justify a generic plugin framework or accepting unknown commands.
@@ -275,15 +276,11 @@ the observation or decision that would settle it.
ownership concern; it does not by itself establish a runtime or performance
defect.
- State has one writer and a clear lifetime. Separate permission, capability,
connection readiness, requested settings, applied settings and observation.
Derive presentation from facts; do not synchronize parallel booleans or let
a cached failure outlive its evidence.
Selecting a runtime mode is not an edit to saved preferences; compare CLI,
launcher and page write paths against the same explicit user intent.
Cumulative observations need a valid baseline for the resource generation
they describe; missing measurements are not zero. Serialized recovery reads
current committed intent when it executes rather than replaying a queued snapshot.
- Separate ordinary operation rejection from an unusable resource instance.
connection readiness, saved preferences, requested settings, applied settings
and observation. Derive presentation from facts; do not synchronize parallel
booleans or let a cached failure outlive its evidence.
- Separate protocol rejection and ordinary operation rejection from an unusable
resource instance; a teardown that is already satisfied succeeds.
Retire a broken instance at its existing lifetime owner; recreate it only from
current authorized intent and committed state. Keep one bounded recovery policy
at that boundary. Recreating resources does not replay user commands or renew
@@ -320,28 +317,20 @@ the observation or decision that would settle it.
authority; the shared core retains that responsibility.
Injected callbacks still execute in their caller's context. Synchronous
authority hooks must not hide blocking I/O or release the caller's lock;
schedule slow work at an explicit, owned effect boundary.
- Validate and normalize unknown input once at each owning trust boundary, then
pass typed values inward. Do not repeat shape checks already guaranteed by a
schedule slow work at an explicit, owned effect boundary that stays
cancellable and keeps control responsive.
- Validate and normalize unknown input once at each owning trust boundary,
with one shared normalizer for any canonical form that is stored or compared,
then pass typed values inward. Do not repeat shape checks already guaranteed by a
schema, constructor or internal contract. Authorization and mutable state or
resource identity remain checked where they can change.
Keep domain error meanings stable and map them into shared localized UI.
Keep domain error meanings stable and map them into shared localized UI when
rendering: retained state keeps the failure fact, raw exceptions stay in
diagnostics, and only a transient notice may resolve its copy once.
[Versioning](./versioning.md) determines which
extensions are compatible; an optional field is not automatically compatible.
Dispatch separates protocol rejection, per-request operation failure and an
already-satisfied teardown. Late teardown is idempotent and cannot retire a
replacement resource; retain strict validation before looking up its target.
Relayed content uses the same units and limits at each boundary; its failure
cannot invalidate an otherwise valid local control session. Slow capture
mutations share one cancellable operation slot while control remains
responsive. Bounded queues apply backpressure rather than turning a valid
burst into session failure.
Retained media state carries failure facts; the presentation layer resolves
localized copy during render. Keep raw exceptions in diagnostics. Transient
event notices may resolve once when the event occurs.
Values with a defined canonical form, such as HTTP origins, use one shared
normalizer before storage and comparison. Verify the actual producer and
consumer together instead of weakening an authorization comparison.
Bounded queues apply backpressure rather than turning a valid burst into
session failure.
- Deployment configuration describes available services; room preferences
request allowed behavior. The server enforces the policy even when a client
requests more. The UI retains the same controls and explains locked choices.
@@ -440,24 +429,21 @@ Before changing production recovery or state, trace the real request producers
and their guards. A test that bypasses disabled controls or writes private state
does not alone establish a reachable product defect. Reference scans, including
hits from tests and previews, are leads rather than proof of product use or
absence. Follow the actual producer-to-consumer path and check the changed
boundary; isolated helper tests can miss a mismatch between the two ends.
absence. Follow the actual producer-to-consumer path, for a healthy sibling as
well as the failing child of a shared resource, and check the changed boundary;
isolated helper tests can miss a mismatch between the two ends.
For a shared-resource failure, review both the failing child and a healthy
sibling through the real producer/consumer boundary. Compare preparation with
live operation, and current implementations with supported compatibility paths.
Exercise optional failure after success and a dependency that remains pending
after cancellation; a timeout constant or a close call alone proves no deadline.
Keep the shared resources production retains while changing the external
condition. New request/connection IDs alone do not prove that a dependency's
cached observations, failure state or resource lease have been refreshed.
For media adaptation, include partial capacity restoration on the retained
connection, not only recovery to a fast link. Check capture, encoded output,
actual send and remote decode separately. A dependency's algorithm does not
prove its adapter preserves assumptions about pacing, measurement or ownership.
For overlapping connections, preserve the actual shared local and remote
endpoints; giving each fixture an independent listener can hide demultiplexing
conflicts. Check both commit and rollback while the surviving media still flows.
Compare preparation with live operation, and current implementations with
supported compatibility paths. Exercise optional failure after success and a
dependency that remains pending after cancellation; a timeout constant or a
close call alone proves no deadline. Keep the shared resources and endpoints
production retains while changing the external condition, including partial
restoration rather than only full recovery. New request/connection IDs alone do
not prove that a dependency's cached observations, failure state or resource
lease have been refreshed. Check capture, encoded output, actual send and remote
decode separately. A dependency's algorithm does not prove its adapter preserves
assumptions about pacing, measurement or ownership. Check both commit and
rollback while the surviving media still flows.
Keep the regression at the owning boundary and verify it rejects the old
behavior. Report which failure sequences were exercised, rather than treating
test counts, file coverage or an earlier audit as proof of lifecycle coverage.