@jjanczur/tyran 0.1.4 → 0.1.6
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -2
- package/CHANGELOG.md +84 -0
- package/agents/reviewer.md +10 -0
- package/hooks/scripts/policy-gate.mjs +65 -10
- package/package.json +1 -1
- package/scripts/hooks-check.mjs +37 -6
- package/scripts/scan-repo.mjs +11 -4
- package/scripts/schema.mjs +15 -1
- package/skills/browser-check/SKILL.md +12 -0
- package/skills/deslop/SKILL.md +11 -3
- package/skills/run/SKILL.md +16 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"name": "tyran",
|
|
13
13
|
"description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.6",
|
|
15
15
|
"source": "./",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Jacek Janczura",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tyran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jacek Janczura",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"homepage": "https://github.com/jjanczur/tyran#readme",
|
|
10
10
|
"repository": "https://github.com/jjanczur/tyran",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
|
-
"hooks": "./hooks/hooks.json",
|
|
13
12
|
"keywords": [
|
|
14
13
|
"orchestration",
|
|
15
14
|
"multi-agent",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6 — 2026-08-06
|
|
4
|
+
|
|
5
|
+
### A browser pass must follow the value to what got STORED
|
|
6
|
+
|
|
7
|
+
A column-mapping override shipped with a perfect `browser-check` measurement —
|
|
8
|
+
15/15 columns visible, 0 console errors, the mapping visibly changed by hand —
|
|
9
|
+
and was completely inert. The server re-derived the source type from the
|
|
10
|
+
uploaded bytes, discarded the client's mapping, and answered `201` either way.
|
|
11
|
+
Nothing in the browser pass could have caught it, because it never inspected
|
|
12
|
+
what the server persisted; a reviewer reading the route did.
|
|
13
|
+
|
|
14
|
+
`browser-check` now says so: when the UI claims to change something the SERVER
|
|
15
|
+
acts on, a clean console and a `2xx` are not proof it arrived. Capture the
|
|
16
|
+
request body you actually sent, or read the value back with a second request or
|
|
17
|
+
a reload, and assert on THAT. The evidence contract already pinned the
|
|
18
|
+
execution MODE (dev server vs production build); it said nothing about
|
|
19
|
+
following a value past the response into storage.
|
|
20
|
+
|
|
21
|
+
### A reviewer must never restore an uncommitted tree with git
|
|
22
|
+
|
|
23
|
+
Breaking the fix to watch its test fail is the right way to prove a guard is
|
|
24
|
+
real. The restore is the foot-gun: the work under review is UNCOMMITTED, so
|
|
25
|
+
`git checkout -- <file>`, `git restore` and `git stash` all revert to HEAD and
|
|
26
|
+
destroy the very thing the reviewer was sent to review. Measured in the field —
|
|
27
|
+
a reviewer did exactly this, caught it by re-diffing, and recovered only
|
|
28
|
+
because it had taken a backup first. Without the backup the author's work is
|
|
29
|
+
gone with no record of what was in it.
|
|
30
|
+
|
|
31
|
+
`agents/reviewer.md` now carries the procedure: copy to a scratch path, restore
|
|
32
|
+
from the copy, prove the restore with `diff`, then disclose the mutation in the
|
|
33
|
+
report. The agent already knew it had no edit tools "on purpose" and that
|
|
34
|
+
`Bash` can still write — what it lacked was the one sequence where its own
|
|
35
|
+
correct technique destroys the subject.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 0.1.5 — 2026-08-03
|
|
39
|
+
|
|
40
|
+
### The plugin loads again (0.1.4 did not)
|
|
41
|
+
|
|
42
|
+
On Claude Code 2.1.197 the plugin failed to load outright — `Duplicate hooks
|
|
43
|
+
file detected: ./hooks/hooks.json` — because the manifest declared
|
|
44
|
+
`"hooks": "./hooks/hooks.json"` while the harness now auto-loads that standard
|
|
45
|
+
path, and the duplicate is fatal. With the hooks unloaded there was no gate at
|
|
46
|
+
all: an out-of-repo write the gate exists to refuse went straight through.
|
|
47
|
+
Every other plugin ships `hooks/hooks.json` with no manifest reference — the
|
|
48
|
+
key is removed. The standard location is auto-discovered on every recent
|
|
49
|
+
version, so this is also cross-version safe.
|
|
50
|
+
|
|
51
|
+
### The main thread may write its own working files
|
|
52
|
+
|
|
53
|
+
The gate refuses writes outside the repository as KERNEL — correct for a
|
|
54
|
+
fanned-out subagent, wrong for Claude Code's own bookkeeping. Adopting Tyran
|
|
55
|
+
made the harness unable to write to its memory store or plan files: "outside
|
|
56
|
+
this repository". (0.1.4 shipped the memory half of this fix but never loaded,
|
|
57
|
+
so users meet it here first.)
|
|
58
|
+
|
|
59
|
+
The **main thread** — never a subagent — may now write three built-in
|
|
60
|
+
out-of-repo locations: the memory store (`<config>/projects/<slug>/memory/`),
|
|
61
|
+
the plans directory (`<config>/plans/`), and the per-session scratchpad
|
|
62
|
+
(`<tmp>/claude-*/`). For anything else, `.tyran/config.yaml` gains an optional
|
|
63
|
+
**`main_writable_paths`** list (globs, `~` expanded) the operator opts into.
|
|
64
|
+
Both are actor-scoped: a subagent still falls through to KERNEL, so a parallel
|
|
65
|
+
run stays contained. Everything else outside the repo is still refused.
|
|
66
|
+
|
|
67
|
+
### Retrospectives applied
|
|
68
|
+
|
|
69
|
+
Four field reports across two initiatives, folded into the conductor and its
|
|
70
|
+
tools:
|
|
71
|
+
|
|
72
|
+
- **`scan-repo`** now recognises `format:check` as a validation command — the
|
|
73
|
+
CHECK name only, because a bare `format` rewrites the working tree. A repo
|
|
74
|
+
that ran it in CI but was missing it from this list shipped two unformatted
|
|
75
|
+
files to main.
|
|
76
|
+
- **`run` rule 7** — worktrees must live OUTSIDE the directories Tyran governs
|
|
77
|
+
(`.claude/`, `.tyran/`). One placed inside has every file, `src/**` included,
|
|
78
|
+
fall through to `default: GATED`, and a subagent cannot edit anything.
|
|
79
|
+
- **`run` rule 2 (evidence contract)** — measure a fix in the EXECUTION MODE
|
|
80
|
+
the defect appeared in (a `next dev` pass was inert under `next start`), and a
|
|
81
|
+
guard or regression test is proven only by a run in which it FAILS without the
|
|
82
|
+
change: one that matches nothing passes exactly like one that works.
|
|
83
|
+
- **`deslop`** — "started with" is the state immediately before THIS pass, not
|
|
84
|
+
the branch point; make the count recomputable by committing the story's work
|
|
85
|
+
and the pass separately.
|
|
86
|
+
|
|
3
87
|
## 0.1.4 — 2026-08-01
|
|
4
88
|
|
|
5
89
|
### The gate stopped refusing Claude Code's own memory
|
package/agents/reviewer.md
CHANGED
|
@@ -31,6 +31,16 @@ that keeps you.
|
|
|
31
31
|
- Warm up routes before a batch run; a cold compile reads as a failure.
|
|
32
32
|
- Take heavy slots only through the lease protocol, and clean up your
|
|
33
33
|
processes afterwards (SIGTERM, not `kill -9`).
|
|
34
|
+
- **To prove a guard is real, break the fix — but never restore with git.**
|
|
35
|
+
Neutering the change to watch its test fail is the right technique. The
|
|
36
|
+
restore is where it goes wrong: the work under review is UNCOMMITTED, so
|
|
37
|
+
`git checkout -- <file>`, `git restore` and `git stash` all revert to
|
|
38
|
+
HEAD and destroy the very thing you were sent to review. Copy the file to
|
|
39
|
+
a scratch path first, restore from that copy, and prove the restore with
|
|
40
|
+
`diff` before you carry on. Then DISCLOSE the mutation in your report.
|
|
41
|
+
Measured: a reviewer did exactly this, caught it by re-diffing, and
|
|
42
|
+
recovered only because it had taken the backup — the same sequence
|
|
43
|
+
without one loses the author's work with no record of what was in it.
|
|
34
44
|
3. **Check the optimization section** — whether what the author claims is
|
|
35
45
|
genuinely in the code, not just in the write-up.
|
|
36
46
|
4. **The verdict is binary.** APPROVE, with minor notes routed to `NOTES.md`;
|
|
@@ -533,6 +533,45 @@ export async function loadDeployClass(root) {
|
|
|
533
533
|
return value;
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
+
/**
|
|
537
|
+
* A leading `~` expanded to the home directory; everything else untouched so
|
|
538
|
+
* the `*`/`**` in a glob survive (`resolve` would collapse a trailing `**`).
|
|
539
|
+
*/
|
|
540
|
+
function expandHome(p) {
|
|
541
|
+
if (p === '~') return homedir();
|
|
542
|
+
if (p.startsWith('~/')) return join(homedir(), p.slice(2));
|
|
543
|
+
return p;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* The out-of-repo paths config.yaml lets the MAIN thread write, home-expanded.
|
|
548
|
+
* Optional: absence is [], never a refusal. A config too broken to parse yields
|
|
549
|
+
* [] rather than throwing, so the write stays refused — fail closed. This only
|
|
550
|
+
* lists paths; the actor split (main-thread only) is enforced at the call site,
|
|
551
|
+
* so it can never widen what a subagent may do.
|
|
552
|
+
*/
|
|
553
|
+
export async function loadMainWritablePaths(root) {
|
|
554
|
+
let text = null;
|
|
555
|
+
for (const candidate of [root, mainWorktreeOf(root)].filter((r) => r !== null)) {
|
|
556
|
+
text = await readBounded(join(candidate, CONFIG_PATH), 'the Tyran config');
|
|
557
|
+
if (text !== null) break;
|
|
558
|
+
}
|
|
559
|
+
if (text === null) return [];
|
|
560
|
+
let doc;
|
|
561
|
+
try {
|
|
562
|
+
doc = parse(text);
|
|
563
|
+
} catch {
|
|
564
|
+
return [];
|
|
565
|
+
}
|
|
566
|
+
const raw = doc !== null && typeof doc === 'object' ? doc.main_writable_paths : undefined;
|
|
567
|
+
if (!Array.isArray(raw)) return [];
|
|
568
|
+
const out = [];
|
|
569
|
+
for (const entry of raw) {
|
|
570
|
+
if (typeof entry === 'string' && entry.trim() !== '') out.push(expandHome(entry.trim()));
|
|
571
|
+
}
|
|
572
|
+
return out;
|
|
573
|
+
}
|
|
574
|
+
|
|
536
575
|
// ------------------------------------------------------ quoting the decision
|
|
537
576
|
|
|
538
577
|
/**
|
|
@@ -739,9 +778,13 @@ export function harnessWritable(rawPath, env = process.env) {
|
|
|
739
778
|
? env.CLAUDE_CONFIG_DIR
|
|
740
779
|
: join(homedir(), '.claude');
|
|
741
780
|
const underConfig = segmentsUnder(canon, configDir);
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
return true;
|
|
781
|
+
if (underConfig !== null) {
|
|
782
|
+
// The memory store's exact shape: <config>/projects/<slug>/memory/**.
|
|
783
|
+
if (underConfig[0] === 'projects' && underConfig[2] === 'memory') return true;
|
|
784
|
+
// The plans directory: <config>/plans/** — where the main thread writes the
|
|
785
|
+
// plan files a user reads between sessions. A popular out-of-repo path, so
|
|
786
|
+
// it is exempt by default rather than requiring per-repo config.
|
|
787
|
+
if (underConfig[0] === 'plans') return true;
|
|
745
788
|
}
|
|
746
789
|
// The scratchpad: <tmp>/claude-*/**, under whichever temp root the platform
|
|
747
790
|
// used. `/tmp` is included explicitly because `os.tmpdir()` is `/var/...` on
|
|
@@ -1062,6 +1105,11 @@ export async function decide({ input, runner = runChild, startedAt = Date.now(),
|
|
|
1062
1105
|
return PASS;
|
|
1063
1106
|
}
|
|
1064
1107
|
|
|
1108
|
+
// Config-declared out-of-repo allowances for the main thread
|
|
1109
|
+
// (`.tyran/config.yaml` `main_writable_paths`), loaded lazily and once: only
|
|
1110
|
+
// an out-of-repo main-thread write ever consults them.
|
|
1111
|
+
let mainWritable;
|
|
1112
|
+
|
|
1065
1113
|
for (const target of targets) {
|
|
1066
1114
|
// Normalized HERE, with the root this call is about, and only then handed
|
|
1067
1115
|
// to the resolver. `classifyPath` normalizes internally too, but against
|
|
@@ -1071,13 +1119,20 @@ export async function decide({ input, runner = runChild, startedAt = Date.now(),
|
|
|
1071
1119
|
// and the two would agree in every test that happened to run in the repo
|
|
1072
1120
|
// root. Normalization is idempotent, so the resolver's own call is a no-op.
|
|
1073
1121
|
const normalized = repoRelative(target, root);
|
|
1074
|
-
// Claude Code's own memory store and
|
|
1075
|
-
//
|
|
1076
|
-
//
|
|
1077
|
-
//
|
|
1078
|
-
//
|
|
1079
|
-
//
|
|
1080
|
-
if (normalized === null && actor === 'main'
|
|
1122
|
+
// Claude Code's own memory store, plans dir and scratchpad are outside every
|
|
1123
|
+
// repository, so `normalized` is null and the matrix below answers KERNEL —
|
|
1124
|
+
// which made adopting Tyran refuse the harness's own writes. `harnessWritable`
|
|
1125
|
+
// exempts those built-in locations; `main_writable_paths` in config.yaml adds
|
|
1126
|
+
// operator-chosen ones. Both are MAIN-thread only: a subagent still falls
|
|
1127
|
+
// through to KERNEL.
|
|
1128
|
+
if (normalized === null && actor === 'main') {
|
|
1129
|
+
if (harnessWritable(target, env)) continue;
|
|
1130
|
+
if (mainWritable === undefined) mainWritable = await loadMainWritablePaths(root);
|
|
1131
|
+
if (mainWritable.length > 0) {
|
|
1132
|
+
const canon = canonicalDeepest(target);
|
|
1133
|
+
if (mainWritable.some((glob) => globMatches(glob, canon) || globMatches(glob, target))) continue;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1081
1136
|
// The one branch this cannot delegate: a path outside the repository makes
|
|
1082
1137
|
// `normalizePath` return null, which `classifyPath` answers with KERNEL.
|
|
1083
1138
|
// Restated in one line rather than reached by passing a null through, and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jjanczur/tyran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Command-line scripts for the Tyran task conductor (doctor, journal, schema, and repo tooling) for CI and terminals outside Claude Code. Installing this package does NOT install the Claude Code plugin — add that separately with `/plugin marketplace add jjanczur/tyran` inside Claude Code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
package/scripts/hooks-check.mjs
CHANGED
|
@@ -325,6 +325,7 @@ export const HOOK_SEVERITY_BY_CODE = Object.freeze(
|
|
|
325
325
|
'hooks-manifest-missing': 'error',
|
|
326
326
|
'hooks-manifest-unreadable': 'error',
|
|
327
327
|
'hooks-manifest-no-hooks': 'error',
|
|
328
|
+
'hooks-manifest-duplicates-standard': 'error',
|
|
328
329
|
'hooks-file-missing': 'error',
|
|
329
330
|
'hooks-file-unreadable': 'error',
|
|
330
331
|
'hooks-file-invalid': 'error',
|
|
@@ -1043,23 +1044,53 @@ export function checkHooks({ root = DEFAULT_PLUGIN_ROOT, env = process.env } = {
|
|
|
1043
1044
|
);
|
|
1044
1045
|
return summarize(pluginRoot, findings, checked);
|
|
1045
1046
|
}
|
|
1047
|
+
// Claude Code auto-loads the standard hooks/hooks.json at the plugin root, so
|
|
1048
|
+
// manifest.hooks is for ADDITIONAL hook files only. Declaring the standard
|
|
1049
|
+
// path there too is a duplicate the harness rejects — measured on 2.1.197,
|
|
1050
|
+
// "Duplicate hooks file detected" — and the plugin then fails to load and
|
|
1051
|
+
// gates NOTHING. This inverts the old check: a missing field is healthy when
|
|
1052
|
+
// the standard file exists, and a field naming the standard file is the error.
|
|
1053
|
+
const standardHooksPath = resolve(pluginRoot, 'hooks', 'hooks.json');
|
|
1046
1054
|
const declaredHooks = typeof manifest?.hooks === 'string' ? manifest.hooks : null;
|
|
1047
|
-
|
|
1055
|
+
const declaredIsStandard = declaredHooks !== null && resolve(pluginRoot, declaredHooks) === standardHooksPath;
|
|
1056
|
+
|
|
1057
|
+
if (declaredIsStandard) {
|
|
1058
|
+
findings.push(
|
|
1059
|
+
finding(
|
|
1060
|
+
'hooks-manifest-duplicates-standard',
|
|
1061
|
+
q(manifestPath),
|
|
1062
|
+
`the manifest declares "hooks": ${q(declaredHooks)}, but Claude Code auto-loads the standard ` +
|
|
1063
|
+
'hooks/hooks.json at the plugin root. Declaring it again is a duplicate the harness rejects, so ' +
|
|
1064
|
+
'the plugin fails to load and gates NOTHING. manifest.hooks is for ADDITIONAL hook files only.',
|
|
1065
|
+
`remove the "hooks" key from ${q(manifestPath)} — the standard file is auto-loaded`,
|
|
1066
|
+
),
|
|
1067
|
+
);
|
|
1068
|
+
return summarize(pluginRoot, findings, checked);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
if (declaredHooks === null && !existsSync(standardHooksPath)) {
|
|
1048
1072
|
findings.push(
|
|
1049
1073
|
finding(
|
|
1050
1074
|
'hooks-manifest-no-hooks',
|
|
1051
1075
|
q(manifestPath),
|
|
1052
|
-
'the manifest declares
|
|
1053
|
-
'so
|
|
1054
|
-
`
|
|
1076
|
+
'no hooks file: the manifest declares none and there is no hooks/hooks.json at the plugin root, ' +
|
|
1077
|
+
'so nothing registers a gate at all.',
|
|
1078
|
+
`create ${q(standardHooksPath)} — it is auto-loaded — or point "hooks" at an additional file`,
|
|
1055
1079
|
),
|
|
1056
1080
|
);
|
|
1057
1081
|
return summarize(pluginRoot, findings, checked);
|
|
1058
1082
|
}
|
|
1059
|
-
|
|
1083
|
+
|
|
1084
|
+
// The file the platform loads: the additional file if the manifest names one,
|
|
1085
|
+
// otherwise the auto-loaded standard file.
|
|
1086
|
+
const hooksRel = declaredHooks ?? './hooks/hooks.json';
|
|
1087
|
+
checked.push(
|
|
1088
|
+
`manifest: name "${readPluginName(pluginRoot) ?? '(unnamed)'}", hooks -> ${hooksRel}` +
|
|
1089
|
+
(declaredHooks === null ? ' (auto-loaded)' : ''),
|
|
1090
|
+
);
|
|
1060
1091
|
|
|
1061
1092
|
// ---- the hooks file ----------------------------------------------------
|
|
1062
|
-
const hooksPath = resolve(pluginRoot,
|
|
1093
|
+
const hooksPath = resolve(pluginRoot, hooksRel);
|
|
1063
1094
|
let doc;
|
|
1064
1095
|
try {
|
|
1065
1096
|
doc = JSON.parse(readFileSync(hooksPath, 'utf8'));
|
package/scripts/scan-repo.mjs
CHANGED
|
@@ -69,11 +69,18 @@ export const LANGUAGES = Object.freeze({
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Script names worth running before calling something done
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* Script names worth running before calling something done. `build` is
|
|
73
|
+
* deliberately absent: it is slow, and on most repos the type check already
|
|
74
|
+
* covers what a build would catch.
|
|
75
|
+
*
|
|
76
|
+
* `format:check` leads because it is the cheapest and fails fastest, and it is
|
|
77
|
+
* here at all because omitting it ships a red main. Measured: a repo declared
|
|
78
|
+
* `format:check` in package.json AND ran it in CI, this list did not include
|
|
79
|
+
* it, so no handoff required it — two unformatted files reached main and
|
|
80
|
+
* needed a repair commit. Only the CHECKING name is listed: a bare `format`
|
|
81
|
+
* REWRITES the working tree, which is not a validation command.
|
|
75
82
|
*/
|
|
76
|
-
export const VALIDATION_SCRIPTS = Object.freeze(['lint', 'typecheck', 'types', 'test']);
|
|
83
|
+
export const VALIDATION_SCRIPTS = Object.freeze(['format:check', 'lint', 'typecheck', 'types', 'test']);
|
|
77
84
|
|
|
78
85
|
const RUN_PREFIX = Object.freeze({ npm: 'npm run', pnpm: 'pnpm', yarn: 'yarn', bun: 'bun run' });
|
|
79
86
|
|
package/scripts/schema.mjs
CHANGED
|
@@ -68,7 +68,7 @@ export function validateConfig(doc) {
|
|
|
68
68
|
const errors = [];
|
|
69
69
|
if (!isPlainObject(doc)) return ['config must be a mapping'];
|
|
70
70
|
|
|
71
|
-
const known = ['profile', 'autonomy', 'tiers', 'validation', 'shared_zones', 'budget'];
|
|
71
|
+
const known = ['profile', 'autonomy', 'tiers', 'validation', 'shared_zones', 'budget', 'main_writable_paths'];
|
|
72
72
|
for (const key of Object.keys(doc)) {
|
|
73
73
|
if (!known.includes(key)) errors.push(`${key}: unknown top-level key`);
|
|
74
74
|
}
|
|
@@ -131,6 +131,20 @@ export function validateConfig(doc) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
// Out-of-repo paths the MAIN thread may write, on top of the built-in memory
|
|
135
|
+
// store, plans dir and scratchpad. A `~` is expanded to the home directory;
|
|
136
|
+
// globs are the same `*`/`**` the policy uses. Never widens what a SUBAGENT
|
|
137
|
+
// may do — the gate enforces the actor split, this only lists paths.
|
|
138
|
+
if ('main_writable_paths' in doc) {
|
|
139
|
+
if (!Array.isArray(doc.main_writable_paths)) {
|
|
140
|
+
errors.push('main_writable_paths: must be a list of path globs');
|
|
141
|
+
} else {
|
|
142
|
+
doc.main_writable_paths.forEach((p, i) => {
|
|
143
|
+
if (!isNonEmptyString(p)) errors.push(`main_writable_paths[${i}]: must be a non-empty path glob`);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
134
148
|
return errors;
|
|
135
149
|
}
|
|
136
150
|
|
|
@@ -57,6 +57,18 @@ Return them as **counts plus the first few offenders**, then a single verdict
|
|
|
57
57
|
line. A pass with `0` console errors is a fact; "the console was clean" is a
|
|
58
58
|
recollection.
|
|
59
59
|
|
|
60
|
+
**When the UI claims to change something the SERVER acts on** — a mapping, a
|
|
61
|
+
setting, a value the next request depends on — a clean console and a `2xx` are
|
|
62
|
+
not proof it arrived. The evidence has to follow the value to what got STORED,
|
|
63
|
+
not stop at what got RENDERED: capture the request body you actually sent, or
|
|
64
|
+
read the value back with a second request or a reload, and assert on THAT. This
|
|
65
|
+
is not hypothetical. A column-mapping override shipped with a perfect browser
|
|
66
|
+
pass — 15/15 columns visible, 0 console errors, the mapping visibly changed by
|
|
67
|
+
hand — while the server re-derived the source type from the uploaded bytes and
|
|
68
|
+
discarded the mapping, answering `201` either way. Only a reviewer reading the
|
|
69
|
+
server route caught it; nothing in the browser measurement could have, because
|
|
70
|
+
it never inspected what the server persisted.
|
|
71
|
+
|
|
60
72
|
## Selectors that do not go blind
|
|
61
73
|
|
|
62
74
|
Anchor on what the user sees — a role, a label, the text — not on a container
|
package/skills/deslop/SKILL.md
CHANGED
|
@@ -9,8 +9,15 @@ description: The optimization pass, defined - delete before you add, one smell c
|
|
|
9
9
|
|
|
10
10
|
**The default action is deletion.** A pass that ends with more lines than it
|
|
11
11
|
started with was a refactor, and a refactor is a different piece of work with a
|
|
12
|
-
different risk profile.
|
|
13
|
-
a
|
|
12
|
+
different risk profile. **"Started with" means the state immediately before
|
|
13
|
+
THIS pass, not the branch point** — a story that adds a feature adds lines, and
|
|
14
|
+
judging the pass by the whole branch diff condemns it in advance. That number
|
|
15
|
+
is then invisible to everyone but you, so make it recomputable: commit the
|
|
16
|
+
story's work, then commit the pass separately. Measured: an author counting
|
|
17
|
+
honestly from its own uncommitted draft and a reviewer counting from the branch
|
|
18
|
+
point produced a blocking CHANGES-REQUESTED and an arbitration, with neither
|
|
19
|
+
agent wrong on its own terms. If you cannot delete anything, say so and stop —
|
|
20
|
+
that is a complete and respectable outcome.
|
|
14
21
|
|
|
15
22
|
## The order, and why it is an order
|
|
16
23
|
|
|
@@ -92,6 +99,7 @@ For a README, a report, an error message or a commit body:
|
|
|
92
99
|
## The report
|
|
93
100
|
|
|
94
101
|
Files touched, what class of slop came out of each, the test output from before
|
|
95
|
-
and after,
|
|
102
|
+
and after, the two line counts with the commit range a reviewer can recompute
|
|
103
|
+
them from, and one line on what you deliberately left. The last part matters: a
|
|
96
104
|
cleanup that silently declined to touch the worst file in the area looks
|
|
97
105
|
identical to one that found nothing there.
|
package/skills/run/SKILL.md
CHANGED
|
@@ -163,7 +163,13 @@ open one.
|
|
|
163
163
|
rather than asserting it — take that baseline after a `git fetch` run
|
|
164
164
|
immediately beforehand, because a stale `origin/main` once turned a
|
|
165
165
|
methodologically correct proof into a false accusation of someone else's
|
|
166
|
-
regression
|
|
166
|
+
regression. And measure the fix in the EXECUTION MODE the defect was
|
|
167
|
+
observed in — a dev server is not a production build: a 404 fix green under
|
|
168
|
+
`next dev` was inert under `next start`, caught by the reviewer's production
|
|
169
|
+
builds one merge short of shipping. A guard or regression test is proven
|
|
170
|
+
only by a run in which it FAILS without the change — one that matches nothing
|
|
171
|
+
passes exactly like one that works (measured twice); (6) "verify the
|
|
172
|
+
premises of this handoff in the code — and
|
|
167
173
|
premises about DATA by measuring the real thing read-only: a field being in
|
|
168
174
|
the schema is not the same as the field being in the data. Correct a wrong
|
|
169
175
|
premise and report the correction EXPLICITLY"; (7) when to escalate.
|
|
@@ -258,6 +264,15 @@ open one.
|
|
|
258
264
|
create** and, if `.tyran/` is missing, get it committed on the main
|
|
259
265
|
checkout first rather than copying it in — a copy makes four divergent
|
|
260
266
|
configs, which is the same defect one layer down.
|
|
267
|
+
**And place them OUTSIDE the directories Tyran governs.** A worktree under
|
|
268
|
+
`.claude/` or `.tyran/` fails the opposite way: every file in it, `src/**`
|
|
269
|
+
included, repo-relativizes into Tyran's own artefact namespace, matches no
|
|
270
|
+
rule written for product code, and falls through to the policy's
|
|
271
|
+
`default: GATED` — which denies a subagent unconditionally. The implementer
|
|
272
|
+
cannot edit anything and has no legitimate route through. Measured: two
|
|
273
|
+
implementers restarted and one fix delivered as a hand-applied diff.
|
|
274
|
+
Siblings of the checkout (`../<repo>-<slug>`) sidestep it, whatever
|
|
275
|
+
convention the repo already had.
|
|
261
276
|
- **Leases are files.** Every worktree and every heavy slot has
|
|
262
277
|
`.tyran/initiatives/<slug>/locks/<resource>.lease` holding holder,
|
|
263
278
|
purpose, story and expiry. A handoff BEGINS by taking the lease — an
|