ur-agent 1.22.0 → 1.22.2

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.
@@ -54,8 +54,18 @@ ur worktree clean --dry-run
54
54
  ur eval run starter --metrics --json
55
55
  ur eval report starter --dashboard
56
56
  ur eval dashboard
57
+ ur spec init auth-refactor --goal "refactor login without changing behavior"
58
+ ur spec run auth-refactor --all
59
+ ur spec verify auth-refactor
57
60
  ```
58
61
 
62
+ ## v1.22.2 Additions
63
+
64
+ | Addition | Surface | What it adds |
65
+ | --- | --- | --- |
66
+ | Lifecycle hooks | `.ur/hooks.json`, `UR.md` frontmatter, `src/utils/hooks.ts` | New hook events `BeforeEdit`, `AfterEdit`, `BeforeCommand`, `AfterCommand`, `BeforeCommit`, and `OnFailure`. Fire around file edits, shell commands, git commits, and failures. Advisory by default; can block actions or write project memory. |
67
+ | Persistent project memory | `ur context-pack remember`, `src/services/context/projectContextManifest.ts` | New memory kinds `architecture`, `preference`, `attempt`, `accepted`, and `rejected` with status, rationale, scope, and source metadata. Stored in `.ur/context/task-memory.jsonl` and surfaced in the compressed context summary. |
68
+
59
69
  ## v1.22.0 Additions
60
70
 
61
71
  | Addition | Surface | What it adds |
@@ -63,6 +73,10 @@ ur eval dashboard
63
73
  | Eval execution metrics | `ur eval run <suite> --metrics`, `UR_EVAL_METRICS_FILE` | Child-serialized cost, tokens, model, duration, files changed, insertions/deletions, command failures, human-edit heuristics, and per-case `testCommand` pass/fail. Safe for parallel runs because each child writes its own metrics file. |
64
74
  | Richer eval dashboard | `ur eval dashboard`, `ur eval report <suite> --dashboard` | Local-first HTML dashboard with summary cards and a per-case timeline showing model, time, cost, tokens, diffs, test result, command failures, and human edits. |
65
75
  | Per-case run metrics persistence | `.ur/evals/.runs/<suite>/<case>.json` | `ur eval run <suite> --metrics` writes each case's metrics to a JSON file for downstream analysis. |
76
+ | Spec verification / verifier kernel role | `ur spec verify <name>`, `src/services/agents/specVerifier.ts` | Deterministic project gates first, then a read-only deep verification subagent that must prove compile/test/lint/diff/runtime before PASS. Writes `.ur/specs/<name>/verification.md` and a `verification` record in `spec.json`. First concrete kernel role: verifier is stricter than the generator. |
77
+ | AgentKernel abstraction | `ur spec run|verify <name> --kernel`, `src/services/agents/kernel.ts` | Pure orchestrator separating planner, executor, verifier, critic, memory, router, and guard. Routes spec run/verify through kernel stages while keeping the legacy loop as default. Foundation for applying the same orchestration to workflows, crew, and CI loop. |
78
+ | Rich task decomposition | `ur crew create|run|plan ... --decompose`, `src/services/agents/decomposer.ts` | Splits large goals into atomic subtasks with goal, files touched, risk level (low/medium/high), tests required, and rollback point. Deterministic fallback + optional LLM-driven JSON decomposition. |
79
+ | Parallel specialized subagents | `ur pattern parallel "<task>" --execute`, `src/services/agents/patterns.ts` | Bug finder, patch writer, test writer, security auditor, and style reviewer run in parallel via the workflow executor, then a synthesizer merges results into one plan. |
66
80
 
67
81
  ## v1.21.0 Additions
68
82
 
package/docs/USAGE.md CHANGED
@@ -100,6 +100,53 @@ ur context-pack remember --decision "Use package scripts before ad hoc commands"
100
100
  ur context-pack compress
101
101
  ```
102
102
 
