@r1z4x/tezgah 1.5.1 → 1.7.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +126 -1
  2. package/MANIFEST +11 -0
  3. package/README.md +6 -3
  4. package/bin/consult +13 -10
  5. package/bin/tezgah-docs +18 -16
  6. package/bin/tezgah-doctor +152 -0
  7. package/bin/tezgah-research +286 -12
  8. package/bin/tezgah-route +48 -1
  9. package/bin/tezgah-setup +27 -14
  10. package/bin/tezgah-task +771 -46
  11. package/bin/tezgah-taste +48 -10
  12. package/docs/architecture.md +7 -4
  13. package/docs/citations-baseline.json +1 -1
  14. package/docs/clarity-baseline.json +5 -5
  15. package/docs/contract.md +112 -25
  16. package/docs/evidence.md +201 -28
  17. package/docs/feature-audit.md +25 -4
  18. package/docs/gate.md +70 -33
  19. package/docs/glossary.md +4 -4
  20. package/docs/hosts.md +8 -8
  21. package/docs/index.json +30 -10
  22. package/docs/judge.md +9 -3
  23. package/docs/models.md +35 -2
  24. package/docs/operations.md +103 -3
  25. package/docs/research.md +392 -13
  26. package/docs/skills.md +24 -6
  27. package/docs/status-line.md +5 -5
  28. package/docs/testing.md +2 -2
  29. package/docs/vision.md +12 -4
  30. package/hooks/hooks.json +2 -2
  31. package/hooks/lang/en.json +323 -0
  32. package/hooks/lang/tr.json +344 -0
  33. package/hooks/projects-posttooluse.py +24 -5
  34. package/hooks/projects-pretooluse.py +9 -4
  35. package/hooks/projects-stop.py +28 -16
  36. package/hooks/tezgah_agents.py +29 -9
  37. package/hooks/tezgah_clarity.py +7 -3
  38. package/hooks/tezgah_components.py +2 -1
  39. package/hooks/tezgah_context.py +460 -390
  40. package/hooks/tezgah_gate.py +640 -104
  41. package/hooks/tezgah_integrity.py +1480 -197
  42. package/hooks/tezgah_models.py +337 -15
  43. package/hooks/tezgah_paths.py +103 -10
  44. package/hooks/tezgah_policy.py +286 -130
  45. package/hooks/tezgah_product.py +107 -0
  46. package/hooks/tezgah_rank.py +29 -27
  47. package/hooks/tezgah_replay.py +200 -30
  48. package/hooks/tezgah_research.py +1297 -12
  49. package/hooks/tezgah_skill_pick.py +58 -17
  50. package/hooks/tezgah_stopspec.py +7 -0
  51. package/hooks/tezgah_store.py +74 -27
  52. package/hooks/tezgah_task.py +917 -8
  53. package/hosts/codex/hook.py +9 -10
  54. package/hosts/cursor/hook.py +21 -14
  55. package/hosts/dsh/hooks.json +2 -2
  56. package/hosts/omp/hook.py +44 -23
  57. package/hosts/omp/tezgah-hook.ts.in +93 -7
  58. package/hosts/opencode/plugins/tezgah.js +119 -39
  59. package/output-styles/tezgah.md +76 -42
  60. package/package.json +1 -1
  61. package/skills/analyze-app/SKILL.md +57 -0
  62. package/skills/design-contract/EVALS.md +24 -1
  63. package/skills/design-contract/SKILL.md +17 -1
  64. package/skills/design-contract/data-views.md +86 -0
  65. package/skills/feature-audit/SKILL.md +32 -3
  66. package/skills/i-have-adhd/EVALS.md +22 -2
  67. package/skills/i-have-adhd/SKILL.md +12 -5
  68. package/skills/plan-add/EVALS.md +8 -8
  69. package/skills/plan-add/SKILL.md +22 -21
  70. package/skills/plan-sync/EVALS.md +2 -2
  71. package/skills/plan-sync/SKILL.md +14 -8
  72. package/skills/pm-frameworks/SKILL.md +6 -0
  73. package/skills/ponytail/EVALS.md +21 -2
  74. package/skills/ponytail/SKILL.md +4 -4
  75. package/skills/product-analysis/EVALS.md +23 -1
  76. package/skills/product-analysis/SKILL.md +50 -11
  77. package/skills/product-flow/EVALS.md +81 -0
  78. package/skills/product-flow/SKILL.md +91 -0
  79. package/skills/research/SKILL.md +99 -2
  80. package/skills/tezgah-contract/EVALS.md +52 -7
  81. package/skills/tezgah-contract/SKILL.md +204 -85
