pi-anchor 0.3.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/README.md +33 -170
- package/README_zh.md +32 -176
- package/assets/hero-en.svg +23 -39
- package/assets/hero-zh.svg +23 -39
- package/bin/anchor.js +36 -69
- package/dist/chunk-LKY6WIKH.js +1100 -0
- package/dist/extension-B1-fzCox.d.cts +167 -0
- package/dist/extension-B1-fzCox.d.ts +167 -0
- package/dist/extension.cjs +369 -1315
- package/dist/extension.d.cts +2 -20
- package/dist/extension.d.ts +2 -20
- package/dist/extension.js +4 -536
- package/dist/index.cjs +317 -1143
- package/dist/index.d.cts +17 -250
- package/dist/index.d.ts +17 -250
- package/dist/index.js +15 -103
- package/package.json +2 -2
- package/src/extension.ts +124 -362
- package/src/index.ts +1 -6
- package/src/store.ts +294 -424
- package/src/tui.ts +102 -297
- package/src/types.ts +24 -65
- package/dist/chunk-Q7IILJFA.js +0 -1563
- package/dist/store-t2_TDhJn.d.cts +0 -210
- package/dist/store-t2_TDhJn.d.ts +0 -210
- package/src/context_injector.ts +0 -166
- package/src/decay.ts +0 -125
- package/src/matcher.ts +0 -202
- package/src/observer.ts +0 -141
- package/src/protocol.ts +0 -95
- package/src/settlement.ts +0 -140
package/README.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# ⌖ Anchor
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
>
|
|
3
|
+
> **A digital sticky note for Pi Coding Agent — with three clever touches.**
|
|
4
|
+
> Stick a quick note across sessions (`/pin`), get a 1-line comment whisper when the AI touches that file, and watch the note tear itself off when you `git commit`. Zero `TODO.md` clutter in your repo.
|
|
5
5
|
|
|
6
6
|
[](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml)
|
|
7
7
|
[](package.json)
|
|
8
8
|
[](tsconfig.json)
|
|
9
|
-
[](package.json)
|
|
11
|
-
[](#1-zero-repository-contamination--storage-topology)
|
|
9
|
+
[](tests/store.test.ts)
|
|
12
10
|
[](LICENSE)
|
|
13
11
|
|
|
14
12
|
**English** | [简体中文](./README_zh.md)
|
|
@@ -18,192 +16,57 @@ pi install npm:pi-anchor
|
|
|
18
16
|
```
|
|
19
17
|
|
|
20
18
|
<p align="center">
|
|
21
|
-
<img src="assets/hero-en.svg" alt="Anchor
|
|
19
|
+
<img src="assets/hero-en.svg" alt="Anchor Sticky Notes" width="820">
|
|
22
20
|
</p>
|
|
23
21
|
|
|
24
22
|
```text
|
|
25
|
-
⌖
|
|
23
|
+
⌖ Notes (3):
|
|
26
24
|
|
|
27
|
-
01
|
|
28
|
-
02
|
|
29
|
-
03
|
|
30
|
-
04 [Quiet] Read external architecture notes before refactor College/优化 Quiet (0 tok) 09-28 14:20
|
|
25
|
+
01 Switch session token to HttpOnly cookie app · auth.ts 25m ago
|
|
26
|
+
02 Double-check rate limit fallback on timeout app · gateway.ts 3h ago
|
|
27
|
+
03 Read external architecture notes first College/优化 · notes.md 8d ago · quiet
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
Run `anchor done <num>` to tear off, or `anchor undo` to put back.
|
|
33
30
|
```
|
|
34
31
|
|
|
35
|
-
### The Three Pillars: Compact · Autonomous · Persistent
|
|
36
|
-
|
|
37
|
-
1. **Compact (小巧 · Zero Bloat & 0 Idle Tokens)**:
|
|
38
|
-
- Pure TypeScript (~20KB bundle, zero external runtime dependencies, zero background daemons, zero SQL databases in your repo).
|
|
39
|
-
- Flat, priority-sorted engineering list (`/anchor`, `/pin`, `/done 1`). Briefs the AI on Turn 1 of a session, then drops to **0 tokens** from Turn 2+ while you code.
|
|
40
|
-
2. **Autonomous (自主 · Smart Path Inference & Real-Time Commit Settlement)**:
|
|
41
|
-
- Automatically extracts file/folder paths mentioned in your task description and binds them to the target workspace even if you pinned the task from another directory.
|
|
42
|
-
- Settles tasks **in real time during the session** the moment `git commit` or a verification test command (`verifyCommand`) succeeds — works for both file-bound and plain-text tasks (`files: []`).
|
|
43
|
-
3. **Persistent (持久 · Never Loses Unfinished Work)**:
|
|
44
|
-
- Stored safely in `~/.anchor/state.json` outside your git working tree.
|
|
45
|
-
- Unfinished tasks are **never silently deleted**. Tasks untouched for 7+ days enter `[Quiet]` mode (saving Turn 1 prompt tokens), stay 100% visible in `/anchor`, and automatically wake up the moment you open their target project or touch matching files.
|
|
46
|
-
|
|
47
32
|
---
|
|
48
33
|
|
|
49
|
-
## Why
|
|
50
|
-
|
|
51
|
-
When building software with terminal-based AI coding agents (Claude Code, Pi, Aider), developers encounter three recurring points of friction:
|
|
52
|
-
|
|
53
|
-
### 1. Terminal Exit = Instant Amnesia
|
|
54
|
-
Pressing `Ctrl+C` terminates the agent process, clearing working memory. Unfinished refactoring plans, temporary milestones, and cross-session agreements vanish instantly.
|
|
55
|
-
|
|
56
|
-
### 2. TODO.md Pollutes Git & Suffocates Token Windows
|
|
57
|
-
Writing tasks into `TODO.md` or `AGENTS.md` inside your repository creates unwanted git noise (`update todo`, `fix checklist`). Worse, **every single turn injects dozens of stagnant lines into the system prompt**, burning token budgets and diluting LLM attention on active code.
|
|
34
|
+
## Why a Sticky Note Instead of `TODO.md`?
|
|
58
35
|
|
|
59
|
-
|
|
60
|
-
|
|
36
|
+
When you're deep in a coding session at 11 PM and realize *"I still need to fix the token expiry in `src/auth.ts` tomorrow"*, you don't want a heavy task manager:
|
|
37
|
+
- Putting a `TODO.md` inside your repo pollutes `git status` and forces the AI to re-read stale checklists on every single turn.
|
|
38
|
+
- Closing the terminal wipes the agent's working memory clean.
|
|
61
39
|
|
|
62
|
-
**Anchor
|
|
63
|
-
- **Zero Repo Contamination**: State is stored outside the workspace in `~/.anchor/state.json`, keeping your git tree 100% clean.
|
|
64
|
-
- **0 Idle Tokens**: Injects active commitments on Turn 1 cold-start; Turn 2+ working turns consume **0 tokens**. Stored tasks don't cost a dime while writing code.
|
|
65
|
-
- **Syntax-Safe JIT Wakeup**: When the agent touches relevant files, Anchor surfaces a single-line language-accurate comment (`//`, `#`, `<!-- -->`, `/* */`), while strictly skipping JSON, ENV, and lockfiles.
|
|
66
|
-
- **Auto-Settlement & Accidental Settle Guard**: Tasks automatically settle on git commits matching task descriptions or on session exit. In interactive dashboard mode, a two-stage dialog prevents accidental completion.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Core Architecture & State Machine
|
|
40
|
+
**Anchor is just a physical sticky note stuck to the bezel of your terminal** — stored outside your repo in `~/.anchor/state.json` (<10 KB, zero external dependencies, 4 source files), with three small, thoughtful touches:
|
|
71
41
|
|
|
42
|
+
### 1. Stick It & Forget It (Smart Path Spotting)
|
|
43
|
+
Write a note in plain language:
|
|
72
44
|
```text
|
|
73
|
-
|
|
74
|
-
│ Anchor Lifecycle State Machine │
|
|
75
|
-
└──────────────────────────────────────┬───────────────────────────────────────┘
|
|
76
|
-
│ Pin task: anchor "Migrate auth to HTTP-only cookies"
|
|
77
|
-
▼
|
|
78
|
-
┌───────────────────────────────────────────────┐
|
|
79
|
-
│ [ACTIVE Tier] (Turn 1 Injected) │
|
|
80
|
-
│ - Status indicator: ⌖ 4 │
|
|
81
|
-
│ - Turn 2+ : Excluded from prompt (0 Tokens) │
|
|
82
|
-
└───────┬───────────────────────────────┬───────┘
|
|
83
|
-
│ │
|
|
84
|
-
Git Commit / │ │ Inactivity Decay
|
|
85
|
-
Code Touch ▼ ▼
|
|
86
|
-
┌──────────────────────────────┐ ┌────────────────────────────────┐
|
|
87
|
-
│ [Syntax-Safe JIT Wakeup] │ │ [SLEEPING Tier] (0 Tokens) │
|
|
88
|
-
│ Language-accurate comments │ │ Preserved safely in global │
|
|
89
|
-
│ JSON/ENV strictly skipped │ │ state; wakes upon code touch │
|
|
90
|
-
└──────────────┬───────────────┘ └────────────────┬───────────────┘
|
|
91
|
-
│ │
|
|
92
|
-
Exit Prompt / Commit Match │ Silent Sweep
|
|
93
|
-
▼ ▼
|
|
94
|
-
┌──────────────────────────────┐ ┌────────────────────────────────┐
|
|
95
|
-
│ [SETTLED / Archived] │ │ [GRAVEYARD / Evicted] │
|
|
96
|
-
│ Appended to archive.jsonl │ │ Swept to graveyard.jsonl │
|
|
97
|
-
│ Evicted from active context │ │ (Auto-pruned after decay) │
|
|
98
|
-
└──────────────────────────────┘ └────────────────────────────────┘
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
| Action / Scenario | What You Do | What Anchor Does | What the AI Gets | When to Use |
|
|
102
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
103
|
-
| **Pin Commitment** | Run `anchor "Refactor auth"` | Atomically writes to `~/.anchor/state.json` | Turn 1: Injected into prompt; Turn 2+: 0 tokens | Retaining multi-step plans across terminal restarts |
|
|
104
|
-
| **File Touch** | Edit or read code normally | Matches touched files against anchor paths | Injects syntax-safe 1-line comment (skips JSON/ENV) | Working on relevant project modules |
|
|
105
|
-
| **Git Commit** | `git commit -m "feat: ..."` | Matches commit message using `Intl.Segmenter` | Auto-settles and archives matching task | Finishing code milestones |
|
|
106
|
-
| **Session Exit** | Type `exit` / `quit` | Intersects git-modified files with active anchors | Single-keypress prompt: `[Enter Settle] / [Esc Keep]` | Wrapping up terminal session |
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Engineering Highlights & v0.2.1 Hardening
|
|
111
|
-
|
|
112
|
-
### 1. Zero Repository Contamination & Storage Topology
|
|
113
|
-
Anchor never creates local `.anchor` folders or touches your project git tree. All state lives safely in user-global storage:
|
|
114
|
-
```text
|
|
115
|
-
~/.anchor/
|
|
116
|
-
├── state.json # Active and sleeping task state (< 10KB, atomic write)
|
|
117
|
-
├── state.lock # Cross-process sync atomic lock (Zero dependencies)
|
|
118
|
-
├── archive.jsonl # Append-only log of settled tasks
|
|
119
|
-
└── graveyard.jsonl # Append-only log of decayed and evicted items
|
|
120
|
-
```
|
|
121
|
-
* **Zero-Dependency Exclusive Lock**: Uses Node's native `fs.openSync(lockPath, 'wx')` to ensure atomic serialization across concurrent tabs or agents.
|
|
122
|
-
* **Dead PID Reclamation**: Automatically reclaims stale locks if the owning process terminated (`process.kill(pid, 0)` fails) or exceeded the 5000ms timeout.
|
|
123
|
-
* **Resilient Atomic Writes**: State writes use a temporary file followed by atomic `fs.renameSync` with spin-retries for Windows NTFS locks.
|
|
124
|
-
|
|
125
|
-
### 2. Accidental Settle Guard & Details Inspector (v0.2.1)
|
|
126
|
-
Pressing Enter in `/anchor` presents a two-stage action menu:
|
|
127
|
-
* `✓ Settle`: Completes and archives the task with an undo notice (`/anchor undo to revert`).
|
|
128
|
-
* `ℹ View details & associated files`: Inspects full description, target date, files, and physical verification command without completing the task.
|
|
129
|
-
* `↩ Cancel`: Returns safely without mutating state.
|
|
130
|
-
|
|
131
|
-
### 3. Invariant 11 Token Clamping (v0.2.1)
|
|
132
|
-
Visual string truncation in dashboard headers automatically strips trailing open brackets (`(`, `[`, `{`, `(`, `【`) right before ellipsis markers (`...`), eliminating dangling punctuation artifacts.
|
|
133
|
-
|
|
134
|
-
### 4. 0-Token Idle Economy & Multi-Language Syntax-Safe JIT
|
|
135
|
-
* **Turn 1 (Cold Start)**: Injects active commitments for the current workspace alongside natural conversational guidelines.
|
|
136
|
-
* **Turn 2+ (Working Turns)**: Anchor strips task lists from subsequent turns. Stored tasks consume **0 tokens** while coding.
|
|
137
|
-
* **Syntax-Safe Guard (Strict Null)**: For **JSON, ENV, Lockfiles, and binary assets**, Anchor explicitly returns `null`, preventing corrupted parsers or invalid syntax.
|
|
138
|
-
|
|
139
|
-
### 5. Pre-Flight Physical Verification
|
|
140
|
-
When an anchor declares a `verifyCommand`, the runner executes it on session start. Tasks that pass auto-settle immediately, freeing cognitive space.
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Commands & Usage
|
|
145
|
-
|
|
146
|
-
### Standalone CLI
|
|
147
|
-
```bash
|
|
148
|
-
anchor # List active tasks (Neovim-style dashboard)
|
|
149
|
-
anchor "Migrate auth to cookies" # Pin new commitment
|
|
150
|
-
anchor "Submit report" --due friday # Pin with explicit deadline
|
|
151
|
-
anchor done 1 # Complete row 1 (ordered index support)
|
|
152
|
-
anchor done anc-5 # Complete by explicit ID
|
|
153
|
-
anchor undo # Restore last archived task
|
|
45
|
+
/pin Switch session token to HttpOnly cookie in src/auth.ts
|
|
154
46
|
```
|
|
47
|
+
Anchor spots `src/auth.ts` (or any project path like `D:/College/...`) directly from your sentence — no forms or tags to fill out. Next time you open Pi in that project, a quiet card sits above your editor (`⌖ 1 note`) and disappears the moment you start typing.
|
|
155
48
|
|
|
156
|
-
###
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| `/pin <task> [--due tomorrow]` | Pin a task across sessions with optional due date |
|
|
160
|
-
| `/anchor` | Open interactive terminal task dashboard |
|
|
161
|
-
| `/done <id>` or `/anchor done <id>` | Complete task by row number (`1`) or ID (`anc-1`) |
|
|
162
|
-
| `/anchor undo` | Restore the last settled task |
|
|
163
|
-
| Status bar `⌖ N` | Displays active task count in status row; 100% hidden when 0 tasks exist |
|
|
164
|
-
|
|
165
|
-
---
|
|
49
|
+
### 2. A Gentle Whisper When Touching the File (0 Idle Tokens)
|
|
50
|
+
Anchor briefs the AI once on Turn 1 of a session, then drops to **0 tokens** from Turn 2 onwards.
|
|
51
|
+
When the AI reads or edits `src/auth.ts`, Anchor slips a single syntax-safe comment onto the end of that file read (`// ⌖ Note #1: Switch session token to HttpOnly cookie`), while strictly skipping `.json`, `.env`, and lockfiles.
|
|
166
52
|
|
|
167
|
-
|
|
53
|
+
*(Notes untouched for more than 7 days automatically enter `quiet` mode so they don't spend Turn-1 tokens in unrelated workspaces, while staying 100% visible in `/anchor` and waking up as soon as you open their project.)*
|
|
168
54
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
| **Workspace Hygiene** | Pollutes repo with 200MB Dolt | System daemon | **Pollutes git commit history** | **100% Zero repo pollution (`~/.anchor/`)** |
|
|
173
|
-
| **Token Cost** | Medium/High per turn | High (full prompt injection) | Severe (stale text accumulates) | **0 Tokens idle (JIT file touch only)** |
|
|
174
|
-
| **Syntax Safety** | N/A | Raw text injection | Static unformatted | **Language-aware comments, strictly skips JSON** |
|
|
175
|
-
| **Closure Mechanism** | Manual CLI close | Passive storage | Manual file edit | **Git Commit auto-match + One-tap exit settlement** |
|
|
176
|
-
| **Concurrency Safety** | SQL Transaction locks | Daemon single-point | Git merge conflicts | **Zero-dep cross-process atomic file lock** |
|
|
177
|
-
| **Startup Overhead** | Heavy CLI init | Go daemon | None | **< 90ms pre-bundled production artifact** |
|
|
178
|
-
| **Dependencies** | External Dolt binary | External Go binary | None | **Zero native binary dependencies (Pure TS)** |
|
|
55
|
+
### 3. Auto-Tears Off on `git commit`
|
|
56
|
+
When you or the AI commits the fix (`git commit -m "feat: switch session token to HttpOnly cookie"`), Anchor matches the commit message against your sticky notes and tears the note off in real time (`⌖ Auto-torn off #1`).
|
|
57
|
+
Tore one off by mistake? Run `/anchor undo` to stick it right back.
|
|
179
58
|
|
|
180
59
|
---
|
|
181
60
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
The motivation behind Anchor came from a recurring headache during pair-programming with AI coding agents: watching `TODO.md` and `AGENTS.md` rot inside my git trees.
|
|
185
|
-
|
|
186
|
-
Every time a task remained unfinished across sessions, writing it to a project markdown file felt harmless at first. Over weeks of work, two frictions became unbearable:
|
|
187
|
-
1. In multi-turn sessions, the AI dragged dozens of stagnant task lines into the prompt on every single turn, burning hundreds of tokens while diluting the model's focus on the actual code being edited.
|
|
188
|
-
2. Merge conflicts on task checklists in Git commits polluted the repository's history with irrelevant bookkeeping noise.
|
|
61
|
+
## Commands
|
|
189
62
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
## Verification & Quality Assurance
|
|
199
|
-
|
|
200
|
-
Engineered with strict TypeScript and 100% standard library test coverage using Node's native test runner:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
npm run typecheck # Strict tsc --noEmit check (0 errors)
|
|
204
|
-
npm test # Native Node test runner (34/34 passing)
|
|
205
|
-
npm run build # Dual ESM/CJS compilation via tsup + declaration emit
|
|
206
|
-
```
|
|
63
|
+
| Where | Command | What It Does |
|
|
64
|
+
| :--- | :--- | :--- |
|
|
65
|
+
| **Inside Pi** | `/pin <note>` | Stick a new note (or just tell the AI *"Remember to..."*) |
|
|
66
|
+
| **Inside Pi** | `/anchor` | Open the interactive sticky note list (press Enter to tear off or read) |
|
|
67
|
+
| **Inside Pi** | `/done 1` | Tear off note `#01` directly |
|
|
68
|
+
| **Inside Pi** | `/anchor undo` | Put back the last torn-off note |
|
|
69
|
+
| **Terminal CLI** | `anchor` / `anchor "<note>"` / `anchor done 1` | Manage the exact same sticky notes outside Pi |
|
|
207
70
|
|
|
208
71
|
---
|
|
209
72
|
|
package/README_zh.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# ⌖ Anchor
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
>
|
|
3
|
+
> **贴在 Pi 终端边框上的电子便签 —— 带一点刚刚好的小巧思。**
|
|
4
|
+
> 随手贴一张跨会话备忘(`/pin`),AI 读改关联文件时顺手递上一行注释提醒,`git commit` 提交代码时自动撕掉便签。不在代码仓库里留任何 `TODO.md` 垃圾。
|
|
5
5
|
|
|
6
6
|
[](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml)
|
|
7
7
|
[](package.json)
|
|
8
8
|
[](tsconfig.json)
|
|
9
|
-
[](package.json)
|
|
11
|
-
[](#1-绝对零仓库污染与跨进程文件锁)
|
|
9
|
+
[](tests/store.test.ts)
|
|
12
10
|
[](LICENSE)
|
|
13
11
|
|
|
14
12
|
[English](./README.md) | **简体中文**
|
|
@@ -18,199 +16,57 @@ pi install npm:pi-anchor
|
|
|
18
16
|
```
|
|
19
17
|
|
|
20
18
|
<p align="center">
|
|
21
|
-
<img src="assets/hero-zh.svg" alt="Anchor
|
|
19
|
+
<img src="assets/hero-zh.svg" alt="Anchor 电子便签预览" width="820">
|
|
22
20
|
</p>
|
|
23
21
|
|
|
24
22
|
```text
|
|
25
|
-
⌖
|
|
23
|
+
⌖ Notes (3):
|
|
26
24
|
|
|
27
|
-
01
|
|
28
|
-
02
|
|
29
|
-
03
|
|
30
|
-
04 [Quiet] College 重构前置查阅外部架构参考库 College/优化 Quiet (0 tok) 09-28 14:20
|
|
25
|
+
01 把登录 Token 改用 HttpOnly Cookie 存储 app · auth.ts 25m ago
|
|
26
|
+
02 检查网关超时后的降级重试边界 app · gateway.ts 3h ago
|
|
27
|
+
03 College 重构前置查阅外部架构参考库 College/优化 · notes.md 8d ago · quiet
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
Run `anchor done <num>` to tear off, or `anchor undo` to put back.
|
|
33
30
|
```
|
|
34
31
|
|
|
35
|
-
### 三大核心设计:小巧 · 自主 · 持久
|
|
36
|
-
|
|
37
|
-
1. **小巧 (Compact · 极简顺手 & 0 闲置 Token)**:
|
|
38
|
-
- 纯 TypeScript 实现(~20KB 产物,0 外部二进制依赖,不在仓库塞数据库,不开后台常驻进程)。
|
|
39
|
-
- 砍掉繁琐的四象限与打卡分类,回归一屏看清的优先级工程列表(`/anchor`、`/pin`、`/done 1`)。第 1 轮冷启动简要提醒 AI,第 2 轮起 **0 Token 损耗**。
|
|
40
|
-
2. **自主 (Autonomous · 智能路径识别 & 会话内实时核销)**:
|
|
41
|
-
- 即使你在别的目录随口记下一句任务,也会自动提取标题/描述里的文件与目录路径并绑定目标工程,下次切换到该目录时自动唤醒。
|
|
42
|
-
- **不等关闭终端**:会话内一旦执行 `git commit` 或通过测试命令(`verifyCommand`),哪怕没填 `files` 也能根据提交信息当场实时自动核销,状态栏 `⌖` 即刻更新。
|
|
43
|
-
3. **持久 (Persistent · 永不莫名丢任务)**:
|
|
44
|
-
- 独立托管于全局 `~/.anchor/state.json`,项目 Git 树 100% 纯净。
|
|
45
|
-
- **绝不因过期而静默删任务**:超过 7 天未触碰的任务自动转为 `[Quiet]` 静默省流态(不在无关会话塞 Prompt),但在 `/anchor` 面板中始终可见,可随时一键唤醒或在进入对应工程时自动激活。
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## 核心价值:为什么需要 Anchor?
|
|
50
|
-
|
|
51
|
-
使用终端编程智能体(Claude Code、Pi、Aider 等)结对开发时,开发者普遍面临三个具体痛点:
|
|
52
|
-
|
|
53
|
-
### 1. 终端一关即失忆(Session Amnesia)
|
|
54
|
-
按下 `Ctrl+C` 退出终端,Agent 内存中的上下文被清空。未完成的代码重构计划、临时交代的排期与多步约定随之丢失。
|
|
55
|
-
|
|
56
|
-
### 2. TODO.md 污染 Git 且拖垮上下文
|
|
57
|
-
在工程根目录下维护 `TODO.md` 或 `AGENTS.md`:
|
|
58
|
-
- 会产生大量 `update todo`、`fix checklist` 之类的 Git 杂质提交;
|
|
59
|
-
- **每一轮对话都要把几十行陈旧清单塞入 System Prompt**,白白消耗大量 Token 预算,还会分散模型对当前核心代码的注意力。
|
|
60
|
-
|
|
61
|
-
### 3. 告别手动打勾与清单发霉
|
|
62
|
-
写完代码后,工程师极少会专程打开 Markdown 逐个打勾。未勾选的旧任务烂在仓库里,越积越多。
|
|
63
|
-
现存的第三方方案走向了重型极端(例如 `beads` 往代码仓库塞入 200MB 的 Dolt SQL 数据库,`engram` 启动常驻后台的 Go 守护进程与向量检索库)。
|
|
64
|
-
|
|
65
|
-
**Anchor 采取了克制而轻量的工程解法**:
|
|
66
|
-
- **零仓库污染**:任务状态保存在全局主目录 `~/.anchor/state.json`,项目 Git 历史 100% 纯净;
|
|
67
|
-
- **0 闲置 Token 损耗**:第 1 轮冷启动注入任务,第 2 轮起保持 0 Token 稳态,绝不浪费推理预算;
|
|
68
|
-
- **语法安全 JIT 唤醒**:Agent 触碰相关代码文件时,以对应语言的单行安全注释精准唤醒,严格跳过 JSON、ENV 与锁文件;
|
|
69
|
-
- **自动核销与防误触抽屉**:代码提交命中任务描述或退出终端时自动核销;交互式面板提供防误触二级菜单。
|
|
70
|
-
|
|
71
32
|
---
|
|
72
33
|
|
|
73
|
-
##
|
|
34
|
+
## 为什么是一张电子便签,而不是 `TODO.md`?
|
|
74
35
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
└──────────────────────────────────────┬───────────────────────────────────────┘
|
|
79
|
-
│ 记录任务: anchor "重构鉴权为 HttpOnly Cookie"
|
|
80
|
-
▼
|
|
81
|
-
┌───────────────────────────────────────────────┐
|
|
82
|
-
│ [活跃期 ACTIVE] (首轮注入提示) │
|
|
83
|
-
│ - 底部状态栏指示: ⌖ 4 │
|
|
84
|
-
│ - 第 2 轮起完全脱离提示词 (0 Token 稳态) │
|
|
85
|
-
└───────┬───────────────────────────────┬───────┘
|
|
86
|
-
│ │
|
|
87
|
-
Git 提交命中 / │ │ 闲置时间衰减
|
|
88
|
-
触碰关联代码文件 ▼ ▼
|
|
89
|
-
┌──────────────────────────────┐ ┌────────────────────────────────┐
|
|
90
|
-
│ [多语言语法安全 JIT 唤醒] │ │ [休眠期 SLEEPING] (0 Token) │
|
|
91
|
-
│ 触碰代码时注入语言对应注释 │ │ 全局安全封存,不打扰当前心流, │
|
|
92
|
-
│ JSON/ENV 等格式绝对跳过 │ │ 触碰关联文件时重新唤醒 │
|
|
93
|
-
└──────────────┬───────────────┘ └────────────────┬───────────────┘
|
|
94
|
-
│ │
|
|
95
|
-
退出自动提议 / Commit 命中 │ 静默定期清理
|
|
96
|
-
▼ ▼
|
|
97
|
-
┌──────────────────────────────┐ ┌────────────────────────────────┐
|
|
98
|
-
│ [已完成归档 SETTLED] │ │ [超期淘汰 GRAVEYARD] │
|
|
99
|
-
│ 追加写入 archive.jsonl 归档 │ │ 超期自动清理,防止陈旧堆积 │
|
|
100
|
-
│ 从当前活跃上下文中物理移除 │ │ │
|
|
101
|
-
└──────────────────────────────┘ └────────────────────────────────┘
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
| 动作 / 场景 | 你做什么 | Anchor 幕后动作 | AI 得到什么 | 适用场景 |
|
|
105
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
106
|
-
| **立项锚定** | 终端输入 `/pin "重构鉴权"` | 原子写入 `~/.anchor/state.json` | 首轮注入任务指引,第 2 轮起脱敏隐形(0 Token) | 跨会话记录多步计划与长效目标 |
|
|
107
|
-
| **代码触碰** | 正常阅读或修改代码 | 自动匹配关联文件后缀 | 注入对应语法的单行安全注释,绝不破坏代码 | Agent 触碰相关业务模块时 |
|
|
108
|
-
| **代码提交** | `git commit -m "feat: ..."` | 借助 `Intl.Segmenter` 分词匹配 | 自动核销任务并归档至 `archive.jsonl` | 完成开发里程碑,自动打勾 |
|
|
109
|
-
| **会话退出** | 输入 `exit` 或退出终端 | 扫描已改动文件与活跃任务的交集 | 弹出单键核销确认:`[Enter 归档] / [Esc 保留]` | 结束会话,零遗漏确认 |
|
|
110
|
-
|
|
111
|
-
---
|
|
36
|
+
深夜写代码准备关机时,你突然想到 *“明天得把 `src/auth.ts` 里的 Token 改成 Cookie”*。这时候你不需要一套沉重的项目管理系统:
|
|
37
|
+
- 往仓库里塞 `TODO.md` 会弄脏 `git status`,而且每一轮对话都在白白消耗上下文 Token;
|
|
38
|
+
- 直接关掉终端,AI 的内存记忆瞬间清空。
|
|
112
39
|
|
|
113
|
-
|
|
40
|
+
**Anchor 就是贴在终端显示器边框上的一张电子便签** —— 独立保存在全局 `~/.anchor/state.json`(全工程仅 4 个核心源码文件、0 外部依赖、20KB 体积),只做三件有小巧思的事:
|
|
114
41
|
|
|
115
|
-
### 1.
|
|
116
|
-
|
|
42
|
+
### 1. 随手一贴,自动认路(无需填表打标签)
|
|
43
|
+
直接用大白话敲一句:
|
|
117
44
|
```text
|
|
118
|
-
|
|
119
|
-
├── state.json # 活跃与休眠任务状态表 (< 10KB,原子写入)
|
|
120
|
-
├── state.lock # 跨进程纯同步原子排他锁 (零依赖)
|
|
121
|
-
├── archive.jsonl # 已完成归档的历史账本 (追加写入)
|
|
122
|
-
└── graveyard.jsonl # 超期脱落墓地账本 (追加写入)
|
|
45
|
+
/pin 把 src/auth.ts 的登录改用 HttpOnly Cookie
|
|
123
46
|
```
|
|
124
|
-
|
|
125
|
-
* **死锁自动熔断回收**:若持有锁的进程已终止或超时(5000ms),系统自动安全回收重占;
|
|
126
|
-
* **原子写入与崩溃自愈**:写入临时文件后执行原子重命名,带 Windows NTFS 自旋重试。损坏文件自动备份为 `state.corrupt.${timestamp}.json` 并安全回退。
|
|
47
|
+
Anchor 会自动从这句话里认出文件名 `src/auth.ts`(或诸如 `D:/College/...` 的目录路径),自动绑定到对应工程。下次打开终端时,输入框上方安静浮现小便签(`⌖ 1 note`),你一开始打字它就自动收起,绝不挡视线。
|
|
127
48
|
|
|
128
|
-
### 2.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
* `ℹ View details & associated files`:直接在终端查看完整任务描述、目标日期、关联文件列表与自动化物理验证命令;
|
|
132
|
-
* `↩ Cancel`:安全取消退出,避免直接敲击回车意外核销未完成事项。
|
|
49
|
+
### 2. 碰文件时顺手递纸条(平时 0 Token)
|
|
50
|
+
会话第 1 轮冷启动时向 AI 交代一眼当前便签,从第 2 轮起 **0 Token 损耗**。
|
|
51
|
+
只有当 AI 真正读取或修改 `src/auth.ts` 时,Anchor 才会在文件内容末尾顺手附上 1 行合法注释(`// ⌖ Note #1: 把 src/auth.ts 的登录改用 HttpOnly Cookie`),遇到 `.json`、`.env` 等文件则严格跳过。
|
|
133
52
|
|
|
134
|
-
|
|
135
|
-
在仪表盘字符串视觉列宽截断算法中,自动清除省略号前紧邻的孤立未闭合开括号(`(`、`[`、`{`、`(`、`【`),消除标点破裂与视觉毛刺。
|
|
53
|
+
*(超过 7 天没动过的旧便签会自动加上 `· quiet` 静默省流标记,不在无关工程首轮刷存在感,但在 `/anchor` 列表里永远都在,绝不莫名消失;一旦你进入对应工程目录就会自动唤醒。)*
|
|
136
54
|
|
|
137
|
-
###
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* **语法安全严格跳过**:根据文件扩展名动态生成合法单行注释(`//`, `#`, `<!-- -->`, `/* */`)。对 **JSON、ENV、Lockfile 与二进制文件坚决返回 null 严格跳过**,杜绝破坏代码解析器。
|
|
141
|
-
|
|
142
|
-
### 5. 冷启动前置物理执行验证
|
|
143
|
-
任务声明 `verifyCommand` 时,系统在启动时自动执行该物理命令。验证通过的任务即刻就地核销,释放认知带宽。
|
|
55
|
+
### 3. 提交代码自动撕便签(支持一键反悔)
|
|
56
|
+
当你或 AI 执行 `git commit -m "feat: 登录改用 HttpOnly Cookie"` 时,Anchor 发现提交说明与便签吻合,当场自动帮你把这张便签撕掉归档(`⌖ Auto-torn off #1`)。
|
|
57
|
+
撕错了?敲一下 `/anchor undo` 就能原封不动贴回来。
|
|
144
58
|
|
|
145
59
|
---
|
|
146
60
|
|
|
147
61
|
## 常用命令
|
|
148
62
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
anchor
|
|
153
|
-
|
|
154
|
-
anchor
|
|
155
|
-
anchor done
|
|
156
|
-
anchor undo # 撤销上一次完成归档
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Pi 扩展内交互命令
|
|
160
|
-
| 命令 | 说明 |
|
|
161
|
-
| :--- | :--- |
|
|
162
|
-
| `/pin <任务描述> [--due tomorrow]` | 快速立项当前工程的跨会话任务(支持指定到期日) |
|
|
163
|
-
| `/anchor` | 在终端内弹出全景交互式任务仪表盘 |
|
|
164
|
-
| `/done <编号>` 或 `/anchor done <编号>` | 按列表行号(`1`)或 ID(`anc-1`)直接完成核销 |
|
|
165
|
-
| `/anchor undo` | 撤销上一次归档的任务 |
|
|
166
|
-
| 状态栏 `⌖ N` | 底部常驻微标签,有活跃任务时显示数量,无任务时 100% 静默隐形 |
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## 横向技术对比
|
|
171
|
-
|
|
172
|
-
| 核心维度 | `gastownhall/beads` | `Gentleman-Programming/engram` | `TODO.md` / `AGENTS.md` | **Anchor ⚓** |
|
|
173
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
174
|
-
| **架构拓扑** | 分布式 SQL 图谱 | 向量检索与 SQLite 常驻进程 | 静态 Markdown 文件 | **轻量解耦协议 + 单文件原子状态机** |
|
|
175
|
-
| **仓库整洁度** | 塞入 200MB Dolt 数据库 | 系统常驻守护进程 | 频繁制造 Git 提交杂质 | **100% 零仓库污染 (`~/.anchor/`)** |
|
|
176
|
-
| **每轮 Token 开销** | 中高频次全量注入 | 高 (全量提示词召回) | 严重 (陈旧清单持续膨胀) | **0 Token 稳态 (仅在触碰文件时 JIT 唤醒)** |
|
|
177
|
-
| **语法注入安全** | 无安全机制 | 原始文本直接拼接 | 静态未格式化文本 | **多语言语法安全注释,JSON/ENV 严格跳过** |
|
|
178
|
-
| **任务结算与核销** | 手动命令 `close` | 无自动结算机制 | 人工修改文本打勾 | **Git Commit 自动识别 + 退出前一键核销** |
|
|
179
|
-
| **并发读写安全** | SQL 事务排他锁 | 守护进程单点调度 | Git 合并冲突频繁 | **零外部依赖 Node 原生原子排他文件锁** |
|
|
180
|
-
| **启动性能损耗** | 较重 CLI 引导 | Go 进程通信延迟 | 无损耗 | **< 90ms 轻量打包生产产物** |
|
|
181
|
-
| **底层运行依赖** | 外部 Dolt 二进制 | 外部 Go 二进制 | 无依赖 | **零原生二进制外部依赖 (纯 TypeScript)** |
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 作者手记 (Author's Note)
|
|
186
|
-
|
|
187
|
-
写 Anchor 的最初冲动,来自于我用终端 AI 编程智能体结对开发时经历的一场持续阵痛:看着项目根目录下的 `TODO.md` 与 `AGENTS.md` 在 Git 历史里发霉。
|
|
188
|
-
|
|
189
|
-
很多时候,写完一段代码已经是深夜,跨会话未完成的任务随手记在项目的 Markdown 里,看起来省事。然而几个月下来,两点物理摩擦让我极其痛苦:
|
|
190
|
-
1. 每一轮对话交互,AI 都要把陈旧的任务清单整段塞进系统提示词,白白烧掉几十上百行 Token,还会分散模型对当前正在修改的代码的注意力;
|
|
191
|
-
2. 团队多人协作或分支合并时,这类任务清单文件频发 Git 合并冲突,无端污染了核心代码的提交历史。
|
|
192
|
-
|
|
193
|
-
调研现存工具时,我发现社区给出的方案走向了沉重的极端:为了管理几个简单的任务,有的方案直接在代码仓库根目录塞入一个超过 200MB 的 Dolt SQL 关系型数据库(`beads`),有的方案在后台常驻一个用 Go 编写的 SQLite 守护进程并做持续向量检索(`engram`)。一个任务追踪工具消耗的系统资源与认知负担,甚至超过了开发者正在编写的业务代码本身。
|
|
194
|
-
|
|
195
|
-
这颠倒了工具与生产者的关系。
|
|
196
|
-
|
|
197
|
-
Anchor 选择了一条极度克制的工程路径:把状态移出代码仓库,托管在用户主目录下的单文件轻量状态表(`~/.anchor/state.json`);首轮对话注入冷启动上下文,第 2 轮起保持 0 Token 损耗;通过语言对应的语法安全注释在触碰代码时精准唤醒,并在代码提交或会话退出时自动核销。
|
|
198
|
-
|
|
199
|
-
在 v0.2.1 中,我们还为 `/anchor` 增加了防误触详情面板,按回车可以从容查看关联文件与执行命令,并在排版算法中消除了开括号截断毛刺。
|
|
200
|
-
|
|
201
|
-
希望 Anchor 能让你的代码仓库保持干净,把专注力还给代码本身。
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## 质量验证与构建
|
|
206
|
-
|
|
207
|
-
基于严格 TypeScript 与 Node 原生测试运行器,保持 100% 标准库覆盖:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
npm run typecheck # TypeScript 严格类型检查 (0 错误)
|
|
211
|
-
npm test # 全套自动化单元测试 (34/34 全绿通过)
|
|
212
|
-
npm run build # tsup 双格式打包 (ESM/CJS) 与 .d.ts 类型生成
|
|
213
|
-
```
|
|
63
|
+
| 场景 | 命令 | 作用 |
|
|
64
|
+
| :--- | :--- | :--- |
|
|
65
|
+
| **Pi 终端内** | `/pin <内容>` | 随手贴一张新便签(也可以直接对 AI 说 *“记一下明天…”*) |
|
|
66
|
+
| **Pi 终端内** | `/anchor` | 打开便签列表,回车即可撕掉(Done)或查看详情 |
|
|
67
|
+
| **Pi 终端内** | `/done 1` | 直接按编号撕掉第 1 张便签 |
|
|
68
|
+
| **Pi 终端内** | `/anchor undo` | 把刚撕掉的便签重新贴回来 |
|
|
69
|
+
| **系统命令行** | `anchor` / `anchor "<内容>"` / `anchor done 1` | 不开 Pi 也能随时在终端查看或贴便签 |
|
|
214
70
|
|
|
215
71
|
---
|
|
216
72
|
|
package/assets/hero-en.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 390" width="840" height="390">
|
|
2
2
|
<defs>
|
|
3
3
|
<filter id="shadow" x="-5%" y="-5%" width="110%" height="115%" filterUnits="userSpaceOnUse">
|
|
4
4
|
<feDropShadow dx="0" dy="12" stdDeviation="16" flood-color="#000000" flood-opacity="0.45" />
|
|
@@ -10,72 +10,56 @@
|
|
|
10
10
|
</defs>
|
|
11
11
|
|
|
12
12
|
<g filter="url(#shadow)">
|
|
13
|
-
<rect x="20" y="15" width="800" height="
|
|
13
|
+
<rect x="20" y="15" width="800" height="350" rx="12" fill="#1e2326" stroke="#343f44" stroke-width="1.2" />
|
|
14
14
|
<path d="M 20,27 A 12,12 0 0,1 32,15 L 808,15 A 12,12 0 0,1 820,27 L 820,52 L 20,52 Z" fill="url(#headerGrad)" stroke="#343f44" stroke-width="1" />
|
|
15
15
|
<line x1="20" y1="52" x2="820" y2="52" stroke="#2d353b" stroke-width="1" />
|
|
16
16
|
<circle cx="42" cy="33.5" r="5.5" fill="#e67e80" />
|
|
17
17
|
<circle cx="60" cy="33.5" r="5.5" fill="#dbbc7f" />
|
|
18
18
|
<circle cx="78" cy="33.5" r="5.5" fill="#a7c080" />
|
|
19
19
|
<text x="420" y="38" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="12" font-weight="500" fill="#859289">
|
|
20
|
-
⌖ anchor
|
|
20
|
+
⌖ anchor · A Digital Sticky Note for Your Terminal
|
|
21
21
|
</text>
|
|
22
22
|
</g>
|
|
23
23
|
|
|
24
24
|
<g font-family="'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace" font-size="13" xml:space="preserve">
|
|
25
|
-
<text x="45" y="
|
|
26
|
-
<tspan fill="#a7c080" font-weight="bold">~/Workspace</tspan>
|
|
25
|
+
<text x="45" y="86">
|
|
26
|
+
<tspan fill="#a7c080" font-weight="bold">~/Workspace/app</tspan>
|
|
27
27
|
<tspan fill="#7fbbb3"> ❯ </tspan>
|
|
28
28
|
<tspan fill="#d3c6aa" font-weight="bold">anchor</tspan>
|
|
29
29
|
</text>
|
|
30
30
|
|
|
31
|
-
<text x="45" y="
|
|
32
|
-
<tspan fill="#7fbbb3" font-weight="bold">⌖
|
|
33
|
-
<tspan fill="#859289">(3 active, 1 quiet · 0 repo clutter · 0 idle tokens):</tspan>
|
|
31
|
+
<text x="45" y="120">
|
|
32
|
+
<tspan fill="#7fbbb3" font-weight="bold">⌖ Notes (3):</tspan>
|
|
34
33
|
</text>
|
|
35
34
|
|
|
36
|
-
<text x="45" y="
|
|
35
|
+
<text x="45" y="154">
|
|
37
36
|
<tspan fill="#859289"> 01 </tspan>
|
|
38
|
-
<tspan fill="#
|
|
39
|
-
<tspan fill="#
|
|
40
|
-
<tspan fill="#
|
|
41
|
-
<tspan fill="#e67e80" font-weight="bold">Today </tspan>
|
|
42
|
-
<tspan fill="#7a8478">Today 10:02</tspan>
|
|
37
|
+
<tspan fill="#d3c6aa">Switch session token to HttpOnly cookie </tspan>
|
|
38
|
+
<tspan fill="#7fbbb3">app · auth.ts </tspan>
|
|
39
|
+
<tspan fill="#7a8478">25m ago</tspan>
|
|
43
40
|
</text>
|
|
44
41
|
|
|
45
42
|
<text x="45" y="182">
|
|
46
43
|
<tspan fill="#859289"> 02 </tspan>
|
|
47
|
-
<tspan fill="#
|
|
48
|
-
<tspan fill="#
|
|
49
|
-
<tspan fill="#
|
|
50
|
-
<tspan fill="#dbbc7f">Tomorrow </tspan>
|
|
51
|
-
<tspan fill="#7a8478">Yesterday 21:34</tspan>
|
|
44
|
+
<tspan fill="#d3c6aa">Double-check rate limit fallback on timeout </tspan>
|
|
45
|
+
<tspan fill="#7fbbb3">app · gateway.ts </tspan>
|
|
46
|
+
<tspan fill="#7a8478">3h ago</tspan>
|
|
52
47
|
</text>
|
|
53
48
|
|
|
54
|
-
<text x="45" y="
|
|
49
|
+
<text x="45" y="210">
|
|
55
50
|
<tspan fill="#859289"> 03 </tspan>
|
|
56
|
-
<tspan fill="#
|
|
57
|
-
<tspan fill="#
|
|
58
|
-
<tspan fill="#
|
|
59
|
-
<tspan fill="#a7c080">In 2d </tspan>
|
|
60
|
-
<tspan fill="#7a8478">Today 10:02</tspan>
|
|
51
|
+
<tspan fill="#859289">Read external architecture notes first </tspan>
|
|
52
|
+
<tspan fill="#7a8478">College/优化 · notes.md </tspan>
|
|
53
|
+
<tspan fill="#56635f">8d ago · quiet</tspan>
|
|
61
54
|
</text>
|
|
62
55
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<tspan fill="#859289">Review external architecture reference notes </tspan>
|
|
67
|
-
<tspan fill="#7a8478"> College/Opt </tspan>
|
|
68
|
-
<tspan fill="#7a8478">Quiet (0 tok) </tspan>
|
|
69
|
-
<tspan fill="#56635f">09-28 14:20</tspan>
|
|
70
|
-
</text>
|
|
71
|
-
|
|
72
|
-
<rect x="45" y="274" width="750" height="58" rx="6" fill="#232a2e" stroke="#3a464c" stroke-width="1" />
|
|
73
|
-
<text x="62" y="298" fill="#a7c080" font-weight="bold">⚡ Real-Time Autonomous Settlement (on `git commit` or passing `verifyCommand`):</text>
|
|
74
|
-
<text x="62" y="319" fill="#d3c6aa"> git commit -m "feat(auth): migrate auth to HttpOnly cookies" ➔ ⌖ Auto-settled #anc-1</text>
|
|
56
|
+
<rect x="45" y="242" width="750" height="58" rx="6" fill="#232a2e" stroke="#3a464c" stroke-width="1" />
|
|
57
|
+
<text x="62" y="266" fill="#dbbc7f">1. Stick a note: /pin Switch session token to HttpOnly cookie in src/auth.ts</text>
|
|
58
|
+
<text x="62" y="287" fill="#a7c080">2. Auto-tear off: git commit -m "feat: switch session token to HttpOnly cookie" ➔ ⌖ Torn off #1</text>
|
|
75
59
|
|
|
76
|
-
<text x="45" y="
|
|
60
|
+
<text x="45" y="334" fill="#7a8478">
|
|
77
61
|
<tspan> Commands: </tspan>
|
|
78
|
-
<tspan fill="#7fbbb3" font-weight="bold">`/pin <
|
|
62
|
+
<tspan fill="#7fbbb3" font-weight="bold">`/pin <note>`</tspan>
|
|
79
63
|
<tspan> · </tspan>
|
|
80
64
|
<tspan fill="#7fbbb3" font-weight="bold">`/anchor`</tspan>
|
|
81
65
|
<tspan> · </tspan>
|