agent-afk 3.102.1 → 3.104.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.
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ground-claim
|
|
3
|
-
description: "
|
|
4
|
-
argument-hint: "<
|
|
3
|
+
description: "Grounds capability claims with file-read evidence. Default mode answers meta-capability questions ('what does X enable') with path:line citations. Pass mode: runtime-wiring with a claims list to trace actual runtime execution paths — call sites, DI registration, middleware — and get CONFIRMED/UNVERIFIED/REFUTED verdicts per claim. Blocks sign-off on any non-CONFIRMED claim."
|
|
4
|
+
argument-hint: "<capability question> | mode: runtime-wiring claims: [...]"
|
|
5
5
|
context: load
|
|
6
|
+
failure_modes:
|
|
7
|
+
- static_artifact_substitution
|
|
8
|
+
- routing_ambiguity
|
|
6
9
|
---
|
|
7
10
|
|
|
8
11
|
## Trigger
|
|
9
12
|
|
|
10
|
-
Self-referential meta-capability questions about the current repository, framework, or system
|
|
11
|
-
|
|
13
|
+
**Mode: capability** (default) — Self-referential meta-capability questions about the current repository, framework, or system:
|
|
12
14
|
- "What does this repo enable?"
|
|
13
15
|
- "What are the orchestration patterns available?"
|
|
14
16
|
- "List the available skills."
|
|
15
17
|
- "What capabilities does the plugin provide?"
|
|
16
|
-
- "Show me what the framework can do."
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
**Mode: runtime-wiring** — Claims that require tracing actual execution paths, not static structure:
|
|
20
|
+
- "Verify that middleware Y intercepts all requests."
|
|
21
|
+
- "Confirm plugin Z is loaded on startup."
|
|
22
|
+
- "Validate that feature X is active in production."
|
|
23
|
+
|
|
24
|
+
Skip both modes for: usage questions ("how do I use X?"), bug reports, feature requests.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Mode: capability (default)
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
### Procedure
|
|
21
31
|
|
|
22
32
|
1. **Extract capability nouns.** From the user's question, identify 2–5 concrete capability categories (e.g., skills, hooks, agents, orchestration patterns, CLI commands, verification methods). Write them down.
|
|
23
33
|
|
|
@@ -26,30 +36,113 @@ Skip: usage questions ("how do I use X?"), bug reports, feature requests, techni
|
|
|
26
36
|
- Read at least one concrete source file per capability. Record the file path and specific line numbers.
|
|
27
37
|
- Do not rely on training data, model recall, or session-listing attachments. Evidence must come from Read tool output.
|
|
28
38
|
|
|
29
|
-
3. **Build the answer inline.**
|
|
39
|
+
3. **Build the answer inline.** Embed citations **within claims**, not in a separate appendix. Format: `path/to/file.md:line—<claim context>`.
|
|
30
40
|
|
|
31
41
|
4. **Tag ungrounded claims.** If a capability claim cannot be traced to a file read, prefix it with `[UNVERIFIED: what would be needed to verify this]`. Never present an unverified claim without the tag.
|
|
32
42
|
|
|
33
|
-
5. **Declare sources read.** Explicitly name which files you read in the response
|
|
43
|
+
5. **Declare sources read.** Explicitly name which files you read in the response.
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
### Hard rules
|
|
36
46
|
|
|
37
47
|
- Do not answer from model recall alone.
|
|
38
48
|
- Do not answer from session-listing attachments without reading the underlying SKILL.md or manifest files.
|
|
39
|
-
-
|
|
49
|
+
- Every capability claim must point to a source. Do not summarize without citation.
|
|
40
50
|
- Do not bury unverified claims. Use the `[UNVERIFIED]` prefix and state the evidence gap.
|
|
41
51
|
- At least one `path:line` citation per named capability.
|
|
42
52
|
|
|
43
|
-
|
|
53
|
+
### Exit criteria
|
|
44
54
|
|
|
45
55
|
- Response contains ≥1 `path:line` citation per capability mentioned.
|
|
46
56
|
- Every unverified claim is explicitly tagged with `[UNVERIFIED: …]`.
|
|
47
|
-
- Response explicitly lists which files were read
|
|
57
|
+
- Response explicitly lists which files were read.
|
|
48
58
|
- No claims rest on model recall or default knowledge.
|
|
49
59
|
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Mode: runtime-wiring
|
|
63
|
+
|
|
64
|
+
Activated when the caller provides a `claims:` list and `mode: runtime-wiring`. Validates capability claims by tracing **actual runtime wiring** — call sites, DI registration, middleware registration, config manifests — not type signatures or import presence.
|
|
65
|
+
|
|
66
|
+
### Inputs
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
mode: runtime-wiring
|
|
70
|
+
claims: string[] # natural-language claims to verify (≤20 per batch; see batching)
|
|
71
|
+
entrypoints: string[] # known runtime entry files (e.g. main.ts, server.ts)
|
|
72
|
+
max_depth: number # max call-graph hops per chain (default: 8)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Pre-flight gate:** If `entrypoints` is empty, abort immediately with `entrypoints_required` — do not dispatch any sub-agents. If `claims` exceeds 20 items, split into batches of 10 and run sequentially; the Qualifier aggregates across batches.
|
|
76
|
+
|
|
77
|
+
### WireTracer sub-agent (one per claim, run in parallel)
|
|
78
|
+
|
|
79
|
+
For each claim:
|
|
80
|
+
|
|
81
|
+
1. Identify the claimed behavior's implementation symbol (function, class, middleware, plugin).
|
|
82
|
+
2. Search for **registration or injection sites** — not import statements. Targets: DI container bindings, `app.use(...)`, `router.register(...)`, config manifests, plugin loaders, factory calls.
|
|
83
|
+
3. Trace forward from the entrypoint, documenting each hop: `{ file, line, symbol, role }`.
|
|
84
|
+
4. If a hop is missing or conditional on an env var / feature flag, record the condition and stop the chain.
|
|
85
|
+
5. Return:
|
|
86
|
+
- `chain`: ordered `{ file, line, symbol, role }` list
|
|
87
|
+
- `last_confirmed`: deepest confirmed hop
|
|
88
|
+
- `gap`: missing-link description, or `null` if complete
|
|
89
|
+
- `verdict`: `CONFIRMED` | `UNVERIFIED` | `REFUTED`
|
|
90
|
+
|
|
91
|
+
**Prohibited reasoning — these are NOT evidence of runtime wiring:**
|
|
92
|
+
- "The type implements the interface, therefore it is active."
|
|
93
|
+
- "The import exists, therefore it is called."
|
|
94
|
+
- "The function is exported, therefore it is used."
|
|
95
|
+
|
|
96
|
+
If no chain can be constructed, return `UNVERIFIED` with `gap: "no_entry_found"`. Max **3 retries** per claim (narrowing search scope each time) before final escalation to `UNVERIFIED`.
|
|
97
|
+
|
|
98
|
+
### Qualifier sub-agent
|
|
99
|
+
|
|
100
|
+
Reviews all WireTracer reports. Applies:
|
|
101
|
+
|
|
102
|
+
- **CONFIRMED** — unbroken chain from entrypoint to invocation site; no conditional gaps left unresolved.
|
|
103
|
+
- **UNVERIFIED** — chain breaks at an identifiable gap; return gap location and a resolution hint.
|
|
104
|
+
- **REFUTED** — positive evidence the symbol is excluded, overridden, or dead-code eliminated at runtime.
|
|
105
|
+
|
|
106
|
+
If Qualifier verdict disagrees with WireTracer verdict, **Qualifier wins**; discrepancy is logged.
|
|
107
|
+
|
|
108
|
+
Emits a machine-readable verdict table:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
| Claim | Verdict | Last Confirmed Hop | Gap / Evidence |
|
|
112
|
+
|-------|---------|-------------------|----------------|
|
|
113
|
+
| ... | ... | ... | ... |
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Sign-off gate
|
|
117
|
+
|
|
118
|
+
Any `UNVERIFIED` or `REFUTED` verdict **blocks downstream review sign-off** and is returned to the caller with the gap location. Only an all-`CONFIRMED` table clears sign-off.
|
|
119
|
+
|
|
120
|
+
### Orchestration flow
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
entrypoints_required check → abort if empty
|
|
124
|
+
│
|
|
125
|
+
claims (batched ≤10 if >20)
|
|
126
|
+
│
|
|
127
|
+
▼
|
|
128
|
+
[WireTracer × N] ── parallel, one per claim
|
|
129
|
+
(≤3 retries per claim, narrowing scope)
|
|
130
|
+
│
|
|
131
|
+
▼
|
|
132
|
+
[Qualifier] ── reviews all reports, assigns verdicts
|
|
133
|
+
│
|
|
134
|
+
┌────┴────────┐
|
|
135
|
+
CONFIRMED UNVERIFIED / REFUTED
|
|
136
|
+
│ │
|
|
137
|
+
sign-off OK return gaps, block sign-off
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
50
142
|
## Out of scope
|
|
51
143
|
|
|
52
144
|
- Usage questions ("how do I use library X?") → normal research.
|
|
53
145
|
- Bug reports → `/diagnose`.
|
|
54
146
|
- Building new capability → `/mint`.
|
|
55
147
|
- Verification of sub-agent findings → `/shadow-verify`.
|
|
148
|
+
```
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ground-state
|
|
3
|
-
description: "Before starting any non-trivial implementation
|
|
3
|
+
description: "Before starting any non-trivial implementation, dispatch a parallel pre-flight reconnaissance wave to triangulate git state, project infrastructure, and prior-session memory. Wave 4 auto-assembles a verified grounding preamble — a session-scoped artifact the orchestrator pastes verbatim into every subsequent sub-agent brief — eliminating stale-worktree reads and silent wrong-path errors before the first edit."
|
|
4
4
|
read-only: true
|
|
5
5
|
context: fork
|
|
6
|
+
failure_modes:
|
|
7
|
+
- stale_worktree_read
|
|
8
|
+
- wrong_branch_assumption
|
|
9
|
+
- path_drift_across_briefs
|
|
6
10
|
---
|
|
7
11
|
|
|
8
12
|
## Sub-agent contract
|
|
@@ -10,7 +14,7 @@ context: fork
|
|
|
10
14
|
|
|
11
15
|
**Constraint: read-only reconnaissance.** Surveyors and the synthesizer MUST NOT call `edit_file`, `write_file`, or any mutating bash command (no `git commit`, `git push`, `git checkout`, `mv`, `rm`, file redirection, package installs, etc.). Read-only tools only: `read_file`, `grep`, `glob`, `list_directory`, and read-only bash (`git status`, `git log`, `git diff`, `cat`, `ls`, `find`, etc.).
|
|
12
16
|
|
|
13
|
-
If the survey reveals a fix that's tempting to apply, **return it as a recommendation in the snapshot** — the orchestrator decides whether to act. Even if the invoking brief sounds prescriptive ("draft the edit", "apply the change"), this skill stops at the snapshot. The orchestrator dispatches a separate implementation step afterward.
|
|
17
|
+
If the survey reveals a fix that's tempting to apply, **return it as a recommendation in the snapshot** — the orchestrator decides whether to act. Even if the invoking brief sounds prescriptive ("draft the edit", "apply the change"), this skill stops at the snapshot and the preamble artifact. The orchestrator dispatches a separate implementation step afterward.
|
|
14
18
|
|
|
15
19
|
Before any multi-step implementation (not single-file fixes, not pure Q&A), dispatch three parallel reconnaissance sub-agents, each with a narrow target. Adapt the first two surveyors to the domain:
|
|
16
20
|
|
|
@@ -49,5 +53,33 @@ Grep the user's auto-memory store (`~/.claude/projects/-<cwd-slug>/memory/`) + a
|
|
|
49
53
|
|
|
50
54
|
Surface the snapshot and stop. The orchestrator then uses these verified facts — not assumptions — to decide the next step. This skill never edits files.
|
|
51
55
|
|
|
56
|
+
## Wave 4 — Brief Anchor (auto-runs after synthesis)
|
|
57
|
+
|
|
58
|
+
After the 6-line snapshot is assembled, run a fourth step inline (no additional sub-agent dispatch required): construct the **Brief Anchor** — a path-verified grounding preamble the orchestrator pastes verbatim into every subsequent sub-agent brief.
|
|
59
|
+
|
|
60
|
+
**Construction procedure:**
|
|
61
|
+
|
|
62
|
+
1. From the state surveyor output, extract the verified `cwd` (absolute path from `pwd`), `branch` (from `git symbolic-ref --short HEAD`), and `HEAD` SHA (from `git rev-parse HEAD`).
|
|
63
|
+
2. From the infrastructure surveyor output, extract the 2–4 canonical file paths most relevant to the task (primary config file, main entry point, test root, etc.). For each, run `stat <path>` — include the path only if `stat` exits 0. Paths that fail `stat` are omitted; if zero paths survive, set the list to `(none verified)`.
|
|
64
|
+
3. Assemble the preamble block:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
## Orchestrator grounding — read this first
|
|
68
|
+
- **cwd**: <absolute path>
|
|
69
|
+
- **branch**: <branch name>
|
|
70
|
+
- **HEAD**: <full SHA>
|
|
71
|
+
- **canonical paths** (stat each on entry; emit GROUNDING_FAILED:<path> and abort if missing):
|
|
72
|
+
- <verified_path_1>
|
|
73
|
+
- <verified_path_2> ← omit line if not applicable
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
4. Append to the snapshot output under the heading **`## Brief Anchor`** so the orchestrator can copy it directly.
|
|
77
|
+
|
|
78
|
+
**Orchestrator usage contract:**
|
|
79
|
+
|
|
80
|
+
- Prepend the Brief Anchor verbatim to every sub-agent brief that reads files, runs `git`/`gh` commands, or references explicit paths. Skip for pure-reasoning tasks (no filesystem reads, no path references).
|
|
81
|
+
- Sub-agents receiving the anchor `stat` each listed path on entry. A missing path returns `GROUNDING_FAILED:<path>` — the orchestrator re-dispatches once with the corrected path. If the retry also returns `GROUNDING_FAILED`, emit `BRIEF_GROUND_ABORT` with both the expected and actual paths **plus the corrective command** the operator should run — `git worktree list` to find the intended checkout, then `cd <correct-worktree>` (or re-invoke the orchestrator from it) — and halt the wave so the operator resolves the worktree mismatch.
|
|
82
|
+
- The anchor is session-scoped: one construction pass per `ground-state` invocation. Do not re-invoke `ground-state` mid-session to refresh it; instead pass the existing anchor through.
|
|
83
|
+
|
|
52
84
|
**Skip when:**
|
|
53
85
|
Task is Q&A only; single-line fix on an already-identified file; user says "skip pre-flight".
|