engineering-memory 1.6.4 → 1.7.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": "engineering-memory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Installs the Engineering Memory skill and its local MCP bridge. Sign in after installing; your organization and project are resolved from your account.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -24,12 +24,22 @@ export class GitInspector {
|
|
|
24
24
|
this.gitValue(repoRoot, ['config', '--get', 'remote.origin.url']),
|
|
25
25
|
this.gitValue(repoRoot, ['rev-list', '--max-parents=0', 'HEAD']),
|
|
26
26
|
]);
|
|
27
|
-
const canonicalRoot = await canonicalPath(repoRoot);
|
|
28
27
|
const identity = remote
|
|
29
28
|
? `${canonicalRemoteIdentity(remote)}\n${firstCommit ?? ''}`
|
|
30
|
-
: `${
|
|
29
|
+
: `${(await this.mainWorktree(repoRoot)).toLowerCase()}\n${firstCommit ?? ''}`;
|
|
31
30
|
return sha256(identity);
|
|
32
31
|
}
|
|
32
|
+
async mainWorktree(repoRoot) {
|
|
33
|
+
const commonDirectory = await this.gitValue(repoRoot, [
|
|
34
|
+
'rev-parse',
|
|
35
|
+
'--path-format=absolute',
|
|
36
|
+
'--git-common-dir',
|
|
37
|
+
]);
|
|
38
|
+
if (!commonDirectory) {
|
|
39
|
+
return await canonicalPath(repoRoot);
|
|
40
|
+
}
|
|
41
|
+
return await canonicalPath(resolve(commonDirectory, '..'));
|
|
42
|
+
}
|
|
33
43
|
async manifest(repoRoot) {
|
|
34
44
|
const root = await this.findRoot(repoRoot);
|
|
35
45
|
const head = await this.gitValue(root, ['rev-parse', 'HEAD']);
|
|
@@ -10,6 +10,8 @@ For a bound repository, call `session.bootstrap` before producing a plan or chan
|
|
|
10
10
|
|
|
11
11
|
Before the first edit of a write task, settle the branch. Ask the user through the native questionnaire whether to open a branch for this task and which name to use, offering the convention the returned rules carry. Do this once, at the start, not at commit time — the commit gate runs long after the work is written, and by then the wrong branch has already cost something. A read-only task never creates a branch.
|
|
12
12
|
|
|
13
|
+
Two tasks in one repository need two branches, and one working tree can only have one checked out. A second checkout is what `git worktree` is for: `git worktree add ../<repo>-<task> -b <branch>` gives the task its own directory and its own branch against the same repository, and the chat for that task runs there. Engineering Memory treats them as one project — the fingerprint comes from the repository, not the directory — while each task measures only what changed in its own tree. Offer this when a task starts in a repository that already has a live task, and never ask somebody to switch branches in a tree another task is using.
|
|
14
|
+
|
|
13
15
|
A repository holds as many tasks as the people working in it. Never treat somebody else's unfinished task as a reason this one cannot proceed: no task waits on another task's review, reconciliation, verification or close, and nothing that is already verified or closed is undone by what happens elsewhere. When `session.resume` reports more than one live task for this repository, it lists them and the right move is to ask the user which one this is, never to guess and never to adopt the one that happens to be most recent.
|
|
14
16
|
|
|
15
17
|
A task nobody is going to finish is abandoned rather than inherited. Ask the user first, then call `task.abandon` with the task ID and their reason: it records the task as abandoned, withdraws the proposals it left waiting for review, releases its lease and session, and removes its local pointer. It changes nothing about any other task. Never abandon a task on your own judgement, and never abandon one to get past an error in your own.
|
|
@@ -60,7 +60,7 @@ Ask for the registered email and intended role. Show owner, maintainer, member,
|
|
|
60
60
|
|
|
61
61
|
## Branch
|
|
62
62
|
|
|
63
|
-
At the start of a write task, before the first edit, ask whether to open a branch for it and confirm the name. Offer the convention the returned engineering rules state, the current branch as the alternative, and let the user name something else. Never create a branch during read-only analysis, and never create one without asking.
|
|
63
|
+
At the start of a write task, before the first edit, ask whether to open a branch for it and confirm the name. Offer the convention the returned engineering rules state, the current branch as the alternative, and let the user name something else. Never create a branch during read-only analysis, and never create one without asking. When the repository already has another live task, add a third option — a separate worktree for this one — and say what it means: its own directory, its own branch, the same project, and the other task's tree left alone.
|
|
64
64
|
|
|
65
65
|
## Flow Entry and Exit
|
|
66
66
|
|