driftseal 0.2.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "driftseal",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Seal intent, verification, and decisions into an auditable workflow for agentic coding",
5
5
  "keywords": [
6
6
  "driftseal",
@@ -12,20 +12,21 @@
12
12
  "decision-log",
13
13
  "madr"
14
14
  ],
15
- "homepage": "https://github.com/ruanboyu/driftseal#readme",
15
+ "homepage": "https://github.com/rowan-hiro/DriftSeal#readme",
16
16
  "bugs": {
17
- "url": "https://github.com/ruanboyu/driftseal/issues"
17
+ "url": "https://github.com/rowan-hiro/DriftSeal/issues"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/ruanboyu/driftseal.git"
21
+ "url": "git+https://github.com/rowan-hiro/DriftSeal.git"
22
22
  },
23
23
  "license": "MIT",
24
24
  "author": "Ruan Boyu <boyuruan@gmail.com>",
25
25
  "type": "commonjs",
26
26
  "main": "index.js",
27
27
  "bin": {
28
- "driftseal": "bin/driftseal.js"
28
+ "driftseal": "bin/driftseal.js",
29
+ "driftseal-mcp": "bin/driftseal-mcp.js"
29
30
  },
30
31
  "directories": {
31
32
  "test": "test"
@@ -42,5 +43,9 @@
42
43
  },
43
44
  "engines": {
44
45
  "node": ">=18"
46
+ },
47
+ "dependencies": {
48
+ "@modelcontextprotocol/sdk": "^1.30.0",
49
+ "zod": "^4.4.3"
45
50
  }
46
51
  }
@@ -5,154 +5,62 @@ description: Run repository work through the DriftSeal (`driftseal`) intent, ver
5
5
 
6
6
  # Use DriftSeal
7
7
 
8
- Run repository work as small, closed, auditable rounds. Treat the intent log,
9
- decision log, and Git history as complementary records rather than duplicate
10
- activity streams.
8
+ This skill is the usage guide for DriftSeal: how to find it and which command
9
+ or tool to reach for. The binding protocol when an intent is required, how
10
+ to close one honestly, when a decision record is warranted, how reclamation
11
+ works — lives in the target repository's `AGENTS.md` (injected by
12
+ `driftseal init`). Follow that file; do not substitute this guide or memory
13
+ for it.
11
14
 
12
15
  ## Locate DriftSeal
13
16
 
14
- - Work from the repository root unless its instructions specify another scope.
15
- - Prefer `driftseal` from `PATH`. In a DriftSeal source checkout, fall back to
16
- `node bin/driftseal.js` when the global command is unavailable.
17
- - Follow the repository's `AGENTS.md` and storage overrides such as `DRIFTSEAL_HOME`.
18
- - If DriftSeal is unavailable, limit activity to read-only discovery and report the
19
- blocker. Do not mutate the repository without the required log.
17
+ - Prefer the `driftseal_*` MCP tools when the DriftSeal MCP server is available
18
+ for the target repository: `driftseal_status`, `driftseal_begin`,
19
+ `driftseal_end`, `driftseal_log`, `driftseal_reclaim`, `driftseal_unreclaim`,
20
+ and the `driftseal_decision_*` tools. Their input schemas come from the MCP
21
+ client, not from `driftseal help`. The server keeps state in its fixed
22
+ repository root and ignores storage-override environment variables.
23
+ - Otherwise prefer `driftseal` from `PATH`, where `DRIFTSEAL_HOME` and
24
+ `DRIFTSEAL_DECISION_HOME` overrides apply. In a DriftSeal source checkout,
25
+ fall back to `node bin/driftseal.js`.
26
+ - Use one interface consistently within a round.
27
+ - If DriftSeal is unavailable, limit activity to read-only discovery and report
28
+ the blocker. Do not mutate the repository without the required log.
20
29
 
21
- Use one command form consistently within a round. The examples below use
22
- `driftseal`; substitute the local source command when necessary.
30
+ ## Command Map
23
31
 
24
- ## Re-anchor Before Acting
25
-
26
- 1. Run `driftseal status` at the start of work.
27
- 2. Run `driftseal log --last 3` after compaction, a resumed session, or uncertainty.
28
- 3. Continue an open intent when it matches the requested work. Treat it as the
29
- source of truth; do not open a duplicate intent.
30
- 4. Close a conflicting intent as `partial` or `abandoned` with an honest note,
31
- then begin the replacement round.
32
-
33
- Do not use `--force` merely for convenience. If another live actor owns the
34
- open intent, stop mutating and coordinate instead of abandoning its work.
35
-
36
- ## Begin the Round
37
-
38
- Before modifying, creating, or deleting files — or making any other change that
39
- may need a rollback — declare one objective and its proof:
32
+ Re-anchor after context loss or uncertainty; when `status` reports an open
33
+ intent, the repository protocol defines whether to resume or replace it:
40
34
 
41
35
  ```sh
42
- driftseal begin "<small objective for this round>" \
43
- --verify "<exact command or outcome check>"
36
+ driftseal status
37
+ driftseal log --last 3 # add --all to include reclaimed records
44
38
  ```
45
39
 
