agency-rules 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.0](https://github.com/deuriib/agency-rules/compare/v0.5.0...v0.6.0) (2026-10-31)
9
+
10
+
11
+ ### Features
12
+
13
+ * **rules:** add Agentmemory MCP guidelines ([0d68b32](https://github.com/deuriib/agency-rules/commit/0d68b32e91b5385087b34d9dc93b45576bf88ceb))
14
+ * **rules:** add Agentmemory MCP guidelines ([1c846f5](https://github.com/deuriib/agency-rules/commit/1c846f5715137ea0d98d5365b99e4589a129a92b)), closes [#14](https://github.com/deuriib/agency-rules/issues/14)
15
+ * **rules:** add subagent delegation guidelines ([4527e1f](https://github.com/deuriib/agency-rules/commit/4527e1f7a16fb131a09406083562d59ff9f0eb8b))
16
+ * **rules:** add subagent delegation guidelines ([1042370](https://github.com/deuriib/agency-rules/commit/1042370beb15a15e9f9a57831a754da4ee05edbc)), closes [#15](https://github.com/deuriib/agency-rules/issues/15)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * unused variable via biome ([7bd25b1](https://github.com/deuriib/agency-rules/commit/7bd25b1c8c1b28521d6aaee57e1d5179e0cfafab))
22
+
8
23
  ## [0.5.0](https://github.com/deuriib/agency-rules/compare/v0.4.1...v0.5.0) (2026-10-31)
9
24
 
10
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agency-rules",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Write rules once. Run them in every harness.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: agentmemory
3
+ description: Guidelines and strict rules for interacting with the Agentmemory MCP server.
4
+ alwaysApply: true
5
+ tags: [mcp, memory, context]
6
+ ---
7
+
8
+ # Agentmemory MCP Rules
9
+
10
+ - **MEM-01** — Recall Before Asking. At the START of any task, call `memory_recall` (or `memory_smart_search`) with the task context before asking the user to repeat anything.
11
+ - **MEM-02** — Save at Decision Points. When you learn something durable (a decision, a fix, a gotcha, a user preference, a project convention), call `memory_save` in the same session — do not batch it for later.
12
+ - **MEM-03** — Lessons From Corrections. Signals this applies: explicit "always/never", "learn this", "from now on", a repeated user fix to the same behavior, "I told you before". Call `memory_save` with a confidence score; re-saving duplicate content strengthens the existing lesson instead of forking it. Before similar work, call `memory_lesson_recall` — check what was learned before deciding. One concept per lesson; state when and where it applies via context and tags.
13
+ - **MEM-04** — Resume, Don't Restart. Resume / recap / "where were we" → `memory_sessions` plus `memory_timeline` around the anchor before doing anything else. Lead with any unanswered question from the prior session. Use `memory_timeline` for chronological context and `memory_smart_search` with `expandIds` for detail — never re-derive what history already holds.
14
+ - **MEM-05** — Track Multi-Step Work as Actions. Work with 3+ steps → `memory_action_create` with typed dependencies; pull from `memory_frontier` / `memory_next`, not vibes. Memory lease acquire before starting an action; release or renew explicitly — leases prevent double-work across agents. Update status in real time; resolving to done unblocks dependents. Hand off via `memory_signal_send`, pick up via `memory_signal_read`.
15
+ - **MEM-06** — Slots Are Small, Pinned State. Durable user or project state (persona, pending items) → memory slots: `memory_slot_get` / `memory_slot_list` first, then `memory_slot_replace`. Appends fail past `sizeLimit` — compact via replace first, never loop blind appends. Seeded defaults are starting values, not gospel; replace them when the user corrects them.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: subagent-delegation
3
+ description: Guidelines for delegating tasks to subagents using spawn, dispatch, or invoke.
4
+ trigger: model_decision
5
+ tags: [workflow, subagents, context-management]
6
+ ---
7
+
8
+ # Subagent Delegation Rules
9
+
10
+ - **SUB-01** — Trigger Words. When the user says `spawn`, `dispatch`, or `invoke`, they are explicitly asking you to delegate the task to a subagent. Do not attempt to execute the task in the main thread.
11
+ - **SUB-02** — When to Delegate. Use subagents for:
12
+ - **Context-heavy tasks:** Searching large codebases, reading multiple files, or exploring documentation.
13
+ - **Parallelizable work:** Multiple independent fixes or searches that can happen concurrently.
14
+ - **Specialized tasks:** Writing tests, refactoring specific modules, or applying strict formatting.
15
+ - **SUB-03** — Clear Prompts. When spawning a subagent, provide a self-contained prompt. Do not assume the subagent has access to the current conversation history. Pass all necessary context, file paths, and constraints explicitly.
16
+ - **SUB-04** — Await and Synthesize. Wait for the subagent to complete and return its result. Verify the output and synthesize it back into the main workflow before presenting the final answer to the user.
17
+ - **SUB-05** — Fail Safely. If a subagent fails or hits a limit, do not silently retry in the main thread. Report the failure, analyze the error, and decide whether to retry the subagent with a better prompt or escalate to the user.
@@ -1,4 +1,4 @@
1
- import { access, mkdir, readFile, writeFile } from 'node:fs/promises';
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import { dirname, join, resolve } from 'node:path';
3
3
  import { parseArgs } from 'node:util';
4
4
  import { readRules } from './lib/frontmatter.mjs';