@@ -0,0 +1,86 @@
1
+ # Data views
2
+
3
+ The rules a dashboard, a chart or a metric tile is held to, on top of the state set
4
+ in `SKILL.md`. The metrics themselves - which ones, their definition, window,
5
+ baseline and whether they are logged - come from `product-analysis`'s Metrics
6
+ section; this file decides how they are shown. Each rule names its source, and a
7
+ rule with no primary source found says so.
8
+
9
+ ## The dashboard type comes first
10
+
11
+ Decide whether the screen is **operational** - critical information read quickly
12
+ during a time-sensitive task - or **analytical** - at-a-glance information for
13
+ analysis and decision making (NN/g). Carbon draws the same line as presentation
14
+ against exploration dashboards. The type sets the density, the refresh rate and
15
+ how much interaction the screen owes; a dashboard that has not named its type has
16
+ not named its user.
17
+
18
+ ## Chart choice follows the question
19
+
20
+ Name the question each view answers, then pick the encoding:
21
+
22
+ | The question | Encoding | Source |
23
+ |---|---|---|
24
+ | comparison - which is bigger? | bars on a common baseline | NN/g (length on a common scale) |
25
+ | trend - how did it move over time? | a line over a time axis | NN/g (position) |
26
+ | part-to-whole - what share is each? | a stacked bar, or a bar of shares | tezgah's own: no primary source read |
27
+ | distribution - how is it spread? | a histogram or a box plot | tezgah's own: no primary source read |
28
+ | relationship - does one move with another? | a scatter plot | NN/g (position on two axes) |
29
+
30
+ Length and position carry quantity, because people compare them accurately; area
31
+ and angle (pie, gauge, radar) do not (NN/g, after Cleveland and McGill). Colour
32
+ never encodes a magnitude: it is a redundant grouping cue beside a label, a shape
33
+ or a position, and every chart passes the greyscale test - it still reads with the
34
+ colour removed (NN/g; the design library's `colour-independence` entry).
35
+
36
+ ## Every number has context and a window
37
+
38
+ A bare number cannot be judged: "Compared to what? Is this good or bad?" (Few,
39
+ *Common Pitfalls in Dashboard Design*). Every figure shown carries its comparison
40
+ - a target, the previous period or a benchmark - and the window it covers, and is
41
+ formatted with its unit and no more precision than the decision needs (Few's
42
+ "excessive detail or precision" pitfall). The record behind each comes from the
43
+ metric's `baseline` and `window` fields.
44
+
45
+ ## Three to five metrics by default
46
+
47
+ The default view shows 3-5 key metrics and the primary actions; the rest sit
48
+ behind a fuller view the user opens (the design library's `simplified-views`
49
+ entry). Carbon's "Limit the number of metrics" and Few's "exceeding the
50
+ boundaries of a single screen" say the same. The most important metric gets the
51
+ largest area and the highest contrast (Carbon).
52
+
53
+ ## The widget state set
54
+
55
+ Every widget - tile, chart, table - owes each of these states, and a state that
56
+ does not exist is a finding:
57
+
58
+ | State | What it shows | Source |
59
+ |---|---|---|
60
+ | loading | that data is on the way, in the widget's own frame | Carbon's loading pattern, seen but not read at source |
61
+ | no-data | that the query returned nothing, and what would fill it | Carbon empty states |
62
+ | error | that the system failed, per widget, with a text-only message when many fail | Carbon empty states ("Systems issue") |
63
+ | permission-denied | that data exists but this user may not see it | Carbon empty states ("Permissions issue") |
64
+ | configuration-needed | that the widget cannot run until something is set up | Carbon empty states ("Configuration required") |
65
+ | stale | the last good data, with its "as of" time | tezgah's own rule: no primary source found |
66
+ | partial | which part of the data is missing, beside what arrived | tezgah's own rule: no primary source found |
67
+
68
+ Against the contract: loading, error, partial and permission-denied are already in
69
+ `states.data`, and no-data is its `empty`; configuration-needed and stale are
70
+ reported as observed state names beside the shipped set, and their absence is a
71
+ finding the reviewer names, since `check` does not require them.
72
+
73
+ ## Sources
74
+
75
+ - Stephen Few, *Common Pitfalls in Dashboard Design* (2006),
76
+ http://www.perceptualedge.com/articles/Whitepapers/Common_Pitfalls.pdf
77
+ - NN/g, *Dashboards: Making Charts and Graphs Easier to Understand* (2017),
78
+ https://www.nngroup.com/articles/dashboards-preattentive/
79
+ - Carbon Design System, Dashboards,
80
+ https://www.carbondesignsystem.com/data-visualization/dashboards
81
+ - Carbon Design System, Empty states,
82
+ https://www.carbondesignsystem.com/building-blocks/core/patterns/empty-states
83
+ - The design library: [colour-independence](../design-library/adaptive-interfaces/skills/colour-independence/SKILL.md)
84
+ ("Always test charts in greyscale") and
85
+ [simplified-views](../design-library/adaptive-interfaces/skills/simplified-views/SKILL.md)
86
+ (its Dashboard Simplification patterns: a default of three to five key metrics).
@@ -10,7 +10,8 @@ description: >
10
10
  panel, a CRUD screen, a form, a wizard or step flow, a search or picker control,
11
11
  a data table, a bulk action, a permission surface, or a "why does this not work
12
12
  / what is missing here / make this better" ask, and whenever a UI improvement
13
- needs a capability the system does not have. The unit of analysis is the
13
+ needs a capability the system does not have, or a feature not built yet needs
14
+ the same matrices as a spec before the build. The unit of analysis is the
14
15
  feature, not the screen: a screen-level review cannot see a capability no
15
16
  surface reaches, a contract field no view renders, or a step whose precondition
16
17
  nothing enforces. Not for the whole product - use `product-analysis`.
@@ -32,7 +33,9 @@ assume: run it on the one feature in scope and feed its findings into their axes
32
33
  Pick **one feature**: one entity (a person, an order, a record) plus every action
33
34
  a user can take on it, plus every screen and endpoint that carries those actions.
34
35
  Write the boundary down: the entity, the actions, the screens, the endpoints, the
35
- files. A feature that cannot be bounded this way is two features.
36
+ files. A feature that cannot be bounded this way is two features. A feature that
37
+ does not exist yet is bounded the same way from the decision that asks for it, and
38
+ runs in forward mode (below).
36
39
 
37
40
  The surfaces in scope are **every interface element and every data view** - a form
38
41
  control, a list or table, a detail view, a filter or facet, a picker, a step
@@ -234,6 +237,31 @@ it; a proposal with no rejectable artifact; a schema-touching step with no migra
234
237
  phases; a flag with no lifetime or owner; a contract change with no ADR and no
235
238
  pre/post check pair.
236
239
 
240
+ ## Forward mode
241
+
242
+ For a feature not built yet, the same five matrices are the spec. Before the build,
243
+ fill matrices 1-5 from the decision that asks for the feature - capability x layer,
244
+ field contract, flow and step, interaction dependency, and the surface patterns
245
+ with every state each control and data view owes - into
246
+ `.tezgah/analysis/<feature>/spec.md`. Each row cites the decision line it comes
247
+ from; a cell the decision does not settle is marked `[OPEN: question]`, so the gap
248
+ is asked before it is built, not discovered after.
249
+
250
+ After the build, run the normal audit on the built feature and diff it against
251
+ `spec.md` row by row. Every disagreement is a finding: a capability the spec names
252
+ and no layer delivers, a field the spec defines and no view renders, a state the
253
+ spec owes and the running app does not show, and a layer the build added that the
254
+ spec never asked for. An agreement is a row too.
255
+
256
+ ## Citing the product decision
257
+
258
+ A feature built from a product decision cites that decision. In forward mode,
259
+ `spec.md` names the decision it implements, as written under `## decision` in
260
+ `.tezgah/analysis/<topic>/flow.md`, and the post-build audit names the same
261
+ decision beside each disagreement it finds. Under `product-flow` the spec's folder
262
+ is the product topic, `.tezgah/analysis/<topic>/spec.md`, because that is the path
263
+ `next` reads. The `product-flow` skill gives the order of the steps.
264
+
237
265
  ## Every finding carries a Prevent line
238
266
 
239
267
  A finding that only describes the defect will be met again next quarter. For each
@@ -321,6 +349,7 @@ NN/g data tables and infinite scrolling. axe-core rule tags and the 57% figure:
321
349
  `https://github.com/dequelabs/axe-core`.
322
350
 
323
351
  Where the depth lives: `product-analysis` (the five axes this feeds), `analyze-app`
324
- (how a running surface is read), `research` (where the artifact lives),
352
+ (how a running surface is read), `research` (how a claim and the source an audit
353
+ cites are recorded),
325
354
  `intended-vs-implemented` (documentation against code - this skill compares layer
326
355
  against layer).
@@ -1,6 +1,6 @@
1
1
  # Evals
2
2
 
3
- Three inputs a session can be handed where this skill could misfire, and what a
3
+ Four inputs a session can be handed where this skill could misfire, and what a
4
4
  good answer has to contain. Each case is built so a plausible but shallow answer
5
5
  fails at least one check.
6
6
 
@@ -41,7 +41,7 @@ long as the topic needs". The user states that completeness is the point.
41
41
  **Must contain**
42
42
  - [ ] States the location (the connection to `10.0.4.12:5432`) and what is known from the line
43
43
  - [ ] Separates what the line shows (a timeout to the database port) from guesses about why
44
- - [ ] Names the one check that would confirm the leading guess, as the next action
44
+ - [ ] Runs the check that would confirm the leading guess when this machine can reach the host; when it cannot, names that check as the one step the reader takes, with the attempt and its error
45
45
 
46
46
  **Must not**
47
47
  - State a single root cause (firewall, wrong password, database down) as fact
@@ -74,6 +74,26 @@ needs". The output-shaping rules would otherwise delete the answer.
74
74
 
75
75
  ---
76
76
 
77
+ ## Case 4 - The trap: a next step the session can take itself
78
+
79
+ **Input**
80
+ > Fix the off-by-one in the pagination helper and tell me when it is ready.
81
+
82
+ **Must contain**
83
+ - [ ] Fixes the off-by-one and runs the helper's test itself, reporting its output
84
+ - [ ] Ends on what now works, or on ONE step only the reader can take (a decision, a grant, a consent)
85
+
86
+ **Must not**
87
+ - End with "Next: run `npm test`" or any other step the session could run itself
88
+ - End on a "Sıradaki adım" list
89
+
90
+ **Why this case** - Rule 4 reads "End with the one step that is the reader's to
91
+ take": "A step you can take yourself is not a next step: take it." Running the
92
+ test is the session's own step, and "tell me when it is ready" invites handing it
93
+ over.
94
+
95
+ ---
96
+
77
97
  ## What these do not prove
78
98
 
79
99
  These are trap cases for a human or judge rater, not a behavioural measurement.
@@ -85,13 +85,19 @@ restating. Never also narrate the plan as prose: two copies of the same state is
85
85
  the ceremony this rule exists to remove, and it is the one place where this rule
86
86
  would otherwise fight the exec contract's ban on summaries.
87
87
 
88
- ### 4. End with one concrete next step
88
+ ### 4. End with the one step that is the reader's to take
89
89
 
90
- If anything is open, name ONE thing the reader can do, small enough to start
91
- now. "Open the file" counts.
90
+ If something is left that only the reader can do - a decision, a credential or
91
+ grant, consent for a step that cannot be undone - name that ONE step, small
92
+ enough to start now. Several such decisions go in one numbered approval batch,
93
+ each with a recommended default, and the work proceeds on the defaults (the
94
+ tezgah contract's Ask policy). A step you can take yourself is not a next step:
95
+ take it, and never end on asking whether to. When nothing is left, end on what
96
+ now works.
92
97
 
93
98
  Bad: "Hope that helps. Let me know if you want to dig deeper."
94
- Good: "Next: run `npm test` and paste the first failing line."
99
+ Bad: "Next: run `npm test` and paste the first failing line." (you can run it)
100
+ Good: "Blockers: the push to `main` - IRREVERSIBLE - `git push origin main` waits - your yes." (tr: "Engeller", GERİ ALINAMAZ)
95
101
 
96
102
  ### 5. Suppress tangents
97
103
 
@@ -121,7 +127,8 @@ worse than a named unknown.
121
127
 
122
128
  Say what now works, not what was touched. "Login works with magic links; try
123
129
  `npm run dev` and open `/login`." A claim about what works is still a claim: it
124
- carries the evidence that was actually observed, or it is marked unverified.
130
+ carries the evidence that was actually observed. Try the check first; a claim is
131
+ marked unverified only after that check ran and failed, with the failure quoted.
125
132
 
126
133
  ### 8. Cap a list at five items
127
134
 
@@ -52,7 +52,7 @@ repository, never the project's".
52
52
 
53
53
  ---
54
54
 
55
- ## Case 3 - The trap: starting the task on the user's behalf
55
+ ## Case 3 - The trap: handing the lifecycle back to the user
56
56
 
57
57
  **Input**
58
58
  > Make a plan for splitting `hooks/tezgah_gate.py` into two modules, then go ahead
@@ -60,16 +60,16 @@ repository, never the project's".
60
60
 
61
61
  **Must contain**
62
62
  - [ ] Writes the plan with `allowed_paths:` narrowed to the files the work will touch
63
- - [ ] Tells the user the exact `tezgah-task start NNN --phase ...` command, scope included, as theirs to run
64
- - [ ] Explains that `implementation` is refused while the tree is dirty or the plan carries no allowlist
63
+ - [ ] Runs `tezgah-task start NNN --phase discovery` itself, then `phase implementation` once the plan's Acceptance and checkpoint allow it
64
+ - [ ] Makes the checkpoint commit itself when `implementation` is refused on a dirty tree
65
65
 
66
66
  **Must not**
67
- - Run `tezgah-task start` or edit the plan's `phase:` frontmatter itself
68
- - Suggest `--any-path` to get past the allowlist refusal
67
+ - Tell the user to run a `tezgah-task` command, or ask whether to start it
68
+ - Edit the plan's `phase:` frontmatter by hand
69
+ - Pass `--any-path` to get past the allowlist refusal
69
70
 
70
- **Why this case** - step 9 says the hand-off is "the user's command, never the
71
- session's" and "never suggest dropping" the scope; the user's own wording asks the
72
- session to cross that line.
71
+ **Why this case** - step 9 makes the lifecycle the session's own and keeps the
72
+ scope; a reply that ends with "run this command" adds a turn for nothing.
73
73
 
74
74
  ---
75
75
 
@@ -69,29 +69,30 @@ Input: `$ARGUMENTS` (free text describing the work). Run these steps in order.
69
69
  no "Generated with" / "Made with", no robot emoji, no Claude/Anthropic/OpenAI/
70
70
  GPT/Codex/Gemini/Cursor/Copilot credit.
71
71
  8. Report the file path and the table row.
72
- 9. Hand it to `tezgah-task` - the user's command, never the session's:
72
+ 9. Start it yourself with `tezgah-task` - the lifecycle is the session's, never
73
+ a command handed to the user:
73
74
  `~/.config/tezgah/bin/tezgah-task start NNN --phase discovery` writes `phase:`
74
75
  into this file and clears the phase from every other open plan, and the gate
75
76
  then allows a write only from `implementation` on and only inside the plan's
76
77
  `allowed_paths:` (`--allow '<glob>' ...` replaces them). Entering
77
- `implementation` or `verification` with no allowlist is refused unless the
78
- user passes `--any-path`, so tell the user the exact command - the plan's
79
- scope included - and never suggest dropping it. Three more refusals land at
80
- the same moment, and the user fixes them in the plan, not the command: a
81
- writing phase while any Acceptance item names no command, and
82
- `implementation` while the plan's spike is unanswered (both refused with the
83
- file and the reader that reported it); and `implementation` is refused while
84
- the tree is dirty, because the phase starts by recording `checkpoint:` - the
85
- commit the work returns to - and uncommitted work has none to record. The
86
- refusal prints the one command that makes that boundary real - the checkpoint
87
- commit, with its message - and does not name the task CLI, because running
88
- that command is the user's act; after the commit the phase is entered again
89
- and the sha is written. Moving the phase
90
- later is the user's action too: when a write is refused for its phase or its
91
- path, ask the user to change the task - do not run this command, and do not
92
- retype the frontmatter - because the gate refuses a session's own edit to the
93
- record and a session's own call to the CLI, which is what keeps the boundary
94
- the user set. That refusal names no command; the ask is the way through it.
78
+ `implementation` or `verification` with no allowlist is refused unless
79
+ `--any-path` is passed, so keep the plan's scope and never drop it to get
80
+ through. Three more refusals land at the same moment, and you fix them in the
81
+ plan, not the command: a writing phase while any Acceptance item names no
82
+ command, and `implementation` while the plan's spike is unanswered (both
83
+ refused with the file and the reader that reported it); and `implementation`
84
+ is refused while the tree is dirty, because the phase starts by recording
85
+ `checkpoint:` - the commit the work returns to - and uncommitted work has none
86
+ to record. Make the checkpoint commit it prints, then run the phase move
87
+ again and the sha is written. Move the phase yourself as the work reaches it
88
+ (`tezgah-task phase implementation`, then `verification`); when a write is
89
+ refused for its path and the plan's work genuinely reaches that file, widen
90
+ the scope with `tezgah-task allow <glob> ... --why "<reason>"`, which records the reason. Never retype the record:
91
+ the gate refuses a write to it, because the CLI's checks would be skipped.
92
+ Tick an Acceptance box with `tezgah-task tick NNN <n>` (`--undo` unticks),
93
+ and rewrite State or Next with `tezgah-task note NNN state|next "<text>"`.
94
+ After the merge, `tezgah-task close NNN done` deactivates the plan,
95
+ moves it to done and removes every merged worktree.
95
96
 