46
- Make the intent small enough to finish and verify in one round. Prefer an
47
- outcome-focused check over a vague activity such as "inspect the result."
48
- Starting the intent is the first permitted mutation. Single-step commands that
49
- only build, check, or record work already done — compiling, running tests,
50
- `git add`/`git commit` — need no intent of their own.
51
-
52
- When the round may change or confirm an existing decision, declare each one at
53
- the boundary with `--decision <id>`. Do not add decision links speculatively.
54
-
55
- Read-only inspection needed to choose the objective or verifier may happen
56
- before `begin`. Do not let that inspection turn into unlogged implementation.
57
-
58
- ## Execute Without Drift
59
-
60
- - Change only what the open intent covers.
61
- - Preserve unrelated worktree changes and other actors' edits.
62
- - If the objective expands or changes, close the current intent as `partial`
63
- or `abandoned`, then start a new round before continuing.
64
- - If the declared verifier becomes invalid, record that honestly and start a
65
- new round with the correct verifier instead of silently substituting proof.
66
- - If the user replaces the active request, reconcile the open intent before
67
- acting on the replacement.
68
-
69
- ## Record Decisions Selectively
70
-
71
- Before adding a decision record, ask what useful information would disappear
72
- if only the intent log and final Git commit remained.
73
-
74
- Add a MADR record only when it preserves at least one of these:
75
-
76
- - a rejected path worth preventing future agents from retrying;
77
- - an unresolved or deliberately deferred path with a concrete revisit trigger;
78
- - non-obvious rationale or trade-offs behind an accepted choice that is
79
- long-lived, cross-cutting, or costly to reverse;
80
- - the reason an earlier decision became deprecated or superseded.
81
-
82
- Skip routine, local, readily reversible choices. Do not restate an accepted
83
- change that the intent and commit already explain.
84
-
85
- Use `proposed` for unresolved choices still under active consideration. Use
86
- `deferred` for choices that are deliberately postponed, and state the revisit
87
- trigger in the outcome or consequences. Use `rejected` for an explicitly
88
- ruled-out choice. Reserve `accepted` for the exceptional accepted decisions
89
- whose rationale would otherwise be lost.
90
-
91
- Count postponed choices with `driftseal decision list --status deferred --count`,
92
- then review them with `driftseal decision list --status deferred` so they do not
93
- disappear into the chronological log.
94
-
95
- For every decision explicitly linked by the open intent, reconcile its current
96
- status and rationale before a successful close:
40
+ Run each work round as the repository's protocol directs (`-v`, `-s`, `-n`,
41
+ and `-r` are the short forms of `--verify`, `--status`, `--note`, and
42
+ `--verify-result`):
97
43
 
98
44
  ```sh
99
- driftseal decision update <id> \
100
- --status <proposed|accepted|rejected|deferred|deprecated|superseded> \
101
- --note "<what changed or was confirmed, and why>"
45
+ driftseal begin "<objective>" --verify "<proof>" [--decision <id>]
46
+ # ... do only what the intent covers ...
47
+ driftseal end --status <status> --note "<what happened>" --verify-result "<proof output>"
102
48
  ```
103
49
 
104
- The update appends a decision history entry tied to the open intent. An
105
- unchanged decision still needs an explicit confirmation note. DriftSeal rejects a
106
- `completed` or `partial` close if any declared decision remains unreconciled;
107
- `failed` and `abandoned` remain available as escape paths.
108
-
109
- Do not edit a linked decision after reconciling it. Run `decision update` again
110
- so the final content hash is recorded. If an update is interrupted, rerun it or
111
- successfully close the linked intent; DriftSeal recovers only that intent's pending
112
- transaction. Closing as `failed` or `abandoned` cancels its pending recovery so
113
- historical conflicts cannot block future decision work.
50
+ Record and reconcile decisions as the repository's decision protocol directs:
114
51
 
115
52
  ```sh
116
- driftseal decision add "<decision title>" \
117
- --status deferred \
118
- --context "<problem and constraints>" \
119
- --outcome "<current disposition, rationale, and revisit trigger>" \
120
- --option "<considered option>" \
121
- --consequence "<result of this disposition>"
53
+ driftseal decision add "<title>" --context "..." --outcome "..."
54
+ driftseal decision update <id> [--status <status>] --note "<what changed or was confirmed>"
55
+ driftseal decision list --status deferred
122
56
  ```
123
57
 
124
- ## Verify and Close
125
-
126
- Run the declared verification exactly as written. Then close the intent before
127
- reporting success:
58
+ Retire meaningless closed records as the repository's protocol directs:
128
59
 
129
60
  ```sh
130
- driftseal end \
131
- --status completed \
132
- --note "<what actually happened>" \
133
- --verify-result "<concise, honest result>"
61
+ driftseal reclaim [id ...] --reason "<why>" [--dry-run]
62
+ driftseal unreclaim <id> --reason "<why>"
134
63
  ```
135
64
 
136
- Choose the status from evidence:
137
-
138
- - `completed`: achieve the objective and pass the declared verification.
139
- - `partial`: leave useful work but do not achieve the whole objective.
140
- - `failed`: fail to produce a usable result or fail essential verification.
141
- - `abandoned`: intentionally stop or replace the round.
142
-
143
- Never leave an intent open merely because the work failed. Never report a
144
- completed result while the log still says `in_progress`.
145
-
146
- ## Persist the Round in Git
147
-
148
- Treat a focused Git commit as the third record: the intent says what was
149
- planned and how it was checked, the decision log preserves otherwise-lost
150
- context, and the commit shows what actually landed.
151
-
152
- When the user has authorized a commit, stage and commit only the verified
153
- changes, the closed intent events, and any relevant decision record. This
154
- bookkeeping finalizes the just-closed round and does not require a new intent.
155
-
156
- Keep this exception narrow. Open a new intent before making content changes,
157
- fixing a hook failure, rewriting history, rebasing, pushing, or including work
158
- outside the closed round.
65
+ For exact flags, eligibility rules, and recovery behavior, run
66
+ `driftseal help` and read the repository's `AGENTS.md`.