agent-afk 5.119.2 → 5.120.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.
- package/dist/cli.mjs +422 -415
- package/dist/index.mjs +177 -177
- package/dist/telegram.mjs +245 -238
- package/package.json +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/intent-lock/SKILL.md +0 -119
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-afk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.120.0",
|
|
4
4
|
"description": "Open-source coding-agent harness you can actually change — own the loop (prompts, gates, routing, skills, terminal states), use any model, run long tasks while you're away.",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: intent-lock
|
|
3
|
-
description: "Fires before multi-step work when the user's request contains ambiguous referents ('the text', 'her Y'), characterizations of unverified entities ('the meeting is substantive'), identity assumptions (which contact = the user), code-vs-runtime dual referents, or no task statement at all (a bare path, URL, noun phrase, or pasted trace). Emits a one-sentence interpretation lock for fast async correction; escalates when interpretation gates an irreversible action AND multiple plausible reads exist."
|
|
4
|
-
context: load
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## When to invoke
|
|
8
|
-
|
|
9
|
-
Check for these signal classes before starting any multi-step task:
|
|
10
|
-
|
|
11
|
-
**Ambiguous referents** — a noun phrase that could resolve to more than one entity in context:
|
|
12
|
-
- Bare demonstratives with no prior binding: "the text", "the doc", "that email", "the file"
|
|
13
|
-
- Possessives pointing to unintroduced people: "her draft", "their proposal", "his calendar"
|
|
14
|
-
- Ordinals with unclear basis: "the first one", "the latest version", "the other branch"
|
|
15
|
-
|
|
16
|
-
**Unverified characterizations** — a status or quality claim about a named entity the agent cannot confirm:
|
|
17
|
-
- "The meeting is substantive" (agent has not read the meeting)
|
|
18
|
-
- "The PR is approved" (agent has not checked)
|
|
19
|
-
- "The last run passed" (agent has not run or read CI output)
|
|
20
|
-
|
|
21
|
-
**Identity assumptions** — who is "the user", "me", "us", "the team", or a named person when the identity matters for action:
|
|
22
|
-
- Sending to "me" when multiple contact entries exist
|
|
23
|
-
- Filing under "my account" when credentials are ambiguous
|
|
24
|
-
- "The owner" when ownership is not established in context
|
|
25
|
-
|
|
26
|
-
**Code-vs-runtime dual referent** — a term that names an entity in the active codebase AND a model runtime concept. Fires when the user is working on a tool whose vocabulary mirrors the agent's own runtime (parity-mirror projects like agent CLIs, plugin frameworks, or harness tooling):
|
|
27
|
-
- "memory" — the project's memory store OR the agent's own session memory
|
|
28
|
-
- "session" — a project's session class OR the agent's conversation
|
|
29
|
-
- "hooks" — the project's hook registry OR the agent's tool-use hooks
|
|
30
|
-
- "agent" / "subagent" — the project's agent abstraction OR the agent dispatching them
|
|
31
|
-
- "tool" / "skill" / "plugin" — the project's loadable units OR the agent's available tools
|
|
32
|
-
- "MCP" / "terminal" / "REPL" — primitives the project implements that the agent also has
|
|
33
|
-
|
|
34
|
-
**No task statement at all** — the request is a bare fragment with no imperative verb, so the referent to resolve is the *goal itself* rather than a noun inside it:
|
|
35
|
-
- A lone path, repo URL, or issue/PR link with no stated ask
|
|
36
|
-
- A bare noun phrase: "the 429s", "usage indicators", "that timeout"
|
|
37
|
-
- A continuation cue whose carried-over goal is not uniquely established: "same as before", "and the 429s?"
|
|
38
|
-
- A pasted error, log line, stack trace, or diff with no question attached
|
|
39
|
-
|
|
40
|
-
**Skip when:**
|
|
41
|
-
- Referent resolves unambiguously from immediately prior context (file was just read this turn, entity was named and confirmed, prior message established the binding).
|
|
42
|
-
- Request is reversible, exploratory, and any misread is immediately correctable without cost.
|
|
43
|
-
- User has already provided the interpretation explicitly ("I mean X by 'the text'", "agent-afk's memory", "my session", "this codebase's hooks").
|
|
44
|
-
- Single-step clarification would cost more than simply proceeding and correcting.
|
|
45
|
-
- Dual-referent term has no matching symbol in cwd — no parity risk, standard interpretation applies.
|
|
46
|
-
- Fragment's goal is fixed by the immediately prior turn (agent just proposed two options and the user named one) — the task statement carries over intact.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## Procedure
|
|
51
|
-
|
|
52
|
-
### Step 1 — Scan
|
|
53
|
-
|
|
54
|
-
Before acting, scan the request for signal classes above. List every ambiguous referent, unverified characterization, identity assumption, code-vs-runtime dual referent, or missing task statement found. If zero are found, skip this skill entirely.
|
|
55
|
-
|
|
56
|
-
**When the finding is a missing task statement**, reconstruct the candidate goal from ambient evidence before classifying it — recent commits, branch name, open diff, the named file's contents, the prior turn. Cite the evidence the reconstruction rests on, so a wrong read is visibly wrong rather than silently load-bearing. Resolve this in-context; dispatch one sub-agent with one focused reconstruction question only when in-context reasoning cannot produce a single confident reading, and do not permit a follow-up dispatch. The reconstructed goal is then classified by Step 2 exactly like any other finding.
|
|
57
|
-
|
|
58
|
-
### Step 2 — Classify each finding
|
|
59
|
-
|
|
60
|
-
For each finding, determine:
|
|
61
|
-
|
|
62
|
-
- **Plausible reads** — how many distinct interpretations exist given available context?
|
|
63
|
-
- **Gate type** — does this interpretation gate a reversible or irreversible action?
|
|
64
|
-
|
|
65
|
-
### Step 3 — Choose resolution mode
|
|
66
|
-
|
|
67
|
-
| Condition | Mode |
|
|
68
|
-
|-----------|------|
|
|
69
|
-
| Single plausible read, reversible action | **Lock** — emit interpretation, proceed |
|
|
70
|
-
| Single plausible read, irreversible action | **Lock** — emit interpretation, proceed (but flag) |
|
|
71
|
-
| Multiple plausible reads, reversible action | **Lock** — emit most-likely read with explicit note, proceed |
|
|
72
|
-
| Multiple plausible reads, irreversible action | **Asking** — stop, ask one question |
|
|
73
|
-
|
|
74
|
-
Use **Asking** only when the current surface can receive an answer. On a daemon, scheduled, one-shot, or other non-interactive surface, multiple plausible reads that gate an irreversible action require **Blocked** — take no action and record the exact question whose answer would unblock it.
|
|
75
|
-
|
|
76
|
-
**Multiple plausible reads** means two or more interpretations that would produce materially different outcomes. "the text" pointing to one of two equally recent documents = multiple. "the text" when only one document was discussed this session = single.
|
|
77
|
-
|
|
78
|
-
### Step 4 — Emit the lock
|
|
79
|
-
|
|
80
|
-
**Lock format (most cases):**
|
|
81
|
-
|
|
82
|
-
> Interpreting: [ambiguous phrase] → [resolved referent]. Proceeding on that basis — correct me if wrong.
|
|
83
|
-
|
|
84
|
-
One sentence. No preamble. Append to the start of the work output, not as a standalone turn. The user can correct asynchronously; work continues.
|
|
85
|
-
|
|
86
|
-
**Lock format (reconstructed goal):**
|
|
87
|
-
|
|
88
|
-
> Reading [fragment] as: [reconstructed task statement] (from [evidence]). Proceeding on that basis — correct me if wrong.
|
|
89
|
-
|
|
90
|
-
**If multiple locks needed:** stack them, one per line, before the work output.
|
|
91
|
-
|
|
92
|
-
**Asking format (irreversible + multiple reads only):**
|
|
93
|
-
|
|
94
|
-
> [One precise question that resolves the ambiguity.] (This determines [what action follows].)
|
|
95
|
-
|
|
96
|
-
One question. State what it unlocks. Do not proceed until answered.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Interaction with other skills
|
|
101
|
-
|
|
102
|
-
**thesis-lock** fires on first-person thesis before drafting. Intent-lock fires on the user's *request* before any multi-step work. They are complementary: thesis-lock protects the agent's own claims; intent-lock protects the agent's reading of what the user asked.
|
|
103
|
-
|
|
104
|
-
**ground-state** fires before implementation to survey repo state. Intent-lock fires before *any* multi-step work on requests with ambiguous inputs — including non-implementation work like drafting, research, or messaging. They can both fire on the same request (ground-state runs after intent-lock resolves).
|
|
105
|
-
|
|
106
|
-
In agent-afk, the `ask_question` hook enforces the reachability rule; where that hook is absent, apply the rule inline. Never emit an unreachable question: on a non-interactive surface, proceed only on a safe assumption or end Blocked without acting when the next action is irreversible. **trajectory-check** is a user-scope skill that may not exist in this installation — reference it only if present, and never block on it. When a session-end goal-vs-execution check is wanted, invoke it with the locked statement from Step 4 as its canonical-goal input, not the original fragment. Do not reimplement that check here.
|
|
107
|
-
|
|
108
|
-
**premise-gate** checks named-entity and status-claim pairs during research and analysis. Intent-lock fires *before* work begins on the request itself. They address the same underlying hazard at different points in the pipeline: intent-lock at request intake, premise-gate during execution.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Exit criteria
|
|
113
|
-
|
|
114
|
-
- Every ambiguous referent, unverified characterization, identity assumption, code-vs-runtime dual referent, and missing task statement is either locked (one-sentence interpretation emitted), escalated to Asking, or ended Blocked on a non-interactive surface.
|
|
115
|
-
- A reconstructed goal is never acted on silently — the lock names both the reading and the evidence it rests on.
|
|
116
|
-
- No multi-step work begins on a request whose interpretation gates an irreversible action when multiple plausible reads exist.
|
|
117
|
-
- On a non-interactive surface, an unresolved interpretation that gates an irreversible action ends Blocked with no action and the exact unblock question recorded.
|
|
118
|
-
- Lock statements are visible in the turn output before the work they govern.
|
|
119
|
-
- Asking state contains exactly one question and states what it unlocks.
|