@tea-agent/loop-agent 0.21.0 → 0.23.1
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/AGENTS.md +42 -108
- package/CHANGELOG.md +114 -0
- package/README.md +7 -4
- package/bin/agent-worker.js +0 -0
- package/dist/adapters/loop-agent.js +52 -0
- package/dist/application/context-usage/skill-resolution-stats.js +263 -0
- package/dist/application/dag/generate-task-dag.js +17 -3
- package/dist/cli/command-definitions.js +8 -7
- package/dist/cli/program.js +17 -15
- package/dist/commands/doctor.js +269 -18
- package/dist/commands/init.js +198 -86
- package/dist/commands/stats.js +40 -11
- package/dist/executors/dag-pi-executor.js +2 -0
- package/dist/executors/shell-executor.js +162 -19
- package/dist/shared/openspec-spec.js +49 -0
- package/dist/shared/operator/capabilities.js +11 -1
- package/dist/worker/console/app-data.js +4 -0
- package/dist/worker/console/chat/instruction-skills.js +217 -0
- package/dist/worker/console/chat/model-resolver.js +106 -0
- package/dist/worker/console/chat/pi-runtime.js +605 -0
- package/dist/worker/console/chat/resource-loader.js +66 -0
- package/dist/worker/console/chat/routes.js +357 -0
- package/dist/worker/console/chat/session-store.js +238 -0
- package/dist/worker/console/chat/tool-adapter.js +238 -0
- package/dist/worker/console/chat/tools.js +171 -0
- package/dist/worker/console/server.js +55 -0
- package/dist/worker/console/static/assets/index-DVl7Jxt5.js +25 -0
- package/dist/worker/console/static/assets/index-lVcIr9Ju.css +1 -0
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/feature/profile-schema.js +1 -1
- package/dist/worker/observability/read-model.js +21 -1
- package/dist/worker/observe/spec-evidence.js +12 -15
- package/dist/worker/observe/static/dag-helpers.js +22 -0
- package/dist/worker/observe/static/views/dag.js +5 -0
- package/dist/workflows/dag/backend-test-markdown-workflow.js +37 -0
- package/dist/workflows/dag/frontend-implementation-contract.js +141 -32
- package/dist/workflows/dag/frontend-lint-baseline.js +471 -0
- package/dist/workflows/dag/frontend-prewrite-gate.js +79 -16
- package/dist/workflows/dag/frontend-project-capability.js +11 -8
- package/dist/workflows/dag/frontend-repair.js +6 -4
- package/dist/workflows/dag/frontend-review-context.js +67 -0
- package/dist/workflows/dag/frontend-test-case-quality.js +105 -0
- package/dist/workflows/dag/frontend-test-result-contract.js +71 -66
- package/dist/workflows/dag/frontend-verification-trace.js +31 -1
- package/dist/workflows/dag/frontend-worktree-diff.js +81 -6
- package/dist/workflows/dag/init-hybrid.js +412 -84
- package/dist/workflows/dag/node-execution.js +38 -1
- package/dist/workflows/dag/output-protocol.js +89 -0
- package/dist/workflows/dag/prompt.js +35 -1
- package/dist/workflows/dag/recovery-recommendation.js +45 -0
- package/dist/workflows/dag/report.js +28 -1
- package/dist/workflows/dag/rerun-task.js +1 -1
- package/dist/workflows/dag/scheduler.js +9 -0
- package/dist/workflows/dag/types.js +74 -1
- package/dist/workflows/dag/validate.js +55 -0
- package/docs/README.md +73 -156
- package/docs/architecture/README.md +3 -2
- package/docs/architecture/dag-execution.md +2 -2
- package/docs/architecture/evolution.md +14 -12
- package/docs/architecture/system-overview.md +1 -1
- package/docs/architecture/worker-and-feature.md +3 -3
- package/docs/governance/README.md +15 -0
- package/docs/{harness-methodology-debugging.md → governance/harness-methodology-debugging.md} +27 -3
- package/docs/init-surface.manifest.json +22 -4
- package/docs/operations/README.md +12 -0
- package/docs/{local-development-environment.md → operations/local-development-environment.md} +1 -1
- package/docs/skills/vetted-skill-registry.md +23 -3
- package/docs/templates/README.md +55 -0
- package/docs/templates/agent-dag.schema.json +15 -5
- package/docs/templates/backend-test-dag.json +1 -1
- package/docs/templates/evaluation/agents-map-slim-v1.candidate.json +9 -0
- package/docs/templates/evaluation/agents-map-slim-v1.md +87 -0
- package/docs/templates/evaluation/agents-map-verbose-v0.candidate.json +9 -0
- package/docs/templates/evaluation/agents-map-verbose-v0.md +153 -0
- package/docs/templates/frontend-implementation-contract.schema.json +4 -3
- package/docs/templates/frontend-test-case-checklist.md +6 -2
- package/docs/templates/frontend-test-dag.json +2 -2
- package/docs/templates/hybrid-dag.json +1 -1
- package/docs/templates/progress-log.md +9 -2
- package/harness.json +5 -5
- package/package.json +5 -5
- package/scripts/kb-bootstrap-init-skeleton.sh +2 -2
- package/skills/agent-worker/SKILL.md +1 -1
- package/skills/frontend-design-review/SKILL.md +12 -10
- package/skills/frontend-design-review/references/review-checklist.md +4 -4
- package/skills/frontend-implementation/SKILL.md +2 -2
- package/skills/frontend-implementation/references/code-standards.md +4 -3
- package/skills/frontend-implementation/references/design-spec.md +19 -14
- package/skills/frontend-implementation/references/node-contracts.md +2 -2
- package/skills/frontend-review/SKILL.md +15 -28
- package/skills/frontend-review/references/review-findings.md +16 -18
- package/skills/frontend-verification/SKILL.md +16 -13
- package/skills/frontend-verification/references/verification-checklist.md +18 -30
- package/skills/grill-with-docs/SKILL.md +44 -52
- package/skills/grill-with-docs/adr-format.md +37 -26
- package/skills/grill-with-docs/context-format.md +18 -26
- package/skills/loop-agent/SKILL.md +28 -112
- package/skills/loop-agent/references/command-reference.md +9 -3
- package/skills/loop-agent/references/harness-policy.md +3 -3
- package/skills/loop-agent/references/hybrid-dag.md +1 -1
- package/skills/loop-agent/references/orchestrator-and-interventions.md +1 -1
- package/skills/loop-agent/references/task-workflow.md +2 -0
- package/skills/systematic-debugging/SKILL.md +20 -4
- package/skills/test-driven-development/SKILL.md +10 -3
- package/dist/worker/console/static/assets/index-CUDke82y.js +0 -18
- package/dist/worker/console/static/assets/index-wSEksVSO.css +0 -1
- /package/docs/{harness-methodology-tdd.md → governance/harness-methodology-tdd.md} +0 -0
- /package/docs/{harness-methodology-verification.md → governance/harness-methodology-verification.md} +0 -0
|
@@ -16,7 +16,7 @@ references:
|
|
|
16
16
|
- **允许**:`agent-worker` / `loop-agent` CLI;只读 `pool doctor`、`observe`、status/report;冻结 controller identity;选择 Ready 工作与 recovery 命令。
|
|
17
17
|
- **禁止**:绕过 CLI 直接 Edit 业务实现;Worker/DAG 失败后主会话「救火改文件」。
|
|
18
18
|
- **失败时只允许**:保留 evidence → `task retry` / `task reconcile` / `pool mark-failed` / human gate → 再经 CLI 重跑;实现写入仍只经 published `loop-agent` DAG。
|
|
19
|
-
- **Official vs Compatibility**:`agent-worker console serve` 是 Official
|
|
19
|
+
- **Official vs Compatibility**:`agent-worker console serve` 是 Official 本地控制面(同进程提供 Operate + Inspect,Inspect 路径 `/inspect/#/...`);openCode 等主会话仍是 Compatibility Assist,二者**不是**同等保证。原 `observe serve` 为兼容期只读入口(启动时输出 `OBSERVE_SERVE_DEPRECATED`,stdout 仍只输出 URL),功能等价于 Console 的 Inspect 面。
|
|
20
20
|
|
|
21
21
|
## Route the Work
|
|
22
22
|
|
|
@@ -11,10 +11,10 @@ references:
|
|
|
11
11
|
|
|
12
12
|
For frontend design review nodes. Read the checklist; audit contract, scout, Mock
|
|
13
13
|
strategy, effective plan, task bounds, and traceable design evidence.
|
|
14
|
-
Knowledge base and `
|
|
15
|
-
knowledge-base connector when available;
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
Knowledge base, OpenSpec, and `ai_workspace/` are parallel sources. Query the
|
|
15
|
+
knowledge-base connector when available; always search/read `openspec/schemas/**`,
|
|
16
|
+
`openspec/project-specs/**`, and `ai_workspace/**` before accepting conventions.
|
|
17
|
+
Connector format is TODO: never invent results.
|
|
18
18
|
|
|
19
19
|
## Verdict Contract
|
|
20
20
|
|
|
@@ -39,16 +39,17 @@ output fails closed.
|
|
|
39
39
|
|
|
40
40
|
- Any criterion lacks implementation/verification; UI states lack reasons; a
|
|
41
41
|
dependency lacks permission; confirmed primitives/rules are ignored; design claims
|
|
42
|
-
lack knowledge-base or required
|
|
43
|
-
commands are missing/non-deterministic; or
|
|
44
|
-
data, or failure behavior requires guessing.
|
|
42
|
+
lack knowledge-base or required openspec specification evidence; paths cross
|
|
43
|
+
write bounds; commands are missing/non-deterministic; or
|
|
44
|
+
interaction, responsive, accessibility, data, or failure behavior requires guessing.
|
|
45
45
|
- `MOCK_STRATEGY: blocked`; missing permitted target paths, endpoint/schema-to-fixture
|
|
46
46
|
mapping, fixed verification, or dev/test-only activation; a second Mock framework;
|
|
47
47
|
inline fake data; commented real requests; Mock-on production defaults; test-only
|
|
48
48
|
production imports; or Mock evidence reported as real integration.
|
|
49
49
|
|
|
50
|
-
Knowledge-base absence is advisory if relevant
|
|
51
|
-
applied. Block skipped fallback, unresolved
|
|
50
|
+
Knowledge-base absence is advisory if relevant rules from either openspec
|
|
51
|
+
specification directory were read and applied. Block skipped fallback, unresolved
|
|
52
|
+
conflict, or unresolved UI decisions.
|
|
52
53
|
|
|
53
54
|
## Method And Output
|
|
54
55
|
|
|
@@ -59,7 +60,8 @@ or Advisory, and never edit files.
|
|
|
59
60
|
|
|
60
61
|
Run `grep`/`find`, then explicit `read` calls for applicable specs/checklist. Only
|
|
61
62
|
successful paired reads count as “已读取规范文件”; summaries do not. List each path/
|
|
62
|
-
section in `Checked Items`; search/read
|
|
63
|
+
section in `Checked Items`; search/read both openspec specification directories
|
|
64
|
+
before accepting conventions.
|
|
63
65
|
|
|
64
66
|
```markdown
|
|
65
67
|
VERDICT: pass
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
## Project Fit
|
|
10
10
|
|
|
11
11
|
- Reuse components, hooks, API helpers, mocks, schemas, router patterns, tokens, and theme rules.
|
|
12
|
-
- Cite knowledge base and `
|
|
13
|
-
knowledge queries must still search `<repoRoot>/openspec
|
|
12
|
+
- Cite knowledge base, `openspec/schemas/`, `openspec/project-specs/`, and `ai_workspace/` as parallel sources; failed or empty
|
|
13
|
+
knowledge queries must still search `<repoRoot>/openspec/schemas/`, `<repoRoot>/openspec/project-specs/`, and `<repoRoot>/ai_workspace/`.
|
|
14
14
|
- Record source status, query terms, paths/headings, conflicts, authorized deps, and allowed paths for both.
|
|
15
15
|
|
|
16
16
|
## Interaction / Quality
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
|
|
37
37
|
## Verdict Matrix
|
|
38
38
|
|
|
39
|
-
- Request revision for coverage gaps, unsafe scope, unauthorized deps, unresolved required interaction, missing required verification, skipped `openspec/`
|
|
40
|
-
- Knowledge-base unavailable but relevant `
|
|
39
|
+
- Request revision for coverage gaps, unsafe scope, unauthorized deps, unresolved required interaction, missing required verification, skipped local specification fallback (`openspec/schemas/`, `openspec/project-specs/`, or `ai_workspace/`), unsafe/missing Mock strategy, or Mock evidence presented as real integration.
|
|
40
|
+
- Knowledge-base unavailable but relevant OpenSpec or `ai_workspace/` rules applied is advisory only.
|
|
41
41
|
- Optional cleanup that cannot affect acceptance is advisory.
|
|
@@ -23,8 +23,8 @@ Read all required references before running any listed frontend node.
|
|
|
23
23
|
## Source And Evidence Rules
|
|
24
24
|
|
|
25
25
|
Use task sources/references, constraints, then `task.json`. Follow `design-spec.md`:
|
|
26
|
-
knowledge base
|
|
27
|
-
evidence. Cite tight paths/symbols,
|
|
26
|
+
query the knowledge base when available and always inspect `openspec/schemas/`,
|
|
27
|
+
`openspec/project-specs/`, and `ai_workspace/`; then use repo evidence. Cite tight paths/symbols, and never invent APIs,
|
|
28
28
|
rules, commands, or retrievals. Scout/planners locate and explicitly read applicable
|
|
29
29
|
specs; only successful paired reads count. Lockfile-only, fixture-only, or unread
|
|
30
30
|
search hits do not prove a reusable Mock service.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Frontend Code Standards
|
|
2
2
|
|
|
3
3
|
Discover rules from task constraints, `design-spec.md` source order, config, code,
|
|
4
|
-
tests, manifests, and generated types.
|
|
5
|
-
|
|
6
|
-
not override installed APIs without an
|
|
4
|
+
tests, manifests, and generated types. Regardless of knowledge-base results,
|
|
5
|
+
applicable `openspec/schemas/`, `openspec/project-specs/`, and `ai_workspace/` rules are normative.
|
|
6
|
+
Preferences are not rules, and docs do not override installed APIs without an
|
|
7
|
+
explicit compatibility decision.
|
|
7
8
|
|
|
8
9
|
## Discover And Cite
|
|
9
10
|
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Required Source Sequence
|
|
4
4
|
|
|
5
|
-
Knowledge base and `
|
|
5
|
+
Knowledge base, OpenSpec, and `ai_workspace/` are parallel specification sources:
|
|
6
6
|
|
|
7
7
|
1. Attempt the configured component/design knowledge-base query first when a
|
|
8
8
|
connector is available in the execution environment.
|
|
9
9
|
2. Regardless of knowledge-base success, failure, timeout, no match, or no
|
|
10
|
-
configuration, also recursively search
|
|
11
|
-
|
|
10
|
+
configuration, also recursively search `openspec/schemas/`,
|
|
11
|
+
`openspec/project-specs/`, and `ai_workspace/` for index files and relevant content.
|
|
12
12
|
3. Treat relevant matches from both sources as the current project's
|
|
13
13
|
specification for this run.
|
|
14
14
|
4. Only then use component source, tokens, stories, tests, and pages as
|
|
15
15
|
non-normative repository fallback.
|
|
16
16
|
|
|
17
|
-
Never skip `
|
|
18
|
-
knowledge-base query returned results. Report source
|
|
19
|
-
combining them. Explicit task requirements remain the
|
|
20
|
-
with knowledge-base or
|
|
17
|
+
Never skip local OpenSpec or `ai_workspace/` sources for neighboring-code
|
|
18
|
+
conventions, even when a knowledge-base query returned results. Report source
|
|
19
|
+
conflicts instead of combining them. Explicit task requirements remain the
|
|
20
|
+
contract; flag conflicts with knowledge-base or openspec specification rules.
|
|
21
21
|
|
|
22
22
|
## Knowledge Base Connection — TODO
|
|
23
23
|
|
|
@@ -25,15 +25,19 @@ Request format is undecided. TODO: define connector/owner, namespaces, secret-fr
|
|
|
25
25
|
auth, query fields, result identity/version/time, and failure behavior.
|
|
26
26
|
|
|
27
27
|
Attempt only a connector actually available in the execution environment. Otherwise
|
|
28
|
-
record `not-configured` and run the
|
|
28
|
+
record `not-configured` and run the openspec fallback; never invent a connection.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## openspec Fallback Procedure
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
|
|
32
|
+
- Inspect `<repoRoot>/openspec/schemas/`, `<repoRoot>/openspec/project-specs/`,
|
|
33
|
+
and `<repoRoot>/ai_workspace/` when present; enumerate supported files recursively.
|
|
34
|
+
- Read indexes first, then search names/content using task, route, component,
|
|
35
|
+
interaction, theme, token, and state terms.
|
|
34
36
|
- Read relevant matches in context; do not treat a filename-only hit as a rule.
|
|
35
|
-
- Record search terms, inspected/matched paths, headings or tight line ranges,
|
|
36
|
-
|
|
37
|
+
- Record search terms, inspected/matched paths, headings or tight line ranges,
|
|
38
|
+
applied rules, and conflicts.
|
|
39
|
+
- If both directories or relevant rules are absent, record that fact before using
|
|
40
|
+
repository fallback.
|
|
37
41
|
|
|
38
42
|
## Retrieval Evidence
|
|
39
43
|
|
|
@@ -50,5 +54,6 @@ and conflicts. `openspec fallback` includes terms, paths/headings/lines, rules,
|
|
|
50
54
|
|
|
51
55
|
- Reuse confirmed primitives unless a new pattern is authorized.
|
|
52
56
|
- Define applicable states and responsive behavior before implementation.
|
|
53
|
-
- Cite knowledge-base or
|
|
57
|
+
- Cite knowledge-base or openspec specification evidence for component/token
|
|
58
|
+
choices; label weaker repository fallback.
|
|
54
59
|
- Make deviations and unresolved gaps explicit.
|
|
@@ -5,7 +5,7 @@ Pre-write nodes are read-only. Preserve IDs, labels, commands, language, require
|
|
|
5
5
|
## Core nodes
|
|
6
6
|
|
|
7
7
|
- **`frontend-contract-pi`**: `Scope`, `Non-goals`, `Acceptance Criteria`, `UI States`, `Target Runtime Environment`, `Risks`, `Verification Expectations`. No guessed requirements.
|
|
8
|
-
- **`frontend-scout-pi`**: routes, components, tokens, data/API/Mock, scripts, tests, assets. Fact vs inference vs gap.
|
|
8
|
+
- **`frontend-scout-pi`**: routes, components, tokens, data/API/Mock, scripts, tests, assets. Fact vs inference vs gap. Query the knowledge base when available and always search+read `openspec/schemas/`, `openspec/project-specs/`, and `ai_workspace/` before repo fallback. Output stack, routes, components, styling, conventions, state/data, test entry points, reuse, risks.
|
|
9
9
|
- **`frontend-plan-pi` + conditional design loop**: AC → steps, in-bound files, UI states, reuse, deps, Mock/API strategy, activation/rollback, frozen verify entrypoints, real-integration gap, and exactly one `frontend-implementation-contract-v1` JSON object. Prefer native Mock; browser intercept only with existing e2e; request-adapter only for a reversible seam. `auto` may select `not-needed` when no project Mock capability exists, while keeping real requests default and recording the gap; `required` cannot. Initial design pass uses the original plan; only exact `request-revision` runs read-only revision plus final review. Small-risk runs one design review only.
|
|
10
10
|
- **`frontend-prewrite-gate-shell`**: the sole write authorization. Resolve effective plan/review, require exact pass, retain every REQ/BR/AC id, enforce Mock policy, validate schema/source binding, and materialize `contracts/frontend-implementation-contract.json`. Fallback is allowed only when a conditional primary is absent; an existing malformed primary fails closed. Generation-time blocked Mock produces one deterministic blocking shell node and no writer.
|
|
11
11
|
- **`frontend-implement-pi`**: sole exclusive writer. Stay in `writeSet`; real requests default-on; Mock reversible, dev/test-only, production-off. Atomic handler/intercept/adapter with consumer+tests. Stop on forbidden paths or guesses. Output changed files, behavior, UI states, styling notes, verification attempted, residual risks. Optional mock-verify when frozen; static+behavior always; behavior must prove page consumption. Skipped-Mock `not-needed` keeps real integration pending unless the real backend path has fresh evidence.
|
|
@@ -22,4 +22,4 @@ Only `eligible=true` runs `frontend-repair-pi` (same writeSet as implement; no r
|
|
|
22
22
|
|
|
23
23
|
## Risk & capability (M4–M6)
|
|
24
24
|
|
|
25
|
-
Deterministic risk (no model); high-risk beats small; supervised never small. Standard/high-risk contain 15 top-level nodes; small contains 13 by omitting revision and final review. Capability seed injects adapters; openspec
|
|
25
|
+
Deterministic risk (no model); high-risk beats small; supervised never small. Standard/high-risk contain 15 top-level nodes; small contains 13 by omitting revision and final review. Capability seed injects adapters; openspec specs and task sources outrank adapter guidance. A11y: static/component tools only when present; Browser a11y always not-run.
|
|
@@ -12,9 +12,8 @@ references:
|
|
|
12
12
|
Use for `frontend-review-pi`; read the findings guide first. Required inputs are
|
|
13
13
|
original task/reference material, effective plan/design branch, implementation summary,
|
|
14
14
|
and `contracts/frontend-review-context.json`. That canonical context binds the validated
|
|
15
|
-
implementation contract, effective
|
|
16
|
-
assessment
|
|
17
|
-
diff from an implementation summary alone.
|
|
15
|
+
implementation contract, effective verification trace, repair assessment, optional
|
|
16
|
+
`frontend-lint-assessment-v1`, and run-owned diff. The diff is authoritative.
|
|
18
17
|
|
|
19
18
|
## Verdict Contract
|
|
20
19
|
|
|
@@ -27,42 +26,30 @@ required check, forbidden write, or unmet acceptance criterion forces revision.
|
|
|
27
26
|
- Compare intent, contract, plan, diff, and evidence; report altered requirements.
|
|
28
27
|
- Inspect every changed file against allowed, forbidden, and approved write scope.
|
|
29
28
|
- Map criteria to behavior, applicable UI states, tests, and shell evidence.
|
|
30
|
-
- Review state/data flow, validation, async/error behavior,
|
|
29
|
+
- Review state/data flow, validation, async/error behavior, design, responsive/a11y,
|
|
30
|
+
dependencies, maintenance, and regression risk when applicable.
|
|
31
31
|
- Inspect static, behavior, and available Mock-specific artifacts directly. For Mock
|
|
32
32
|
strategies, compare the endpoint matrix, handler/fixture/adapter and consumer diff;
|
|
33
33
|
require the real request as default, contract-aligned fixtures, production isolation,
|
|
34
34
|
and no false real-integration claim. `not-needed` needs applicable real/no-remote
|
|
35
35
|
evidence, or an explicit default-auto skipped-Mock rationale with the Real
|
|
36
36
|
Integration Gap preserved when no project Mock capability is confirmed.
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
- Inspect lint assessment directly. `baseline-debt` requires intact evidence, only
|
|
38
|
+
baseline-matched diagnostics on unchanged files, and none on writer-changed files.
|
|
39
|
+
Report debt, never `lint passed`; `failed`/`unavailable` blocks. Typecheck, build,
|
|
40
|
+
and test still require successful final exits.
|
|
41
|
+
- Component/design claims need both knowledge-base and local openspec evidence. Query
|
|
42
|
+
the connector when available and always read task-relevant files under
|
|
43
|
+
`<repoRoot>/openspec/schemas/`, `<repoRoot>/openspec/project-specs/`, and `<repoRoot>/ai_workspace/`.
|
|
44
|
+
Connector format is TODO; never invent evidence. Only successful `read` calls are
|
|
45
|
+
observable as "已读取规范文件".
|
|
44
46
|
- Treat shell exit status as authoritative. Do not edit files.
|
|
45
47
|
|
|
46
48
|
## Evidence And Output
|
|
47
49
|
|
|
48
50
|
Findings cite a tight file location, exact command/result, or named DAG artifact.
|
|
49
|
-
Separate confirmed defects, missing evidence, and residual risks
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-
VERDICT: request-revision
|
|
53
|
-
|
|
54
|
-
## Findings
|
|
55
|
-
- [Important] `path:line` — issue, impact, and required correction.
|
|
56
|
-
|
|
57
|
-
## Verification Assessment
|
|
58
|
-
- ...
|
|
59
|
-
|
|
60
|
-
## UX Assessment
|
|
61
|
-
- ...
|
|
62
|
-
|
|
63
|
-
## Residual Risks
|
|
64
|
-
- ...
|
|
65
|
-
```
|
|
51
|
+
Separate confirmed defects, missing evidence, and residual risks using Findings,
|
|
52
|
+
Verification Assessment, UX Assessment, and Residual Risks headings.
|
|
66
53
|
|
|
67
54
|
A pass requires no Critical/Important findings and all required shell checks passed.
|
|
68
55
|
Still report knowledge-source status and optional browser/manual gaps.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Severity
|
|
4
4
|
|
|
5
|
-
- **Critical**: blocks primary flow, corrupts data, violates security/privacy, writes forbidden paths,
|
|
5
|
+
- **Critical**: blocks primary flow, corrupts data, violates security/privacy, writes forbidden paths, bypasses required verification.
|
|
6
6
|
- **Important**: acceptance/state/validation gap, material convention drift, missing behavior tests, unauthorized dependency, unsafe mock activation/import, mock-contract drift, misleading real-integration claim, or failed/missing required verification.
|
|
7
7
|
- **Minor**: non-blocking maintainability, copy, layout, or cleanup issue.
|
|
8
8
|
|
|
@@ -10,43 +10,41 @@
|
|
|
10
10
|
|
|
11
11
|
- Cite tight file locations, exact commands/results, or named DAG artifacts.
|
|
12
12
|
- Never invent evidence; name the missing check. An implementation summary is not the actual diff.
|
|
13
|
-
- Failed required static/behavior verification is at least Important
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
- Failed required static/behavior verification is at least Important. Lint may be
|
|
14
|
+
`baseline-debt` only with a valid `frontend-lint-assessment-v1`; this is not a
|
|
15
|
+
passed lint result. A changed-file lint diagnostic, new unmatched diagnostic,
|
|
16
|
+
command drift, missing baseline, timeout, or unparseable output is Important.
|
|
17
|
+
- Treat knowledge base, `openspec/schemas/`, `openspec/project-specs/`, and `ai_workspace/` as
|
|
18
|
+
parallel sources. Record connector/query/source/time plus openspec search terms and
|
|
19
|
+
matched paths/headings; label fallback or unavailable accurately.
|
|
19
20
|
|
|
20
21
|
## Review Sequence
|
|
21
22
|
|
|
22
23
|
1. Establish changed-file inventory and write boundaries.
|
|
23
24
|
2. Compare original requirement with derived contract/constraints.
|
|
24
25
|
3. Map each criterion to code, states, tests, and evidence.
|
|
25
|
-
4. Inspect interactions, state/data/API behavior, failure paths, and
|
|
26
|
+
4. Inspect interactions, state/data/API behavior, failure paths, and regressions.
|
|
26
27
|
5. Check mock selection, contract-to-fixture mapping, activation/default path,
|
|
27
|
-
handler/fixture/adapter and consumer diff,
|
|
28
|
-
|
|
29
|
-
6. Check
|
|
28
|
+
handler/fixture/adapter and consumer diff, verification, production imports, and
|
|
29
|
+
the real-integration gap.
|
|
30
|
+
6. Check design evidence, responsive/a11y behavior, dependencies, and maintenance.
|
|
30
31
|
7. Classify findings and derive the verdict mechanically.
|
|
31
32
|
|
|
32
|
-
Skipping
|
|
33
|
-
when component/design compliance affects acceptance or implementation choices.
|
|
34
|
-
|
|
35
|
-
Use one issue per finding:
|
|
33
|
+
Skipping either directory is Important when design compliance affects acceptance.
|
|
36
34
|
|
|
37
35
|
```text
|
|
38
36
|
- [Critical|Important|Minor] path:line — Problem; impact; required correction; evidence.
|
|
39
37
|
```
|
|
40
38
|
|
|
41
|
-
Avoid vague advice. When no source location exists, cite the command or artifact.
|
|
42
|
-
|
|
43
39
|
## Pass Rules
|
|
44
40
|
|
|
45
41
|
- No Critical or Important findings remain.
|
|
46
42
|
- Required static and behavior nodes ran and passed.
|
|
43
|
+
- Lint is `passed` or evidence-backed `baseline-debt`; typecheck, build, and test are
|
|
44
|
+
passed. Any debt count and affected unchanged files remain disclosed.
|
|
47
45
|
- Changed files are authorized.
|
|
48
46
|
- Criteria and applicable states have implementation and evidence.
|
|
49
47
|
- Required Mock-backed behavior passed; any generated Mock-specific verification also
|
|
50
48
|
passed; Mock is not enabled by default in production. For default-auto skipped
|
|
51
49
|
Mock, the real request remains default and the Real Integration Gap is preserved.
|
|
52
|
-
- Optional unavailable knowledge
|
|
50
|
+
- Optional unavailable knowledge/browser/visual/manual checks remain explicit risks.
|
|
@@ -17,18 +17,22 @@ verdict/findings, and required browser, visual, manual, or knowledge evidence.
|
|
|
17
17
|
|
|
18
18
|
## Evidence Rules
|
|
19
19
|
|
|
20
|
-
- Static evidence covers type/
|
|
20
|
+
- Static evidence covers type/build/schema; behavior evidence must exercise the flow.
|
|
21
|
+
Lint has its own assessment status: `passed`, `baseline-debt`, `failed`, or
|
|
22
|
+
`unavailable`.
|
|
21
23
|
- Shell exit status is authoritative. Classify as `passed`, `failed`, `not-run`,
|
|
22
24
|
`blocked`, or `unavailable`; only passed satisfies a required check.
|
|
23
25
|
- Never use static success as behavior proof, or tests as visual/browser proof they did not exercise.
|
|
24
26
|
- Mock-backed behavior proves frontend rendering and state transitions only. It never
|
|
25
27
|
proves backend readiness, transport compatibility, or real API integration.
|
|
26
28
|
- Unavailable commands remain gaps.
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
- `baseline-debt` is not lint passed. It requires
|
|
30
|
+
`frontend-lint-assessment-v1` proving only pre-writer diagnostics on unchanged
|
|
31
|
+
files. Report debt count, changed files, and raw evidence. Typecheck/build/test do
|
|
32
|
+
not support debt.
|
|
33
|
+
- Resolve design evidence from parallel sources: query the available knowledge
|
|
34
|
+
connector and always read task-relevant `<repoRoot>/openspec/schemas/`,
|
|
35
|
+
`<repoRoot>/openspec/project-specs/`, and `<repoRoot>/ai_workspace/`. Connector format is TODO; never invent it.
|
|
32
36
|
- Separate Mock service/handler checks from page consumption and record the
|
|
33
37
|
dev/test-only boundary; handler tests alone do not prove page use.
|
|
34
38
|
|
|
@@ -40,18 +44,17 @@ only proven changes.
|
|
|
40
44
|
Return Markdown headings:
|
|
41
45
|
|
|
42
46
|
- `Changes`: changed behavior and areas.
|
|
43
|
-
- `Mock Decision`, `Mock Files`, `Mock Verification`, `Production Boundary
|
|
47
|
+
- `Mock Decision`, `Mock Files`, `Mock Verification`, `Production Boundary`.
|
|
44
48
|
- `Verification Evidence`: table of check, command/source, status, and artifact/result.
|
|
49
|
+
Keep lint `baseline-debt` verbatim rather than converting it to `passed`.
|
|
45
50
|
- `Review Result`: exact review verdict and findings.
|
|
46
51
|
- `Known Risks`: missing optional checks and environment caveats.
|
|
47
52
|
- `Follow-up`: concrete work or `None`.
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
`Frontend status:
|
|
51
|
-
`
|
|
52
|
-
`
|
|
53
|
-
`<task-id>-real-api-integration-verify` task before changing the latter to complete;
|
|
54
|
-
the follow-up is explicit, not auto-created or auto-executed.
|
|
54
|
+
With only Mock evidence, state `Frontend status: mock-validated`; when default `auto`
|
|
55
|
+
skipped Mock without real API evidence, state `Frontend status: locally-validated`.
|
|
56
|
+
Both require `Real integration: pending` and explicit
|
|
57
|
+
`<task-id>-real-api-integration-verify` follow-up; it is not auto-created/executed.
|
|
55
58
|
|
|
56
59
|
Do not edit files. Do not claim complete when review is not pass or a required check
|
|
57
60
|
is failed, not-run, blocked, unavailable, stale, or contradicted.
|
|
@@ -3,19 +3,26 @@
|
|
|
3
3
|
## Static And Behavior Evidence
|
|
4
4
|
|
|
5
5
|
- Required type/compile, lint/format, build, schema/client, browser/e2e/manual checks ran.
|
|
6
|
+
- Lint is recorded as `passed | baseline-debt | failed | unavailable`.
|
|
7
|
+
`baseline-debt` cites `frontend-lint-baseline-v1` and
|
|
8
|
+
`frontend-lint-assessment-v1`, writer changed files, tolerated diagnostic count,
|
|
9
|
+
command identity, and raw output hashes; it is never labeled passed.
|
|
10
|
+
- Every remaining lint diagnostic is on an unchanged file and matches the
|
|
11
|
+
writer-preceding baseline. Changed-file diagnostics, new unmatched diagnostics,
|
|
12
|
+
command drift, timeout, worktree mutation, or unparseable output fail closed.
|
|
13
|
+
- Typecheck, build, and test are fully passed; none accepts baseline debt.
|
|
6
14
|
- Generated output was authorized; tests cover changed logic, flows, and regressions.
|
|
7
|
-
- Fixed
|
|
15
|
+
- Fixed entrypoints prove selected-strategy behavior and applicable UI states.
|
|
8
16
|
- Mock-specific checks cover service/handler/schema/fixtures; behavior evidence separately proves page consumption.
|
|
9
17
|
- Mock activation is explicit/non-production; a default-real-path build with Mock off proves the real request remains default.
|
|
10
|
-
- `not-needed` has real/no-remote evidence
|
|
18
|
+
- `not-needed` has real/no-remote evidence or a default-auto skipped-Mock rationale.
|
|
11
19
|
- Mock-backed evidence is frontend-only and never satisfies real API integration.
|
|
12
20
|
|
|
13
21
|
## Design And Component Evidence
|
|
14
22
|
|
|
15
|
-
- Claims cite
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- Relevant `openspec/` matches satisfy source availability; missing both sources blocks explicit compliance or required design decisions.
|
|
23
|
+
- Claims cite knowledge-base, OpenSpec, and `<repoRoot>/ai_workspace/` sources.
|
|
24
|
+
- Evidence records query/source/time, local-spec terms, paths, headings, and rules.
|
|
25
|
+
- OpenSpec or `ai_workspace/` matches satisfy source availability; none blocks required design decisions.
|
|
19
26
|
|
|
20
27
|
## Status
|
|
21
28
|
|
|
@@ -25,7 +32,8 @@
|
|
|
25
32
|
- `blocked`: a prerequisite prevented execution.
|
|
26
33
|
- `unavailable`: tool, environment, connector, or source was absent.
|
|
27
34
|
|
|
28
|
-
Only passed satisfies a required check.
|
|
35
|
+
Only passed satisfies a required check. For lint alone, evidence-backed
|
|
36
|
+
`baseline-debt` may continue as explicit debt; it replaces no other check.
|
|
29
37
|
|
|
30
38
|
## Closeout Checks
|
|
31
39
|
|
|
@@ -35,26 +43,6 @@ Only passed satisfies a required check. Other optional statuses remain disclosed
|
|
|
35
43
|
- If only Mock evidence exists, report `Frontend status: mock-validated` and `Real integration: pending`, with actual API verification follow-up.
|
|
36
44
|
- If default `auto` skipped Mock and no real API evidence exists, report `Frontend status: locally-validated` and `Real integration: pending`.
|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
## Verification Evidence
|
|
43
|
-
| Check | Command or source | Status | Evidence |
|
|
44
|
-
|---|---|---|---|
|
|
45
|
-
| ... | ... | passed | ... |
|
|
46
|
-
|
|
47
|
-
## Mock Decision / Mock Files / Mock Verification / Production Boundary
|
|
48
|
-
- Status: `passed | failed | not-required | blocked | unavailable`
|
|
49
|
-
|
|
50
|
-
## Review Result
|
|
51
|
-
- Verdict: `VERDICT: pass`
|
|
52
|
-
|
|
53
|
-
## Known Risks
|
|
54
|
-
- ...
|
|
55
|
-
|
|
56
|
-
## Follow-up
|
|
57
|
-
- None.
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
If review is not pass or a required check is not passed, describe the task as incomplete and list concrete follow-up.
|
|
46
|
+
Output uses Changes, Verification Evidence, Mock Decision/Files/Verification,
|
|
47
|
+
Production Boundary, Review Result, Known Risks, and Follow-up headings. If review is
|
|
48
|
+
not pass or a required check fails, describe the task as incomplete with follow-up.
|
|
@@ -1,88 +1,80 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grill-with-docs
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Grilling session that challenges a plan against the existing domain model,
|
|
5
|
+
sharpens terminology, and proposes CONTEXT.md / ADR updates as decisions
|
|
6
|
+
crystallise. Use when the user wants to stress-test a plan against project
|
|
7
|
+
language and documented decisions. Explicit interactive operator skill only —
|
|
8
|
+
not a default DAG role.
|
|
9
|
+
references:
|
|
10
|
+
- path: context-format.md
|
|
11
|
+
required: true
|
|
12
|
+
- path: adr-format.md
|
|
13
|
+
required: true
|
|
4
14
|
---
|
|
5
15
|
|
|
6
|
-
|
|
16
|
+
# Grill With Docs
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
显式交互式 operator skill。用于压力测试计划与术语;**不**加入默认 planner / reviewer / implementer role mapping,避免普通 DAG 被问答阻塞。
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
## What to do
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</what-to-do>
|
|
15
|
-
|
|
16
|
-
<supporting-info>
|
|
17
|
-
|
|
18
|
-
## Domain awareness
|
|
22
|
+
Interview the user relentlessly about every aspect of the plan until shared understanding. Walk each design branch, resolve decision dependencies one-by-one. For each question, provide a recommended answer.
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
Ask questions one at a time; wait for feedback before continuing.
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Most repos have a single context:
|
|
26
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
/
|
|
28
|
-
├── CONTEXT.md
|
|
29
|
-
├── ai_workspace/loop-agent/
|
|
30
|
-
│ └── adr/
|
|
31
|
-
│ ├── 0001-event-sourced-orders.md
|
|
32
|
-
│ └── 0002-postgres-for-write-model.md
|
|
33
|
-
└── src/
|
|
34
|
-
```
|
|
28
|
+
## Path resolution
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
1. Read `harness.json.governanceRoot`(缺省时常见为源码仓库 `docs`,目标项目 `ai_workspace/loop-agent`)。
|
|
31
|
+
2. Decisions 目录 = `${governanceRoot}/decisions/`(本仓库即 `docs/decisions/`)。
|
|
32
|
+
3. Glossary = 仓库根 `CONTEXT.md`(多 context 时见 `CONTEXT-MAP.md`)。
|
|
33
|
+
4. **禁止**硬编码平行 `adr/` 目录树;只用 `${governanceRoot}/decisions/`。
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
/
|
|
40
|
-
├── CONTEXT-MAP.md
|
|
41
|
-
├── ai_workspace/loop-agent/
|
|
42
|
-
│ └── adr/ ← system-wide decisions
|
|
43
|
-
├── src/
|
|
44
|
-
│ ├── ordering/
|
|
45
|
-
│ │ ├── CONTEXT.md
|
|
46
|
-
│ │ └── ai_workspace/loop-agent/adr/ ← context-specific decisions
|
|
47
|
-
│ └── billing/
|
|
48
|
-
│ ├── CONTEXT.md
|
|
49
|
-
│ └── ai_workspace/loop-agent/adr/
|
|
50
|
-
```
|
|
35
|
+
## Write boundary
|
|
51
36
|
|
|
52
|
-
|
|
37
|
+
- Inline 更新 `CONTEXT.md` / ADR **必须**服从当前 task `allowedPaths` 与 DAG `writeSet`。
|
|
38
|
+
- 无写权限时:只返回建议与待确认 patch,**不得**越界写文档。
|
|
39
|
+
- 不得绕过 human gate、write guard 或 shell completion authority。
|
|
53
40
|
|
|
54
41
|
## During the session
|
|
55
42
|
|
|
56
43
|
### Challenge against the glossary
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
术语与 `CONTEXT.md` 冲突时立即指出。
|
|
59
46
|
|
|
60
47
|
### Sharpen fuzzy language
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
模糊或过载词要提出规范术语。
|
|
63
50
|
|
|
64
51
|
### Discuss concrete scenarios
|
|
65
52
|
|
|
66
|
-
|
|
53
|
+
用具体场景压力测试边界。
|
|
67
54
|
|
|
68
55
|
### Cross-reference with code
|
|
69
56
|
|
|
70
|
-
|
|
57
|
+
声称与代码不符时立即表面矛盾。
|
|
71
58
|
|
|
72
|
-
### Update CONTEXT.md
|
|
59
|
+
### Update CONTEXT.md only when allowed
|
|
73
60
|
|
|
74
|
-
|
|
61
|
+
术语敲定后,若有写权限则按 `context-format.md` 立刻更新;否则只给出建议 patch。
|
|
75
62
|
|
|
76
|
-
`CONTEXT.md`
|
|
63
|
+
`CONTEXT.md` 是 glossary 且仅是 glossary:不含实现细节、规格草稿、计划状态或架构决策。
|
|
77
64
|
|
|
78
65
|
### Offer ADRs sparingly
|
|
79
66
|
|
|
80
|
-
|
|
67
|
+
仅当三条同时成立才提议 ADR:
|
|
68
|
+
|
|
69
|
+
1. **Hard to reverse** — 改变成本可观
|
|
70
|
+
2. **Surprising without context** — 未来读者会追问 why
|
|
71
|
+
3. **Real trade-off** — 曾有合理备选并基于具体理由选择
|
|
72
|
+
|
|
73
|
+
缺一则跳过。格式遵循目标仓库已有模板(见 `adr-format.md`),本仓库使用完整 `docs/templates/adr.md` 字段,不用单段极简 ADR 覆盖本地约定。
|
|
81
74
|
|
|
82
|
-
|
|
83
|
-
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
84
|
-
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
75
|
+
## Supporting formats
|
|
85
76
|
|
|
86
|
-
|
|
77
|
+
Required references(已进入 skill snapshot):
|
|
87
78
|
|
|
88
|
-
|
|
79
|
+
- `context-format.md`
|
|
80
|
+
- `adr-format.md`
|