@schneiderjoseph/devia 0.4.0 → 0.5.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/CHANGELOG.md +31 -0
- package/MIGRATION.md +3 -2
- package/README.md +1 -1
- package/package.json +1 -1
- package/skills/devia/SKILL.md +3 -2
- package/src/commands/check.mjs +10 -3
- package/src/commands/doctor.mjs +4 -5
- package/src/commands/init.mjs +9 -6
- package/templates/agents/AGENTS.md +2 -2
- package/templates/agents/CLAUDE.md +2 -1
- package/templates/project/14_INDEX.md +12 -8
- package/templates/project/AGENTS.md +3 -3
- package/templates/project/README.md +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 — 2026-09-09
|
|
4
|
+
|
|
5
|
+
The standard is unchanged: `VERSION` stays at 0.1.0.
|
|
6
|
+
|
|
7
|
+
### Pinning the standard is now opt-in
|
|
8
|
+
|
|
9
|
+
`devia init` used to copy the whole standard into `.devia/standard/`. Measured on a real
|
|
10
|
+
repository: **391 pinned files against 17 of memory** — a folder whose purpose is to be read by
|
|
11
|
+
a human and an agent, in which 96% of the files were a copy nobody wrote. On a 211-file project
|
|
12
|
+
it tripled the repository, and every `devia sync` produced a 391-file diff in which a real
|
|
13
|
+
memory change was invisible.
|
|
14
|
+
|
|
15
|
+
- `devia init` writes the memory and the adapters, and pins nothing: **17 files, 57 kB**
|
|
16
|
+
- `devia init --vendor` pins the copy for those who want it up front
|
|
17
|
+
- `devia sync` pins it on demand and refreshes it afterwards — that is now its first job, not
|
|
18
|
+
only its maintenance one
|
|
19
|
+
- `doctor` reports an unpinned standard as `INFO`, not a `WARN` to clear: the default is not a
|
|
20
|
+
defect
|
|
21
|
+
- The memory templates, the agent adapters and the skill read the rules with
|
|
22
|
+
`npx devia rules --id <ID>` / `--domain <name>` instead of linking into a copy that may not
|
|
23
|
+
exist. A pinned copy is mentioned as what it is: optional
|
|
24
|
+
|
|
25
|
+
Nothing to do when upgrading. An existing `.devia/standard/` is left alone, `devia sync` keeps
|
|
26
|
+
refreshing it, and only new `devia init` runs behave differently. Recorded as G8.
|
|
27
|
+
|
|
28
|
+
### A P0 blocker comes from the priority cell, never from prose
|
|
29
|
+
|
|
30
|
+
`MEM-DEBT-P0` matched `P0` anywhere in a debt row. A P1 line reading "becomes P0 once the
|
|
31
|
+
payment module ships" failed the gate, so a project with no P0 debt was told it was blocked by
|
|
32
|
+
one. The check now reads the priority cell. Found by writing a real project's debt registry.
|
|
33
|
+
|
|
3
34
|
## 0.4.0 — 2026-09-09
|
|
4
35
|
|
|
5
36
|
The standard is unchanged: `VERSION` stays at 0.1.0, no adopter needs `devia sync`.
|
package/MIGRATION.md
CHANGED
|
@@ -58,5 +58,6 @@ Then:
|
|
|
58
58
|
(undecided) and `.devia/12_DEBT.md` (decided, not built) — the split matters.
|
|
59
59
|
4. Replace `node scripts/production-check.mjs` in CI with `npx devia check`.
|
|
60
60
|
|
|
61
|
-
Nothing in the old repos is lost: the full text of both
|
|
62
|
-
|
|
61
|
+
Nothing in the old repos is lost: the full text of both ships with this package, readable with
|
|
62
|
+
`npx devia rules`, and `npx devia sync` pins a copy under `.devia/standard/` when a project
|
|
63
|
+
wants one on disk.
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ npx devia doctor # adoption + staleness diagnosis
|
|
|
56
56
|
├── 14_INDEX.md # where to find what
|
|
57
57
|
├── impact-map.yaml # change type → files that must be updated
|
|
58
58
|
├── devia.json # profile, modules, maturity target, pinned version
|
|
59
|
-
└── standard/ #
|
|
59
|
+
└── standard/ # optional: `devia sync` pins a copy of the standard here
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Plus adapters so every agent gets the same contract: `AGENTS.md` (universal), `CLAUDE.md`,
|
package/package.json
CHANGED
package/skills/devia/SKILL.md
CHANGED
|
@@ -40,8 +40,9 @@ the difference between a task and a guess (`AGT-002`).
|
|
|
40
40
|
|
|
41
41
|
## Step 2 — work under the rules
|
|
42
42
|
|
|
43
|
-
The rules
|
|
44
|
-
|
|
43
|
+
The rules have stable IDs and are read with `npx devia rules --id <ID>`, or `--domain <name>`
|
|
44
|
+
for a whole area. A project that ran `devia sync` also has them on disk under
|
|
45
|
+
`.devia/standard/rules/`. The ones that stop most bad changes:
|
|
45
46
|
|
|
46
47
|
| If you are about to… | Rule |
|
|
47
48
|
|---|---|
|
package/src/commands/check.mjs
CHANGED
|
@@ -154,9 +154,16 @@ function makeChecks(root, ctx) {
|
|
|
154
154
|
run: () => {
|
|
155
155
|
const text = read(path.join(root, ".devia", "12_DEBT.md"));
|
|
156
156
|
if (text === null) return { kind: "SKIP", detail: "no debt registry" };
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
// The priority is a cell, not a word somewhere in the row. Matching the whole line made
|
|
158
|
+
// a P1 line reading "becomes P0 once the payment module ships" fail the gate — a P0
|
|
159
|
+
// blocker invented out of prose, on a project that had none.
|
|
160
|
+
const rows = (text.match(/^\|\s*D\d+\s*\|.*$/gm) || []).filter((row) => {
|
|
161
|
+
if (/TODO\(devia\)/.test(row)) return false;
|
|
162
|
+
return row
|
|
163
|
+
.split("|")
|
|
164
|
+
.slice(1, -1)
|
|
165
|
+
.some((cell) => cell.trim().toUpperCase() === "P0");
|
|
166
|
+
});
|
|
160
167
|
return rows.length
|
|
161
168
|
? { kind: "FAIL", detail: `${rows.length} P0 debt line(s) open` }
|
|
162
169
|
: { kind: "PASS" };
|
package/src/commands/doctor.mjs
CHANGED
|
@@ -64,12 +64,11 @@ ${color.bold("devia doctor")} — adoption, drift and staleness
|
|
|
64
64
|
const vendored = walk(path.join(deviaDir, "standard")).length;
|
|
65
65
|
if (path.resolve(root) === path.resolve(packageRoot)) {
|
|
66
66
|
status("SKIP", "vendored standard", "this repository is the standard");
|
|
67
|
+
} else if (vendored) {
|
|
68
|
+
status("PASS", `standard pinned: ${vendored} files`);
|
|
67
69
|
} else {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`vendored standard: ${vendored} files`,
|
|
71
|
-
vendored ? "" : "run `devia sync`"
|
|
72
|
-
);
|
|
70
|
+
// Not pinning is the default, so absence is a fact to report, never a warning to clear.
|
|
71
|
+
status("INFO", "standard not pinned", "`devia rules` reads it; `devia sync` pins a copy");
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
// Adapters
|
package/src/commands/init.mjs
CHANGED
|
@@ -84,7 +84,7 @@ ${color.bold("devia init")} — create .devia/ in this repository
|
|
|
84
84
|
--profile <name> ${Object.keys(PROFILES).join(" | ")}
|
|
85
85
|
--force overwrite existing memory files (dangerous: they hold your decisions)
|
|
86
86
|
--no-agents do not write the agent adapters
|
|
87
|
-
--
|
|
87
|
+
--vendor pin a copy of the standard into .devia/standard/ (~390 files)
|
|
88
88
|
--yes accept a detected root that is not the current directory
|
|
89
89
|
`.trim());
|
|
90
90
|
return 0;
|
|
@@ -163,17 +163,20 @@ ${color.bold("devia init")} — create .devia/ in this repository
|
|
|
163
163
|
status("SKIP", "devia.json kept", "use --force to regenerate");
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
// 3.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
// 3. Pinned standard — opt-in. Vendoring writes ~390 files a project did not author, which
|
|
167
|
+
// buries the memory it is supposed to serve: on a real repository the ratio was 17 files of
|
|
168
|
+
// memory to 391 of copy, and every `sync` produced a 391-file diff. The rules stay reachable
|
|
169
|
+
// through `devia rules`, and `devia sync` pins the copy for whoever needs it offline.
|
|
170
|
+
if (flags.vendor && flags.vendor !== "false") {
|
|
170
171
|
const files = vendorStandard(path.join(deviaDir, "standard"), {
|
|
171
172
|
by: "devia init",
|
|
172
173
|
cli,
|
|
173
174
|
standard: version,
|
|
174
175
|
date: vars.DATE,
|
|
175
176
|
});
|
|
176
|
-
status("PASS", `standard
|
|
177
|
+
status("PASS", `standard pinned: ${files} files`, `v${version}`);
|
|
178
|
+
} else {
|
|
179
|
+
status("SKIP", "standard not pinned", "`devia sync` writes .devia/standard/ when you need it");
|
|
177
180
|
}
|
|
178
181
|
|
|
179
182
|
// 4. Agent adapters
|
|
@@ -31,5 +31,5 @@ npx devia check # readiness gates
|
|
|
31
31
|
Update `.devia/` in the same change (see `.devia/impact-map.yaml`), then report what you changed
|
|
32
32
|
**and what you did not verify**.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Rules by ID: `npx devia rules --id SEC-001`, or by domain: `npx devia rules --domain database`.
|
|
35
|
+
A pinned copy lives under `.devia/standard/` only if this project ran `devia sync`.
|
|
@@ -31,4 +31,5 @@ npx devia check
|
|
|
31
31
|
|
|
32
32
|
Report the checks that ran, the rule IDs involved, and what you did **not** verify.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Rules by ID: `npx devia rules --id SEC-001`, or by domain: `npx devia rules --domain database`.
|
|
35
|
+
A pinned copy lives under `.devia/standard/` only if this project ran `devia sync`.
|
|
@@ -38,13 +38,17 @@
|
|
|
38
38
|
|---|---|---|
|
|
39
39
|
| TODO(devia) | | |
|
|
40
40
|
|
|
41
|
-
## Standard
|
|
41
|
+
## Standard
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
The standard is read through the CLI, not copied into this repository.
|
|
44
|
+
|
|
45
|
+
| Need | Command |
|
|
44
46
|
|---|---|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
| A rule by ID | `npx devia rules --id SEC-001` |
|
|
48
|
+
| Every rule in a domain | `npx devia rules --domain database --priority P0` |
|
|
49
|
+
| Work contract | `AGENTS.md` at this repository's root |
|
|
50
|
+
| Readiness gates | `npx devia check` |
|
|
51
|
+
|
|
52
|
+
`npx devia sync` pins a version-locked copy under `standard/` when an agent must read it
|
|
53
|
+
offline, or when an audit needs the exact wording you built against. Add the paths here if you
|
|
54
|
+
do.
|
|
@@ -8,8 +8,8 @@ This file is your contract. Violating it is a failed task.
|
|
|
8
8
|
1. Read [`10_NEVER_ALWAYS.md`](10_NEVER_ALWAYS.md) — what this project has already banned
|
|
9
9
|
2. Read [`00_OVERVIEW.md`](00_OVERVIEW.md) — what this project is
|
|
10
10
|
3. Read the memory file for the surface you are about to change ([`14_INDEX.md`](14_INDEX.md))
|
|
11
|
-
4. Read the
|
|
12
|
-
|
|
11
|
+
4. Read the rules for what you are touching: `npx devia rules --domain <name>`, or
|
|
12
|
+
`npx devia rules --id <ID>` for one
|
|
13
13
|
|
|
14
14
|
Then work. Then update this memory in the same change.
|
|
15
15
|
|
|
@@ -48,4 +48,4 @@ TODO(devia): add this project's own commands — install, dev, test, lint, migra
|
|
|
48
48
|
- Not verified: ...
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Full contract, routing table and hard stops:
|
|
51
|
+
Full contract, routing table and hard stops: the `AGENTS.md` at this repository's root.
|
|
@@ -27,8 +27,11 @@ Created by `devia init` (devia {{DEVIA_VERSION}}, {{DATE}}).
|
|
|
27
27
|
Machine files: [`devia.json`](devia.json) (profile, maturity, pinned version) and
|
|
28
28
|
[`impact-map.yaml`](impact-map.yaml) (change type → files to update).
|
|
29
29
|
|
|
30
|
-
The standard itself is
|
|
31
|
-
|
|
30
|
+
The standard itself is not copied in here. Read it with `npx devia rules --id SEC-001` or
|
|
31
|
+
`npx devia rules --domain database`, which is the same text for every agent. If you need it on
|
|
32
|
+
disk — an agent with no network, or an audit that must show the exact wording you built against
|
|
33
|
+
— `npx devia sync` pins a version-locked copy under `standard/`, and `14_INDEX.md` then points
|
|
34
|
+
at it.
|
|
32
35
|
|
|
33
36
|
## The two registries
|
|
34
37
|
|
|
@@ -43,7 +46,7 @@ for every agent, offline, no network and no package manager required.
|
|
|
43
46
|
npx devia validate # structure, registries, placeholders
|
|
44
47
|
npx devia doctor # is the memory older than the code?
|
|
45
48
|
npx devia check # readiness gates
|
|
46
|
-
npx devia sync #
|
|
49
|
+
npx devia sync # pin the standard under standard/, or refresh a pinned copy
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
`.devia/` is committed. It is part of the repository, not a local scratch pad.
|