ur-agent 1.22.1 → 1.22.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.22.3
4
+
5
+ ### Added
6
+ - **Executable skill directories.** A `.ur/skills/<name>/` directory containing
7
+ `skill.yaml` is now an executable skill that compiles into a `WorkflowSpec`.
8
+ Supports `instructions.md`, `scripts/`, `templates/`, and `checklists/`.
9
+ `src/skills/skillSpec.ts` parses, validates, and compiles skills; step prompts
10
+ support `$ARGUMENTS`, `$0..$N`, and `$ARGUMENTS[N]` substitution.
11
+ - **`ur skill` CLI.** New command surface: `ur skill list`, `ur skill show <name>`,
12
+ `ur skill run <name> [args]`, and `ur skill init <name>`. Registered in
13
+ `src/commands.ts` and `src/main.tsx`.
14
+ - **Semantic repo index.** `src/utils/codeIndex/repoIndex.ts` builds offline,
15
+ dependency-free indexes under `.ur/code-index/`: `repo.json` (file
16
+ classification + imports/importedBy), `symbols.json`, `calls.json`,
17
+ `tests.json`, `docs.json`, and `configs.json`. `ur code-index repo` exposes
18
+ `build|status|search|symbols|callers|tests|docs|configs` subcommands.
19
+ - **`--repo` flag for code-index build/watch.** `ur code-index build --repo`
20
+ builds both the embedding index and the repo index; `watch --repo` refreshes
21
+ the repo index on file changes.
22
+
23
+ ### Changed
24
+ - Reused the existing workflow engine for executable skills and extended the
25
+ existing `ur code-index` surface for the repo index, keeping changes additive.
26
+
27
+ ### Verified
28
+ - Added `test/skillSpec.test.ts`, `test/skillCommand.test.ts`, and
29
+ `test/repoIndex.test.ts` covering skill parsing, compilation, CLI scaffolding,
30
+ repo file classification, symbol/call/test/doc/config extraction, and index
31
+ round-trips.
32
+
33
+ ## 1.22.2
34
+
35
+ ### Added
36
+ - **Lifecycle hooks.** Added six new hook events in `src/entrypoints/sdk/coreTypes.ts`
37
+ and `src/entrypoints/sdk/coreSchemas.ts`: `BeforeEdit`, `AfterEdit`,
38
+ `BeforeCommand`, `AfterCommand`, `BeforeCommit`, and `OnFailure`. Dispatchers
39
+ in `src/utils/hooks.ts` run them around file edits, shell commands, git commits,
40
+ and failure paths. Call sites are wired in `FileEditTool`, `BashTool`,
41
+ `PowerShellTool`, `toolExecution.ts`, and `query.ts`. Hooks are advisory by
42
+ default and can block actions or append project memory.
43
+ - **Persistent project memory.** Extended `TaskMemoryKind` in
44
+ `src/services/context/projectContextManifest.ts` with `architecture`,
45
+ `preference`, `attempt`, `accepted`, and `rejected`. Entries now support
46
+ `status`, `rationale`, `alternativeTo`, `supersedesId`, `scope`, and `source`
47
+ metadata. `ur context-pack remember` accepts the new kinds and metadata flags.
48
+
49
+ ### Changed
50
+ - **Compressed context** now includes sections for all memory kinds, including the
51
+ new project-memory categories.
52
+
53
+ ### Verified
54
+ - Added `test/lifecycleHooks.test.ts` covering the new `HOOK_EVENTS` literals and
55
+ Zod schema validation.
56
+ - Added `test/projectMemory.test.ts` covering append/read/compress/summarize for
57
+ the new memory categories and metadata.
58
+
3
59
  ## 1.22.1
4
60
 
5
61
  ### Added
package/QUALITY.md CHANGED
@@ -10,6 +10,7 @@ Run these commands before tagging or pushing a release:
10
10
 