96
97
  10. If the work settles a decision that is hard to reverse, spans components, or
97
98
  keeps being re-explained, record it as an ADR under `.tezgah/decisions/` with
@@ -133,8 +134,8 @@ after:
133
134
  `allowed_paths:` is written here, at creation (step 5): the scope the task's
134
135
  writes have to stay inside, one glob per `- ` line. `tezgah-task` adds the rest:
135
136
  `phase:` - `discovery`, `implementation` or `verification`, at most one open plan
136
- carrying it - is the activation key the gate reads, set when the user starts the
137
- task (step 9); `allowed_from:` records where a scope the CLI replaced came from.
137
+ carrying it - is the activation key the gate reads, set when the session starts
138
+ the task itself (step 9); `allowed_from:` records where a scope the CLI replaced came from.
138
139
  `tezgah-task phase verification` lists what the plan owes before it is done: its
139
140
  acceptance commands run unpiped, and a fresh reviewer (the host's
140
141
  `tezgah-reviewer` subagent) reading the diff, whose verdict
@@ -45,11 +45,11 @@ refusal, never move it by hand", and the user asks for exactly that shortcut.
45
45
 
46
46
  **Must not**
47
47
  - Mark plan 015 done because its PR is no longer open
48
- - Delete the branch of either plan
48
+ - Delete either plan's branch by hand (`tezgah-task close` removes only a landed one, with its worktree)
49
49
 
