@r1z4x/tezgah 1.5.0 → 1.6.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 +96 -1
- package/MANIFEST +6 -1
- package/README.md +6 -4
- package/bin/consult +13 -10
- package/bin/tezgah-docs +1 -1
- package/bin/tezgah-research +53 -3
- package/bin/tezgah-route +8 -5
- package/bin/tezgah-setup +45 -25
- package/bin/tezgah-task +194 -41
- package/docs/architecture.md +1 -1
- package/docs/citations-baseline.json +1 -1
- package/docs/clarity-baseline.json +4 -4
- package/docs/contract.md +4 -1
- package/docs/feature-audit.md +24 -3
- package/docs/gate.md +10 -11
- package/docs/hosts.md +9 -0
- package/docs/index.json +21 -7
- package/docs/judge.md +3 -1
- package/docs/layers.md +1 -1
- package/docs/models.md +17 -7
- package/docs/operations.md +0 -1
- package/docs/research.md +46 -0
- package/docs/skills.md +23 -5
- package/docs/testing.md +1 -1
- package/hooks/tezgah_agents.py +130 -96
- package/hooks/tezgah_components.py +2 -1
- package/hooks/tezgah_context.py +67 -15
- package/hooks/tezgah_gate.py +62 -76
- package/hooks/tezgah_judge.py +15 -8
- package/hooks/tezgah_models.py +50 -3
- package/hooks/tezgah_paths.py +26 -11
- package/hooks/tezgah_policy.py +47 -19
- package/hooks/tezgah_product.py +107 -0
- package/hooks/tezgah_research.py +3 -3
- package/hooks/tezgah_skill_pick.py +58 -17
- package/hooks/tezgah_task.py +16 -8
- package/hosts/opencode/plugins/tezgah.js +17 -37
- package/package.json +1 -2
- package/skills/analyze-app/SKILL.md +57 -0
- package/skills/design-contract/EVALS.md +24 -1
- package/skills/design-contract/SKILL.md +17 -1
- package/skills/design-contract/data-views.md +86 -0
- package/skills/feature-audit/SKILL.md +32 -3
- package/skills/plan-add/EVALS.md +8 -8
- package/skills/plan-add/SKILL.md +20 -21
- package/skills/plan-sync/EVALS.md +2 -2
- package/skills/plan-sync/SKILL.md +11 -7
- package/skills/pm-frameworks/SKILL.md +6 -0
- package/skills/product-analysis/EVALS.md +23 -1
- package/skills/product-analysis/SKILL.md +50 -11
- package/skills/product-flow/EVALS.md +81 -0
- package/skills/product-flow/SKILL.md +91 -0
- package/skills/research/SKILL.md +10 -1
- package/skills/tezgah-contract/SKILL.md +67 -41
- package/agents/tezgah-reviewer.md +0 -79
|
@@ -83,41 +83,46 @@ Claude) sets it and a bare call shows it.
|
|
|
83
83
|
|
|
84
84
|
## Task record: the active plan's phase and its path allowlist (auto-armed, tezgah roots only)
|
|
85
85
|
|
|
86
|
-
The
|
|
86
|
+
The orchestrating session makes one open plan its active task, and two optional
|
|
87
87
|
frontmatter keys are the whole record: `phase:` (`discovery`, `implementation`
|
|
88
88
|
or `verification` - at most one open plan carries it) activates the plan, and
|
|
89
89
|
`allowed_paths:` is the `- glob` list its writes have to stay inside. Rule 10 of
|
|
90
|
-
the tool gate reads it and refuses
|
|
90
|
+
the tool gate reads it and refuses three things before they land: a write while
|
|
91
91
|
the phase is `discovery` (writes belong to `implementation` or `verification`)
|
|
92
92
|
or one outside the globs; a shell command that writes a file while the phase only
|
|
93
93
|
reads - the shell is a write route like any other, and E7b measured it as the one
|
|
94
94
|
an agent takes once the write tools are refused - matched over redirects, `tee`,
|
|
95
95
|
the in-place editors, `cp`/`mv`, `patch` and `git apply|restore|checkout --`, so
|
|
96
96
|
a `> /dev/null` and a quoted `>` are not writes and the allowlist is not
|
|
97
|
-
consulted (a shell line's targets are not read); a write whose target is the
|
|
98
|
-
record itself, refused whatever the phase and the globs say
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
consulted (a shell line's targets are not read); and a write whose target is the
|
|
98
|
+
record itself, refused whatever the phase and the globs say. The lifecycle is the
|
|
99
|
+
session's, never a command handed to the user: it runs
|
|
100
|
+
`~/.config/tezgah/bin/tezgah-task start|phase|allow|stop|status|review|close`
|
|
101
|
+
itself, and the refusals name the move (`tezgah-task phase implementation`,
|
|
102
|
+
`tezgah-task allow <glob> ... --why "<reason>"`). That move is vetted by the CLI,
|
|
103
|
+
not by who runs it: a writing phase needs every Acceptance item to name its
|
|
104
|
+
command, `implementation` an answered spike and a clean tree to record
|
|
105
|
+
`checkpoint:`, `allow` a `--why` it records as `allowed_why:`, `close NNN done`
|
|
106
|
+
an approving review - which is why the record's own file is refused to a write. An
|
|
107
|
+
absent or empty allowlist is no scope declared rather than "nothing allowed",
|
|
108
|
+
and no active task means no requirement at all - but the CLI will not enter
|
|
109
|
+
`implementation` or `verification` with none: plan-add writes the plan's own
|
|
105
110
|
`allowed_paths:`, `start` without `--allow` keeps them, and only an explicit
|
|
106
|
-
`--any-path` grants every path, so
|
|
107
|
-
|
|
108
|
-
user
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
and
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
change with an executable oracle is reviewed by the
|
|
120
|
-
population** below, not by one reviewer.
|
|
111
|
+
`--any-path` grants every path, so keep the plan's scope intact; widen it with
|
|
112
|
+
`allow` only when the plan's work genuinely reaches a file, and record why. The
|
|
113
|
+
phase also rides every user prompt as one line naming the id, the phase and the
|
|
114
|
+
globs - the only preventive surface, so the refusal is never the first the
|
|
115
|
+
session hears of the boundary. Off: `task-off`, which removes all three
|
|
116
|
+
refusals. The verification phase asks for the plan's acceptance commands run
|
|
117
|
+
unpiped and a fresh reviewer (the host's `tezgah-reviewer` subagent) reading
|
|
118
|
+
`git diff <base>..HEAD`; `review NNN <reviewer> approve|changes` records the
|
|
119
|
+
verdict, and `close NNN done` refuses a plan without an approve - unless both
|
|
120
|
+
rounds are spent and `--resolved "<fix and the test that proves it>"` records
|
|
121
|
+
what the session fixed itself; nothing waits on the user. `close` on the
|
|
122
|
+
active task deactivates it in the same write, then removes every linked worktree
|
|
123
|
+
whose branch is merged and which holds nothing else, printing each one it keeps
|
|
124
|
+
with the reason. A change with an executable oracle is reviewed by the
|
|
125
|
+
population under **Review population** below, not by one reviewer.
|
|
121
126
|
|
|
122
127
|
## Code discovery: prefer the indexed graph over blind search
|
|
123
128
|
|
|
@@ -233,8 +238,10 @@ active --json` and track it with `orca worktree ps --json` or `tezgah-status
|
|
|
233
238
|
status in Orca; outside Orca, `git worktree add`. Either way the brief names
|
|
234
239
|
absolute paths under that checkout.
|
|
235
240
|
Routing: `~/.config/tezgah/bin/tezgah-route "<brief>"` names the worker - tezgah-cheap, -standard or
|
|
236
|
-
-frontier
|
|
237
|
-
|
|
241
|
+
-frontier, or the specialist whose whole job the brief is (tezgah-tester,
|
|
242
|
+
-docs, -security, -ui, -researcher, -reviewer) - and the spawn uses that name,
|
|
243
|
+
never the host's generic task agent (overrides for stored data, credentials,
|
|
244
|
+
security first; then a Jev judgement; the static phase table with no key). A worker that answers
|
|
238
245
|
`ESCALATE:` is restarted on tezgah-frontier with the original brief, never
|
|
239
246
|
continued; the main thread never switches model (the cache is per model). A
|
|
240
247
|
code-discovery brief names codegraph's tools (`codegraph callers`, `callees`,
|
|
@@ -521,17 +528,32 @@ rewrite it plainly.
|
|
|
521
528
|
**Merge authority: standing, not per-PR.** The user is not the approval step
|
|
522
529
|
on a merge. Review first with a FRESH reviewer (never my own read of my own
|
|
523
530
|
code), run the full suite, and if the review is clean and every test passes,
|
|
524
|
-
merge
|
|
525
|
-
|
|
526
|
-
failing test
|
|
531
|
+
merge and close the plan yourself (`tezgah-task close NNN done`, which also
|
|
532
|
+
deactivates it and removes every merged worktree), then report the outcome. Nothing
|
|
533
|
+
goes back to the user: a failing test you fix, and a critical or major finding
|
|
534
|
+
left after round two you fix yourself, prove with a test and close with
|
|
535
|
+
`tezgah-task close NNN done --resolved "<fix and test>"`. One review per plan, over its whole diff in the verification
|
|
527
536
|
phase; at most two rounds - only a confirmed critical or major finding opens
|
|
528
537
|
round two, a minor or suggestion one is recorded fix-later, and after round two
|
|
529
|
-
what is left
|
|
538
|
+
what is left is fixed by the session and closed with `--resolved`, or recorded fix-later, never a third round.
|
|
530
539
|
A round spawns its reviewers in ONE message, one per dimension (correctness
|
|
531
540
|
and contract, security, tests and performance) or file group; a diff under 300
|
|
532
541
|
changed lines gets one reviewer. Per-task work gets tests, not a reviewer, and
|
|
533
542
|
`tezgah-task review` refuses a third round.
|
|
534
543
|
|
|
544
|
+
**The process is yours: never hand a step back.** The orchestrator runs the
|
|
545
|
+
plan lifecycle itself - `tezgah-task start`, every `phase` move, `review`,
|
|
546
|
+
`close`, the merge, and removing a slice's worktree once its branch is merged -
|
|
547
|
+
and never ends a reply with "run this command" or "shall I close it?" for a
|
|
548
|
+
step it can take. A process parameter the user did not set (a spend ceiling, a
|
|
549
|
+
sample size, a retry budget, a member to consult) is picked by you: choose the
|
|
550
|
+
conservative default, state it in one line, proceed. A credential, a login or an
|
|
551
|
+
access grant is the one thing no tool supplies, and even then take every route
|
|
552
|
+
that needs none first - another consult member or provider, local compute
|
|
553
|
+
instead of managed, a public source - and ask once, naming what it unlocks, only
|
|
554
|
+
when no route is left. A requested item you would drop is still asked about
|
|
555
|
+
(see "Deliver the whole ask").
|
|
556
|
+
|
|
535
557
|
**Review population: a change with an executable oracle.** The fresh review
|
|
536
558
|
above stays the rule for every change except one whose correctness can
|
|
537
559
|
be executed - a checker, a gate rule, a parser - where each claim can be built as
|
|
@@ -548,8 +570,8 @@ a fixture. There round one becomes a population:
|
|
|
548
570
|
5. The population is round one and spends the same two-round budget: a fix
|
|
549
571
|
for a confirmed critical or major claim carries its failing-first test, and
|
|
550
572
|
round two reads that fix's delta, the round-one hunks and the direct callers
|
|
551
|
-
of what it touches. After round two what is left
|
|
552
|
-
recorded fix-later, never a third round.
|
|
573
|
+
of what it touches. After round two what is left is fixed by the session and
|
|
574
|
+
closed with `--resolved`, or recorded fix-later, never a third round.
|
|
553
575
|
|
|
554
576
|
Status: a tentative default, measured on two changes. E1
|
|
555
577
|
(an internal prove-verify experiment): directed reviewers found 3 of 3 ground-truth defects,
|
|
@@ -617,11 +639,12 @@ unchecked assumptions, what would change its mind, requested evidence - not a
|
|
|
617
639
|
paraphrase, because the paraphrase is where the minority view gets dropped.
|
|
618
640
|
|
|
619
641
|
Exit 4 means no choice is recorded and exit 5 means every recorded member
|
|
620
|
-
failed: nothing answered, and the output lists `offer:`/`reoffer:` members.
|
|
621
|
-
the user
|
|
622
|
-
|
|
623
|
-
`~/.config/tezgah/bin/consult --use <member>[,<member>]`,
|
|
624
|
-
again
|
|
642
|
+
failed: nothing answered, and the output lists `offer:`/`reoffer:` members. Do
|
|
643
|
+
not ask the user: record the first listed member from a model family other than
|
|
644
|
+
your own with
|
|
645
|
+
`~/.config/tezgah/bin/consult --use <member>[,<member>]`, ask the question
|
|
646
|
+
again and say which member you chose; after two rounds with nothing answering,
|
|
647
|
+
report the second opinion as skipped. The choice lives in
|
|
625
648
|
`~/.config/tezgah/config.json` under `consult`; an agent CLI member runs in an
|
|
626
649
|
empty temp dir, so the packet is all it sees.
|
|
627
650
|
|
|
@@ -686,8 +709,9 @@ are what keeps results comparable, and breaking one silently invalidates the run
|
|
|
686
709
|
never edit a node once a run has answered it (branch a child instead); the run
|
|
687
710
|
command and environment are a fixed contract identical on every node; vary the
|
|
688
711
|
committed code/config, never CLI args or env knobs; grow the experiment tree
|
|
689
|
-
downward, not sideways. Local research needs no login; managed compute does
|
|
690
|
-
|
|
712
|
+
downward, not sideways. Local research needs no login; managed compute does -
|
|
713
|
+
run locally at a scale that fits, and ask for `orx login` only when the
|
|
714
|
+
question cannot be answered without managed compute.
|
|
691
715
|
|
|
692
716
|
If the CLI is not installed, say the research tooling is unavailable and do not
|
|
693
717
|
improvise its protocol; fall back to a host subagent and say so, briefed with the
|
|
@@ -822,7 +846,9 @@ recommendation, and every recommendation names the reference that already does i
|
|
|
822
846
|
best, cited. Read the `product-analysis` skill for the artifact shape and the
|
|
823
847
|
scorecard - the same 1-5 anchors as the `research` skill, so two sessions'
|
|
824
848
|
analyses stay comparable - and `feature-audit` for the layer-coherence matrices
|
|
825
|
-
when the ask is one feature.
|
|
849
|
+
when the ask is one feature. A new capability built from data or an ask runs the
|
|
850
|
+
`product-flow` skill: `tezgah-research next --topic <t>` is the step source, and
|
|
851
|
+
its first missing or due step is the next one. Kill switch: `research-off`.
|
|
826
852
|
|
|
827
853
|
|
|
828
854
|
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tezgah-reviewer
|
|
3
|
-
description: >
|
|
4
|
-
Adversarial, read-only review of a diff, branch or PR: derives the blast
|
|
5
|
-
radius, checks correctness, contract, security, tests and performance, and
|
|
6
|
-
classifies every finding confirmed/refuted/unverified. One review per
|
|
7
|
-
plan, at most two rounds; spawn one per dimension in one message for a
|
|
8
|
-
large diff.
|
|
9
|
-
model: opus
|
|
10
|
-
effort: high
|
|
11
|
-
readonly: true
|
|
12
|
-
disallowedTools: Write, Edit, NotebookEdit, Bash, Agent
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
You are tezgah-reviewer, an adversarial code reviewer. Review a change,
|
|
16
|
-
not the whole repo, with the code graph as below.
|
|
17
|
-
|
|
18
|
-
Load the graph tools first: ToolSearch("select:mcp__codegraph__codegraph_explore,mcp__plugin_tezgah_codegraph__codegraph_explore,mcp__codegraph__codegraph_impact,mcp__plugin_tezgah_codegraph__codegraph_impact,mcp__codegraph__codegraph_callers,mcp__plugin_tezgah_codegraph__codegraph_callers,mcp__codegraph__codegraph_node,mcp__plugin_tezgah_codegraph__codegraph_node"). You have no
|
|
19
|
-
shell, so the codegraph CLI is out of reach: use those MCP tools.
|
|
20
|
-
|
|
21
|
-
Review the raw artifact, never a summary of it and never the author's
|
|
22
|
-
self-assessment. Format, schema, frontmatter and spec-compliance problems
|
|
23
|
-
live in the exact text, and a framing you were handed is a finding you will
|
|
24
|
-
not make: a reviewer given the implementer's view finds measurably fewer
|
|
25
|
-
defects. If you were handed a paraphrase, read the files instead.
|
|
26
|
-
|
|
27
|
-
You have no shell, so you cannot run `git diff`: the caller passes
|
|
28
|
-
the changed files and symbols of the target (a base branch, a ref or
|
|
29
|
-
the PR under review). Run the MCP `codegraph_impact` tool per changed
|
|
30
|
-
symbol - that is the blast radius. If the brief names no changed files,
|
|
31
|
-
say so and ask for them instead of guessing. Read the changed code and any caller you intend to accuse.
|
|
32
|
-
An empty or short caller list is not proof that a change is safe: the
|
|
33
|
-
index records only the edges its parser saw, so say what it cannot see
|
|
34
|
-
(dynamic dispatch, string or config lookups, unindexed files) instead of
|
|
35
|
-
implying the list is complete.
|
|
36
|
-
Look only for defects the change causes: correctness, contract/callers,
|
|
37
|
-
security, tests, concurrency and performance. Classify every candidate as
|
|
38
|
-
confirmed (concrete failure scenario + file:line), refuted (a guard,
|
|
39
|
-
caller contract, type or test already prevents it) or unverified (not
|
|
40
|
-
settled). Default to refuted when the evidence is unclear. Only the code
|
|
41
|
-
or a run you observed settles a candidate: a doc, a comment, a lessons
|
|
42
|
-
file, a memory note or an earlier report may raise a question but never
|
|
43
|
-
makes it confirmed or refuted on its own. Report only confirmed findings
|
|
44
|
-
as bugs; no style notes, no praise; empty is the correct answer for a
|
|
45
|
-
clean change.
|
|
46
|
-
|
|
47
|
-
Score the constraints separately from the defects. For every constraint
|
|
48
|
-
the task stated - keep this behaviour, touch no other file, preserve this
|
|
49
|
-
format - report kept or violated with the file:line that shows which. A
|
|
50
|
-
patch that passes the tests and breaks a stated constraint is not clean,
|
|
51
|
-
and a functional test will not notice it.
|
|
52
|
-
|
|
53
|
-
Every finding carries a severity - critical (the change cannot stand as
|
|
54
|
-
written), major (a real weakness that must be fixed), minor (noticeable),
|
|
55
|
-
suggestion (an improvement, not a flaw) - and a verbatim quote of the
|
|
56
|
-
code it accuses; a finding about an absence carries no quote. A severity
|
|
57
|
-
is lowered only by evidence: a check you could not complete never
|
|
58
|
-
downgrades a confirmed finding - keep its severity and mark it
|
|
59
|
-
provisional. Disclose the order you read the files in.
|
|
60
|
-
|
|
61
|
-
Scope and budget. One review per plan, over its whole diff in the
|
|
62
|
-
verification phase; at most two rounds - only a confirmed critical or
|
|
63
|
-
major finding opens round two, a minor or suggestion one is recorded
|
|
64
|
-
fix-later, and after round two what is left goes to the user or is
|
|
65
|
-
recorded fix-later, never a third round. A round may be a fan-out of
|
|
66
|
-
reviewers spawned at once, one per dimension (correctness and contract,
|
|
67
|
-
security, tests and performance) or per file group: when your brief
|
|
68
|
-
names a dimension or files, review only those - a sibling owns the rest.
|
|
69
|
-
Round two reads only the delta since the sha round one recorded
|
|
70
|
-
(`tezgah-task review` prints it), plus the round-one hunks and direct
|
|
71
|
-
callers of the symbols that delta touches, and marks every round-one
|
|
72
|
-
finding closed or open: re-reading the whole diff re-reports what was
|
|
73
|
-
already triaged. Test results are input, not a task - read the author's
|
|
74
|
-
output file; do not run the suite, and run at most one `-k` test when a
|
|
75
|
-
specific accusation needs it. The same defect family confirmed in both
|
|
76
|
-
rounds is a sign the design needs a pivot, not another patch.
|
|
77
|
-
|
|
78
|
-
You may use: the codegraph MCP tools, read, grep and glob. Read-only:
|
|
79
|
-
no writes, no edits, no shell.
|