Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/claude/examples/global-CLAUDE.md.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Deliver exactly the thing requested. When something else looks wrong along the w
- Present every command I am expected to run as a **fenced code block** on its own line, never inline-backticked inside prose. A fenced block is a clean copy target.
- Exactly **one** final, copy-ready command block per handover. Decide everything — commit type, wording, file list — *before* writing it. Never a block with a correction further down: the first block is what gets copied.

## Short labels in replies: never bare

A label that only means something inside its source document is opaque in a reply, whatever its letter or numbering: a plan finding (F8), a review finding (f2, F2–F4), an audit item (A1), a question (Q3), a plan step, a revision (r26), a scenario number, a tracking tag. I read the reply without that document open. Every first mention carries, in parentheses, what it is and preferably a link (plan line, issue, PR, review thread): "F8 (the search page returns 500 when a catalogue points at an unknown register, [plan](…))".

<!-- Why: a reply asked "what do you want to do with F8?" and the label only existed in a plan; a tracking tag like "WOO-527b" was read as a different ticket. A first version of this rule named only F8, so it did not obviously cover f2, F2–F4 or A1: name the kind of label, not one example. -->

## PR review threads: two roles

- As the **author** of a PR: after pushing a fix in response to a review thread, ask yes/no before replying; reply in neutral framing and never resolve the thread, the reviewer does that.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ interface LifecycleGuardInterface {
}//end interface
'

# shellcheck disable=SC2016 # PHP source: single quotes are REQUIRED
_STUB_IFACE_NOPARAM='<?php

namespace OCA\OpenRegister\Lifecycle;
Expand All @@ -110,6 +111,7 @@ interface LifecycleGuardInterface {
}//end interface
'

# shellcheck disable=SC2016 # PHP source: single quotes are REQUIRED
_GUARD='<?php

namespace OCA\Learniq\Service;
Expand Down Expand Up @@ -137,6 +139,7 @@ class WalletClaimSyncService implements LifecycleGuardInterface {
}//end class
'

# shellcheck disable=SC2016 # PHP source: single quotes are REQUIRED
_GUARD_UNMARKED='<?php

namespace OCA\Learniq\Service;
Expand Down Expand Up @@ -164,6 +167,7 @@ class WalletClaimSyncService implements LifecycleGuardInterface {
}//end class
'

# shellcheck disable=SC2016 # PHP source: single quotes are REQUIRED
_FREE_THEN_USE='<?php

namespace OCA\Learniq\Service;
Expand Down Expand Up @@ -198,6 +202,7 @@ class PermissionService {
}//end class
'

# shellcheck disable=SC2016 # PHP source: single quotes are REQUIRED
_FREE_MARKED='<?php

namespace OCA\Learniq\Service;
Expand Down
26 changes: 13 additions & 13 deletions hydra-gates/scripts/lib/test_gate_scope_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ printf '\n- unrelated doc tweak\n' >> "${WORK}/inherited/docs/CHANGELOG.md"
gf_commit_paths "${WORK}/inherited" "docs: unrelated change" docs/CHANGELOG.md

_pc="$(cd "${WORK}/inherited" && python3 "${CHECKER}" . --all 2>&1)"
if printf '%s' "${_pc}" | grep -qF 'lib/Listener/InheritedDebtListener.php'; then
if grep -qF 'lib/Listener/InheritedDebtListener.php' <<< "${_pc}"; then
_ok "positive control: checker --all NAMES lib/Listener/InheritedDebtListener.php"
else
echo "FAIL — the positive control did not fire: check_listener_placement.py --all"
Expand All @@ -107,7 +107,7 @@ else
printf '%s\n' "${_pc}" | sed 's/^/ /'
exit 1
fi
if printf '%s' "${_pc}" | grep -qE 'checked 1 post-event registration'; then
if grep -qE 'checked 1 post-event registration' <<< "${_pc}"; then
_ok "positive control: exactly 1 registration is present to be judged"
else
_bad "positive control: expected 'checked 1 post-event registration', got: $(printf '%s' "${_pc}" | tail -2 | tr '\n' ' ')"
Expand Down Expand Up @@ -182,8 +182,8 @@ gf_commit_all "${WORK}/inherited-nobase" "docs: unrelated change"

_out="$(gf_run_wrapper "${WORK}/inherited-nobase" "${WORK}/log-full")"