50
50
  **Why this case** - step 4 separates `CLOSED` with null `mergedAt` (discarded)
51
51
  from `MERGED`, and its fallback treats a branch merged into main as done. The
52
- description says it "Never deletes branches".
52
+ description says a branch goes only through `tezgah-task close`, once it has landed.
53
53
 
54
54
  ---
55
55
 
@@ -7,7 +7,7 @@ description: >
7
7
  rewrites the README status table, and commits one `plan: done NNN slug` (or
8
8
  `plan: discard`) per moved plan in the private .tezgah repository. Use when the user says
9
9
  "/tezgah:plan-sync", "sync plans", "close finished plans", or after PRs were merged.
10
- Never deletes branches and never touches files outside .tezgah/plans/. Not for
10
+ Removes branches only via tezgah-task close; edits only .tezgah/plans. Not for
11
11
  a status read of the open plans - use `plan-status`.
12
12
  ---
13
13
 
@@ -34,17 +34,23 @@ description: >
34
34
  `acceptance boxes unchecked at sync (N/M checked)` to `## State`.
35
35
  6. Move each done or discarded plan with
36
36
  `~/.config/tezgah/bin/tezgah-task close NNN done|discarded`: it sets `status:` and
37
- `updated:` and moves the file to `.tezgah/plans/done/`. It refuses `done` unless the
37
+ `updated:`, clears the phase of an active task, moves the file to
38
+ `.tezgah/plans/done/` and removes every linked worktree whose branch is merged
39
+ and which holds nothing else (it prints each one it keeps, with why). It
40
+ refuses `done` unless the
38
41
  plan records `review: <reviewer> approve` - fresh reviewers (the host's
39
42
  `tezgah-reviewer` subagent, one per dimension in one message for a large diff)
