@event4u/agent-config 1.22.0 → 1.24.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/commands/agents/cleanup.md +31 -17
- package/.agent-src/commands/analyze-reference-repo.md +3 -0
- package/.agent-src/commands/commit/in-chunks.md +30 -10
- package/.agent-src/commands/commit.md +46 -6
- package/.agent-src/commands/compress.md +19 -13
- package/.agent-src/commands/cost-report.md +120 -0
- package/.agent-src/commands/create-pr/description-only.md +8 -0
- package/.agent-src/commands/create-pr.md +95 -80
- package/.agent-src/commands/feature/plan.md +13 -7
- package/.agent-src/commands/memory/add.md +16 -8
- package/.agent-src/commands/memory/promote.md +17 -9
- package/.agent-src/commands/optimize/rtk.md +16 -11
- package/.agent-src/commands/prepare-for-review.md +12 -6
- package/.agent-src/commands/project-analyze.md +31 -20
- package/.agent-src/commands/review-changes.md +24 -15
- package/.agent-src/commands/roadmap/create.md +14 -9
- package/.agent-src/commands/roadmap/process-full.md +41 -1
- package/.agent-src/contexts/contracts/frugality-charter.md +57 -0
- package/.agent-src/contexts/execution/roadmap-process-loop.md +29 -6
- package/.agent-src/rules/architecture.md +9 -0
- package/.agent-src/rules/ask-when-uncertain.md +3 -13
- package/.agent-src/rules/caveman-speak.md +78 -0
- package/.agent-src/rules/direct-answers.md +5 -14
- package/.agent-src/rules/markdown-safe-codeblocks.md +6 -7
- package/.agent-src/rules/no-cheap-questions.md +4 -14
- package/.agent-src/rules/roadmap-progress-sync.md +37 -3
- package/.agent-src/rules/token-efficiency.md +5 -7
- package/.agent-src/skills/adr-create/SKILL.md +197 -0
- package/.agent-src/skills/agent-docs-writing/SKILL.md +23 -1
- package/.agent-src/skills/command-writing/SKILL.md +23 -0
- package/.agent-src/skills/context-authoring/SKILL.md +23 -0
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +23 -0
- package/.agent-src/skills/guideline-writing/SKILL.md +22 -0
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +9 -0
- package/.agent-src/skills/markitdown/SKILL.md +239 -0
- package/.agent-src/skills/persona-writing/SKILL.md +153 -0
- package/.agent-src/skills/readme-writing/SKILL.md +20 -0
- package/.agent-src/skills/readme-writing-package/SKILL.md +19 -0
- package/.agent-src/skills/roadmap-writing/SKILL.md +157 -0
- package/.agent-src/skills/rule-writing/SKILL.md +22 -0
- package/.agent-src/skills/script-writing/SKILL.md +226 -0
- package/.agent-src/skills/skill-writing/SKILL.md +23 -0
- package/.agent-src/skills/test-driven-development/SKILL.md +24 -0
- package/.agent-src/skills/universal-project-analysis/SKILL.md +8 -0
- package/.agent-src/templates/agent-settings.md +73 -0
- package/.agent-src/templates/command.md +15 -10
- package/.agent-src/templates/rule.md +6 -0
- package/.agent-src/templates/skill.md +32 -0
- package/.claude-plugin/marketplace.json +10 -4
- package/AGENTS.md +14 -3
- package/CHANGELOG.md +61 -0
- package/README.md +5 -5
- package/docs/architecture.md +4 -4
- package/docs/catalog.md +25 -8
- package/docs/customization.md +72 -0
- package/docs/decisions/INDEX.md +15 -0
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +27 -19
- package/docs/guidelines/agent-infra/carve-out-predicates.md +17 -0
- package/docs/guidelines/agent-infra/mcp-request-signing.md +199 -0
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +11 -4
- package/package.json +1 -1
- package/scripts/_lib/__init__.py +5 -0
- package/scripts/_lib/script_output.py +140 -0
- package/scripts/adr/regenerate_index.py +79 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_add_quiet.py +149 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_inject_quiet_flag.py +33 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_v2.sh +36 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_verbosity.sh +26 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_per_task.sh +41 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_silent_taskfiles.py +98 -0
- package/scripts/check_augmentignore.py +4 -1
- package/scripts/check_command_count_messaging.py +4 -1
- package/scripts/check_compressed_paths.py +4 -1
- package/scripts/check_council_layout.py +4 -1
- package/scripts/check_council_references.py +4 -1
- package/scripts/check_iron_law_prominence.py +3 -1
- package/scripts/check_md_language.py +3 -1
- package/scripts/check_memory_proposal.py +3 -1
- package/scripts/check_public_catalog_links.py +4 -1
- package/scripts/check_reply_consistency.py +8 -2
- package/scripts/check_roadmap_trackable.py +4 -1
- package/scripts/compile_router.py +27 -0
- package/scripts/compress.py +33 -19
- package/scripts/cost/budget.mjs +152 -0
- package/scripts/cost/track.mjs +144 -0
- package/scripts/first-run.sh +3 -9
- package/scripts/install-hooks.sh +19 -1
- package/scripts/install.py +17 -12
- package/scripts/install.sh +19 -8
- package/scripts/lint_examples.py +6 -2
- package/scripts/lint_handoffs.py +4 -1
- package/scripts/lint_load_context.py +4 -1
- package/scripts/lint_roadmap_complexity.py +6 -2
- package/scripts/lint_rule_interactions.py +4 -1
- package/scripts/lint_rule_tiers.py +4 -1
- package/scripts/measure_frugality_savings.py +164 -0
- package/scripts/measure_markitdown_lift.py +127 -0
- package/scripts/runtime_dispatcher.py +11 -0
- package/scripts/skill_linter.py +207 -2
|
@@ -145,30 +145,44 @@ After each action:
|
|
|
145
145
|
|
|
146
146
|
Progress Phase {n}: [{completed}/{total}]
|
|
147
147
|
██████████░░░░░░ 60%
|
|
148
|
-
|
|
149
|
-
> 1. Continue with next action
|
|
150
|
-
> 2. Stop here
|
|
151
148
|
```
|
|
152
149
|
|
|
153
|
-
|
|
150
|
+
Per `verbosity.routine_confirmations` (default `false`):
|
|
154
151
|
|
|
155
|
-
|
|
152
|
+
- `false` → continue to the next action silently. User can interrupt
|
|
153
|
+
any time; "continue" is dominant once cleanup is in flight.
|
|
154
|
+
- `true` → ask:
|
|
155
|
+
```
|
|
156
|
+
> 1. Continue with next action
|
|
157
|
+
> 2. Stop here
|
|
158
|
+
```
|
|
156
159
|
|
|
157
|
-
|
|
158
|
-
═══════════════════════════════════════════════
|
|
159
|
-
✅ CLEANUP SUMMARY
|
|
160
|
-
═══════════════════════════════════════════════
|
|
160
|
+
### 5. Summary (verbosity-gated)
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
✏️ Updated: {count} files
|
|
166
|
-
📄 Created: {count} contexts
|
|
162
|
+
After completing a phase or all actions, read
|
|
163
|
+
`verbosity.post_action_reports` from `.agent-settings.yml` (default
|
|
164
|
+
`minimal`).
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
- `off` → emit nothing on success; surface errors only.
|
|
167
|
+
- `minimal` (default) → one line:
|
|
168
|
+
`→ Cleanup: {moved} moved · {deleted} deleted · {updated} updated · {remaining} remaining`.
|
|
169
|
+
- `full` → multi-line block:
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
```
|
|
172
|
+
═══════════════════════════════════════════════
|
|
173
|
+
✅ CLEANUP SUMMARY
|
|
174
|
+
═══════════════════════════════════════════════
|
|
175
|
+
|
|
176
|
+
📁 Moved: {count} files
|
|
177
|
+
🔗 Merged: {count} files
|
|
178
|
+
🗑️ Deleted: {count} files
|
|
179
|
+
✏️ Updated: {count} files
|
|
180
|
+
📄 Created: {count} contexts
|
|
181
|
+
|
|
182
|
+
Remaining: {count} actions in {phases} phases
|
|
183
|
+
|
|
184
|
+
═══════════════════════════════════════════════
|
|
185
|
+
```
|
|
172
186
|
|
|
173
187
|
### Rules
|
|
174
188
|
|
|
@@ -192,4 +192,7 @@ Never create the roadmap without explicit confirmation.
|
|
|
192
192
|
- Skill: `project-analyzer` — base analysis workflow.
|
|
193
193
|
- Skill: `learning-to-rule-or-skill` — turn adopt items into content.
|
|
194
194
|
- Skill: `upstream-contribute` — push learnings back to this package.
|
|
195
|
+
- Skill: `markitdown` — preferred ingestion path when the reference
|
|
196
|
+
ships PDFs, DOCX, XLSX, PPTX, EPUB, images, or audio. Never read a
|
|
197
|
+
binary office format raw — convert first, then analyze.
|
|
195
198
|
- Roadmaps: `agents/roadmaps/` — consumers of findings (e.g. `archive/road-to-anthropic-alignment.md`).
|
|
@@ -63,7 +63,16 @@ Splitting rules:
|
|
|
63
63
|
|
|
64
64
|
Generate commit messages per [`commit-conventions`](../../rules/commit-conventions.md).
|
|
65
65
|
|
|
66
|
-
### 4.
|
|
66
|
+
### 4. Validate, then commit immediately
|
|
67
|
+
|
|
68
|
+
Before staging anything, run the same `preview-on-error` validator as
|
|
69
|
+
[`/commit`](../commit.md) step 5. Each generated message must match
|
|
70
|
+
`^(feat|fix|chore|docs|refactor|test|perf|style|build|ci|revert)(\([^)]+\))?!?: .+`.
|
|
71
|
+
|
|
72
|
+
- **All valid** → proceed silently.
|
|
73
|
+
- **Any invalid** → stop, print the failed message(s) + the regex,
|
|
74
|
+
hand back to the user. Do **not** auto-commit broken messages even
|
|
75
|
+
though confirmation is otherwise suppressed.
|
|
67
76
|
|
|
68
77
|
For each planned commit in order:
|
|
69
78
|
|
|
@@ -75,18 +84,29 @@ git commit -m "{message}"
|
|
|
75
84
|
No "looks good?" prompt. No confirmation step. The user invoked this
|
|
76
85
|
command knowing the plan would be executed.
|
|
77
86
|
|
|
78
|
-
### 5. Report
|
|
87
|
+
### 5. Report (verbosity-gated)
|
|
79
88
|
|
|
80
|
-
|
|
89
|
+
Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
|
|
90
|
+
`minimal`). Same contract as [`/commit`](../commit.md) step 7.
|
|
81
91
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
- `off` → emit nothing (still run `git log --oneline -N` silently for
|
|
93
|
+
the agent's own verification).
|
|
94
|
+
- `minimal` (default) → one line:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
→ N commits created
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- `full` → full summary:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Created N commits:
|
|
104
|
+
1. {sha1} feat(DEV-1234): {summary}
|
|
105
|
+
2. {sha2} test(DEV-1234): {summary}
|
|
106
|
+
3. {sha3} chore: {summary}
|
|
107
|
+
```
|
|
88
108
|
|
|
89
|
-
Include `git log --oneline -N` output for verification.
|
|
109
|
+
Include `git log --oneline -N` output for verification.
|
|
90
110
|
|
|
91
111
|
## Rules
|
|
92
112
|
|
|
@@ -79,7 +79,33 @@ Rules for splitting:
|
|
|
79
79
|
- **Style-only changes** (ECS/Rector formatting) may get their own `style:` or `chore:` commit
|
|
80
80
|
if they are large and mixed with logic changes.
|
|
81
81
|
|
|
82
|
-
### 5. Present the commit plan
|
|
82
|
+
### 5. Present the commit plan (verbosity-gated)
|
|
83
|
+
|
|
84
|
+
Read `verbosity.preview_artifacts` and `verbosity.routine_confirmations`
|
|
85
|
+
from `.agent-settings.yml`. Both default to `false`.
|
|
86
|
+
|
|
87
|
+
**Terse path** — `preview_artifacts: false` AND `routine_confirmations: false`:
|
|
88
|
+
|
|
89
|
+
1. Validate every generated commit message against the
|
|
90
|
+
conventional-commits regex
|
|
91
|
+
`^(feat|fix|chore|docs|refactor|test|perf|style|build|ci|revert)(\([^)]+\))?!?: .+`.
|
|
92
|
+
2. **All messages valid** → skip the preview block and the confirmation
|
|
93
|
+
prompt. Print one line summarising the plan and proceed to step 6:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
→ 3 commits planned: feat, test, chore (scope: DEV-1234)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
3. **Any message invalid** → `preview-on-error` safety net fires:
|
|
100
|
+
force the full preview block below + the numbered confirm prompt,
|
|
101
|
+
regardless of the two flags. The user must approve before step 6.
|
|
102
|
+
4. **Hard-Floor diff** (bulk deletion ≥5 unrelated files, infra changes
|
|
103
|
+
touching Terraform / Pulumi / k8s / Ansible / cloud-config) →
|
|
104
|
+
ALWAYS preview + confirm regardless of flags, per
|
|
105
|
+
[`non-destructive-by-default`](../rules/non-destructive-by-default.md).
|
|
106
|
+
|
|
107
|
+
**Preview path** — `preview_artifacts: true` OR `routine_confirmations: true`
|
|
108
|
+
(or `preview-on-error` triggered):
|
|
83
109
|
|
|
84
110
|
Show the proposed commits as a numbered list, including which files go into each:
|
|
85
111
|
|
|
@@ -107,19 +133,33 @@ Then ask:
|
|
|
107
133
|
|
|
108
134
|
Wait for the user's response before doing anything.
|
|
109
135
|
|
|
136
|
+
**Override:** the user may force the preview at any time with
|
|
137
|
+
*"show me the commit plan first"* / *"preview commits"* — treat as a
|
|
138
|
+
one-shot `preview_artifacts: true` for this invocation.
|
|
139
|
+
|
|
110
140
|
### 6. Commit
|
|
111
141
|
|
|
112
|
-
|
|
142
|
+
On the **terse path** proceed directly. On the **preview path** only after
|
|
143
|
+
the user confirms (option 1).
|
|
113
144
|
|
|
114
145
|
For each planned commit in order:
|
|
115
146
|
1. Stage only the files for that commit: `git add {files...}`
|
|
116
147
|
2. Commit: `git commit -m "{message}"`
|
|
117
148
|
|
|
118
|
-
### 7. Report
|
|
149
|
+
### 7. Report (verbosity-gated)
|
|
150
|
+
|
|
151
|
+
Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
|
|
152
|
+
`minimal`).
|
|
153
|
+
|
|
154
|
+
- `off` → emit nothing.
|
|
155
|
+
- `minimal` (default) → one line:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
→ 3 commits created
|
|
159
|
+
```
|
|
119
160
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- Commit messages (one per line)
|
|
161
|
+
- `full` → multi-line summary: number of commits + commit messages
|
|
162
|
+
(one per line).
|
|
123
163
|
|
|
124
164
|
## Rules
|
|
125
165
|
|
|
@@ -50,18 +50,18 @@ For each changed `.md` file:
|
|
|
50
50
|
pleasantries, hedging, connective fluff (however, furthermore, additionally),
|
|
51
51
|
redundant wording, obvious framework knowledge, repeated explanations, decorative prose
|
|
52
52
|
- **Shorten:** "in order to" → "to", "make sure to" → "ensure", use short synonyms
|
|
53
|
-
- **Abbreviate** common terms when context unambiguous: `DB`, `auth`,
|
|
54
|
-
`config`, `req`, `res`, `fn`, `impl`, `env`, `deps`, `ctx`. Skip
|
|
55
|
-
first occurrence of the concept in the file, or
|
|
56
|
-
abbreviation collides with a domain term (`auth` stays
|
|
57
|
-
`authentication` inside an auth-module file). Never abbreviate
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
- **Abbreviate** common terms when context is unambiguous: `DB`, `auth`,
|
|
54
|
+
`config`, `req`, `res`, `fn`, `impl`, `env`, `deps`, `ctx`. Skip if it
|
|
55
|
+
would be the first occurrence of the concept in the file, or if the
|
|
56
|
+
abbreviation collides with a domain term (e.g. `auth` stays
|
|
57
|
+
`authentication` inside an auth-module file). Never abbreviate inside
|
|
58
|
+
code blocks, frontmatter, file paths, command strings, or Iron Law
|
|
59
|
+
fenced blocks.
|
|
60
60
|
- **Arrows for causality:** `X causes Y` / `X leads to Y` / `X, then Y`
|
|
61
|
-
→ `X → Y`. Keep arrows out of code blocks, frontmatter, and Iron
|
|
62
|
-
|
|
63
|
-
backticked
|
|
64
|
-
strip
|
|
61
|
+
→ `X → Y`. Keep arrows out of code blocks, frontmatter, and Iron Law
|
|
62
|
+
fenced blocks; only the surrounding prose uses them. (The example
|
|
63
|
+
phrases here are intentionally backticked so the inline-code
|
|
64
|
+
protection skips them — never strip those backticks.)
|
|
65
65
|
- **Fragments OK:** "Run tests before commit" not "You should always run tests before committing"
|
|
66
66
|
- **Drop:** "you should", "make sure to", "remember to" — state action directly
|
|
67
67
|
- **Merge** redundant bullets that say the same thing differently
|
|
@@ -142,9 +142,15 @@ python3 scripts/check_compression.py
|
|
|
142
142
|
Must show **zero 🔴 errors**. Warnings (🟡) are acceptable.
|
|
143
143
|
If any 🔴 errors remain: go back and fix those files before finishing.
|
|
144
144
|
|
|
145
|
-
## Step 5: Summary
|
|
145
|
+
## Step 5: Summary (verbosity-gated)
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
|
|
148
|
+
`minimal`).
|
|
149
|
+
|
|
150
|
+
- `off` → emit nothing on success; surface errors only.
|
|
151
|
+
- `minimal` (default) → one line: `→ N files compressed (avg X% savings)`.
|
|
152
|
+
- `full` → multi-line table with per-category stats (files compressed,
|
|
153
|
+
avg savings).
|
|
148
154
|
|
|
149
155
|
## Hash management
|
|
150
156
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost-report
|
|
3
|
+
description: Capture token cost from the active Claude Code session, append to the local sessions store, and surface the 50/75/90/100% budget alert ladder with cost-profile suggestions.
|
|
4
|
+
skills: [file-editor]
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
suggestion:
|
|
7
|
+
eligible: true
|
|
8
|
+
trigger_description: "check this session's token cost, see budget utilization, surface 50/75/90/100% alert ladder"
|
|
9
|
+
trigger_context: "user wants to know how expensive the active Claude Code session is or whether it crosses a budget threshold"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- cloud_safe: noop -->
|
|
13
|
+
|
|
14
|
+
# /cost:report
|
|
15
|
+
|
|
16
|
+
Records the current Claude Code session's token usage and checks it against
|
|
17
|
+
the configured budget. Local-only: writes to
|
|
18
|
+
`agents/cost-tracking/sessions.jsonl` (no MCP / external services).
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
### 1. Capture the active session
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
node scripts/cost/track.mjs
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Emits a Markdown summary of the session (model breakdown, per-tier cost,
|
|
29
|
+
total USD) and appends a JSON record to
|
|
30
|
+
`agents/cost-tracking/sessions.jsonl`.
|
|
31
|
+
|
|
32
|
+
If `track.mjs` exits 2 with `no Claude Code project dir`, the user is not in
|
|
33
|
+
a Claude Code session — surface that and stop.
|
|
34
|
+
|
|
35
|
+
### 2. Check the budget
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node scripts/cost/budget.mjs check
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Reads the runtime budget config under `agents/cost-tracking/` (set via step 4
|
|
42
|
+
if missing) and the JSONL store, computes utilization, and prints the alert
|
|
43
|
+
level.
|
|
44
|
+
|
|
45
|
+
### 3. Surface the alert ladder
|
|
46
|
+
|
|
47
|
+
The check output already includes the level. Translate it into a
|
|
48
|
+
profile recommendation per the table:
|
|
49
|
+
|
|
50
|
+
| Level | Utilization | Recommendation |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| 🟢 OK | < 50% | within budget — no action |
|
|
53
|
+
| 🟡 INFO | ≥ 50% | log notification, no UX disruption |
|
|
54
|
+
| 🟠 WARNING | ≥ 75% | suggest [`/set-cost-profile balanced→minimal`](set-cost-profile.md) |
|
|
55
|
+
| 🔴 CRITICAL | ≥ 90% | recommend model downgrades, consider [`/set-cost-profile minimal`](set-cost-profile.md) |
|
|
56
|
+
| 🛑 HARD_STOP | ≥ 100% | halt non-essential work; review before continuing (`budget.mjs check` exits 1) |
|
|
57
|
+
|
|
58
|
+
If `level` ≥ WARNING and the current `cost_profile` in `.agent-settings.yml`
|
|
59
|
+
is not already `minimal`, add an explicit suggestion sentence:
|
|
60
|
+
|
|
61
|
+
> Run [`/set-cost-profile`](set-cost-profile.md) to switch from your
|
|
62
|
+
> current profile to a leaner one.
|
|
63
|
+
|
|
64
|
+
### 4. First-run: prompt to set a budget
|
|
65
|
+
|
|
66
|
+
If `budget.mjs check` reports `no budget configured`, ask the user (one
|
|
67
|
+
question per turn — see [`ask-when-uncertain`](../rules/ask-when-uncertain.md)):
|
|
68
|
+
|
|
69
|
+
> No budget set yet. What monthly USD cap do you want to track against?
|
|
70
|
+
> (e.g. 25, 50, 200)
|
|
71
|
+
|
|
72
|
+
On reply, run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node scripts/cost/budget.mjs set <usd>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Then re-run step 2.
|
|
79
|
+
|
|
80
|
+
### 5. Period filter (optional)
|
|
81
|
+
|
|
82
|
+
If the user asks for spend in a specific window — "this week", "today",
|
|
83
|
+
"this month" — re-run with `BUDGET_PERIOD`:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
BUDGET_PERIOD=week node scripts/cost/budget.mjs check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Allowed values: `today`, `week`, `month`, `all` (default).
|
|
90
|
+
|
|
91
|
+
## Rules
|
|
92
|
+
|
|
93
|
+
- **Local-only.** Never persist cost data to remote stores. The
|
|
94
|
+
JSONL store and the `budget.json` config both live inside `agents/`,
|
|
95
|
+
which is gitignored by default in consumer projects.
|
|
96
|
+
- **Don't auto-switch profiles.** This command surfaces a recommendation;
|
|
97
|
+
the user runs [`/set-cost-profile`](set-cost-profile.md) themselves.
|
|
98
|
+
Auto-mutation of `.agent-settings.yml` would breach
|
|
99
|
+
[`commit-policy`](../rules/commit-policy.md) and
|
|
100
|
+
[`scope-control`](../rules/scope-control.md).
|
|
101
|
+
- **Honor HARD_STOP.** When `budget.mjs check` exits 1, surface the alert
|
|
102
|
+
prominently and stop the current task — do not keep working through the
|
|
103
|
+
cap silently.
|
|
104
|
+
|
|
105
|
+
## See also
|
|
106
|
+
|
|
107
|
+
- [`/set-cost-profile`](set-cost-profile.md) — change `cost_profile` in
|
|
108
|
+
`.agent-settings.yml`.
|
|
109
|
+
- [`/agent-status`](agent-status.md) — per-conversation token estimate
|
|
110
|
+
(different scope: in-flight estimate, not historical actuals).
|
|
111
|
+
- [`scripts/cost/track.mjs`](../../scripts/cost/track.mjs) — tracker source.
|
|
112
|
+
- [`scripts/cost/budget.mjs`](../../scripts/cost/budget.mjs) — budget source.
|
|
113
|
+
|
|
114
|
+
## Attribution
|
|
115
|
+
|
|
116
|
+
Forked from
|
|
117
|
+
[`ruvnet/ruflo`](https://github.com/ruvnet/ruflo)
|
|
118
|
+
`plugins/ruflo-cost-tracker/scripts/{track,budget}.mjs`. The MCP
|
|
119
|
+
`memory_store` dependency was replaced with a local JSONL append; the
|
|
120
|
+
50/75/90/100% alert ladder and pricing tiers are preserved verbatim.
|
|
@@ -13,6 +13,14 @@ suggestion:
|
|
|
13
13
|
|
|
14
14
|
# /create-pr:description-only
|
|
15
15
|
|
|
16
|
+
> **Carve-out:** this command's *purpose* is the copyable preview of
|
|
17
|
+
> the PR description. It therefore **ignores**
|
|
18
|
+
> `verbosity.preview_artifacts` and `commands.create_pr.preview_description`
|
|
19
|
+
> — both flags govern only the bare `/create-pr` flow's preview-and-
|
|
20
|
+
> adjust loop. Removing the preview here would make the command a
|
|
21
|
+
> no-op. Do not "fix" this; the suppression flags only apply when the
|
|
22
|
+
> PR is actually being created.
|
|
23
|
+
|
|
16
24
|
## Input
|
|
17
25
|
|
|
18
26
|
The user may or may not provide a PR URL or branch name.
|
|
@@ -55,94 +55,109 @@ fallback structure defined in `/create-pr:description-only`. NEVER invent a cust
|
|
|
55
55
|
**Preview gate** — read `commands.create_pr.preview_description` from
|
|
56
56
|
`.agent-settings.yml` (default `false` when unset):
|
|
57
57
|
|
|
58
|
-
- `false` (default): skip Steps 5–6 of `/create-pr:description-only` (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
> 1. Run the council on this diff before opening the PR? (billable)
|
|
67
|
-
> 2. Skip council review
|
|
68
|
-
|
|
69
|
-
Suppress when `personal.autonomy: on` (council is billable; autonomy
|
|
70
|
-
must not silently spend — see `road-to-ai-council.md` Decision 3).
|
|
71
|
-
|
|
72
|
-
If picked **1**:
|
|
73
|
-
|
|
74
|
-
- Compute the diff range — `origin/<default>..HEAD` from step 1.
|
|
75
|
-
- Run `/council diff:<base>..<head>` with `original_ask` set to the
|
|
76
|
-
PR title from step 2 (the user's framing of the change).
|
|
77
|
-
- Surface findings to the user before step 3. **Do not** auto-edit
|
|
78
|
-
the PR body or block PR creation — output is advisory.
|
|
79
|
-
- Optional: offer to append a one-paragraph "Council notes" section
|
|
80
|
-
to the PR description for reviewer transparency. Default: skip.
|
|
81
|
-
|
|
82
|
-
If picked **2** → continue.
|
|
83
|
-
|
|
84
|
-
### 3. Create the PR
|
|
85
|
-
|
|
86
|
-
Once the user approves the content from step 2:
|
|
87
|
-
|
|
88
|
-
- **Head branch**: Use the EXACT output of `git branch --show-current` from step 1.
|
|
89
|
-
**NEVER** reuse a branch name from earlier in the conversation — always use the fresh value.
|
|
90
|
-
- **Base branch**: Default branch (`main` / `master`).
|
|
91
|
-
- Ask the user:
|
|
92
|
-
```
|
|
93
|
-
> 1. Create as draft
|
|
94
|
-
> 2. Create as ready for review
|
|
95
|
-
```
|
|
96
|
-
- Create the PR via GitHub API with the approved title and body.
|
|
97
|
-
- **CRITICAL**: Set the `draft` parameter based on the user's choice:
|
|
98
|
-
- Option 1 → `"draft": true`
|
|
99
|
-
- Option 2 → `"draft": false`
|
|
100
|
-
- Do NOT default to draft. The user's choice is the ONLY factor.
|
|
101
|
-
- **After creating with `draft: false`**: The GitHub REST API sometimes ignores
|
|
102
|
-
`draft: false` and creates a draft anyway. Always verify by running:
|
|
103
|
-
```bash
|
|
104
|
-
gh pr view {number} --json isDraft --jq '.isDraft'
|
|
105
|
-
```
|
|
106
|
-
If it returns `true`, fix it immediately:
|
|
107
|
-
```bash
|
|
108
|
-
gh pr ready {number}
|
|
109
|
-
```
|
|
58
|
+
- `false` (default): skip Steps 5–6 of `/create-pr:description-only` (the
|
|
59
|
+
copyable preview block + adjust loop). Use the generated title and body
|
|
60
|
+
directly in Step 3 below. This saves agent tokens by avoiding a full
|
|
61
|
+
re-render of the description in chat. The user can still edit the PR
|
|
62
|
+
body in the GitHub UI after creation.
|
|
63
|
+
- `true`: run Steps 5–6 of `/create-pr:description-only` — present the
|
|
64
|
+
title and body as copyable blocks and ask for adjustments before
|
|
65
|
+
proceeding. The user reviews and adjusts the content in that step.
|
|
110
66
|
|
|
111
|
-
###
|
|
67
|
+
### 2b. Council review — explicitly excluded
|
|
112
68
|
|
|
113
|
-
|
|
69
|
+
`/create-pr` does **not** prompt for council review, even when
|
|
70
|
+
`ai_council.enabled: true`. Invoking the PR command is an explicit
|
|
71
|
+
delivery action; interrupting it with a billable opt-in question is
|
|
72
|
+
out of scope.
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
74
|
+
Users who want a council pass on the diff run `/council diff:<base>..<head>`
|
|
75
|
+
**before** `/create-pr`. Do not re-add the prompt here without an explicit
|
|
76
|
+
user request.
|
|
118
77
|
|
|
119
|
-
|
|
120
|
-
2. Search (case-insensitive) for: `Generated with [Augment Code]`,
|
|
121
|
-
`🤖 Generated with`, `Pull Request opened by [Augment Code]`,
|
|
122
|
-
`Co-authored by Augment Code`, unsolicited `augmentcode.com` link.
|
|
123
|
-
3. If any present, strip with surrounding `---` and trailing
|
|
124
|
-
whitespace, then `PATCH /pulls/{number}` with cleaned body.
|
|
125
|
-
4. Re-fetch to verify. If the pattern reappears, repeat once; if
|
|
126
|
-
still present, surface to user and stop (no strip/PATCH loop).
|
|
127
|
-
5. Note in the reply how many footers were removed (or "clean").
|
|
78
|
+
### 3. Create the PR (draft-vs-ready, verbosity-gated)
|
|
128
79
|
|
|
129
|
-
|
|
80
|
+
- **Head branch**: EXACT output of `git branch --show-current` from step 1.
|
|
81
|
+
- **Base branch**: default branch (`main` / `master`).
|
|
130
82
|
|
|
131
|
-
|
|
83
|
+
**Behavior change vs. legacy:** with `verbosity.routine_confirmations:
|
|
84
|
+
false` (default), `/create-pr` creates the PR as draft silently. Override
|
|
85
|
+
per-invocation with `:ready` / `:final` / `:draft`. Restore the prompt
|
|
86
|
+
by flipping `routine_confirmations: true`. See
|
|
87
|
+
[`docs/customization.md` § Verbosity](../../docs/customization.md#verbosity).
|
|
132
88
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
89
|
+
Resolve `"draft"` (first match wins):
|
|
90
|
+
|
|
91
|
+
1. `:ready` / `:final` arg → `false`.
|
|
92
|
+
2. `:draft` arg → `true`.
|
|
93
|
+
3. `routine_confirmations: true` → ask `1. draft / 2. ready`.
|
|
94
|
+
4. Default → `true` (silent draft).
|
|
95
|
+
|
|
96
|
+
Create the PR with the approved title/body and the resolved `draft`.
|
|
97
|
+
|
|
98
|
+
**Verify after `draft: false`** — the GitHub REST API sometimes ignores
|
|
99
|
+
the flag:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
gh pr view {number} --json isDraft --jq '.isDraft'
|
|
103
|
+
# returns true → gh pr ready {number}
|
|
139
104
|
```
|
|
140
105
|
|
|
106
|
+
**Silent-draft postscript** (rule 4) → see step 4b.
|
|
107
|
+
|
|
108
|
+
### 4. After creation
|
|
109
|
+
|
|
110
|
+
#### 4a. Strip attribution footers (mandatory)
|
|
111
|
+
|
|
112
|
+
Some `github-api` tool surfaces append attribution server-side after
|
|
113
|
+
the agent has sent a clean body. Per
|
|
114
|
+
[`no-attribution-footers`](../rules/no-attribution-footers.md), every
|
|
115
|
+
PR body must be re-checked and stripped after every write.
|
|
116
|
+
|
|
117
|
+
Run this strip-pass **after PR creation and after every body PATCH**:
|
|
118
|
+
|
|
119
|
+
1. Re-fetch the PR body:
|
|
120
|
+
```
|
|
121
|
+
GET /repos/{owner}/{repo}/pulls/{number}
|
|
122
|
+
```
|
|
123
|
+
2. Search the body (case-insensitive) for any of:
|
|
124
|
+
- `Generated with [Augment Code]` / `🤖 Generated with`
|
|
125
|
+
- `Pull Request opened by [Augment Code]`
|
|
126
|
+
- `Co-authored by Augment Code`
|
|
127
|
+
- Any `augmentcode.com` link the user did not ask for
|
|
128
|
+
3. If any pattern is present, remove it together with surrounding
|
|
129
|
+
`---` separators and trailing whitespace, then:
|
|
130
|
+
```
|
|
131
|
+
PATCH /repos/{owner}/{repo}/pulls/{number}
|
|
132
|
+
{ "body": "<cleaned body>" }
|
|
133
|
+
```
|
|
134
|
+
4. Re-fetch the body once more to verify the strip stuck. If a
|
|
135
|
+
pattern reappears (server re-injection), repeat steps 2–4 once;
|
|
136
|
+
if it still reappears, surface the issue to the user and stop
|
|
137
|
+
(do not enter a strip/PATCH loop).
|
|
138
|
+
5. Briefly note in the reply how many footers were removed (or
|
|
139
|
+
"no footers found" if clean).
|
|
140
|
+
|
|
141
|
+
#### 4b. Show the PR URL (verbosity-gated)
|
|
142
|
+
|
|
143
|
+
Per `verbosity.post_action_reports` (default `minimal`):
|
|
144
|
+
|
|
145
|
+
- `off` → nothing.
|
|
146
|
+
- `minimal` → `→ #N opened: <url>`. Append `→ created as draft — run
|
|
147
|
+
\`gh pr ready N\` to flip` when silent-draft (rule 4); omit on ready.
|
|
148
|
+
- `full` → multi-line: PR number, URL, draft state, base/head, ready-reminder.
|
|
149
|
+
|
|
150
|
+
#### 4c. Jira transition (only when transitioned)
|
|
151
|
+
|
|
152
|
+
Linked ticket + `routine_confirmations: true` → ask `1. Yes / 2. No`.
|
|
153
|
+
Default (`false`) → skip silently. **Only emit a transition line when
|
|
154
|
+
an actual Jira API call succeeded** — never announce "skipped".
|
|
155
|
+
|
|
141
156
|
### Rules
|
|
142
157
|
|
|
143
|
-
- **Always use the PR template** from `.github/pull_request_template.md
|
|
144
|
-
- **Preview
|
|
145
|
-
- **Push the branch first** if
|
|
146
|
-
- **
|
|
147
|
-
- Only create the PR — never merge
|
|
148
|
-
- Only commit or push with explicit
|
|
158
|
+
- **Always use the PR template** from `.github/pull_request_template.md`.
|
|
159
|
+
- **Preview is opt-in** — `commands.create_pr.preview_description` (default `false`). `/create-pr:description-only` always previews.
|
|
160
|
+
- **Push the branch first** if needed (with permission).
|
|
161
|
+
- **No attribution footers** — see [`no-attribution-footers`](../rules/no-attribution-footers.md); strip-pass at 4a defends against tool injection.
|
|
162
|
+
- Only create the PR — never merge.
|
|
163
|
+
- Only commit or push with explicit permission.
|
|
@@ -209,16 +209,22 @@ Mir sind noch ein paar offene Fragen aufgefallen:
|
|
|
209
209
|
Hast du dazu schon eine Meinung?
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
### 5d. Offer council idea-validation (B4 hook)
|
|
212
|
+
### 5d. Offer council idea-validation (B4 hook, verbosity-gated)
|
|
213
213
|
|
|
214
|
-
Once
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
Once rounds 1–4 have converged but **before** step 6 writes the file,
|
|
215
|
+
read `verbosity.offer_council_in_delivery` from `.agent-settings.yml`
|
|
216
|
+
(default `false`):
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
- `false` (default): skip the prompt silently. When `ai_council.enabled:
|
|
219
|
+
true`, emit one line: `→ council skipped (set
|
|
220
|
+
verbosity.offer_council_in_delivery: true to enable, or run
|
|
221
|
+
/council directly)`. When `ai_council.enabled: false`, emit nothing.
|
|
222
|
+
- `true`: ask (in the user's language):
|
|
220
223
|
|
|
221
|
-
|
|
224
|
+
> 1. Run the council on this idea before writing the plan? (billable)
|
|
225
|
+
> 2. Skip — write the plan now
|
|
226
|
+
|
|
227
|
+
Also suppress when `personal.autonomy: on` (council is billable).
|
|
222
228
|
|
|
223
229
|
If picked **1**:
|
|
224
230
|
|
|
@@ -115,14 +115,22 @@ link resolves. Broken link → block and ask the user to fix.
|
|
|
115
115
|
- Duplicate of an existing entry (step 2) — update instead.
|
|
116
116
|
- Missing `source:` — an entry without evidence cannot be reviewed.
|
|
117
117
|
|
|
118
|
-
## Output format
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
## Output format (verbosity-gated)
|
|
119
|
+
|
|
120
|
+
Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
|
|
121
|
+
`minimal`).
|
|
122
|
+
|
|
123
|
+
- `off` → emit nothing on success; surface gate failures only.
|
|
124
|
+
- `minimal` (default) → one line:
|
|
125
|
+
`✅ Added <type>/<id> (gate: PASS)`.
|
|
126
|
+
- `full` → multi-line block:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
✅ Added <type>/<id> (confidence: <high|medium|low>)
|
|
130
|
+
Path: agents/memory/<type>.yml (or agents/memory/<type>/<hash>.yml)
|
|
131
|
+
Gate: scripts/check_memory.py → PASS
|
|
132
|
+
Next: commit and link from the relevant skill/command.
|
|
133
|
+
```
|
|
126
134
|
|
|
127
135
|
## See also
|
|
128
136
|
|