@event4u/agent-config 1.12.0 → 1.13.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/.agent-src/rules/user-interaction.md +53 -7
- package/.agent-src/scripts/update_roadmap_progress.py +31 -1
- package/.agent-src/templates/github-workflows/roadmap-progress-check.yml +63 -0
- package/.agent-src/templates/hooks/pre-commit-roadmap-progress +60 -0
- package/.agent-src/templates/scripts/memory_lookup.py +382 -21
- package/.agent-src/templates/scripts/memory_status.py +110 -9
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +21 -0
- package/composer.json +3 -0
- package/docs/getting-started.md +1 -0
- package/package.json +9 -1
- package/scripts/agent-config +75 -0
- package/scripts/memory_lookup.py +143 -7
- package/scripts/memory_status.py +76 -14
- package/scripts/postinstall.sh +16 -0
|
@@ -25,30 +25,76 @@ The user should be able to reply with just a number (e.g., `1`) instead of typin
|
|
|
25
25
|
- **Every question with choices** must use numbered options — no exceptions.
|
|
26
26
|
- **Keep options short** — one line each, with a brief explanation after the dash.
|
|
27
27
|
- **Always include a "skip" or "no change" option** when applicable.
|
|
28
|
-
- **
|
|
28
|
+
- **Always state a recommendation** — see iron law below.
|
|
29
29
|
- **Use the user's language** for the question and options.
|
|
30
30
|
- **Accept both** the number and a natural language answer (e.g., "1" or "the first one").
|
|
31
31
|
|
|
32
|
+
### Iron Law — ALWAYS recommend
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
EVERY numbered-option question MUST state which option the agent recommends and WHY.
|
|
36
|
+
"Egal, was bevorzugst Du?" / "no preference" is NEVER an acceptable agent stance.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The user is asking the agent because the agent has read the code, the
|
|
40
|
+
contracts, the trade-offs. Refusing to take a position dumps that work
|
|
41
|
+
back on the user. Take the position; be wrong out loud if needed.
|
|
42
|
+
|
|
43
|
+
**Format:**
|
|
44
|
+
|
|
45
|
+
- Mark the recommended option inline: `1. Do X — short explanation (recommended)`.
|
|
46
|
+
- After the option block, state **WHY** in 1–3 sentences: the trade-off
|
|
47
|
+
that tips the balance, plus the **caveat** that would flip it.
|
|
48
|
+
- If the agent genuinely cannot pick (rare — true 50/50 with missing
|
|
49
|
+
data), say what data would break the tie and ask for that instead.
|
|
50
|
+
|
|
51
|
+
**Example:**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
> 1. Hybrid contract — keys + query (recommended)
|
|
55
|
+
> 2. Key-based — extend the package
|
|
56
|
+
> 3. Semantic — change all call sites
|
|
57
|
+
|
|
58
|
+
I recommend 1: solves the acute consult-flow without a cross-repo PR,
|
|
59
|
+
and the file-fallback stays trivial. Caveat — if hit-rate on the
|
|
60
|
+
concat-shim turns out poor in practice, escalate to 2.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**What does NOT count as a recommendation:**
|
|
64
|
+
|
|
65
|
+
- "Both work" / "either is fine" / "depends on what you prefer"
|
|
66
|
+
- Listing pros and cons without picking
|
|
67
|
+
- "I'd lean towards X" without a reason
|
|
68
|
+
- Hiding behind "you know the project better" (the agent just researched it)
|
|
69
|
+
|
|
32
70
|
### Examples
|
|
33
71
|
|
|
34
|
-
**Binary choice:**
|
|
72
|
+
**Binary choice (with recommendation):**
|
|
35
73
|
```
|
|
36
|
-
> 1. Interactive — ask before each comment
|
|
74
|
+
> 1. Interactive — ask before each comment (recommended)
|
|
37
75
|
> 2. Automatic — handle all independently
|
|
76
|
+
|
|
77
|
+
I recommend 1: the comments touch security-sensitive code, so a wrong
|
|
78
|
+
auto-fix is more expensive than the friction of approving each one.
|
|
79
|
+
Switch to 2 if the comments turn out to be pure formatting.
|
|
38
80
|
```
|
|
39
81
|
|
|
40
|
-
**Multiple choice with skip:**
|
|
82
|
+
**Multiple choice with skip (with recommendation):**
|
|
41
83
|
```
|
|
42
|
-
> 1. Fix the code
|
|
84
|
+
> 1. Fix the code (recommended)
|
|
43
85
|
> 2. Fix the test
|
|
44
86
|
> 3. Skip
|
|
87
|
+
|
|
88
|
+
I recommend 1: the test is asserting the documented behavior; the
|
|
89
|
+
production code drifted from the contract. Pick 2 only if the contract
|
|
90
|
+
itself is wrong.
|
|
45
91
|
```
|
|
46
92
|
|
|
47
|
-
**Confirmation with context:**
|
|
93
|
+
**Confirmation with context (recommendation implicit in framing):**
|
|
48
94
|
```
|
|
49
95
|
> Found PR #1399 on branch `chore/refactor-agent-setup-2`.
|
|
50
96
|
>
|
|
51
|
-
> 1. Yes, that's the right PR
|
|
97
|
+
> 1. Yes, that's the right PR (recommended — branch matches)
|
|
52
98
|
> 2. No, different PR — I'll provide the URL
|
|
53
99
|
```
|
|
54
100
|
|
|
@@ -19,6 +19,12 @@ Percentage = done / (done + open). Deferred and cancelled do not count towards
|
|
|
19
19
|
Invocation (from project root):
|
|
20
20
|
python3 .augment/scripts/update_roadmap_progress.py # rewrite
|
|
21
21
|
python3 .augment/scripts/update_roadmap_progress.py --check # CI: exit 1 if stale
|
|
22
|
+
|
|
23
|
+
`--check` mode also fails when a roadmap reaches `count_open == 0` but is
|
|
24
|
+
still under `agents/roadmaps/` instead of `agents/roadmaps/archive/` —
|
|
25
|
+
backstopping the `roadmap-progress-sync` rule's "completion = archival,
|
|
26
|
+
same response" requirement. The write path emits the same finding as a
|
|
27
|
+
warning on stderr and still regenerates the dashboard.
|
|
22
28
|
"""
|
|
23
29
|
|
|
24
30
|
from __future__ import annotations
|
|
@@ -176,6 +182,15 @@ def collect(roadmap_root: Path) -> list[RoadmapStats]:
|
|
|
176
182
|
return results
|
|
177
183
|
|
|
178
184
|
|
|
185
|
+
def unarchived_complete(roadmaps: list[RoadmapStats]) -> list[RoadmapStats]:
|
|
186
|
+
# A roadmap is complete when every active checkbox is done and at least
|
|
187
|
+
# one active checkbox exists. The `roadmap-progress-sync` rule mandates
|
|
188
|
+
# that such a roadmap be moved to `agents/roadmaps/archive/` in the
|
|
189
|
+
# same response that closes its last open item; `collect()` already
|
|
190
|
+
# excludes that directory, so anything left here is unarchived.
|
|
191
|
+
return [r for r in roadmaps if r.total_active > 0 and r.open_ == 0]
|
|
192
|
+
|
|
193
|
+
|
|
179
194
|
def render(roadmaps: list[RoadmapStats]) -> str:
|
|
180
195
|
total_done = sum(r.done for r in roadmaps)
|
|
181
196
|
total_active = sum(r.total_active for r in roadmaps)
|
|
@@ -241,12 +256,22 @@ def main() -> int:
|
|
|
241
256
|
roadmaps = collect(roadmap_root)
|
|
242
257
|
new_text = render(roadmaps)
|
|
243
258
|
current = target.read_text(encoding="utf-8") if target.exists() else ""
|
|
259
|
+
complete = unarchived_complete(roadmaps)
|
|
244
260
|
if args.check:
|
|
245
|
-
|
|
261
|
+
stale = current != new_text
|
|
262
|
+
if stale:
|
|
246
263
|
print(f"❌ {target.relative_to(args.repo_root)} is stale. "
|
|
247
264
|
f"Run `python3 .augment/scripts/update_roadmap_progress.py` "
|
|
248
265
|
f"to regenerate (or `task roadmap-progress` in Taskfile "
|
|
249
266
|
f"projects).", file=sys.stderr)
|
|
267
|
+
if complete:
|
|
268
|
+
print("❌ Completed roadmaps are still in `agents/roadmaps/` — "
|
|
269
|
+
"move them to `agents/roadmaps/archive/` (per the "
|
|
270
|
+
"`roadmap-progress-sync` rule):", file=sys.stderr)
|
|
271
|
+
for r in complete:
|
|
272
|
+
print(f" - {r.rel} ({r.done}/{r.total_active} done)",
|
|
273
|
+
file=sys.stderr)
|
|
274
|
+
if stale or complete:
|
|
250
275
|
return 1
|
|
251
276
|
print(f"✅ {target.relative_to(args.repo_root)} is up to date.")
|
|
252
277
|
return 0
|
|
@@ -254,6 +279,11 @@ def main() -> int:
|
|
|
254
279
|
print(f"✅ Wrote {target.relative_to(args.repo_root)} · "
|
|
255
280
|
f"{len(roadmaps)} roadmap(s) · "
|
|
256
281
|
f"{sum(r.done for r in roadmaps)}/{sum(r.total_active for r in roadmaps)} steps done.")
|
|
282
|
+
if complete:
|
|
283
|
+
print("⚠️ Completed roadmaps not yet archived — move to "
|
|
284
|
+
"`agents/roadmaps/archive/`:", file=sys.stderr)
|
|
285
|
+
for r in complete:
|
|
286
|
+
print(f" - {r.rel}", file=sys.stderr)
|
|
257
287
|
return 0
|
|
258
288
|
|
|
259
289
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Roadmap Progress Check — template shipped by agent-config
|
|
2
|
+
#
|
|
3
|
+
# Copy this file to `.github/workflows/roadmap-progress-check.yml` in the
|
|
4
|
+
# consumer project. It fails CI when `agents/roadmaps-progress.md` is
|
|
5
|
+
# stale relative to the source roadmaps under `agents/roadmaps/`.
|
|
6
|
+
#
|
|
7
|
+
# This is the last-line defence behind the `roadmap-progress-sync` rule
|
|
8
|
+
# and the optional pre-commit hook (see `./agent-config hooks:install`).
|
|
9
|
+
# A green check here proves the dashboard reflects reality on every PR
|
|
10
|
+
# that touches roadmaps.
|
|
11
|
+
#
|
|
12
|
+
# Prerequisites:
|
|
13
|
+
# - `.augment/scripts/update_roadmap_progress.py` installed by
|
|
14
|
+
# `task install` (or `./agent-config install`).
|
|
15
|
+
# - At least one file exists under `agents/roadmaps/` — absence
|
|
16
|
+
# short-circuits the check with a passing exit (consumer projects
|
|
17
|
+
# that haven't adopted roadmaps stay green).
|
|
18
|
+
#
|
|
19
|
+
# This workflow is intentionally narrow: it only runs when relevant
|
|
20
|
+
# files change, so it adds zero overhead to unrelated PRs.
|
|
21
|
+
|
|
22
|
+
name: Roadmap Progress Check
|
|
23
|
+
|
|
24
|
+
on:
|
|
25
|
+
push:
|
|
26
|
+
branches: [main]
|
|
27
|
+
paths:
|
|
28
|
+
- "agents/roadmaps/**"
|
|
29
|
+
- "agents/roadmaps-progress.md"
|
|
30
|
+
- ".augment/scripts/update_roadmap_progress.py"
|
|
31
|
+
pull_request:
|
|
32
|
+
paths:
|
|
33
|
+
- "agents/roadmaps/**"
|
|
34
|
+
- "agents/roadmaps-progress.md"
|
|
35
|
+
- ".augment/scripts/update_roadmap_progress.py"
|
|
36
|
+
workflow_dispatch: {}
|
|
37
|
+
|
|
38
|
+
permissions:
|
|
39
|
+
contents: read
|
|
40
|
+
|
|
41
|
+
jobs:
|
|
42
|
+
check:
|
|
43
|
+
name: Verify roadmaps-progress.md is fresh
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.11"
|
|
51
|
+
|
|
52
|
+
- name: Run roadmap progress check
|
|
53
|
+
run: python3 .augment/scripts/update_roadmap_progress.py --check
|
|
54
|
+
|
|
55
|
+
- name: Remediation hint on failure
|
|
56
|
+
if: failure()
|
|
57
|
+
run: |
|
|
58
|
+
echo "::error::roadmaps-progress.md is stale."
|
|
59
|
+
echo "Regenerate locally with one of:"
|
|
60
|
+
echo " ./agent-config roadmap:progress"
|
|
61
|
+
echo " task roadmap-progress"
|
|
62
|
+
echo " python3 .augment/scripts/update_roadmap_progress.py"
|
|
63
|
+
echo "Then commit and push the updated agents/roadmaps-progress.md."
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Pre-commit hook: roadmap progress dashboard sync (event4u/agent-config)
|
|
3
|
+
#
|
|
4
|
+
# Installed by `./agent-config hooks:install`. Aborts the commit if
|
|
5
|
+
# `agents/roadmaps-progress.md` is out of date relative to staged
|
|
6
|
+
# changes under `agents/roadmaps/`. Exits silently when no roadmap
|
|
7
|
+
# files are staged — zero overhead on unrelated commits.
|
|
8
|
+
#
|
|
9
|
+
# To run manually:
|
|
10
|
+
# ./agent-config roadmap:progress-check
|
|
11
|
+
#
|
|
12
|
+
# To uninstall:
|
|
13
|
+
# rm .git/hooks/pre-commit
|
|
14
|
+
set -e
|
|
15
|
+
|
|
16
|
+
# Only act on commits that touch roadmap content.
|
|
17
|
+
staged="$(git diff --cached --name-only --diff-filter=ACMR 2>/dev/null || true)"
|
|
18
|
+
case "$staged" in
|
|
19
|
+
*agents/roadmaps/*.md*|*agents/roadmaps-progress.md*|*.augment/scripts/update_roadmap_progress.py*)
|
|
20
|
+
: ;;
|
|
21
|
+
*)
|
|
22
|
+
exit 0 ;;
|
|
23
|
+
esac
|
|
24
|
+
|
|
25
|
+
# Resolve the script — prefer the consumer-shipped path, fall back to
|
|
26
|
+
# the source-of-truth copy when run from inside the package itself.
|
|
27
|
+
script=""
|
|
28
|
+
for cand in \
|
|
29
|
+
".augment/scripts/update_roadmap_progress.py" \
|
|
30
|
+
".agent-src/scripts/update_roadmap_progress.py" \
|
|
31
|
+
".agent-src.uncompressed/scripts/update_roadmap_progress.py"; do
|
|
32
|
+
if [ -f "$cand" ]; then
|
|
33
|
+
script="$cand"
|
|
34
|
+
break
|
|
35
|
+
fi
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
if [ -z "$script" ]; then
|
|
39
|
+
echo "⚠️ pre-commit-roadmap-progress: update_roadmap_progress.py not found." >&2
|
|
40
|
+
echo " Run \`task install\` (or \`./agent-config install\`) and retry." >&2
|
|
41
|
+
echo " Skipping check — letting commit through." >&2
|
|
42
|
+
exit 0
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
if ! python3 "$script" --check >/dev/null 2>&1; then
|
|
46
|
+
echo "❌ agents/roadmaps-progress.md is stale relative to your staged changes." >&2
|
|
47
|
+
echo "" >&2
|
|
48
|
+
echo " Regenerate the dashboard with one of:" >&2
|
|
49
|
+
echo " ./agent-config roadmap:progress" >&2
|
|
50
|
+
echo " task roadmap-progress" >&2
|
|
51
|
+
echo " python3 $script" >&2
|
|
52
|
+
echo "" >&2
|
|
53
|
+
echo " Then \`git add agents/roadmaps-progress.md\` and retry the commit." >&2
|
|
54
|
+
echo "" >&2
|
|
55
|
+
echo " To bypass once (NOT recommended):" >&2
|
|
56
|
+
echo " git commit --no-verify" >&2
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
exit 0
|