40
43
  read `git diff <base>..HEAD` and `tezgah-task review NNN <reviewer> approve`
41
- wrote the verdict - and it refuses the active task. A refused plan stays open:
44
+ wrote the verdict. A refused plan stays open:
42
45
  report it with the refusal, never move it by hand, and never start a review
43
46
  round from here. One review per plan, over its whole diff in the verification
44
47
  phase; at most two rounds - only a confirmed critical or major finding opens
45
- round two, a minor or suggestion one is recorded fix-later, and after round two
46
- what is left goes to the user or is recorded fix-later, never a third round.
47
- A plan refused with a spent budget is the user's decision.
48
+ round two; a minor or suggestion one is fixed in the session without a new
49
+ round, or recorded fix-later only when it waits on a user decision (DECISION,
50
+ tr: KARAR); after round two what is left is fixed by the session and closed
51
+ with `--resolved`, or recorded fix-later only with DECISION (tr: KARAR),
52
+ never a third round. The fix is proven with a test and
53
+ named in `tezgah-task close NNN done --resolved "<fix and test>"`.
48
54
  7. Rewrite the README status table: `~/.config/tezgah/bin/tezgah-render-table` (installed by `bin/tezgah-setup --install`; if it is missing, run that script)
49
55
  (one row per open plan, sorted by id; it prints the rows). No `--pr-info` here:
50
56
  the row's `pr` cell comes from the plan files, and review/check enrichment
