@trailkeep/cli 0.0.0-stage → 0.3.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.
@@ -0,0 +1,28 @@
1
+ {
2
+ "description": "trailkeep: inject private repo notes and the active effort file; log decisions at session end",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "matcher": "startup|clear|compact",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/bin/trailkeep\" context --for claude",
11
+ "timeout": 10
12
+ }
13
+ ]
14
+ }
15
+ ],
16
+ "SessionEnd": [
17
+ {
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/bin/trailkeep\" harvest --for claude",
22
+ "timeout": 10
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }
28
+ }
package/package.json CHANGED
@@ -1,6 +1,44 @@
1
1
  {
2
2
  "name": "@trailkeep/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.2",
4
+ "description": "Shared instructions, per-branch task context and a decision log for Claude Code, Codex CLI and GitHub Copilot CLI. POSIX sh + git.",
5
+ "keywords": [
6
+ "claude-code",
7
+ "codex",
8
+ "copilot",
9
+ "agents",
10
+ "AGENTS.md",
11
+ "context",
12
+ "ai-coding"
13
+ ],
14
+ "homepage": "https://github.com/msiric/trailkeep#readme",
15
+ "bugs": "https://github.com/msiric/trailkeep/issues",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/msiric/trailkeep.git"
19
+ },
20
+ "license": "MIT",
21
+ "author": "Mario Širić",
22
+ "bin": {
23
+ "trailkeep": "bin/trailkeep"
24
+ },
25
+ "files": [
26
+ "bin/",
27
+ "hooks/",
28
+ "skills/",
29
+ ".claude-plugin/",
30
+ "README.md",
31
+ "LICENSE"
32
+ ],
33
+ "os": [
34
+ "darwin",
35
+ "linux"
36
+ ],
37
+ "scripts": {
38
+ "test": "sh tests/run.sh"
39
+ },
40
+ "publishConfig": {
41
+ "registry": "https://registry.npmjs.org/",
42
+ "access": "public"
43
+ }
44
+ }
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: effort
3
+ description: Start, hand off or close the per-branch effort file (goal, plan, progress, decisions), and search the repo's decision log, managed by trailkeep. Use when the user wants to start or plan a task, save progress or hand off, wrap up a branch, or asks why something was done.
4
+ ---
5
+
6
+ # Effort files
7
+
8
+ An effort file holds the context for one branch: goal, definition of done,
9
+ plan, progress and decisions. It lives in `.trailkeep/<branch>.md` at the
10
+ worktree root; that folder ignores itself, so it never shows up in git. If one
11
+ exists for the current branch, it was injected at session start. Edit it
12
+ directly with your file tools.
13
+
14
+ ## Start
15
+
16
+ 1. Run `trailkeep new`. It prints the file path.
17
+ 2. Ask the user for anything you can't infer, then fill in **Goal**,
18
+ **Done when** (checkable outcomes, including the tests that must pass) and
19
+ **Plan** (small checkbox steps).
20
+ 3. Stop and let the user review the plan before writing code.
21
+
22
+ ## While working and before you stop
23
+
24
+ - Tick Plan items as they are done.
25
+ - Add one line under **Progress** per session: `YYYY-MM-DD: what changed, what's next`.
26
+ - Record decisions with their reason under **Decisions and dead ends**, one
27
+ line each. Start a line with `Dead end:` for an approach that failed, and say
28
+ why, so no later session retries it.
29
+ - Keep the file under about 150 lines: fold old Progress lines into one summary line.
30
+
31
+ Every new Decisions and Progress line is copied to the repo's append-only
32
+ decision log when the session ends, with the commit, changed files and
33
+ session id. Don't write to the log yourself.
34
+
35
+ ## Find out why something is the way it is
36
+
37
+ Search the log instead of guessing. It returns short lines, newest first:
38
+
39
+ - `trailkeep log --path src/auth` (entries that touched a path)
40
+ - `trailkeep log --grep jwt` (text search), `--type dead-end`, `--since 2026-10-01`
41
+ - `trailkeep log show <id>` for one entry in full, then `git show <commit>` for the change
42
+
43
+ ## Hand off
44
+
45
+ When the user asks to hand off, or context is getting long: update the file
46
+ until a fresh session could continue from it alone, then say so. The user
47
+ will start a new session; the file is injected again automatically.
48
+
49
+ ## Close
50
+
51
+ 1. Read **Decisions and dead ends**. For each item, decide whether every
52
+ future task needs it. Most don't.
53
+ 2. Propose each keeper as a one-line diff to exactly one place:
54
+ - the repo's `AGENTS.md` if it's team-wide and not derivable from the code
55
+ - `trailkeep notes --path` if it's private to the user, for this repo
56
+ - `~/.agents/AGENTS.md` if it applies to the user in every repo
57
+ 3. Apply only what the user approves, then run `trailkeep close`. If that
58
+ fails because your sandbox can't write to `~/.agents`, ask the user to run
59
+ it in their terminal.