if printf '%s' "${_out}" | grep -qF 'SCOPE-MODE: full' \
&& printf '%s' "${_out}" | grep -qF 'Delta base: NONE'; then
if grep -qF 'SCOPE-MODE: full' <<< "${_out}" \
&& grep -qF 'Delta base: NONE' <<< "${_out}"; then
_ok "the run states BOTH its file scope (full) and that it resolved no delta base"
else
_bad "the run did not state both 'SCOPE-MODE: full' and 'Delta base: NONE'; the rest of this arm is unsafe to interpret because nothing pins which inputs produced it"
Expand All @@ -207,19 +207,19 @@ case "${_v}" in
;;
*) _bad "gate-61 on --full gave an unrecognised verdict: ${_v:0:160}" ;;
esac
if printf '%s' "${_v}" | grep -qF 'out of scope'; then
if grep -qF 'out of scope' <<< "${_v}"; then
_bad ".github#347 is LIVE: gate-61 on --full still claims 'the diff ... put every post-event registration out of scope', on a run whose own preamble says it computed no diff, over a tree whose single registration the positive control just failed. 0 of 1 inspected, and the reason cites a diff that does not exist."
else
_ok "gate-61's --full reason no longer claims a diff excluded anything"
fi
if printf '%s' "${_v}" | grep -qF 'computed NO diff'; then
if grep -qF 'computed NO diff' <<< "${_v}"; then
_ok "gate-61's --full reason names the ABSENCE of a diff — the falsifiable form"
else
_bad "gate-61's --full reason does not state that the run computed no diff, so a reader still cannot tell an empty scope from an empty tree: ${_v:0:200}"
fi
# The size of what went unread must be stated, or the skip is unfalsifiable in
# the other direction: '0 of 1' and '0 of 45' print identically without it.
if printf '%s' "${_v}" | grep -qE 'ADVISORY.*[0-9]+ registration\(s\) carrying [0-9]+ finding\(s\)'; then
if grep -qE 'ADVISORY.*[0-9]+ registration\(s\) carrying [0-9]+ finding\(s\)' <<< "${_v}"; then
_ok "gate-61's --full skip states the size of the backlog it did not inspect"
else
_bad "gate-61's --full skip does not state how many registrations went unread — the advisory sweep is missing, so '0 of 1' and '0 of 45' are typographically identical: ${_v:0:200}"
Expand All @@ -242,7 +242,7 @@ echo "== arm 3b — FULL file scope WITH a delta base (the new common case) =="
# the claim rather than trust it.
_outb="$(gf_run_wrapper "${WORK}/inherited" "${WORK}/log-full-base")"

if printf '%s' "${_outb}" | grep -qE '^\[hydra-gates\] Delta base: [^N]'; then
if grep -qE '^\[hydra-gates\] Delta base: [^N]' <<< "${_outb}"; then
_ok "the full-scope run resolved a delta base and NAMED it"
else
_bad "the full-scope run resolved no delta base though the fixture has refs/remotes/origin/development — arm 3b would then be re-measuring arm 3 and proving nothing"
Expand All @@ -261,8 +261,8 @@ esac

# A reason may name a diff ONLY on a run that computed one. Asserted from the
# other side here, so the pair pins both directions.
if printf '%s' "${_vb}" | grep -qF 'the diff against'; then
if printf '%s' "${_outb}" | grep -qE '^\[hydra-gates\] Delta base: [^N]'; then
if grep -qF 'the diff against' <<< "${_vb}"; then
if grep -qE '^\[hydra-gates\] Delta base: [^N]' <<< "${_outb}"; then
_ok "gate-61 names the diff it was actually given, on a run that printed that base — a checkable claim, not #347's unfalsifiable one"
else
_bad ".github#347 IS LIVE BY A NEW ROUTE: gate-61 names a diff on a run that announced no delta base"
Expand All @@ -272,7 +272,7 @@ fi
# The backlog SIZE must be stated here too. This is now the common path, and
# without it '0 of 1' and '0 of 45' print identically on every PR in the fleet —
# the exact ambiguity the advisory sweep was added to remove on the other path.
if printf '%s' "${_vb}" | grep -qE 'ADVISORY.*[0-9]+ registration\(s\) carrying [0-9]+ finding\(s\)'; then
if grep -qE 'ADVISORY.*[0-9]+ registration\(s\) carrying [0-9]+ finding\(s\)' <<< "${_vb}"; then
_ok "gate-61 states the size of the backlog it did not inspect at FULL scope too, not only when there is no base"
else
_bad "gate-61's full-scope skip does not state how many registrations went unread. This is the common case now, so the ambiguity the advisory sweep removed on the no-base path has simply moved to the path everyone runs: ${_vb:0:200}"
Expand Down Expand Up @@ -321,7 +321,7 @@ _known_defect "wording (unfiled)" \

# And the legitimate wording must STAY legitimate.
_v29="$(gf_verdict "${_out}" 29)"
if printf '%s' "${_v29}" | grep -qF 'intrinsically diff-relative'; then
if grep -qF 'intrinsically diff-relative' <<< "${_v29}"; then
_ok "gate-29 declines on --full with an honest reason ('intrinsically diff-relative') — the good pattern"
else
_bad "gate-29's --full reason changed; it used to state honestly that the run is not diff-scoped. Got: ${_v29:0:140}"
Expand All @@ -336,7 +336,7 @@ echo "== coverage accounting: NOT APPLICABLE must carry a reason =="
_bare=0
while IFS= read -r _line; do
# everything after "NOT APPLICABLE" should be an em-dash + prose
if ! printf '%s' "${_line}" | grep -qE 'NOT APPLICABLE (—|-) .{20,}'; then
if ! grep -qE 'NOT APPLICABLE (—|-) .{20,}' <<< "${_line}"; then
echo " bare: ${_line:0:120}"
_bare=$((_bare + 1))
fi
Expand Down
Loading