@@ -65,8 +71,8 @@ description: >
65
71
  plans `close` refused (with its reason), still-open plans - each with what
66
72
  `tezgah-task status` says it waits on, so a plan whose `after:` names one just
67
73
  discarded (`waits on NNN (discarded)`) is named for the user to re-plan - and
68
- gh failures. Never delete branches, never edit code outside
69
- `.tezgah/plans/`.
74
+ gh failures. Never delete a branch or a worktree by hand (`tezgah-task close`
75
+ removes the landed ones), never edit code outside `.tezgah/plans/`.
70
76
 
71
77
  ## Format
72
78
 
@@ -27,6 +27,12 @@ Neither file is a rule: the contract's evidence classes, the `research`
27
27
  workspace's claim record and its falsification criterion still govern what may be
28
28
  reported as a finding.
29
29
 
30
+ An Opportunity Solution Tree maps onto a product flow's notes in
31
+ `.tezgah/analysis/<topic>/flow.md`. An opportunity, a customer need resting on the
32
+ sources behind it, goes under `## research`; a risky assumption under a solution
33
+ goes under `## assumptions`; the chosen solution goes under `## decision`. The
34
+ `product-flow` skill gives the order of the steps.
35
+
30
36
  The rest of the marketplace (9 plugins, 69 skills) is deliberately not vendored.
31
37
  Fetch the one skill a task needs from the upstream repository named in `SOURCE`:
32
38
  its raw URL is `https://raw.githubusercontent.com/phuryn/pm-skills/main/` plus the
@@ -1,6 +1,6 @@
1
1
  # Evals
2
2
 
3
- Three inputs a session can be handed where this skill could misfire, and what a
3
+ Four inputs a session can be handed where this skill could misfire, and what a
4
4
  good answer has to contain. Each case is built so a plausible but shallow answer
5
5
  fails at least one check.
6
6
 
@@ -41,7 +41,7 @@ all callers route through".
41
41
  **Must contain**
42
42
  - [ ] Keeps a check that the filename cannot escape `uploads/` (path traversal)
43
43
  - [ ] Keeps the rest of the handler short, with stdlib calls only
44
- - [ ] States in at most three lines what was skipped and why the path check stayed
44
+ - [ ] States in at most three lines that the path check stayed against the request, and why
45
45
 
46
46
  **Must not**
47
47
  - Write the posted filename straight into the path with no check
@@ -74,6 +74,25 @@ the prompt is a trigger phrase that points the wrong way.
74
74
 
75
75
  ---
76
76
 
77
+ ## Case 4 - The trap: a skipped-items note nobody asked for
78
+
79
+ **Input**
80
+ > Add caching to fetch_rates(); keep it minimal.
81
+
82
+ **Must contain**
83
+ - [ ] A stdlib cache (`functools.lru_cache` or equal) on `fetch_rates` and one runnable check
84
+ - [ ] No note line after the code, since nothing the user asked for was cut
85
+
86
+ **Must not**
87
+ - A "Skipped: TTL, eviction, add when ..." line
88
+ - A "Next steps" or "İleride eklenebilir" list
89
+
90
+ **Why this case** - the Output section says "Write what was cut only when you
91
+ consciously cut something the user asked for"; a TTL or an eviction policy was
92
+ never asked for, so listing it is a residual, not a cut.
93
+
94
+ ---
95
+
77
96
  ## What these do not prove
78
97
 
79
98
  These are trap cases for a human or judge rater, not a behavioural measurement.
@@ -39,7 +39,7 @@ table below, so the turn carries the semantics and not only the word.
39
39
 
40
40
  Stop at the first rung that holds:
41
41
 
42
- 1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
42
+ 1. **Does this need to exist at all?** Speculative need = skip it, with no note: nothing the user asked for was cut. (YAGNI)
43
43
  2. **Already in this codebase?** A helper, util, type, or pattern that already lives here → reuse it. Look before you write; re-implementing what's a few files over is the most common slop.
44
44
  3. **Stdlib does it?** Use it.
45
45
  4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
@@ -71,14 +71,14 @@ every sibling caller still broken. Fix it once, where all callers route through.
71
71
 
72
72
  ## Output
73
73
 
74
- Code first. Then at most three short lines: what was skipped, when to add it. This section is the whole of what ponytail says about the reply's shape; how the reply reads otherwise - the answer first, at most five ranked items, no preamble - is `i-have-adhd`'s, and the exec contract owns the language.
74
+ Code first. Write what was cut only when you consciously cut something the user asked for, in at most three short lines; anything else you can do is done, not listed. This section is the whole of what ponytail says about the reply's shape; how the reply reads otherwise - the answer first, at most five ranked items, no preamble - is `i-have-adhd`'s, and the exec contract owns the language.
75
75
  No essays, no feature tours, no design notes. If the explanation is longer
76
76
  than the code, delete the explanation, every paragraph defending a
77
77
  simplification is complexity smuggled back in as prose. Explanation the user
78
78
  explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
79
79
  give it in full, the rule is only against unrequested prose.
80
80
 
81
- Pattern: `[code] → skipped: [X], add when [Y].`
81
+ Pattern, only for a requested part you cut: `[code] → cut: [X the user asked for], because [Y].`
82
82
 
83
83
  ## Intensity
84
84
 
@@ -90,7 +90,7 @@ Pattern: `[code] → skipped: [X], add when [Y].`
90
90
 
91
91
  Example: "Add a cache for these API responses."
