@groundnuty/macf 0.2.0-rc.1 → 0.2.1
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.
- package/dist/.build-info.json +2 -2
- package/dist/cli/claude-sh.d.ts.map +1 -1
- package/dist/cli/claude-sh.js +12 -4
- package/dist/cli/claude-sh.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +8 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/rules-refresh.d.ts.map +1 -1
- package/dist/cli/commands/rules-refresh.js +5 -1
- package/dist/cli/commands/rules-refresh.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +8 -1
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/settings-writer.d.ts +84 -4
- package/dist/cli/settings-writer.d.ts.map +1 -1
- package/dist/cli/settings-writer.js +182 -4
- package/dist/cli/settings-writer.js.map +1 -1
- package/dist/cli/version-resolver.d.ts.map +1 -1
- package/dist/cli/version-resolver.js +15 -2
- package/dist/cli/version-resolver.js.map +1 -1
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +26 -0
- package/dist/package-version.js.map +1 -0
- package/package.json +2 -2
- package/plugin/rules/check-before-propose.md +86 -0
- package/plugin/rules/codify-at-correction-time.md +92 -0
- package/plugin/rules/coordination.md +17 -0
- package/plugin/rules/delegation-template.md +250 -0
- package/plugin/rules/execute-on-directive.md +71 -0
- package/plugin/rules/gh-token-attribution-traps.md +157 -0
- package/plugin/rules/mention-routing-hygiene.md +105 -0
- package/plugin/rules/model-era-compatibility.md +94 -0
- package/plugin/rules/observability-wiring.md +60 -0
- package/plugin/rules/peer-dynamic.md +205 -0
- package/plugin/rules/pr-discipline.md +245 -0
- package/plugin/rules/verify-before-claim.md +131 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Verify Before Claim
|
|
2
|
+
|
|
3
|
+
**Tool output beats memory. Diff beats prose. Freshly-queried state beats last-known state.**
|
|
4
|
+
|
|
5
|
+
Before you make an assertion about system state — the status of an issue, whether a PR merged, what a config file contains, whether a service is running — verify it with a tool call, then claim it. The cost of a `gh`/`kubectl`/`helm`/`ls`/`grep` call is ~1 second. The cost of a confidently-wrong assertion that a peer acts on is much larger.
|
|
6
|
+
|
|
7
|
+
This rule compounds every behavior in this file — they're four faces of the same discipline.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Never fabricate "verified" output in close comments
|
|
12
|
+
|
|
13
|
+
When closing an issue (or writing any "this is done" artifact), paste **literal output** from the verifying tool call. Do not paraphrase it. Do not write what it "should" say.
|
|
14
|
+
|
|
15
|
+
**Bad:**
|
|
16
|
+
> Verified — `macf --version` returns `0.2.0` and `npm view @groundnuty/macf version` returns `0.2.0`. Closing.
|
|
17
|
+
|
|
18
|
+
(If you didn't actually run those commands in the current session, the text is a fabrication even if the values happen to be correct.)
|
|
19
|
+
|
|
20
|
+
**Good:**
|
|
21
|
+
> $ npm view @groundnuty/macf version
|
|
22
|
+
> 0.2.0
|
|
23
|
+
> $ macf --version
|
|
24
|
+
> 0.2.0
|
|
25
|
+
>
|
|
26
|
+
> Closing as reporter.
|
|
27
|
+
|
|
28
|
+
Literal quoted output with the `$` prompts is the signal that the assertion is grounded in a just-executed command. Future readers (auditors, peers, future-you) can tell by formatting whether the evidence is fresh or narrated.
|
|
29
|
+
|
|
30
|
+
**Applies to:** issue close comments, PR merge-handoff comments, runbook "I ran X, got Y" sections, status updates on long-running tasks.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. After `gh issue comment` / `gh issue close`, verify it actually posted
|
|
35
|
+
|
|
36
|
+
Writing the review/LGTM/close-comment as prose in your response is NOT the same as posting it. Only executed tool calls reach the repo; chat output is invisible to other agents. Treat the verification step as a **mandatory tail**, not optional.
|
|
37
|
+
|
|
38
|
+
After any `gh issue comment` / `gh pr comment` / `gh issue close`:
|
|
39
|
+
|
|
40
|
+
gh issue view <N> --repo <owner>/<repo> --json comments \
|
|
41
|
+
--jq '.comments[-1].author.login'
|
|
42
|
+
|
|
43
|
+
Confirms:
|
|
44
|
+
- (a) the comment exists (non-empty output)
|
|
45
|
+
- (b) attribution is correct — your bot login, not the user's login (attribution-trap catch)
|
|
46
|
+
|
|
47
|
+
Signs you may have missed the tool call:
|
|
48
|
+
|
|
49
|
+
- Your last action was describing a review / decision / close in prose
|
|
50
|
+
- The recipient's status comment says "waiting for review" or "ready for you to close" with no reply from you visible on the thread
|
|
51
|
+
- Time has passed since you "reviewed" but no downstream activity has happened
|
|
52
|
+
|
|
53
|
+
When in doubt, run the `gh issue view` check. Cheap to verify; costly to have the peer wait on a review that never arrived.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 3. Before ordering-claims, `gh pr view` the predecessor
|
|
58
|
+
|
|
59
|
+
Before asserting "PR A must merge before PR B" or "X is blocked on Y":
|
|
60
|
+
|
|
61
|
+
gh pr view <predecessor-N> --repo <owner>/<repo> --json state,mergeStateStatus,mergedAt
|
|
62
|
+
|
|
63
|
+
Don't infer the predecessor's state from stale in-context memory. PR review conversations often span hours; a PR you saw as OPEN two hours ago may be MERGED now. Sequencing claims based on stale state lead to peers doing unnecessary rebases or waiting on already-satisfied dependencies.
|
|
64
|
+
|
|
65
|
+
Same principle for `gh issue view` / `helm status` / `kubectl get` — the live query beats the remembered value, always, for anything that could have moved.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 4. Before committing "root cause: X" to memory, read the fix diff
|
|
70
|
+
|
|
71
|
+
When an incident closes with a post-mortem-style "root cause: X" from the reporter, that statement is the reporter's *hypothesis*. Before writing it into persistent memory, verify against the actual fix diff:
|
|
72
|
+
|
|
73
|
+
git show <fix-commit-sha>
|
|
74
|
+
# or
|
|
75
|
+
gh pr diff <fix-PR-N> --repo <owner>/<repo>
|
|
76
|
+
|
|
77
|
+
The diff shows what was *actually* changed. Reporter prose is narrative — often right, sometimes simplified, occasionally wrong. A memory file claiming "mode-6 of the attribution trap is X" is load-bearing for future sessions; miscalling the root cause sends those future sessions chasing the wrong bug class.
|
|
78
|
+
|
|
79
|
+
Cluster to which this belongs: always prefer concrete artifact (diff, config, tool output) over narrative description of it. The narrative is lossy compression.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 5. Verify-at-every-hop — both sides apply
|
|
84
|
+
|
|
85
|
+
When evidence flows through multiple agents (peer-A observes → peer-B cites → peer-C tracks), the verify-before-claim discipline applies **at each hop**, not just at the original observation. Two complementary species:
|
|
86
|
+
|
|
87
|
+
### Emitter side — label hypotheses as hypothetical
|
|
88
|
+
|
|
89
|
+
When proposing a mechanism, root-cause framing, or other interpretive claim into the substrate-record (issue thread, comment, memory, paper-trail entry), explicitly label hypotheses as hypothetical. Don't claim mechanism-as-fact when it's mechanism-as-hypothesis.
|
|
90
|
+
|
|
91
|
+
The surface observation may be valid even when the named mechanism isn't; preserve the observation while making the proposal-status explicit:
|
|
92
|
+
|
|
93
|
+
- **Hypothesis-as-hypothesis (good):** *"the mechanism appears to be X — anyone want to verify?"*
|
|
94
|
+
- **Fact (only when verified):** *"the mechanism is X (verified via `gh api ... --jq ...` returning Y)"*
|
|
95
|
+
- **Hypothesis-as-fact (avoid):** *"the mechanism is X."* — forces downstream peers to either re-derive from the source or propagate an unverified claim
|
|
96
|
+
|
|
97
|
+
### Receiver side — re-verify before promoting
|
|
98
|
+
|
|
99
|
+
When citing another agent's API-evidence claim into a higher-visibility tracking surface (tracking issue, synthesis comment, workbench rule, paper-trail entry), re-verify the literal data with a fresh tool call. Don't propagate citations.
|
|
100
|
+
|
|
101
|
+
The data-quality buck stops at whoever promotes the claim into the higher-visibility surface, regardless of who originally observed it. Tracking-surface citations carry the misread forward indefinitely once promoted.
|
|
102
|
+
|
|
103
|
+
### Worked examples
|
|
104
|
+
|
|
105
|
+
**Receiver-side, observed 2026-04-25:** Peer-A reports *"PR#57 was created at 18:23:31Z, 5s before FAIL."* Peer-B writes a tracking issue update citing that timestamp without re-running `gh api .../pulls/57 --jq '.created_at'`. Peer-C re-verifies and finds the actual API returns `18:24:36Z` — 61s AFTER FAIL. The receiver-side discipline at peer-B's citation hop would have caught this.
|
|
106
|
+
|
|
107
|
+
**Emitter-side, observed 2026-04-26:** Peer-A reports *"the window appears to count from `issue.createdAt`."* Peer-B reads the helper code and finds the deadline is calculated from `SECONDS + timeout` at helper-call time (post-merge). The mechanism was already merge-anchored; the symptom (FAIL fires too quickly) was real but the proposed mechanism was wrong. The emitter-side discipline would have framed peer-A's observation as *"appears to count from `createdAt` — anyone want to verify?"* rather than as asserted-fact.
|
|
108
|
+
|
|
109
|
+
### Relationship to §1 (literal output)
|
|
110
|
+
|
|
111
|
+
§1 covers single-hop verification (paste literal output from your own tool calls). §5 extends this to multi-hop propagation: each hop in a citation chain gets its own §1-style discipline. A citation without re-verification is the multi-hop equivalent of paraphrased close-comment output — same epistemic shape, larger blast radius.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 6. When mis-attribution is discovered mid-thread
|
|
116
|
+
|
|
117
|
+
If you post a comment and later realize it was attributed to the wrong identity (typically: chat-fallback to user because GH_TOKEN was the string "null"), **do not delete-and-repost**. Downstream references — @mentions to you, PR thread anchors, peer agents quoting the comment — break when the original is deleted.
|
|
118
|
+
|
|
119
|
+
Instead: post a follow-up clarification on the same thread:
|
|
120
|
+
|
|
121
|
+
> Follow-up: the previous comment on this thread was posted under the wrong identity due to a token-refresh failure. The intended author was `macf-devops-agent[bot]`. Content still stands.
|
|
122
|
+
|
|
123
|
+
Then fix the root-cause (refresh the token properly, inspect the helper for silent-failure modes — see `gh-token-refresh.md`). Silent delete-and-repost creates a worse audit trail than a clear acknowledgment of the slip.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Why this rule exists
|
|
128
|
+
|
|
129
|
+
Verification discipline slips most often in the turn *right before a hand-off*: closing an issue, merging a PR, summarizing to a peer. The context buffer feels settled, the task feels done — so we narrate instead of verify. That's exactly when a wrong claim becomes load-bearing on someone else's next action.
|
|
130
|
+
|
|
131
|
+
Cheap to verify. Expensive to be confidently wrong. Always pay the cheap cost.
|