@freetesh/zeno 0.8.0 → 0.9.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/.claude-plugin/plugin.json +1 -1
- package/README.md +10 -1
- package/cli/dist/checks/index.js +2 -0
- package/cli/dist/checks/sources.js +39 -0
- package/package.json +1 -1
- package/skills/weigh/SKILL.md +55 -19
- package/standards/agent-contract.md +6 -0
- package/standards/constitution.md +12 -1
- package/standards/wiki-schema.md +17 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "zeno",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"description": "Keeps your domain knowledge and AI rules local and enforces them, so Claude hallucinates less.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ritesh Firodiya",
|
package/README.md
CHANGED
|
@@ -19,6 +19,15 @@ It has two halves that read the same config:
|
|
|
19
19
|
cost vs value, and the write-less ladder, then answers **DO IT**, **DO IT
|
|
20
20
|
DIFFERENTLY** or **PUSH BACK** with citations. Push back stops work until you
|
|
21
21
|
give a reason; overrides are logged and feed `zeno learn`.
|
|
22
|
+
- **No assumptions.** A request is not a fact. Each claim in it ("users want
|
|
23
|
+
this", "it is slow") is checked against the repo and its data sources and
|
|
24
|
+
marked backed or not. Work that rests on an assumption stops until you agree
|
|
25
|
+
to written, numbered terms. Replies use plain words.
|
|
26
|
+
- **Your data sources, your tools.** zeno has no connectors. A repo describes
|
|
27
|
+
each tool that holds its data (Sentry, Datadog, Snowflake) on a `SOURCE.*`
|
|
28
|
+
wiki page that names the MCP server, skill or CLI that reads it. The gate
|
|
29
|
+
queries it, read-only, to back or reject a claim, and `zeno check` fails a
|
|
30
|
+
source page that does not say how to read it.
|
|
22
31
|
- **Knowledge that is found, not remembered.** Every repo's `.context/wiki` and
|
|
23
32
|
feature board is indexed with [QMD](https://github.com/tobi/qmd) (local hybrid
|
|
24
33
|
search). Claude is told to search before answering.
|
|
@@ -168,7 +177,7 @@ your own.
|
|
|
168
177
|
|
|
169
178
|
## Evals
|
|
170
179
|
|
|
171
|
-
`evals/` runs
|
|
180
|
+
`evals/` runs nine requests against a fixture product (`evals/fixtures/streaks`)
|
|
172
181
|
with and without the plugin, each in a sandbox seeded with the fixture and a
|
|
173
182
|
local QMD index:
|
|
174
183
|
|
package/cli/dist/checks/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { contextLayout } from "./context-layout.js";
|
|
|
4
4
|
import { staleCopies, standardsCopies } from "./copies.js";
|
|
5
5
|
import { commandChecks } from "./external.js";
|
|
6
6
|
import { metricsDefinitions } from "./metrics.js";
|
|
7
|
+
import { sources } from "./sources.js";
|
|
7
8
|
import { wikiFrontmatter } from "./wiki-frontmatter.js";
|
|
8
9
|
export const ALL_CHECKS = [
|
|
9
10
|
contextLayout,
|
|
@@ -13,5 +14,6 @@ export const ALL_CHECKS = [
|
|
|
13
14
|
staleCopies,
|
|
14
15
|
architecture,
|
|
15
16
|
metricsDefinitions,
|
|
17
|
+
sources,
|
|
16
18
|
commandChecks,
|
|
17
19
|
];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { parseFrontmatter } from "../lib/frontmatter.js";
|
|
4
|
+
import { wikiPages } from "./wiki-frontmatter.js";
|
|
5
|
+
// zeno has no connectors: a source page must say which MCP server, skill or CLI
|
|
6
|
+
// reads it, or the weigh gate cannot turn a claim into a fact.
|
|
7
|
+
const ACCESS = /^(mcp|skill|cli):\s*(\S+)/;
|
|
8
|
+
const HOW_TO_QUERY = /^## How to query\s*$/m;
|
|
9
|
+
function accessValue(body, id) {
|
|
10
|
+
const row = body.split("\n").find((line) => line.replace(/\s/g, "").startsWith(`|${id}.ACCESS|`));
|
|
11
|
+
return row ? (row.split("|")[2]?.trim() ?? "") : null;
|
|
12
|
+
}
|
|
13
|
+
export const sources = {
|
|
14
|
+
id: "sources",
|
|
15
|
+
module: "docs",
|
|
16
|
+
description: "each SOURCE.* page says how to read it (mcp, skill or a cli in doctor.tools) and has a How to query section",
|
|
17
|
+
run({ repo, config }) {
|
|
18
|
+
const tools = new Set(config.doctor.tools.map((tool) => tool.tool));
|
|
19
|
+
return wikiPages(repo).flatMap((file) => {
|
|
20
|
+
const { data, body } = parseFrontmatter(readFileSync(join(repo, file), "utf8"));
|
|
21
|
+
const id = String(data?.id ?? "");
|
|
22
|
+
if (data?.type !== "entity" || !id.startsWith("SOURCE."))
|
|
23
|
+
return [];
|
|
24
|
+
const findings = [];
|
|
25
|
+
const add = (message) => findings.push({ check: "sources", level: "error", file, message });
|
|
26
|
+
if (!HOW_TO_QUERY.test(body))
|
|
27
|
+
add("no `## How to query` section");
|
|
28
|
+
const access = accessValue(body, id);
|
|
29
|
+
const match = access === null ? null : ACCESS.exec(access);
|
|
30
|
+
if (access === null)
|
|
31
|
+
add(`no ${id}.ACCESS row — say how to read it`);
|
|
32
|
+
else if (!match)
|
|
33
|
+
add(`${id}.ACCESS is "${access}" — write mcp: <server>, skill: <name> or cli: <command>`);
|
|
34
|
+
else if (match[1] === "cli" && !tools.has(match[2]))
|
|
35
|
+
add(`cli ${match[2]} is not in doctor.tools — zeno doctor cannot report it missing`);
|
|
36
|
+
return findings;
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
};
|
package/package.json
CHANGED
package/skills/weigh/SKILL.md
CHANGED
|
@@ -19,7 +19,10 @@ product's `.claude/zeno.yaml` may tighten this under `weigh.trivial`.
|
|
|
19
19
|
|
|
20
20
|
1. **Restate the goal** in one line — what outcome the user wants, not the
|
|
21
21
|
mechanism they named. A named mechanism ("use library X", "move to Firebase")
|
|
22
|
-
is a proposal to weigh, not a given.
|
|
22
|
+
is a proposal to weigh, not a given. Then **list the claims** the request
|
|
23
|
+
makes or rests on: "users want it", "it will help retention", "it is
|
|
24
|
+
missing", "it is slow". The request is not a fact (C-14); each claim is
|
|
25
|
+
checked in step 4.
|
|
23
26
|
|
|
24
27
|
2. **Rules.** Run `zeno standards --constitution` for the principle titles
|
|
25
28
|
(zeno's and any the team added), and read the constitution files that
|
|
@@ -31,7 +34,7 @@ product's `.claude/zeno.yaml` may tighten this under `weigh.trivial`.
|
|
|
31
34
|
3. **Domain.** Search before you judge. Run `mcp__plugin_zeno_qmd__query` with
|
|
32
35
|
the goal in plain words, then the key nouns, scoped with `collections` to
|
|
33
36
|
this product's `<repo>-wiki` and `<repo>-features` (the names `zeno init`
|
|
34
|
-
gives them; add `pack-<name>` when the question is about a vendor's API). Other products' hits are noise here; step
|
|
37
|
+
gives them; add `pack-<name>` when the question is about a vendor's API). Other products' hits are noise here; step 5 is where
|
|
35
38
|
siblings are searched. Read the top hits with `mcp__plugin_zeno_qmd__get`. Look for: an ADR that already
|
|
36
39
|
decided this, a canonical value it would change, a concept it would break.
|
|
37
40
|
If qmd is unavailable, read `.context/wiki/index.md` and `decisions/`.
|
|
@@ -42,30 +45,41 @@ product's `.claude/zeno.yaml` may tighten this under `weigh.trivial`.
|
|
|
42
45
|
is **too-large** unless a decision page already approves it. Cite the rule
|
|
43
46
|
by its `name`.
|
|
44
47
|
|
|
45
|
-
4. **
|
|
48
|
+
4. **Claims.** Mark each claim from step 1 **backed**, **partly backed** or
|
|
49
|
+
**not backed**, with the fact and its source. Look in what step 3 read, the
|
|
50
|
+
code and `.context/raw/`. When that is not enough, look for a data source:
|
|
51
|
+
query qmd for `SOURCE` pages in this product's wiki. Each says what it holds,
|
|
52
|
+
how to read it (`mcp:`, `skill:` or `cli:`) and which claims it answers. If
|
|
53
|
+
one fits, run its query and follow the query rules in `wiki-schema.md`
|
|
54
|
+
("Data sources"): read only, one or two small queries, counts not people.
|
|
55
|
+
Save a result that decides the verdict to `.context/raw/`. If the tool is not
|
|
56
|
+
available, say so and leave the claim not backed. If no source fits, name
|
|
57
|
+
the kind of source that would answer it ("an analytics tool with weekly
|
|
58
|
+
active users"). Never mark a claim backed because the user said it again.
|
|
59
|
+
|
|
60
|
+
5. **Duplicates and conflicts.** Check `.context/features/` and `.context/tasks.md`
|
|
46
61
|
of this product, and the features collections of sibling products in qmd:
|
|
47
62
|
is this already planned, built, shelved, or in progress elsewhere? Would it
|
|
48
63
|
conflict with something in `## Now`?
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
6. **Cost vs value.**
|
|
51
66
|
- Size: **small** (1 file, < 50 lines) · **medium** (2–5 files, < 200 lines) ·
|
|
52
67
|
**large** (5+ files) · **too-large** (architecture change — split it).
|
|
53
68
|
- Ongoing cost: new dependency, new service bill, more to maintain, more to
|
|
54
69
|
test, store review risk.
|
|
55
70
|
- Value: name the user or the metric it moves (`metrics/definitions.yml` if
|
|
56
|
-
the product has one). If neither can be named, say "value unproven".
|
|
57
|
-
|
|
58
|
-
for where that data lives and query it rather than guess.
|
|
71
|
+
the product has one). If neither can be named, say "value unproven". A
|
|
72
|
+
value claim is checked like any other claim, in step 4.
|
|
59
73
|
- Evidence: say which evidence from `dev-methods.md` the work must leave — a
|
|
60
74
|
feature page, a failing test first, or a metric and snapshot.
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
7. **Write less.** Climb the ladder and stop at the first rung that works:
|
|
63
77
|
delete it → reuse something in this repo → reuse from a sibling product or
|
|
64
78
|
shared script → platform or standard library → an existing well-used package
|
|
65
79
|
→ fewer lines → new code. If the `ponytail` plugin is installed, follow its
|
|
66
80
|
ladder for this step.
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
8. **Too-large, or the user asked for a second opinion?** Then, and only then,
|
|
69
83
|
ask the `challenger` agent for an independent read. It costs tens of
|
|
70
84
|
thousands of tokens, so hand it what you already have: the request, the repo
|
|
71
85
|
path, your draft verdict, and every file and wiki page you read with one line
|
|
@@ -85,26 +99,48 @@ Why:
|
|
|
85
99
|
- <C-xx> <one line> — <file or wiki page cited>
|
|
86
100
|
- ...
|
|
87
101
|
Instead: <only for DO IT DIFFERENTLY — the cheaper or safer way>
|
|
102
|
+
Claims:
|
|
103
|
+
- "<claim>" — backed | partly backed | not backed — <fact and source, or what was searched>
|
|
104
|
+
Assumed: <every claim not backed, or "none">
|
|
88
105
|
Open questions: <only if a real ambiguity blocks a good answer>
|
|
89
106
|
```
|
|
90
107
|
|
|
91
108
|
- Every bullet under **Why** cites a principle ID and a source (a wiki page, ADR,
|
|
92
|
-
standard, feature or
|
|
93
|
-
|
|
94
|
-
- **DO IT**
|
|
109
|
+
standard, feature, file or saved query result). A reason with no source is an
|
|
110
|
+
opinion: drop it, or list it under **Assumed**.
|
|
111
|
+
- **DO IT** only when **Assumed** is "none". Proceed with the work in the same
|
|
112
|
+
turn.
|
|
95
113
|
- **DO IT DIFFERENTLY** → proceed with the *Instead* version only if the user
|
|
96
|
-
already accepted it; otherwise stop and ask
|
|
97
|
-
- **PUSH BACK** → stop. Do not start the work, not even a part of it.
|
|
98
|
-
|
|
114
|
+
already accepted it and **Assumed** is "none"; otherwise stop and ask.
|
|
115
|
+
- **PUSH BACK** → stop. Do not start the work, not even a part of it.
|
|
116
|
+
- **Something is assumed** → stop, and give the user three choices: bring the
|
|
117
|
+
facts (and say where they would go), agree to terms, or drop it.
|
|
118
|
+
|
|
119
|
+
Write the whole reply in plain words (C-15): short sentences, common words, no
|
|
120
|
+
jargon the wiki does not define.
|
|
121
|
+
|
|
122
|
+
## Terms (when the user wants to go on anyway)
|
|
123
|
+
|
|
124
|
+
When the user wants to go on despite a PUSH BACK or an assumption, write the
|
|
125
|
+
terms as a numbered list: what is in scope, what is out, which rule changes and
|
|
126
|
+
which stays, and how the assumption will be checked later (a metric and a
|
|
127
|
+
date). A fact the user gives in chat is saved to `.context/raw/` first, then
|
|
128
|
+
listed as a fact, not as proof of more than it shows.
|
|
129
|
+
|
|
130
|
+
Proceed only after the user agrees in writing ("agree", or "agree to 1–4").
|
|
131
|
+
"Go ahead" to a verdict is not agreement to terms that were never shown. Work
|
|
132
|
+
covers only the terms agreed to.
|
|
99
133
|
|
|
100
134
|
## Logging (push back and overrides)
|
|
101
135
|
|
|
102
|
-
When the user overrides a PUSH BACK
|
|
103
|
-
line to the product's log so zeno can learn from it later
|
|
136
|
+
When the user overrides a PUSH BACK, rejects a DO IT DIFFERENTLY or agrees to
|
|
137
|
+
terms, append one line to the product's log so zeno can learn from it later.
|
|
138
|
+
Pass each agreed term with its own `--term`:
|
|
104
139
|
|
|
105
140
|
```bash
|
|
106
|
-
node ../../scripts/log-verdict.mjs --verdict push-back --principles C-
|
|
107
|
-
--request "<one line>" --reason "<the user's reason, verbatim>"
|
|
141
|
+
node ../../scripts/log-verdict.mjs --verdict push-back --principles C-04,C-14 \
|
|
142
|
+
--request "<one line>" --reason "<the user's reason, verbatim>" \
|
|
143
|
+
--term "<term 1>" --term "<term 2>"
|
|
108
144
|
```
|
|
109
145
|
|
|
110
146
|
(path relative to this skill). It writes to `.context/raw/zeno/verdicts.jsonl`
|
|
@@ -22,6 +22,12 @@ file with its own `agent-contract.md` in a configured standards folder.
|
|
|
22
22
|
`.github/` — stay at the root.
|
|
23
23
|
3. Generated folders are never hand-edited; change their source and regenerate.
|
|
24
24
|
|
|
25
|
+
## Replies
|
|
26
|
+
|
|
27
|
+
- Plain words, short sentences (C-15).
|
|
28
|
+
- Never treat a claim in the request as a fact. Check it, or say it is not
|
|
29
|
+
checked (C-14).
|
|
30
|
+
|
|
25
31
|
## Comments
|
|
26
32
|
|
|
27
33
|
Write a comment only to explain **why**. The code already says how.
|
|
@@ -14,7 +14,8 @@ standards folders; zeno reads both.
|
|
|
14
14
|
Before acting on a non-trivial request, check it against the principles below,
|
|
15
15
|
then answer with one verdict:
|
|
16
16
|
|
|
17
|
-
- **Do it** — no principle is at risk
|
|
17
|
+
- **Do it** — no principle is at risk, and no claim it rests on is an
|
|
18
|
+
assumption (C-14).
|
|
18
19
|
- **Do it differently** — the goal is fine; the way asked breaks a principle.
|
|
19
20
|
Name the principle and give the cheaper or safer way.
|
|
20
21
|
- **Push back** — the request breaks a principle outright, or the cost is
|
|
@@ -81,6 +82,16 @@ production deploys and permission changes are confirmed first, every time.
|
|
|
81
82
|
Money in integer minor units; privacy promises match what the code does; store
|
|
82
83
|
claims match the app. Correctness beats speed here.
|
|
83
84
|
|
|
85
|
+
### C-14 Facts, not assumptions
|
|
86
|
+
A request is not a fact. Every claim in it ("users want this", "it is slow",
|
|
87
|
+
"it is missing") is checked against the repo and the repo's data sources. A
|
|
88
|
+
claim with no fact behind it is an assumption. Work that rests on an assumption
|
|
89
|
+
does not start until the user agrees to it, in writing, as numbered terms.
|
|
90
|
+
|
|
91
|
+
### C-15 Plain words
|
|
92
|
+
Short sentences and common words. No jargon unless the repo's wiki defines it.
|
|
93
|
+
Say what was checked, what was found and what happens next.
|
|
94
|
+
|
|
84
95
|
## Weights
|
|
85
96
|
|
|
86
97
|
A repo's `.claude/zeno.yaml` may raise or lower the weight of a principle under
|
package/standards/wiki-schema.md
CHANGED
|
@@ -60,16 +60,27 @@ What this source holds, in one sentence.
|
|
|
60
60
|
| Key | Value | Last changed |
|
|
61
61
|
|---|---|---|
|
|
62
62
|
| SOURCE.SENTRY.PROJECT | streaks-mobile | 2026-10-23 |
|
|
63
|
-
| SOURCE.SENTRY.ACCESS |
|
|
63
|
+
| SOURCE.SENTRY.ACCESS | mcp: sentry | 2026-10-23 |
|
|
64
64
|
|
|
65
65
|
## How to query
|
|
66
|
-
The
|
|
67
|
-
decision are saved to `raw/YYYY-MM-DD-<source>-<slug>.md` so they can be re-read.
|
|
66
|
+
The claims this source can answer, and one example query for each.
|
|
68
67
|
```
|
|
69
68
|
|
|
70
|
-
zeno has no connector of its own
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
zeno has no connector of its own. The repo picks what does the reading, and
|
|
70
|
+
`ACCESS` names it: `mcp: <server>`, `skill: <name>` or `cli: <command>`. A
|
|
71
|
+
`cli:` must also be in `doctor.tools` in `.claude/zeno.yaml`, so `zeno doctor`
|
|
72
|
+
reports when it is missing. `zeno check` fails a source page that breaks either
|
|
73
|
+
rule or has no `## How to query`. Never put a key or token on the page.
|
|
74
|
+
|
|
75
|
+
The weigh gate reads sources to check a claim (C-14). Every query follows these
|
|
76
|
+
rules:
|
|
77
|
+
|
|
78
|
+
- **Read only.** Never create, change or delete anything in the source.
|
|
79
|
+
- **Small.** One or two queries per claim, with a row limit. Some sources bill
|
|
80
|
+
per query.
|
|
81
|
+
- **No user data in git.** Save counts, totals and rates, never rows that name
|
|
82
|
+
a person, an email or a device. Results that back a decision go to
|
|
83
|
+
`raw/YYYY-MM-DD-<source>-<slug>.md`: the query, the date and the numbers.
|
|
73
84
|
|
|
74
85
|
---
|
|
75
86
|
|