11
11
  ```sh
12
12
  bun run typecheck
13
+ bun run lint
13
14
  bun test
14
15
  bun run bundle
15
16
  bun run smoke
package/README.md CHANGED
@@ -10,9 +10,10 @@
10
10
  <a href="./QUALITY.md"><img alt="quality gate" src="https://img.shields.io/badge/quality-release%20gated-brightgreen.svg"></a>
11
11
  </p>
12
12
 
13
- UR Agent is a Bun and TypeScript command-line coding agent. It opens a stateful
14
- interactive terminal session by default, can run one-shot prompts for scripts,
15
- and includes workflow commands for specification-driven development,
13
+ UR Agent is a Bun and TypeScript command-line coding agent: a reproducible
14
+ autonomous software engineering agent. It opens a stateful interactive terminal
15
+ session by default, can run one-shot prompts for scripts, and includes workflow
16
+ commands for specification-driven development,
16
17
  multi-agent execution, test-first quality loops, CI repair loops, background
17
18
  agents, MCP servers, plugins, skills, memory, permission safety policy,
18
19
  project context packing, verification, and local model routing.
@@ -27,6 +28,9 @@ UR is built around the work that happens after a prompt: reading a repository,
27
28
  editing files, running commands, validating the result, preserving context, and
28
29
  handing work off to other tools or agents when needed.
29
30
 
31
+ - **Reproducible engineering loop.** Substantial tasks should move through
32
+ `spec -> plan -> patch -> test -> report -> rollback`, with command evidence
33
+ captured before success is claimed.
30
34
  - **Terminal-native agent loop.** Run `ur` for an interactive coding session or
31
35
  `ur -p` for automation-friendly output.
32
36
  - **Local model runtime.** Use any model exposed by Ollama, set a specific host
@@ -38,7 +42,13 @@ handing work off to other tools or agents when needed.
38
42
  AST-aware rename plans, patch previews, and rollback-safe multi-file apply.
39
43
  - **Permission and context control.** Use `ur safety` and `ur context-pack` to
40
44
  inspect command risk, initialize project safety policy, summarize repository
41
- architecture, and preserve task decisions, constraints, commands, and diffs.
45
+ architecture, and preserve task decisions, constraints, commands, diffs,
46
+ architecture decisions, preferred commands, failed attempts, accepted patterns,
47
+ and rejected approaches.
48
+ - **Lifecycle hooks.** Configure `BeforeEdit`, `AfterEdit`, `BeforeCommand`,
49
+ `AfterCommand`, `BeforeCommit`, and `OnFailure` hooks in `.ur/hooks.json` or
50
+ `UR.md` to run custom commands when the agent edits files, runs shell commands,
51
+ commits, or hits a failure.
42
52
  - **Verification and provenance.** Use `ur test-first`, the built-in verifier,
43
53
  `/verify`, `.ur/verify.json`, `ur artifacts`, `ur claim-ledger`, and `/trace`
44
54
  to make results easier to inspect.
@@ -124,13 +134,14 @@ as first-class subcommands in the shipped CLI.
124
134
  | --- | --- |
125
135
  | `ur` | Start an interactive terminal agent session in the current workspace. |
126
136
  | `ur -p` | Run a non-interactive prompt with text, JSON, or stream-JSON output. |
127
- | `ur spec` | Create requirements, design, and task documents under `.ur/specs/`, run the task list, and verify with strict proof gates. |
137
+ | `ur spec` | Default spec-first workflow: create requirements, design, and task documents under `.ur/specs/`, run the task list, and verify with strict proof gates. |
128
138
  | `ur escalate` | Plan or run work with fast and oracle model tiers selected from local model capabilities. |
129
139
  | `ur arena` | Run multiple agents on the same task in isolated worktrees and surface the winning diff. |
130
140
  | `ur ci-loop` | Run a build or test command, hand failures to a fix agent, and retry with a bounded budget. |
131
141
  | `ur test-first` | Detect the project stack, run compile/test/lint commands, store failure traces, and install edit-time verify gates. |
132
142
  | `ur safety` | Inspect or initialize project shell safety policy and evaluate command risk before execution. |
133
- | `ur context-pack` | Write project architecture context, task memory, and compressed context under `.ur/`. |
143
+ | `ur context-pack` | Write project architecture context, task memory, and compressed context under `.ur/`. Supports memory kinds `decision`, `constraint`, `command`, `diff`, `note`, `architecture`, `preference`, `attempt`, `accepted`, and `rejected`. |
144
+ | `ur hooks` | Configure lifecycle hooks (`BeforeEdit`, `AfterEdit`, `BeforeCommand`, `AfterCommand`, `BeforeCommit`, `OnFailure`) via settings files. |
134
145
  | `ur bg` | Run and manage detached local background agents with optional worktrees and PR creation. |
135
146
  | `ur worktree` | List, inspect, and clean up UR agent worktrees. |
136
147
  | `ur automation` | Store and run project-local scheduled automation specs under `.ur/automations/`. |
@@ -139,7 +150,7 @@ as first-class subcommands in the shipped CLI.
139
150
  | `ur pattern` | Run multi-agent collaboration patterns (PEER, DOE, concurrent, handoff, debate, parallel); `--execute` runs them as a workflow. |
140
151
  | `ur goal` | Track long-horizon objectives that persist across sessions. |
141
152
  | `ur repo-edit` | Build a repo edit index, plan AST-aware renames, preview patches, and apply with rollback. |
142
- | `ur code-index` | Build, query, or watch a local semantic code index using Ollama embeddings. |
153
+ | `ur code-index` | Build, query, or watch a local semantic code index using Ollama embeddings; `ur code-index repo` adds files/symbols/calls/tests/docs/configs. |
143
154
  | `ur semantic-memory` | Build and search a project-local memory index. |
144
155
  | `ur knowledge` | Manage a curated project knowledge base with provenance. |
145
156
  | `ur artifacts` | Capture diffs, test runs, notes, and review feedback under `.ur/artifacts/`. |
@@ -167,6 +178,14 @@ Install matching agent templates with `ur agent-templates install`.
167
178
 
168
179
  New built-in tools (exposed through MCP and the ACP server): GitHub, API, Browser, Docker, TestRunner, Database. File-system and terminal tools are already built in (FileRead, FileEdit, FileWrite, Glob, Grep, Bash, PowerShell).
169
180
 
181
+ UR also documents the core Cursor-style agent primitives as first-class,
182
+ project-backed features: Agent surfaces (`ur`, `ur agents`, `ur crew`, `ur bg`),
183
+ Rules (`AGENTS.md`, `UR.md`, `.cursor/rules/*.mdc`, `.cursorrules`, safety and
184
+ guardrail config), MCP (`ur mcp`, `.mcp.json`, plugin MCP servers), Skills
185
+ (`/skills`, bundled, project, user, and plugin skills), CLI (`ur --help`, `ur -p`,
186
+ `ur exec`, `ur acp`), and Models (`ur model`, `ur model-doctor`, Ollama routing
187
+ and discovery).
188
+
170
189
  Examples:
171
190
 
172
191
  ```sh
@@ -186,6 +205,11 @@ ur test-first install
186
205
  ur safety check --command "rm -rf build"
187
206
  ur context-pack scan
188
207
  ur context-pack remember --decision "Use package scripts before ad hoc commands"
208
+ ur context-pack remember --architecture "Repository pattern for data access" --status accepted --rationale "Testability"
209
+ ur context-pack remember --preference "Use bun test over jest"
210
+ ur context-pack remember --accepted "Use p-map for bounded concurrency" --scope project
211
+ ur context-pack remember --rejected "Switch to esbuild" --alternative-to "Keep bun bundle"
212
+ ur context-pack remember --attempt "Tried Deno runtime" --status superseded
189
213
  ur context-pack compress
190
214
  ur ci-loop --command "bun test" --max-attempts 3 --dry-run
191
215
  ur bg run "fix the flaky parser test" --worktree --dry-run
@@ -193,6 +217,10 @@ ur automation create nightly --schedule "0 9 * * 1-5" --prompt "Review open task
193
217
  ur repo-edit preview rename oldName --to newName
194
218
  ur repo-edit apply rename oldName --to newName --check "bun test"
195
219
  ur code-index search "where is the rate limiter configured"
220
+ ur code-index repo build
221
+ ur code-index repo search "rate limiter"
222
+ ur skill init security-review
223
+ ur skill run security-review "src/auth.ts"
196
224
  ur artifacts capture-tests --command "bun test"
197
225
  ur agent-task pr --create --dry-run
198
226
  ur acp serve --port 8123
@@ -214,7 +242,9 @@ UR reads repository instructions and local runtime state from project files:
214
242
  - `.ur/safety-policy.json` configures project shell safety rules for read,
215
243
  write, execute, and network command classes.
216
244
  - `.ur/project-manifest.json` and `.ur/context/` hold architecture summaries,
217
- task memory, compressed context, and command/constraint decisions.
245
+ task memory, compressed context, and project memory including architecture
246
+ decisions, preferred commands, failed attempts, accepted patterns, and rejected
247
+ approaches.
218
248
  - `.ur/specs/`, `.ur/artifacts/`, `.ur/automations/`, `.ur/test-first/`,
219
249
  `.ur/memory/`, and `.ur/index/` hold workflow state, review artifacts,
220
250
  scheduled jobs, failure traces, memory, and indexes.
@@ -292,6 +322,7 @@ Build and verify a release:
292
322
 
293
323
  ```sh
294
324
  bun run typecheck
325
+ bun run lint
295
326
  bun test
296
327
  bun run bundle
297
328
  bun run smoke