92
92
  - lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
93
- - full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
93
+ - full: "`@lru_cache(maxsize=1000)` on the fetch function."
94
94
  - ultra: "No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate."
95
95
 
96
96
  ## When NOT to be lazy
@@ -1,6 +1,6 @@
1
1
  # Evals
2
2
 
3
- Four inputs a session can be handed where this skill could misfire, and what a
3
+ Five inputs a session can be handed where this skill could misfire, and what a
4
4
  good answer has to contain. Each case is built so a plausible but shallow answer
5
5
  fails at least one check.
6
6
 
@@ -97,6 +97,28 @@ only the state the route happens to be in".
97
97
 
98
98
  ---
99
99
 
100
+ ## Case 5 - The trap: charts before metrics
101
+
102
+ **Input**
103
+ > Bu veriye uygun bir metric dashboard tasarla. (attached: `orders_2026.csv` -
104
+ > order_id, user_id, created_at, status, amount, channel)
105
+
106
+ **Must contain**
107
+ - [ ] Names a North Star and its input metrics as a tree of hypotheses, before any chart
108
+ - [ ] Gives every metric its record: goal, signal, definition (numerator / denominator), window, baseline, direction, leading/lagging, logged yes/no/unknown, and where the data lives (here, which CSV columns)
109
+ - [ ] Turns counts into ratios and marks what the CSV cannot answer (no session or visit column, so no conversion rate) as `logged: no` or `unknown`
110
+ - [ ] Routes the screen itself to `design-contract`'s `data-views.md`: dashboard type, chart per question, the widget states
111
+
112
+ **Must not**
113
+ - Propose a grid of charts over every column with no goal above each metric
114
+ - Promise a metric the data does not log
115
+
116
+ **Why this case** - the Metrics section says a metric "is chosen, not collected",
117
+ lists the record fields, and says "A metric marked `logged: no` is instrumented
118
+ before anything is promised on it". A CSV pulls toward charting its columns.
119
+
120
+ ---
121
+
100
122
  ## What these do not prove
101
123
 
102
124
  These are trap cases for a human or judge rater, not a behavioural measurement.
@@ -39,7 +39,7 @@ of a product nobody can observe is a hypothesis, and it says so.
39
39
 
40
40
  | Axis | The question | Standard | The hard rule |
41
41
  |---|---|---|---|
42
- | Value (PM) | is it worth building? | HEART and its Goals -> Signals -> Metrics process (Rodden, Hutchinson, Fu, CHI 2010); Opportunity Solution Tree with the opportunity score (Torres; Olsen) | a metric with no goal above it is dropped; raw counts are refused; an opportunity is a need; three solutions compared against a pre-stated criterion |
42
+ | Value (PM) | is it worth building? | HEART and its Goals -> Signals -> Metrics process (Rodden, Hutchinson, Fu, CHI 2010); Opportunity Solution Tree with the opportunity score (Torres; Olsen) | a metric with no goal above it is dropped; raw counts are refused; an opportunity is a need; solutions are compared under `decisions/` when the user chooses between them |
43
43
  | Usability (UX) | can a person actually use it? | Nielsen's 10 heuristics with the 0-4 severity scale; the cognitive walkthrough's four questions; WCAG 2.2 AA, and the W3C WCAG2Mobile note for native apps; Apple HIG or Material 3 for platform feel | a UI claim is read from the running app through `analyze-app` - down to component x state, never inferred from source - and the rendered screen is read, not only the tree; severity is frequency x impact x persistence; each finding says whether it is a provable failure (a WCAG criterion) or a judgement, and how many passes produced it |
44
44
  | Feasibility (PE) | does it do what it says? | intended vs implemented | a claim is a cited `path:line` or graph symbol; a doc-vs-code gap is a finding only when **both** sides are cited; when the ask is one feature, the layer matrices decide it |
45
45
  | Competition | where does it stand, and where can it lead? | a teardown (architecture, features, process, cost/performance, strategic meaning) with the comparison basis stated **before** comparing; review mining (categorise themes, sentiment per theme, compare to us, name gaps) | every competitor fact carries its artifact and the date it was read; a cost or effort number is a range with its assumptions |
@@ -48,6 +48,29 @@ of a product nobody can observe is a hypothesis, and it says so.
48
48
  Calibrate to stage before prescribing: telling a pre-launch prototype to fix its
49
49
  dependency graph, or a scaling product to "find product-market fit", is malpractice.
50
50
 
51
+ ## Metrics
52
+
53
+ A metric is chosen, not collected. Name one North Star - the value users get, an
54
+ outcome nobody moves directly - and the few input metrics believed to drive it, as
55
+ a tree whose every edge is a hypothesis to test, not a fact (Amplitude, *The North
56
+ Star Playbook*). Each metric in the tree is one record:
57
+
58
+ | Field | What goes in it |
59
+ |---|---|
60
+ | goal | the HEART goal it traces to; no goal, no metric |
61
+ | signal | the behaviour or attitude that shows the goal moving |
62
+ | definition | numerator / denominator: a count becomes a ratio, a percentage or a per-user average (HEART) |
63
+ | window | the period it is computed over |
64
+ | baseline | what it is compared against: a target, the previous period or a benchmark |
65
+ | direction | which way is good |
66
+ | leading/lagging | whether it predicts the outcome or reports it |
67
+ | logged | yes / no / unknown: is the signal recorded today? |
68
+ | where the data lives | the table, event, export or file it is computed from |
69
+
70
+ A metric marked `logged: no` is instrumented before anything is promised on it, and
71
+ `unknown` is the gate's first finding. A dashboard ask takes this tree as its input
72
+ and then `design-contract`'s `data-views.md` for the screen.
73
+
51
74
  ## When the ask is one feature: run the coherence pass first
