sphica 0.6.47 → 0.6.49
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +3 -1
- package/dist/capture.js +14 -9
- package/dist/cli.js +431 -10
- package/dist/deliver.js +45 -16
- package/dist/git-worker.js +43 -16
- package/dist/mcp-record.js +250 -137
- package/dist/mcp.js +1705 -1531
- package/package.json +1 -1
- package/skills/export/SKILL.md +3 -1
- package/skills/fields/SKILL.md +3 -2
- package/skills/glean/SKILL.md +8 -1
- package/skills/harvest/SKILL.md +3 -1
- package/skills/trace/SKILL.md +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sphica",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.49",
|
|
4
4
|
"description": "Records Claude Code and Codex sessions on your machine and keeps past implementation and decisions, with their sources, for your agent to find.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/skills/export/SKILL.md
CHANGED
|
@@ -38,7 +38,9 @@ Pass the repository root as `cwd` to every tool.
|
|
|
38
38
|
(CLAUDE.md, AGENTS.md, `.github/copilot-instructions.md`, a `SKILL.md`, anything under `.claude`, `.agents`, `.codex`, `.cursor`, a `skills` directory, or a plugin manifest directory) and Git's
|
|
39
39
|
own folder are refused
|
|
40
40
|
4. **Call `export`** with the chosen keys and the path. When it answers that nothing was exported, tell the owner the reasons it gives and
|
|
41
|
-
stop; write nothing.
|
|
41
|
+
stop; write nothing. A document has to fit one reply (about 29 KB): when it says the document would be over that, the owner picks
|
|
42
|
+
fewer decisions for this file, or several files; when it says one decision is over that on its own, that decision cannot be
|
|
43
|
+
exported, and `read` shows it. Otherwise its first line names the path and says whether it is a new file or replaces an existing one, and every line
|
|
42
44
|
after it is the document
|
|
43
45
|
5. **Show the owner the whole document**, and when it replaces a file, that file's current content too. Say that the quoted words, which may
|
|
44
46
|
include other people's comments, go into a file others can read. Ask whether to write it (AskUserQuestion in Claude Code). Without a clear
|
package/skills/fields/SKILL.md
CHANGED
|
@@ -19,8 +19,9 @@ on them, filled only when the conversation says it: trace saves a value only wit
|
|
|
19
19
|
|
|
20
20
|
## Flow
|
|
21
21
|
|
|
22
|
-
1. Call `fields` with the repository root as `cwd
|
|
23
|
-
|
|
22
|
+
1. Call `fields` with the repository root as `cwd`. A long table comes a page at a time: while a reply ends with a line that
|
|
23
|
+
names an `after`, call `fields` again with that `after`, until a reply ends without one
|
|
24
|
+
2. Show the table as it is, every page's rows under one header. Do not add, drop, or reword rows
|
|
24
25
|
3. When the owner asks how to add a field: they say it in a session (for example, "record the affected tenant as tenant on decisions"), and
|
|
25
26
|
the next `/sphica:trace` of that session saves it with their words. A field cannot be defined again or changed while fields are a trial
|
|
26
27
|
|
package/skills/glean/SKILL.md
CHANGED
|
@@ -79,8 +79,15 @@ read tools `search` and `read`. Pass the repository root as `cwd` to every tool.
|
|
|
79
79
|
| `resolve_conflict` | Ends an unresolved conflict between `unit` and `with`, citing the owner's words (`reason_source`, `reason_quote`). Until then each is held back from being shown on its own, except the owner's decision, which only another record the owner adopted holds back |
|
|
80
80
|
| `withdraw` | Withdraws a record the owner says no longer holds, citing the owner's words. A superseded record is refused: withdraw the record that replaced it |
|
|
81
81
|
|
|
82
|
+
Words that give an op its authority have to be their writer's own: the `quote` of `adopt`, `replace_anchor`, and `retire_anchor`, and the
|
|
83
|
+
`reason_quote` of `retract_evidence`, `retract_adoption`, `resolve_conflict`, and `withdraw`. Check refuses a quote that touches a `>` line
|
|
84
|
+
or a fenced code block, or that sits wholly inside quotation marks on its line or right between two of them (straight or curly quotes,
|
|
85
|
+
Japanese corner brackets, backticks, apostrophes): quote more of the owner's own words around it instead. Evidence (`add_evidence`) and the `quote` that says which piece to retract may still be quoted text.
|
|
86
|
+
Check reads where the words sit, not what they mean: whether they settle this record is yours to judge.
|
|
87
|
+
|
|
82
88
|
Every op carries the `revision` read printed; a record changed since is refused, so read it again. To correct what a record says, write a new
|
|
83
|
-
record in `units` (trace's shape, keys saved as `glean:<key>`) with `supersedes` naming the old one (citing the owner's words, a maintainer's, or the owner's session, not other people's text
|
|
89
|
+
record in `units` (trace's shape, keys saved as `glean:<key>`) with `supersedes` naming the old one (citing the owner's words, a maintainer's, or the owner's session, not other people's text: words that are in the source, and not only a
|
|
90
|
+
quotation there); records are never rewritten.
|
|
84
91
|
|
|
85
92
|
## When a source turns up for an unsourced record
|
|
86
93
|
|
package/skills/harvest/SKILL.md
CHANGED
|
@@ -54,7 +54,9 @@ and only by saying so: "we rejected yarn", "let's keep SQLite". check refuses th
|
|
|
54
54
|
`sphica init` bound. It adopts like the owner's words anywhere, even where their association is CONTRIBUTOR
|
|
55
55
|
- The merge only shows the code went in. It is evidence for an `implementation` (with the commit message, `role: "implements"`), never adoption
|
|
56
56
|
- A resolved review thread is not agreement either
|
|
57
|
-
- `supersedes` and `conflicts` retire or dispute a saved record, so they need the owner's or a maintainer's words among the unit's evidence or adoption
|
|
57
|
+
- `supersedes` and `conflicts` retire or dispute a saved record, so they need the owner's or a maintainer's words among the unit's evidence or adoption.
|
|
58
|
+
Those words have to be in the source and be the writer's own: a maintainer quoting someone else (a `>` line, a code block, words wholly
|
|
59
|
+
inside quotation marks or right between two of them) does not count, and neither does a quote that is not there
|
|
58
60
|
|
|
59
61
|
## What to record
|
|
60
62
|
|
package/skills/trace/SKILL.md
CHANGED
|
@@ -100,14 +100,14 @@ The `"..."` stands for the other language's words: in this example, `"データ
|
|
|
100
100
|
| `stance` | Decisions and constraints only: `do`, `dont`, or `defer`. A deferral may add `revisit_when` |
|
|
101
101
|
| `text`, `why`, `scope_note` | In the conversation's language. `text` states the record in one sentence; `why` is the reason given, not one you infer |
|
|
102
102
|
| `evidence` | Required. `source` is a ref from context, `quote` is copied **exactly** from that message (a phrase is enough). `role`: `states`, `proposes`, `rejects`, `explains`, `implements`, `decides` (the AI's reply deciding it; see below). When the owner reports what someone else said, add `reported_speaker` |
|
|
103
|
-
| `options` | Options compared, with `outcome` `chosen` / `rejected` / `deferred` / `proposed` and the `why` given. Evidence is optional per option. A rejected option may add `reconsider_when` (when it would be worth looking at again) with `reconsider_quote` (`source`, `quote`): **only a condition the owner stated, quoting the owner's words**. Never infer one, and never take it from the AI's suggestion or from someone else's words the owner passes on. A `reconsider_quote` not found in the message refuses the save (unlike other quotes, which quarantine the record) |
|
|
104
|
-
| `adoption` | Decisions and constraints only: the words that settle it. The owner's message adopts it as the owner's decision. The AI's own reply adopts it as an AI's decision only under the rules below. The AI proposing something and the owner not objecting is not adoption; leave it out and the record stays a candidate. Words the owner quoted (`>` lines)
|
|
103
|
+
| `options` | Options compared, with `outcome` `chosen` / `rejected` / `deferred` / `proposed` and the `why` given. Evidence is optional per option. A rejected option may add `reconsider_when` (when it would be worth looking at again) with `reconsider_quote` (`source`, `quote`): **only a condition the owner stated, quoting the owner's words**. Never infer one, and never take it from the AI's suggestion or from someone else's words the owner passes on (a `>` line, a code block, or words wholly inside quotation marks refuse the save). A `reconsider_quote` not found in the message refuses the save (unlike other quotes, which quarantine the record) |
|
|
104
|
+
| `adoption` | Decisions and constraints only: the words that settle it. The owner's message adopts it as the owner's decision. The AI's own reply adopts it as an AI's decision only under the rules below. The AI proposing something and the owner not objecting is not adoption; leave it out and the record stays a candidate. Words the owner quoted (`>` lines), pasted in a code block, or put wholly inside quotation marks on a line (straight or curly quotes, Japanese corner brackets, backticks) are someone else's and never adopt, and neither do words that stand right between two such marks or apostrophes: quote more of the owner's own words around them. Check reads where the words sit, not what they mean |
|
|
105
105
|
| `anchors` | Only where the record has a code location: `path` relative to the repository root, `symbol` when there is one, `role` `applies_to` (where it applies) or `evidence` (code that shows it was done; add `commit` when known). When an adopted decision or constraint governs how one existing code location behaves (keeping it as it is included), give it `applies_to` there, even if this work did not change it: delivery shows it when that file is read or edited. Confirm the path in the repository; do not infer one from a broad topic, and leave it unanchored when several places are plausible. `no_code_surface` may say why there is none. A `symbol` must be a name in the code, never a key or a value Sphica masks: such a symbol is dropped and the anchor keeps only its path (save reports it) |
|
|
106
106
|
| `aliases` | 8 to 12 short search words in **both Japanese and English** a later reader might type: synonyms, the other language's words, abbreviations. Search only; never evidence. Not broad words that match everything (`code`, `fix`, `update`) |
|
|
107
107
|
| `supersedes` | The key of a live record this one replaces (context lists them). The old one is marked superseded, never deleted |
|
|
108
108
|
| `conflicts` | Keys of live records this one contradicts without replacing them. Until resolved, both are held back from automatic injection, except the owner's decision, which only another record the owner adopted holds back |
|
|
109
109
|
| `work` | The current work status, optional. The same `key` updates it |
|
|
110
|
-
| `field_defs` | Top level, beside `units`. Only when the owner said in this session to keep a field on records: `name` (a lowercase letter, then lowercase letters, digits, `_`; at most 40), `type` (`text`, `enum`, `integer`, `date`), `label`, `description`, `enum` (1 to 30 distinct allowed values, only for `enum`), `kinds` (the unit kinds it applies to; empty means every kind), and `quote` of **the owner's** words defining it. A field context already lists cannot be defined again |
|
|
110
|
+
| `field_defs` | Top level, beside `units`. Only when the owner said in this session to keep a field on records: `name` (a lowercase letter, then lowercase letters, digits, `_`; at most 40), `type` (`text`, `enum`, `integer`, `date`), `label`, `description`, `enum` (1 to 30 distinct allowed values, only for `enum`), `kinds` (the unit kinds it applies to; empty means every kind), and `quote` of **the owner's** words defining it (their own, not a quotation inside their message). A field context already lists cannot be defined again |
|
|
111
111
|
| `fields` | On a unit, only for fields context lists or this record's `field_defs` defines: `name`, `value`, and `quote` of the words that say it. The value must be written in the quote as it is: an `integer` whole (not the `95` of `p95`, not the `1` of `1.5` or `1,000`; `1,000` is `1000`), a `date` as `YYYY-MM-DD`, an `enum` value exactly, and a date or enum value on its own (not the `no` of `not`). When no message says the value, leave the field out; never infer one |
|
|
112
112
|
|
|
113
113
|
A field value that breaks these rules refuses the whole save, like a `reconsider_quote` not found: fix it or leave the field out.
|