103
+ ## Project memory
104
+
105
+ `ur context-pack remember` stores durable project memory in `.ur/context/task-memory.jsonl`. Use it to record decisions, constraints, preferred commands, failed attempts, accepted patterns, rejected approaches, and architecture notes. The compressed summary in `.ur/context/compressed.md` is included in agent context.
106
+
107
+ Memory kinds:
108
+
109
+ - `decision`, `constraint`, `command`, `diff`, `note` — original task memory categories.
110
+ - `architecture` — architecture decisions and design rationale.
111
+ - `preference` — preferred commands, tools, or workflows.
112
+ - `attempt` — things you tried that did not work out (often written by `OnFailure` hooks).
113
+ - `accepted` — patterns or approaches that worked and should be reused.
114
+ - `rejected` — approaches that should not be repeated, optionally with an `alternative-to`.
115
+
116
+ ```sh
117
+ ur context-pack remember --architecture "Repository pattern for data access" --status accepted --rationale "Testability"
118
+ ur context-pack remember --preference "Use bun test over jest"
119
+ ur context-pack remember --accepted "Use p-map for bounded concurrency" --scope project
120
+ ur context-pack remember --rejected "Switch to esbuild" --alternative-to "Keep bun bundle"
121
+ ur context-pack remember --attempt "Tried Deno runtime" --status superseded
122
+ ur context-pack compress
123
+ ```
124
+
125
+ ## Lifecycle hooks
126
+
127
+ UR supports lifecycle hook events that fire around agent actions. Hooks are configured in `.ur/hooks.json` or `UR.md` frontmatter and receive JSON payloads.
128
+
129
+ | Event | Fires | Payload |
130
+ | --- | --- | --- |
131
+ | `BeforeEdit` | Before `FileEditTool` writes a file. | `file_path`, `old_string`, `new_string`, `replace_all`, `tool_use_id` |
132
+ | `AfterEdit` | After a file edit succeeds. | Same as `BeforeEdit` plus `success: true`. Can write project memory. |
133
+ | `BeforeCommand` | Before a Bash/PowerShell command runs. | `command`, `shell_type`, `cwd`, `timeout_ms`, `sandbox`, `tool_use_id` |
134
+ | `AfterCommand` | After a command finishes. | `command`, `exit_code`, `stdout`, `stderr`, `tool_use_id` |
135
+ | `BeforeCommit` | After a successful `git commit` command. | `command`, `message`, `files`, `tool_use_id` |
136
+ | `OnFailure` | When a tool, turn, or API call fails. | `error`, `stage`, `tool_name`, `tool_use_id` |
137
+
138
+ Example `UR.md` frontmatter hook:
139
+
140
+ ```yaml
141
+ ---
142
+ hooks:
143
+ - event: BeforeCommit
144
+ command: 'echo "Commit detected: $UR_CODE_HOOK_INPUT" >> /tmp/ur-commits.log'
145
+ ---
146
+ ```
147
+
148
+ Hooks are advisory by default. A `BeforeEdit`/`BeforeCommand`/`BeforeCommit` hook can block the action by returning `{"decision":"block","reason":"..."}` or exit code 2. `AfterEdit` and `OnFailure` hooks can return `{"hookSpecificOutput":{"hookEventName":"...","memory":{"kind":"accepted","text":"..."}}}` to append project memory automatically.
149
+
103
150
  ## Commands
104
151
 
105
152
  UR includes slash commands and CLI subcommands for common workflows:
@@ -113,10 +160,10 @@ UR includes slash commands and CLI subcommands for common workflows:
113
160
  - `ur bg ...` to run detached local background agents with optional worktrees and PRs
114
161
  - `ur repo-edit ...` to index the repo, plan AST-aware renames, preview patches, and apply with rollback
115
162
  - `ur safety ...` to inspect project shell safety policy and preview command risk
116
- - `ur context-pack ...` to summarize architecture and persist task decisions, constraints, commands, and diffs
163
+ - `ur context-pack ...` to summarize architecture and persist project memory (decisions, constraints, commands, diffs, architecture, preferences, attempts, accepted, rejected)
117
164
  - `ur code-index watch` to keep the local semantic code index fresh