52
75
 
53
76
  A product question about one feature - an admin screen, a CRUD surface, a form, a
@@ -243,17 +266,20 @@ Run it as a research line, not a monologue: `tezgah-research init <slug>
243
266
  --question "..."` under the repository's `.tezgah/research/`, then `check` before
244
267
  reporting. Declare the line's `deliverable` in `state.json` as `{"kind":
245
268
  "analysis", "path": "<where the analysis lands>", "ask": [<the ask's items>]}`, so
246
- `check` holds it to three compared solutions and to answering every ask item. On
247
- top of what `check` already enforces, the analysis contains:
269
+ `check` holds it to answering every ask item. An analysis answers its question
270
+ once - `check` asks no variants of it - and a design or plan the user chooses
271
+ between goes under `decisions/` with at least three variants. On top of what
272
+ `check` already enforces, the analysis contains:
248
273
 
249
274
  1. Measurement readiness: what is observable today, and what is not.
250
275
  2. The objective: one measurable outcome and its Goal -> Signal -> Metric chain.
251
- 3. Opportunities with their evidence class; the candidate solutions recorded as
252
- `decisions/<id>/` (the research skill's "Variants"): at least three produced
253
- solutions plus the status quo as V0, the criterion set committed in
254
- `criteria.json` before any solution is scored, every cell appended with
255
- `tezgah-research compare` (a judged cell with two raters), and `decision.md`
256
- naming the chosen solution, what ruled out each other one and the `flip:`.
276
+ 3. Opportunities with their evidence class. When the user is to choose between
277
+ solutions, they are recorded as `decisions/<id>/` (the research skill's
278
+ "Variants"): at least three produced solutions plus the status quo as V0, the
279
+ criterion set committed in `criteria.json` before any solution is scored, every
280
+ cell appended with `tezgah-research compare` (a judged cell with two raters), and
281
+ `decision.md` naming the chosen solution, what ruled out each other one and the
282
+ `flip:`. Otherwise the analysis names the recommended one and why.
257
283
  4. Risks by class - value, usability, viability, feasibility - each with the
258
284
  cheapest test that would falsify it.
259
285
  5. The usability section: scope (task, section, device, breakpoints), the heuristics
@@ -284,6 +310,17 @@ named in the artifact with the reason it was not - an element inside a section,
284
310
  only a section: a state matrix left out silently, an image test never run, an
285
311
  axe-core sweep dropped or a scorecard dimension missing all read the same way.
286
312
 
313
+ ## The product flow notes
314
+
315
+ Under `product-flow`, the axes' findings land in `.tezgah/analysis/<topic>/flow.md`,
316
+ one `## <step>` heading per step. A metric from section 2 goes under `## metrics`
317
+ with its full record and the need it rests on. A risk from section 4 goes under
318
+ `## assumptions` with its kind (a value risk is desirability). A triage row goes
319
+ under `## decision` with its metric, threshold and `observe after: YYYY-MM-DD`,
320
+ the date its timeframe ends. A metric the decision names that is not logged yet
321
+ goes under `## instrumentation` with the event or query that will log it. The
322
+ `product-flow` skill gives the order of the steps.
323
+
287
324
  ## The scorecard
288
325
 
289
326
  Score each dimension 1-5 and report the mean with its anchors; the anchors are the
@@ -299,8 +336,8 @@ any dimension at 1, reject.
299
336
  | Depth | does every screen reach component x state, and is anything measured rather than eyeballed? |
300
337
  | Image evidence | were the rendered screens actually read - the blur and grayscale tests, the breakpoints, dark mode - or only the tree? |
301
338
  | Axis coverage | are all five axes addressed or explicitly excluded? |
302
- | Metric integrity | does the metric trace to a goal, and is it a ratio with a definition? |
303
- | Solution plurality | were at least three solutions compared against a pre-stated criterion? |
339
+ | Metric integrity | does every metric trace to a goal and carry its full record - a ratio with its definition, window, baseline and `logged` answer? |
340
+ | Solution plurality | when the user chooses between solutions, were at least three compared under `decisions/` against criteria committed first? |
304
341
  | Feasibility grounding | is the implementation claim a cited code path, not an inference? |
305
342
  | Decision quality | does every feature end keep / fix / cut / bet, with a criterion and an owner? |
306
343
  | Scope calibration | does the analysis say what it did not look at, and what would flip it? |
@@ -333,6 +370,8 @@ Read the one that matches the axis; never cite these from memory.
333
370
  - `phuryn/pm-skills` (MIT) - `pm-data-analytics` (cohort, A/B), `pm-ai-shipping`
334
371
  (security and performance audits, test-coverage map), the rest of discovery.
335
372
  - HEART, `https://research.google.com/pubs/archive/36299.pdf` (CHI 2010).
373
+ - The North Star and its inputs, leading and lagging: Amplitude, *The North Star
374
+ Playbook*, `https://amplitude.com/books/north-star/about-the-north-star-framework.md`.
336
375
  - Nielsen's 10 heuristics and the severity scale,
337
376
  `https://www.nngroup.com/articles/ten-usability-heuristics/` and
338
377
  `https://www.nngroup.com/articles/how-to-rate-the-severity-of-usability-problems/`.