@phamvuhoang/otto-core 0.20.0 → 0.22.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/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/loop.d.ts.map +1 -1
- package/dist/loop.js +212 -19
- package/dist/loop.js.map +1 -1
- package/dist/model-tier.d.ts +5 -0
- package/dist/model-tier.d.ts.map +1 -1
- package/dist/model-tier.js +13 -0
- package/dist/model-tier.js.map +1 -1
- package/dist/panel.d.ts +37 -3
- package/dist/panel.d.ts.map +1 -1
- package/dist/panel.js +126 -39
- package/dist/panel.js.map +1 -1
- package/dist/plan-artifacts.d.ts +10 -0
- package/dist/plan-artifacts.d.ts.map +1 -0
- package/dist/plan-artifacts.js +63 -0
- package/dist/plan-artifacts.js.map +1 -0
- package/dist/plan-gate.d.ts +10 -1
- package/dist/plan-gate.d.ts.map +1 -1
- package/dist/plan-gate.js +22 -4
- package/dist/plan-gate.js.map +1 -1
- package/dist/plan-report-cli.d.ts +2 -1
- package/dist/plan-report-cli.d.ts.map +1 -1
- package/dist/plan-report-cli.js +9 -32
- package/dist/plan-report-cli.js.map +1 -1
- package/dist/plan-rubric.d.ts +24 -0
- package/dist/plan-rubric.d.ts.map +1 -1
- package/dist/plan-rubric.js +122 -0
- package/dist/plan-rubric.js.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +3 -1
- package/dist/render.js.map +1 -1
- package/dist/report-finalize.d.ts +26 -0
- package/dist/report-finalize.d.ts.map +1 -0
- package/dist/report-finalize.js +222 -0
- package/dist/report-finalize.js.map +1 -0
- package/dist/report-rubric.d.ts +1 -1
- package/dist/report-rubric.d.ts.map +1 -1
- package/dist/report-rubric.js +3 -3
- package/dist/report-rubric.js.map +1 -1
- package/dist/review-severity.d.ts +41 -0
- package/dist/review-severity.d.ts.map +1 -0
- package/dist/review-severity.js +101 -0
- package/dist/review-severity.js.map +1 -0
- package/dist/risk.d.ts +3 -2
- package/dist/risk.d.ts.map +1 -1
- package/dist/risk.js +8 -7
- package/dist/risk.js.map +1 -1
- package/dist/run-report.d.ts +8 -0
- package/dist/run-report.d.ts.map +1 -1
- package/dist/run-report.js.map +1 -1
- package/dist/runner.d.ts +2 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +1 -1
- package/dist/runner.js.map +1 -1
- package/dist/stage-exec.d.ts.map +1 -1
- package/dist/stage-exec.js +3 -2
- package/dist/stage-exec.js.map +1 -1
- package/package.json +1 -1
- package/templates/lens-guidance/correctness.md +1 -0
- package/templates/lens-guidance/security.md +1 -0
- package/templates/lens-guidance/structural.md +25 -0
- package/templates/lens-guidance/task-fit.md +1 -0
- package/templates/lens-guidance/tests.md +1 -0
- package/templates/plan.md +36 -4
- package/templates/quality-report.md +18 -9
- package/templates/report-rewrite.md +25 -0
- package/templates/review-lens.md +16 -1
- package/templates/review-synth.md +18 -2
- package/templates/review-verify.md +11 -6
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
Produce an **Otto quality report** with the exact section headings below. Rules:
|
|
9
9
|
|
|
10
|
+
- **Outcome-first.** Lead with what the end user can now do, drawn from the
|
|
11
|
+
issue/plan intent and traceable to evidence — not marketing claims and not a
|
|
12
|
+
diff summary. Keep the change description below the engineer divider.
|
|
10
13
|
- **Layperson-first.** Lead with plain language a non-engineer can act on — the
|
|
11
|
-
prose sections (What
|
|
12
|
-
Unsure About) come first; keep code-cited engineer detail below the
|
|
13
|
-
Write the top sections with no jargon, file paths, or SHAs.
|
|
14
|
+
prose sections (What You Can Now Do · Why · How To Verify · What To Watch ·
|
|
15
|
+
What I Was Unsure About) come first; keep code-cited engineer detail below the
|
|
16
|
+
divider. Write the top sections with no jargon, file paths, or SHAs.
|
|
14
17
|
- **Readable first.** Keep it short enough to review in a couple of minutes — a
|
|
15
18
|
maintainer should not have to replay the run log. Specific beats exhaustive.
|
|
16
19
|
- **Verification a non-engineer can run.** _How To Verify_ is numbered,
|
|
@@ -33,10 +36,11 @@ Produce an **Otto quality report** with the exact section headings below. Rules:
|
|
|
33
36
|
One of — **Accepted** · **Accepted with follow-ups** · **Needs human review** · **Rejected**
|
|
34
37
|
(when uncertain, choose **Needs human review**)
|
|
35
38
|
|
|
36
|
-
## What
|
|
39
|
+
## What You Can Now Do
|
|
37
40
|
|
|
38
|
-
<Plain language, no jargon —
|
|
39
|
-
|
|
41
|
+
<Plain language, no jargon — the user-visible outcome this run enables, in one
|
|
42
|
+
or two sentences. Draw it from the issue/plan intent. No file paths, SHAs, or
|
|
43
|
+
diff summaries here; those go below the divider.>
|
|
40
44
|
|
|
41
45
|
## Why
|
|
42
46
|
|
|
@@ -72,6 +76,11 @@ _Engineer detail below — a non-engineer can stop reading here._
|
|
|
72
76
|
- Source: <plan/PRD path, GitHub issue #, or Linear ref>
|
|
73
77
|
- Issue or plan: <link or path>
|
|
74
78
|
|
|
79
|
+
## What Changed
|
|
80
|
+
|
|
81
|
+
<Engineer-facing change summary: the concrete implementation or documentation
|
|
82
|
+
changes, one click below the user outcome. Cite evidence in the next section.>
|
|
83
|
+
|
|
75
84
|
## Evidence
|
|
76
85
|
|
|
77
86
|
- Implementation evidence: <file:line or commit SHA proving each claim; the
|
|
@@ -97,8 +106,8 @@ _Engineer detail below — a non-engineer can stop reading here._
|
|
|
97
106
|
### Human verdict trail
|
|
98
107
|
|
|
99
108
|
Prior **human** verdicts on past Otto runs (most recent last) — consult them so a
|
|
100
|
-
recurring reason ("scope creep", "thin evidence") informs
|
|
101
|
-
and
|
|
109
|
+
recurring reason ("scope creep", "thin evidence") informs _this_ run's Verdict
|
|
110
|
+
and _Recommended next action_ before you commit to one:
|
|
102
111
|
|
|
103
112
|
<verdict-trail>
|
|
104
113
|
|
|
@@ -109,7 +118,7 @@ and *Recommended next action* before you commit to one:
|
|
|
109
118
|
**Maintainer:** after reviewing this report, append your verdict to
|
|
110
119
|
`./.otto/verdicts.md` (create it lazily) — a dated `##` heading plus one line:
|
|
111
120
|
the human verdict (**Accepted** · **Accepted with follow-ups** · **Rejected** ·
|
|
112
|
-
**Needs investigation**) and
|
|
121
|
+
**Needs investigation**) and _why_ (what was accepted with caveats, or the
|
|
113
122
|
concrete reason it was rejected). The file is git-tracked; it feeds the existing
|
|
114
123
|
learning loop, so future runs see what was accepted or rejected and why.
|
|
115
124
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{{ RESUME }}
|
|
2
|
+
|
|
3
|
+
A quality report failed Otto's emit-time legibility rubric. The missing
|
|
4
|
+
required section(s): **{{ MISSING }}**.
|
|
5
|
+
|
|
6
|
+
Your only job: emit a corrected **Otto quality report** that includes ALL
|
|
7
|
+
required sections. Lead the prose with `## What You Can Now Do`. Keep the
|
|
8
|
+
leading `# Otto quality report` H1 marker so the harness re-captures it.
|
|
9
|
+
|
|
10
|
+
Rules — read carefully, this is a tight rewrite, not a new run:
|
|
11
|
+
|
|
12
|
+
- **Read-only.** Do NOT edit files, do NOT commit, do NOT run the loop or any
|
|
13
|
+
build/test stage. You are reformatting an existing report.
|
|
14
|
+
- **No invented value.** Base every claim ONLY on the report below and real run
|
|
15
|
+
evidence. Never fabricate outcomes, verdicts, or evidence to fill a section —
|
|
16
|
+
if the original report did not establish something, say so plainly.
|
|
17
|
+
- **Layperson-first, terse.** Match the style of the quality-report contract:
|
|
18
|
+
the prose sections (What You Can Now Do · Why · How To Verify · What To Watch ·
|
|
19
|
+
What I Was Unsure About) come first, no jargon, then the
|
|
20
|
+
`_Engineer detail below — a non-engineer can stop reading here._` divider, then
|
|
21
|
+
the engineer sections. Short enough to review in a couple of minutes.
|
|
22
|
+
|
|
23
|
+
The report to correct:
|
|
24
|
+
|
|
25
|
+
{{ REPORT }}
|
package/templates/review-lens.md
CHANGED
|
@@ -24,6 +24,8 @@ Read that file with `Read` (use `offset`/`limit` for large diffs) before reviewi
|
|
|
24
24
|
|
|
25
25
|
# REVIEWER — {{ LENS }} lens
|
|
26
26
|
|
|
27
|
+
@include:lens-guidance/{{LENS}}.md
|
|
28
|
+
|
|
27
29
|
You review the most recent commit (HEAD) through ONE lens only: **{{ LENS }}**.
|
|
28
30
|
|
|
29
31
|
- `correctness` — bugs, regressions, broken logic, unhandled edge cases.
|
|
@@ -33,9 +35,22 @@ You review the most recent commit (HEAD) through ONE lens only: **{{ LENS }}**.
|
|
|
33
35
|
|
|
34
36
|
If `<head>` shows `(no commits)`, output `<lens>SKIP</lens>` and stop.
|
|
35
37
|
|
|
38
|
+
## How to report findings
|
|
39
|
+
|
|
40
|
+
Emit each finding on its own line, pipe-delimited:
|
|
41
|
+
|
|
42
|
+
`SEVERITY | file:line | claim | why | fix?`
|
|
43
|
+
|
|
44
|
+
- `SEVERITY` is one of `blocker | major | minor | nit`.
|
|
45
|
+
- `file:line` may be `path` or `path:line` or `path:start-end`.
|
|
46
|
+
- `fix` (a one-line remediation hint) is optional.
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
`major | packages/core/src/loop.ts:120-180 | gate+routing+cost in one block | three responsibilities, hard to scan | extract resolveGate()`
|
|
50
|
+
|
|
36
51
|
# OUTPUT
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
Emit each finding in the wire format above (`SEVERITY | file:line | claim | why | fix?`), one per line, for the **{{ LENS }}** lens only. Be terse. If you have no findings for this lens, output `none`.
|
|
39
54
|
|
|
40
55
|
# RULES
|
|
41
56
|
|
|
@@ -19,10 +19,26 @@ An adversarial verifier already judged the lens findings and wrote `{{ FINDINGS_
|
|
|
19
19
|
# ACTION
|
|
20
20
|
|
|
21
21
|
1. Collect the `CONFIRMED` findings (already deduped and verified). If there are none, output `<review>OK</review>` and do **not** commit.
|
|
22
|
-
2. Otherwise
|
|
22
|
+
2. Otherwise apply confirmed findings **highest severity first** (blocker → major → minor).
|
|
23
|
+
**Suppress nits**: if any blocker or major is confirmed, skip nit-severity
|
|
24
|
+
findings entirely — do not spend a fix on them while real issues remain.
|
|
25
|
+
|
|
26
|
+
Fix them in the working tree (only the latest commit's code — no unrelated changes), run the feedback loops:
|
|
23
27
|
- Frontend / Node: `pnpm run test`, `pnpm run typecheck`
|
|
24
28
|
- Backend / Dotnet: `dotnet test`, `dotnet build`
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
Then make a SINGLE commit, annotating the body with what you fixed:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
fix(review): <short summary>
|
|
34
|
+
|
|
35
|
+
Addressed:
|
|
36
|
+
- blocker | file:line | <claim>
|
|
37
|
+
- major | file:line | <claim>
|
|
38
|
+
Suppressed N nit(s).
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
(subject ≤72 chars, no `Co-Authored-By`, no file lists). If a finding reflects a durable, reusable learning (e.g. a recurring defect class), you may also append it tersely to `./.otto/LEARNINGS.md` so it rides in this same commit.
|
|
26
42
|
|
|
27
43
|
# RULES
|
|
28
44
|
|
|
@@ -24,7 +24,7 @@ Read that file with `Read` (use `offset`/`limit` for large diffs) before judging
|
|
|
24
24
|
|
|
25
25
|
# ADVERSARIAL VERIFICATION
|
|
26
26
|
|
|
27
|
-
Review lenses (correctness / security / tests) each examined HEAD and wrote findings to `{{ FINDINGS_DIR }}` — `Read` every `findings-*.md` file there.
|
|
27
|
+
Review lenses (correctness / security / tests / task-fit / structural) each examined HEAD and wrote findings to `{{ FINDINGS_DIR }}` — `Read` every `findings-*.md` file there.
|
|
28
28
|
|
|
29
29
|
Your role is the **SKEPTIC**. The lenses are eager: many findings will be false positives, speculative, pre-existing, out of scope, or things this repo already accepts. Try to **REFUTE** each finding against the actual HEAD diff and the surrounding code before any of them earns a fix.
|
|
30
30
|
|
|
@@ -37,12 +37,17 @@ Bias toward **REJECTED** when genuinely uncertain: this loop commits fixes with
|
|
|
37
37
|
|
|
38
38
|
# OUTPUT
|
|
39
39
|
|
|
40
|
-
Write your verdicts to `{{ FINDINGS_DIR }}verdicts.md`, one finding per line, deduped
|
|
40
|
+
Write your verdicts to `{{ FINDINGS_DIR }}verdicts.md`, one finding per line, deduped.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
Write each verdict on its own line, carrying severity (you MAY **downgrade** a
|
|
43
|
+
finding's severity if it is real but smaller than claimed):
|
|
44
|
+
|
|
45
|
+
- `CONFIRMED <severity> | file:line | claim | why this is really a problem`
|
|
46
|
+
- `REJECTED | file:line | claim | why this is not a real problem`
|
|
47
|
+
|
|
48
|
+
`<severity>` is one of `blocker | major | minor | nit`. Stay biased toward
|
|
49
|
+
REJECTED for anything you cannot substantiate — a false positive costs more than
|
|
50
|
+
a missed nit.
|
|
46
51
|
|
|
47
52
|
If the lenses produced no findings at all, write a single line: `none`.
|
|
48
53
|
|