118
165
  - `ur memory retention ...` to prune project-local memory by TTL, max entries, and decay
119
- - `ur spec ...` to scaffold requirements, design, and tasks, then run a spec task list
166
+ - `ur spec ...` to scaffold requirements, design, and tasks, run a spec task list, and verify with strict proof gates
120
167
  - `ur escalate ...` to plan, run, or ask an oracle model for hard tasks
121
168
  - `ur arena ...` to run multiple agents on the same task and select a winner
122
169
  - `ur test-first ...` to detect compile/test/lint commands, store failure traces, and install after-edit gates
@@ -129,6 +176,8 @@ UR includes slash commands and CLI subcommands for common workflows:
129
176
  - `ur eval report ...` to show a saved report or write a single-suite dashboard
130
177
  - `ur eval dashboard` to generate the local HTML dashboard across all reports
131
178
  - `ur eval bench ...` to import local SWE-bench, Terminal-Bench, or Aider Polyglot exports
179
+ - `ur crew ...` to run lead+worker agent crews with optional automatic task decomposition
180
+ - `ur pattern ...` to run multi-agent collaboration patterns (PEER, DOE, concurrent, handoff, debate, parallel)
132
181
  - `ur doctor` to inspect CLI health
133
182
  - `ur update` or `ur upgrade` to check for updates
134
183
 
@@ -142,6 +191,8 @@ Agent platform examples:
142
191
  ```sh
143
192
  ur spec init demo --goal "1. add a utils.add function 2. add a test"
144
193
  ur spec run demo --all --dry-run
194
+ ur spec run demo --all --kernel
195
+ ur spec verify demo --kernel
145
196
  ur arena "implement a debounce helper" --agents 2 --dry-run
146
197
  ur escalate run "refactor the cache layer" --force-oracle --dry-run
147
198
  ur test-first detect
@@ -151,6 +202,7 @@ ur safety status
151
202
  ur safety check --command "rm -rf build"
152
203
  ur context-pack scan
153
204
  ur context-pack remember --constraint "Run command evidence before claiming success"
205
+ ur context-pack remember --accepted "Use p-map for concurrency" --scope project
154
206
  ur context-pack compress
155
207
  ur acp serve --port 8123
156
208
  ur exec "add tests for the parser" --concurrency 4 --json
@@ -169,6 +221,9 @@ ur eval run starter --dry-run --json
169
221
  ur eval run starter --metrics --json
170
222
  ur eval report starter --dashboard
171
223
  ur eval dashboard
224
+ ur crew create parser-crew --goal "fix the flaky parser test" --decompose --dry-run
225
+ ur crew run parser-crew --workers 3 --decompose --dry-run
226
+ ur pattern parallel "refactor login without changing behavior" --execute --dry-run
172
227
  ```
173
228
 
174
229
  ## Permissions
@@ -43,7 +43,7 @@
43
43
  <main id="content" class="content">
44
44
  <header class="topbar">
45
45
  <div>
46
- <p class="eyebrow">Version 1.22.0</p>
46
+ <p class="eyebrow">Version 1.22.2</p>
47
47
  <h1>UR Agent Documentation</h1>
48
48
  <p class="lead">A practical, tutorial-style reference for installing, configuring, automating, extending, and operating UR Agent.</p>
49
49
  </div>
@@ -2,7 +2,7 @@
2
2
  "name": "ur-inline-diffs",
3
3
  "displayName": "UR Inline Diffs",
4
4
  "description": "Review UR inline diff bundles from .ur/ide/diffs inside VS Code.",
5
- "version": "1.22.0",
5
+ "version": "1.22.2",
6
6
  "publisher": "ur-agent",
7
7
  "engines": {
8
8
  "vscode": "^1.92.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ur-agent",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "UR terminal coding agent CLI",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.14",