@tea-agent/loop-agent 0.13.0-alpha.0 → 0.13.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/AGENTS.md +4 -0
- package/CHANGELOG.md +57 -53
- package/README.md +12 -3
- package/dist/application/dag/generate-task-dag.js +28 -58
- package/dist/application/evaluation/candidate-hash.js +75 -0
- package/dist/application/evaluation/candidate.js +52 -0
- package/dist/application/evaluation/replay.js +289 -0
- package/dist/application/evaluation/types.js +130 -0
- package/dist/cli/command-definitions.js +17 -4
- package/dist/cli/program.js +8 -4
- package/dist/commands/eval.js +235 -0
- package/dist/commands/init.js +131 -24
- package/dist/executors/pi-sdk-executor.js +38 -24
- package/dist/executors/shell-executor.js +226 -15
- package/dist/executors/shell-presets.js +20 -0
- package/dist/executors/shell-verification.js +7 -0
- package/dist/governance/manifest-types.js +1 -0
- package/dist/infrastructure/evaluation/candidate-store.js +439 -0
- package/dist/infrastructure/evaluation/store.js +40 -0
- package/dist/task/config-types.js +23 -0
- package/dist/worker/observe/routes.js +18 -3
- package/dist/worker/observe/spec-evidence.js +1 -1
- package/dist/worker/observe/static/dom.js +160 -1
- package/dist/worker/observe/static/state.js +14 -0
- package/dist/worker/observe/static/views/dag-inspector.js +35 -4
- package/dist/worker/observe/static/views/dag.js +9 -0
- package/dist/worker/observe/static/views/dashboard.js +702 -445
- package/dist/worker/observe/static/views/session-timeline.js +15 -1
- package/dist/workflows/dag/backend-test-analysis-contract.js +120 -0
- package/dist/workflows/dag/backend-test-case-manifest.js +503 -0
- package/dist/workflows/dag/backend-test-execution-contract.js +353 -0
- package/dist/workflows/dag/backend-test-result-contract.js +568 -0
- package/dist/workflows/dag/decision-envelope.js +57 -2
- package/dist/workflows/dag/dynamic-runtime/map.js +90 -2
- package/dist/workflows/dag/frontend-implementation-contract.js +240 -0
- package/dist/workflows/dag/frontend-project-capability.js +309 -0
- package/dist/workflows/dag/frontend-repair.js +341 -0
- package/dist/workflows/dag/frontend-risk.js +161 -0
- package/dist/workflows/dag/frontend-verification-trace.js +190 -0
- package/dist/workflows/dag/init-hybrid.js +2407 -297
- package/dist/workflows/dag/node-execution.js +9 -0
- package/dist/workflows/dag/prompt.js +9 -0
- package/dist/workflows/dag/repair-artifact.js +43 -3
- package/dist/workflows/dag/report.js +35 -1
- package/dist/workflows/dag/runner.js +28 -2
- package/dist/workflows/dag/skill-instructions.js +4 -2
- package/dist/workflows/dag/task-demand-routing.js +383 -0
- package/dist/workflows/dag/types.js +71 -13
- package/dist/workflows/dag/upstream-artifacts.js +1 -0
- package/dist/workflows/dag/validate.js +59 -1
- package/docs/README.md +6 -3
- package/docs/agent-dag-recovery-playbook.md +5 -3
- package/docs/agent-dag-runner.md +3 -3
- package/docs/architecture/README.md +3 -3
- package/docs/architecture/dag-execution.md +1 -1
- package/docs/architecture/evolution.md +13 -13
- package/docs/architecture/facts-and-state.md +1 -1
- package/docs/architecture/runtime-boundaries.md +7 -7
- package/docs/architecture/system-overview.md +3 -3
- package/docs/architecture/worker-and-feature.md +3 -3
- package/docs/design/README.md +124 -42
- package/docs/development-principles.md +4 -4
- package/docs/exec-plans/active/README.md +12 -11
- package/docs/exec-plans/completed/README.md +33 -0
- package/docs/feature-workflow.md +114 -39
- package/docs/init-surface.manifest.json +30 -3
- package/docs/loop-agent-harness.md +9 -8
- package/docs/production-readiness.md +1 -1
- package/docs/progress/README.md +23 -1
- package/docs/reports/README.md +65 -6
- package/docs/skills/vetted-skill-registry.md +2 -0
- package/docs/templates/agent-dag.schema.json +29 -1
- package/docs/templates/agent-dag.supervised-implementation.json +127 -8
- package/docs/templates/backend-test-analysis.schema.json +44 -0
- package/docs/templates/backend-test-case-manifest.schema.json +190 -0
- package/docs/templates/backend-test-dag.classify.prompt.md +75 -0
- package/docs/templates/backend-test-dag.generate-pytest.prompt.md +81 -16
- package/docs/templates/backend-test-dag.json +311 -40
- package/docs/templates/backend-test-dag.retrospect.prompt.md +44 -30
- package/docs/templates/backend-test-dag.review-cases.prompt.md +10 -8
- package/docs/templates/backend-test-execution.schema.json +133 -0
- package/docs/templates/backend-test-result.schema.json +99 -0
- package/docs/templates/branch-merge-report.md +93 -0
- package/docs/templates/frontend-design-contract.md +9 -0
- package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -0
- package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -0
- package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -0
- package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -0
- package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -0
- package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -0
- package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -0
- package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -0
- package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -0
- package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -0
- package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -0
- package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -0
- package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -0
- package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -0
- package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -0
- package/docs/templates/frontend-eval/metrics.md +138 -0
- package/docs/templates/frontend-eval/smoke-targets.md +53 -0
- package/docs/templates/frontend-implementation-contract.schema.json +27 -0
- package/docs/templates/frontend-task-constraints.md +10 -0
- package/docs/templates/frontend-task-requirement.md +9 -0
- package/docs/templates/frontend-test-dag.generate-cases.prompt.md +5 -0
- package/docs/templates/frontend-test-dag.json +23 -0
- package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +3 -0
- package/docs/templates/frontend-test-dag.retrospect.prompt.md +3 -0
- package/docs/templates/frontend-test-dag.review-cases.prompt.md +3 -0
- package/docs/templates/frontend-test-dag.review-execution.prompt.md +3 -0
- package/docs/templates/knowledge-graph-bootstrap-dag.json +1 -1
- package/docs/templates/knowledge-sync-dag.json +1 -0
- package/docs/verification-matrix.md +4 -1
- package/examples/decision-gate-agent-dag.json +4 -4
- package/examples/hybrid-loop-agent-dag.json +1 -1
- package/package.json +2 -2
- package/scripts/kb-bootstrap-init-skeleton.sh +2 -1
- package/scripts/kb-graph-incremental-prepare.mjs +19 -5
- package/scripts/kb-graph-promote.mjs +12 -1
- package/skills/ai-engineering-context/SKILL.md +2 -2
- package/skills/analyze-product-dependencies/SKILL.md +67 -0
- package/skills/analyze-product-dependencies/agents/openai.yaml +4 -0
- package/skills/analyze-product-dependencies/references/api-documentation-schema.md +30 -0
- package/skills/analyze-product-dependencies/references/dependency-analysis-schema.md +28 -0
- package/skills/analyze-product-dependencies/references/example.md +76 -0
- package/skills/analyze-product-dependencies/references/forward-test-cases.md +35 -0
- package/skills/analyze-product-dependencies/references/input-contract.md +11 -0
- package/skills/analyze-product-dependencies/references/scouting-rules.md +61 -0
- package/skills/analyze-product-dependencies/scripts/test-validators.mjs +267 -0
- package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +101 -0
- package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +142 -0
- package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +76 -0
- package/skills/analyze-product-dependencies/scripts/validation-helpers.mjs +146 -0
- package/skills/analyze-product-requirements/SKILL.md +90 -0
- package/skills/analyze-product-requirements/agents/openai.yaml +4 -0
- package/skills/analyze-product-requirements/references/acceptance-criteria.md +91 -0
- package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +56 -0
- package/skills/analyze-product-requirements/references/example.md +86 -0
- package/skills/analyze-product-requirements/references/forward-test-cases.md +66 -0
- package/skills/analyze-product-requirements/references/product-analysis-schema.md +32 -0
- package/skills/analyze-product-requirements/references/product-requirement-schema.md +33 -0
- package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +35 -0
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +193 -0
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +69 -0
- package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +97 -0
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +98 -0
- package/skills/analyze-product-requirements/scripts/validation-helpers.mjs +156 -0
- package/skills/browser-tools/SKILL.md +196 -0
- package/skills/browser-tools/browser-content.js +103 -0
- package/skills/browser-tools/browser-cookies.js +35 -0
- package/skills/browser-tools/browser-eval.js +53 -0
- package/skills/browser-tools/browser-hn-scraper.js +108 -0
- package/skills/browser-tools/browser-nav.js +44 -0
- package/skills/browser-tools/browser-pick.js +162 -0
- package/skills/browser-tools/browser-screenshot.js +34 -0
- package/skills/browser-tools/browser-start.js +86 -0
- package/skills/browser-tools/package-lock.json +2556 -0
- package/skills/browser-tools/package.json +19 -0
- package/skills/frontend-design-review/SKILL.md +6 -1
- package/skills/frontend-design-review/references/review-checklist.md +25 -4
- package/skills/frontend-implementation/SKILL.md +25 -30
- package/skills/frontend-implementation/references/code-standards.md +20 -22
- package/skills/frontend-implementation/references/node-contracts.md +17 -53
- package/skills/frontend-review/SKILL.md +10 -4
- package/skills/frontend-review/references/review-findings.md +8 -3
- package/skills/frontend-verification/SKILL.md +22 -9
- package/skills/frontend-verification/references/verification-checklist.md +17 -5
- package/skills/grill-with-docs/SKILL.md +5 -5
- package/skills/grill-with-docs/adr-format.md +3 -3
- package/skills/init-capability-evolution/SKILL.md +5 -5
- package/skills/loop-agent/SKILL.md +5 -5
- package/skills/loop-agent/references/README.md +3 -3
- package/skills/loop-agent/references/command-reference.md +98 -24
- package/skills/loop-agent/references/docs-converge.md +15 -15
- package/skills/loop-agent/references/harness-policy.md +2 -2
- package/skills/loop-agent/references/hybrid-dag.md +32 -22
- package/skills/loop-agent/references/multi-worktree.md +1 -1
- package/skills/loop-agent/references/orchestrator-and-interventions.md +8 -8
- package/skills/loop-agent/references/task-workflow.md +1 -1
- package/skills/loop-agent/references/verification-and-failure-handling.md +6 -4
- package/skills/playwright-cli/SKILL.md +420 -0
- package/skills/playwright-cli/references/element-attributes.md +23 -0
- package/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/skills/playwright-cli/references/request-mocking.md +87 -0
- package/skills/playwright-cli/references/running-code.md +241 -0
- package/skills/playwright-cli/references/session-management.md +225 -0
- package/skills/playwright-cli/references/storage-state.md +275 -0
- package/skills/playwright-cli/references/test-generation.md +433 -0
- package/skills/playwright-cli/references/tracing.md +139 -0
- package/skills/playwright-cli/references/video-recording.md +143 -0
- package/skills/playwright-cli-case-generator/SKILL.md +74 -0
- package/skills/requesting-code-review/SKILL.md +1 -1
- package/skills/systematic-debugging/CREATION-LOG.md +3 -3
- package/skills/systematic-debugging/SKILL.md +1 -1
- package/skills/systematic-debugging/test-academic.md +1 -1
- package/skills/systematic-debugging/test-pressure-1.md +1 -1
- package/skills/systematic-debugging/test-pressure-2.md +1 -1
- package/skills/systematic-debugging/test-pressure-3.md +1 -1
- package/skills/verification-before-completion/SKILL.md +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "browser-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Minimal CDP tools for collaborative site exploration",
|
|
6
|
+
"author": "Mario Zechner",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@mozilla/readability": "^0.6.0",
|
|
10
|
+
"cheerio": "^1.1.2",
|
|
11
|
+
"jsdom": "^27.0.1",
|
|
12
|
+
"puppeteer": "^24.31.0",
|
|
13
|
+
"puppeteer-core": "^23.11.1",
|
|
14
|
+
"puppeteer-extra": "^3.3.6",
|
|
15
|
+
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
16
|
+
"turndown": "^7.2.2",
|
|
17
|
+
"turndown-plugin-gfm": "^1.0.2"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -4,12 +4,13 @@ description: Use for the frontend plan design gate before any writer runs.
|
|
|
4
4
|
references:
|
|
5
5
|
- path: references/review-checklist.md
|
|
6
6
|
required: true
|
|
7
|
+
maxChars: 3600
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Frontend Design Review
|
|
10
11
|
|
|
11
12
|
For first/final design review nodes. Read the checklist, then audit contract, scout,
|
|
12
|
-
plan/revision, task constraints/bounds, and traceable design evidence. The knowledge-
|
|
13
|
+
mock strategy, plan/revision, task constraints/bounds, and traceable design evidence. The knowledge-
|
|
13
14
|
base connector is TODO: never invent results. If absent/failed/unmatched, require
|
|
14
15
|
`<repoRoot>/openSpec/**` search/read evidence before repo conventions.
|
|
15
16
|
|
|
@@ -29,6 +30,10 @@ remaining, incomplete, or newly introduced gaps.
|
|
|
29
30
|
lack knowledge-base or required `openSpec/` evidence; paths cross write bounds;
|
|
30
31
|
commands are missing/non-deterministic; or interaction, responsive, accessibility,
|
|
31
32
|
data, or failure behavior requires guessing.
|
|
33
|
+
- `MOCK_STRATEGY: blocked`; missing permitted target paths, endpoint/schema-to-fixture
|
|
34
|
+
mapping, fixed verification, or dev/test-only activation; a second Mock framework;
|
|
35
|
+
inline fake data; commented real requests; Mock-on production defaults; test-only
|
|
36
|
+
production imports; or Mock evidence reported as real integration.
|
|
32
37
|
|
|
33
38
|
Knowledge-base absence is advisory if relevant `openSpec/` rules were searched/read
|
|
34
39
|
and applied. Block skipped fallback, unresolved conflict, or unresolved UI decisions.
|
|
@@ -5,15 +5,17 @@
|
|
|
5
5
|
- Target route/page/component and non-goals are clear.
|
|
6
6
|
- Every acceptance criterion maps to steps, files, UI behavior, and verification.
|
|
7
7
|
- Assumptions and unresolved ambiguity are explicit.
|
|
8
|
-
-
|
|
8
|
+
- Applicable success, error, loading, empty, disabled, permission, retry, stale-response, and boundary states are handled or marked N/A.
|
|
9
9
|
|
|
10
10
|
## Project And Knowledge Fit
|
|
11
11
|
|
|
12
12
|
- Existing components, hooks, API helpers, mocks, schemas, router patterns, templates, tokens, and theme rules were considered.
|
|
13
|
-
- Component/design choices cite
|
|
14
|
-
-
|
|
15
|
-
- Source is `knowledge-base`, `openSpec fallback`, `repository fallback`, or `unavailable`; evidence includes query/search terms, matched paths/headings, and conflicts.
|
|
13
|
+
- Component/design choices cite knowledge-base or `openSpec/`; failed/empty knowledge-base queries recurse through `<repoRoot>/openSpec/**` first.
|
|
14
|
+
- Evidence records source status, query terms, paths/headings, and conflicts.
|
|
16
15
|
- Dependencies are authorized; paths fit allowed/write scope and avoid forbidden/generated files.
|
|
16
|
+
- A required Mock-backed strategy reuses native support when proven, otherwise an
|
|
17
|
+
existing browser-intercept/request-adapter seam; it maps endpoint/states to fixtures,
|
|
18
|
+
stays in writer scope, and is off in production. `not-needed` adds none.
|
|
17
19
|
|
|
18
20
|
## Interaction And Quality
|
|
19
21
|
|
|
@@ -27,11 +29,30 @@
|
|
|
27
29
|
- Tests prove changed state logic and flows at repository-supported levels.
|
|
28
30
|
- Browser/visual checks are required only by task intent or existing gates.
|
|
29
31
|
- Every missing verification path is a blocker or disclosed risk.
|
|
32
|
+
- Verification entrypoints are frozen; any Mock-specific command is generated only
|
|
33
|
+
from trusted sources, and behavior separately proves page consumption.
|
|
34
|
+
|
|
35
|
+
## Mock Strategy Safety
|
|
36
|
+
|
|
37
|
+
- The strategy protocol is valid and not `MOCK_STRATEGY: blocked`.
|
|
38
|
+
- For Mock strategies, API fields and fixture states trace to contract evidence; gaps are explicit.
|
|
39
|
+
- Selection follows repository capability: native mock first, browser interception
|
|
40
|
+
for existing e2e, request adapter/injection for local preview.
|
|
41
|
+
- The real request remains enabled by default; activation is explicit, reversible,
|
|
42
|
+
local/test-only, and excluded from production behavior.
|
|
43
|
+
- Verification uses only shell entrypoints fixed when the DAG was generated; the
|
|
44
|
+
plan does not invent commands that shell nodes cannot execute.
|
|
45
|
+
- Mock strategies include a production/default-real-path build with Mock off and
|
|
46
|
+
Mock-backed behavior evidence. `not-needed` instead needs applicable real or
|
|
47
|
+
no-remote behavior evidence.
|
|
48
|
+
- Mock-backed checks prove frontend states only. Real integration remains pending
|
|
49
|
+
until the actual backend path has fresh evidence.
|
|
30
50
|
|
|
31
51
|
## Verdict Matrix
|
|
32
52
|
|
|
33
53
|
- Coverage gap, unsafe scope, unauthorized dependency, unresolved required interaction, or missing required verification: request revision.
|
|
34
54
|
- Missing knowledge-base evidence and skipped `openSpec/` fallback: request revision.
|
|
35
55
|
- No relevant knowledge-base or `openSpec/` rule for a required decision: request revision.
|
|
56
|
+
- Unsafe/missing mock strategy or mock evidence presented as real integration: request revision.
|
|
36
57
|
- Knowledge-base unavailable but relevant `openSpec/` rules were applied: advisory connection gap, not a specification gap.
|
|
37
58
|
- Optional cleanup that cannot affect acceptance: advisory.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-implementation
|
|
3
3
|
description: >-
|
|
4
|
-
Use for frontend contract, scout, plan, and implementation DAG nodes.
|
|
4
|
+
Use for frontend contract, scout, mock strategy, plan, and implementation DAG nodes.
|
|
5
5
|
references:
|
|
6
|
-
- path: references/node-contracts.md
|
|
7
|
-
required: true
|
|
8
|
-
|
|
6
|
+
- path: references/node-contracts.md
|
|
7
|
+
required: true
|
|
8
|
+
# Compact contract index must stay under skill total budget (~10k with body + other refs).
|
|
9
|
+
# Headroom above current ~4k file; do not raise alone without checking totalMaxChars.
|
|
10
|
+
maxChars: 6000
|
|
9
11
|
- path: references/design-spec.md
|
|
10
12
|
required: true
|
|
11
13
|
maxChars: 3000
|
|
@@ -16,39 +18,32 @@ references:
|
|
|
16
18
|
|
|
17
19
|
# Frontend Implementation
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
`frontend-implement-pi`. Read all required references first.
|
|
21
|
+
Read all required references before running any listed frontend node.
|
|
21
22
|
|
|
22
23
|
## Source And Evidence Rules
|
|
23
24
|
|
|
24
|
-
Use task sources/references, constraints, then `task.json`.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- Record `knowledge-base`, `openSpec fallback`, `repository fallback`, or `unavailable`, plus evidence/conflicts.
|
|
31
|
-
|
|
32
|
-
### Observable Spec Retrieval
|
|
33
|
-
|
|
34
|
-
Scout/planner nodes must `grep`/`find` relevant `openSpec/**` and skill references,
|
|
35
|
-
then explicitly `read` every consulted spec (`SKILL.md`, `design-spec.md`,
|
|
36
|
-
`code-standards.md`, etc.). Observe derives evidence from session tool events: only
|
|
37
|
-
successful paired `read` calls count as “已读取规范文件”; summaries do not. If the
|
|
38
|
-
knowledge base is unavailable, record `openSpec/**` search hits before repo fallback.
|
|
25
|
+
Use task sources/references, constraints, then `task.json`. Follow `design-spec.md`:
|
|
26
|
+
knowledge base; `<repoRoot>/openSpec/**` after unavailable/failed/empty; then repo
|
|
27
|
+
evidence. Cite tight paths/symbols, label gaps/conflicts, and never invent APIs,
|
|
28
|
+
rules, commands, or retrievals. Scout/planners locate and explicitly read applicable
|
|
29
|
+
specs; only successful paired reads count. Lockfile-only, fixture-only, or unread
|
|
30
|
+
search hits do not prove a reusable Mock service.
|
|
39
31
|
|
|
40
32
|
## Implementation Discipline
|
|
41
33
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
34
|
+
- Reuse confirmed specs, components, tokens, helpers, APIs, mocks, schemas, and tests.
|
|
35
|
+
- Keep real requests enabled by default; never comment them out for a mock.
|
|
36
|
+
- Prefer native Mock support; otherwise use existing browser interception for e2e or
|
|
37
|
+
a reversible request adapter/DI seam for local preview.
|
|
38
|
+
- Trace fixtures to API/schema evidence. Activation is explicit, dev/test-only,
|
|
39
|
+
production-off; Mock evidence never proves real API integration.
|
|
40
|
+
- Add dependencies only when approved. Cover applicable success/loading/empty/error/
|
|
41
|
+
permission/boundary states and justify N/A.
|
|
42
|
+
- Keep state testable. Stay in `writeSet`, preserve behavior, and update tests.
|
|
47
43
|
- Never relax lint/type/test/build config or write unauthorized generated output.
|
|
48
44
|
|
|
49
45
|
## Output And Failure Rules
|
|
50
46
|
|
|
51
|
-
- Follow `node-contracts.md
|
|
52
|
-
|
|
53
|
-
- Preserve
|
|
54
|
-
- Attempted checks may be reported; completion needs fresh downstream shell evidence.
|
|
47
|
+
- Follow `node-contracts.md`; read-only nodes never edit. Missing input blocks work
|
|
48
|
+
when proceeding would guess behavior, bounds, or verification.
|
|
49
|
+
- Preserve tokens, commands, paths, IDs, and language. Completion needs fresh shell evidence.
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
# Frontend Code Standards
|
|
2
2
|
|
|
3
|
-
Discover
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
documentation never overrides an installed API without an explicit compatibility decision.
|
|
3
|
+
Discover rules from task constraints, `design-spec.md` source order, config, code,
|
|
4
|
+
tests, manifests, and generated types. After knowledge-base failure, applicable
|
|
5
|
+
`<repoRoot>/openSpec/**` rules are normative. Preferences are not rules, and docs do
|
|
6
|
+
not override installed APIs without an explicit compatibility decision.
|
|
8
7
|
|
|
9
8
|
## Discover And Cite
|
|
10
9
|
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- Component, hook, route, mock, utility, and test naming.
|
|
14
|
-
- Unit, component, integration, browser/e2e, fixture, and mock expectations.
|
|
15
|
-
- Approved/forbidden dependencies and human-approval rules.
|
|
10
|
+
- Find routing and server/client boundaries; state, forms, data/cache, and errors;
|
|
11
|
+
API/mock/UI/schema/test locations and naming; supported tests; dependency rules.
|
|
16
12
|
|
|
17
|
-
Cite
|
|
18
|
-
|
|
13
|
+
Cite representative files/config for each convention. Describe conflicts instead of
|
|
14
|
+
silently selecting one.
|
|
19
15
|
|
|
20
16
|
## Plan And Implement
|
|
21
17
|
|
|
22
|
-
- Map
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
18
|
+
- Map criteria to code and checks. Define placement, state ownership, request
|
|
19
|
+
lifecycle, validation/failures, API compatibility, mocks, and fixtures.
|
|
20
|
+
- Trace fixtures to API evidence; label gaps. Prefer native mocks, then browser
|
|
21
|
+
interception for existing e2e, then a reversible request adapter/DI preview seam.
|
|
22
|
+
- Real API stays default; mock activation is explicit, local/test-only,
|
|
23
|
+
non-production, and removable.
|
|
24
|
+
- Reuse helpers/public APIs and preserve out-of-contract behavior. Keep rendering,
|
|
25
|
+
transitions, validation, and side effects testable; cover lifecycle races/bounds
|
|
26
|
+
when relevant. Update supported tests; stay in `writeSet`.
|
|
29
27
|
|
|
30
28
|
## Prohibited
|
|
31
29
|
|
|
32
|
-
- Do not relax
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
- Do not relax checks, add unapproved dependencies, comment real requests, hardcode
|
|
31
|
+
fixtures in production UI, import test mocks into production, store fixture
|
|
32
|
+
secrets, equate mock evidence with real integration, or report unrun checks as verified.
|
|
@@ -1,63 +1,27 @@
|
|
|
1
1
|
# Frontend Node Contracts
|
|
2
2
|
|
|
3
|
-
Pre-
|
|
4
|
-
labels, language, and named output headings.
|
|
3
|
+
Pre-write nodes are read-only. Preserve IDs, labels, commands, language, required headings.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Core nodes
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
routes/components,
|
|
10
|
-
|
|
11
|
-
`
|
|
12
|
-
`
|
|
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. Knowledge base first; else search+read `<repoRoot>/openSpec/**` before repo fallback. Output stack, routes, components, styling, conventions, state/data, test entry points, reuse, risks.
|
|
9
|
+
- **`frontend-mock-assess-pi` + gate**: first non-empty line
|
|
10
|
+
`MOCK_STRATEGY: native|browser-intercept|request-adapter|not-needed|blocked`
|
|
11
|
+
Prefer native Mock; browser intercept only with existing e2e; request-adapter only for reversible local preview. `not-needed` needs positive no-remote/stable-backend evidence; invalid when `frontendMock.policy=required`. `blocked` for missing/conflicting contracts, unsafe paths/deps, unread specs, production-default-on, unverifiable entrypoints. Output Mock Decision, API/spec/service evidence, backend readiness, selection evidence, endpoint/fixture matrix, activation, targets, production safety, verification plan, real-integration gap, blocking issues. Never invent fields, store secrets, comment real requests, import test mocks into production, or treat Mock as real integration. Gate uses `first-non-empty` only; never authorizes writes. Unsafe required contracts → no writer.
|
|
12
|
+
- **`frontend-plan-pi` + design loop**: AC → steps, in-bound files, UI states, reuse, deps, activation/rollback, frozen verify entrypoints, real-integration gap. First gate: `VERDICT: pass|request-revision`. Pass may emit `PASS_NO_REVISION_NEEDED`; else full corrected plan without invented evidence. Final review rechecks plan/findings/revision/assessment/Mock safety. Only final `VERDICT: pass` authorizes writes; failure → replan/rerun (not dev-fix).
|
|
13
|
+
- **`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.
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Contract / trace / stages (M1–M2)
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
conventions. Record source, query/terms, and paths. Output: `Frontend Stack`,
|
|
20
|
-
`Routes`, `Components`, `Styling System`, `Existing Design Conventions`,
|
|
21
|
-
`State / Data Flow`, `Test Entry Points`, `Reuse Opportunities`, `Risks`.
|
|
17
|
+
- Contract shell: `jsonArtifactGate` → `contracts/frontend-implementation-contract.json` from revision (one fenced JSON or pure JSON); schemaId `frontend-implementation-contract-v1`. Final design + implement depend on it; `MOCK_STRATEGY: blocked` not implementable.
|
|
18
|
+
- Trace shell: `frontend-verification-trace-gate` binds contract `verificationTargets` to static/behavior records (`commandLabels`, file exists, optional symbol). Assess `MOCK_STRATEGY:` must match `mockApi.strategy` when present. Writes `contracts/frontend-verification-trace.json`. Browser/visual always `not-run`.
|
|
19
|
+
- Implement stages: (1) contract confirm (2) tests sync (3) component/UI (4) API/Mock (5) frozen checks (6) diff cleanup. Summary: Contract Ref, Changed Files, Requirements, UI States, Tests, Verification Attempts, Deviations, Residual Risks.
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## Repair (M3)
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
states, reuse, interactions, dependencies, and commands. Apply `openSpec/` rules
|
|
27
|
-
when knowledge-base fails; ask only for material conflicts. Output: `Implementation Steps`, `Target
|
|
28
|
-
Files`, `UI State Handling`, `Styling / Component Strategy`, `Interaction Notes`,
|
|
29
|
-
`Dependency Policy`, `Verification Plan`, `Residual Risks`.
|
|
23
|
+
static/behavior/trace may `nonZeroExitPolicy: record`. Assess → `contracts/frontend-repair-assessment.json`. Repair-contract fail-closed on non-repairable (contract/path/dependency/credential/deploy/spec-unclear) or writeSet expansion. `frontend-repair-pi`: same writeSet as implement; no re-spec; max 1 attempt. Reverify/retrace fail policy; review/closeout use post-repair evidence.
|
|
30
24
|
|
|
31
|
-
##
|
|
25
|
+
## Risk & capability (M4–M6)
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
non-empty line. It accepts only `VERDICT: pass` or `VERDICT: request-revision` and
|
|
35
|
-
blocks malformed output. It never authorizes writes; request-revision enters plan
|
|
36
|
-
revision. Line mode: `first-verdict-line`.
|
|
37
|
-
|
|
38
|
-
## `frontend-plan-revision-pi`
|
|
39
|
-
|
|
40
|
-
Consume the original plan and first review findings. On first-gate pass, output
|
|
41
|
-
`PASS_NO_REVISION_NEEDED`; on request-revision, address every Required Plan
|
|
42
|
-
Correction in a complete plan with the plan headings above. Always `read-only`;
|
|
43
|
-
never edit code, docs, or artifacts.
|
|
44
|
-
|
|
45
|
-
## Final design review and gate
|
|
46
|
-
|
|
47
|
-
`frontend-final-design-review-pi` rechecks the original plan for
|
|
48
|
-
`PASS_NO_REVISION_NEEDED`, otherwise verifies every correction and rejects any
|
|
49
|
-
remaining/new gap. Its first non-empty line is exactly `VERDICT: pass` or
|
|
50
|
-
`VERDICT: request-revision`.
|
|
51
|
-
|
|
52
|
-
`frontend-final-design-gate-shell` reads that verdict and accepts only
|
|
53
|
-
`VERDICT: pass`. It is the sole write authorization. Failure routes to
|
|
54
|
-
`ContractMismatch` / `frontend-plan-revision-and-rerun`, never `ProductBug` /
|
|
55
|
-
`dev-fix`. Line mode: `first-verdict-line`.
|
|
56
|
-
|
|
57
|
-
## `frontend-implement-pi`
|
|
58
|
-
|
|
59
|
-
Depends directly on final gate, revision plan, and final review. After pass, re-read
|
|
60
|
-
current files and implement only the approved plan inside `writeSet`; stop on
|
|
61
|
-
forbidden paths or blocking guesses. Reuse primitives and update tests. Output:
|
|
62
|
-
`Changed Files`, `Implemented Behavior`, `UI States Covered`, `Styling / Component
|
|
63
|
-
Notes`, `Verification Attempted`, `Residual Risks`.
|
|
27
|
+
Deterministic risk (no model); high-risk beats small; supervised never small. Small may drop first design gate + plan-revision; contract shell retargets to `frontend-plan-pi`. Capability seed injects adapters; openSpec/task sources outrank. A11y: static/component tools only when present; Browser a11y always not-run.
|
|
@@ -4,14 +4,16 @@ description: Use to review completed frontend code and verification before close
|
|
|
4
4
|
references:
|
|
5
5
|
- path: references/review-findings.md
|
|
6
6
|
required: true
|
|
7
|
+
maxChars: 2800
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Frontend Review
|
|
10
11
|
|
|
11
12
|
Use for `frontend-review-pi`; read the findings guide first. Required inputs are
|
|
12
|
-
original task/reference material,
|
|
13
|
-
design verdict, implementation summary, actual diff,
|
|
14
|
-
|
|
13
|
+
original task/reference material, contract/constraints, Mock assessment, original and
|
|
14
|
+
revised/confirmed plan, final design verdict, implementation summary, actual diff,
|
|
15
|
+
and static/behavior/optional Mock shell evidence. Missing actual diff or required
|
|
16
|
+
evidence forces revision; never infer it from a summary.
|
|
15
17
|
|
|
16
18
|
## Verdict Contract
|
|
17
19
|
|
|
@@ -21,10 +23,14 @@ required check, forbidden write, or unmet acceptance criterion forces revision.
|
|
|
21
23
|
|
|
22
24
|
## Review Scope
|
|
23
25
|
|
|
24
|
-
- Compare
|
|
26
|
+
- Compare intent, contract, plan, diff, and evidence; report altered requirements.
|
|
25
27
|
- Inspect every changed file against allowed, forbidden, and approved write scope.
|
|
26
28
|
- Map criteria to behavior, applicable UI states, tests, and shell evidence.
|
|
27
29
|
- Review state/data flow, validation, async/error behavior, components/design, responsive behavior, accessibility, dependencies, maintenance, and regression risk when applicable.
|
|
30
|
+
- Inspect static, behavior, and available Mock-specific artifacts directly. For Mock
|
|
31
|
+
strategies, compare the endpoint matrix, handler/fixture/adapter and consumer diff;
|
|
32
|
+
require the real request as default, contract-aligned fixtures, production isolation,
|
|
33
|
+
and no false real-integration claim. `not-needed` needs applicable real/no-remote evidence.
|
|
28
34
|
- Component/design claims require traceable knowledge-base evidence or, after connection/query failure or no match, relevant `<repoRoot>/openSpec/**` evidence. The connector format is TODO; never claim a query or fallback search without evidence. Execute explicit `grep`/`find` to locate spec files and `read` to load them before referencing their rules. Only successful `read` tool calls are observable as "已读取规范文件" in the spec-evidence inspector.
|
|
29
35
|
- Treat shell exit status as authoritative. Do not edit files.
|
|
30
36
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Severity
|
|
4
4
|
|
|
5
5
|
- **Critical**: blocks primary flow, corrupts data, violates security/privacy, writes forbidden paths, or bypasses required verification.
|
|
6
|
-
- **Important**: acceptance/state/validation gap, material convention drift, missing behavior tests, unauthorized dependency, or failed/missing required verification.
|
|
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
|
|
|
9
9
|
## Evidence
|
|
@@ -19,8 +19,11 @@
|
|
|
19
19
|
2. Compare original requirement with derived contract/constraints.
|
|
20
20
|
3. Map each criterion to code, states, tests, and evidence.
|
|
21
21
|
4. Inspect interactions, state/data/API behavior, failure paths, and regression risk.
|
|
22
|
-
5. Check
|
|
23
|
-
|
|
22
|
+
5. Check mock selection, contract-to-fixture mapping, activation/default path,
|
|
23
|
+
handler/fixture/adapter and consumer diff, optional Mock-specific verification,
|
|
24
|
+
production imports, evidence scope, and the documented real-integration gap.
|
|
25
|
+
6. Check component/design evidence, responsive/accessibility behavior, dependencies, and maintenance fit when applicable.
|
|
26
|
+
7. Classify findings and derive the verdict mechanically.
|
|
24
27
|
|
|
25
28
|
Skipping the required `openSpec/` search after knowledge-base failure is Important
|
|
26
29
|
when component/design compliance affects acceptance or implementation choices.
|
|
@@ -39,4 +42,6 @@ Avoid vague advice. When no source location exists, cite the command or artifact
|
|
|
39
42
|
- Required static and behavior nodes ran and passed.
|
|
40
43
|
- Changed files are authorized.
|
|
41
44
|
- Criteria and applicable states have implementation and evidence.
|
|
45
|
+
- Required Mock-backed behavior passed; any generated Mock-specific verification also
|
|
46
|
+
passed; Mock is not enabled by default in production.
|
|
42
47
|
- Optional unavailable knowledge-base, browser, visual, or manual checks remain explicit risks.
|
|
@@ -4,6 +4,7 @@ description: Use to assess frontend evidence and produce closeout.
|
|
|
4
4
|
references:
|
|
5
5
|
- path: references/verification-checklist.md
|
|
6
6
|
required: true
|
|
7
|
+
maxChars: 3000
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Frontend Verification
|
|
@@ -11,30 +12,42 @@ references:
|
|
|
11
12
|
Use for `frontend-closeout-pi`. Shell nodes execute commands; this read-only skill
|
|
12
13
|
assesses their evidence. Read the checklist first.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
required browser, visual, manual, or knowledge-base validation.
|
|
15
|
+
Inputs: criteria, change inventory, shell commands/status/artifacts, review
|
|
16
|
+
verdict/findings, and required browser, visual, manual, or knowledge evidence.
|
|
17
17
|
|
|
18
18
|
## Evidence Rules
|
|
19
19
|
|
|
20
|
-
- Static evidence covers type/lint/build/schema
|
|
21
|
-
- Shell exit status is authoritative. Classify
|
|
20
|
+
- Static evidence covers type/lint/build/schema; behavior evidence must exercise the flow.
|
|
21
|
+
- Shell exit status is authoritative. Classify as `passed`, `failed`, `not-run`,
|
|
22
|
+
`blocked`, or `unavailable`; only passed satisfies a required check.
|
|
22
23
|
- Never use static success as behavior proof, or tests as visual/browser proof they did not exercise.
|
|
23
|
-
-
|
|
24
|
-
|
|
24
|
+
- Mock-backed behavior proves frontend rendering and state transitions only. It never
|
|
25
|
+
proves backend readiness, transport compatibility, or real API integration.
|
|
26
|
+
- Unavailable commands remain gaps.
|
|
27
|
+
- Resolve design evidence via knowledge base, then `<repoRoot>/openSpec/**` after
|
|
28
|
+
failure/no match. Its connector format remains TODO; never invent it. An applied
|
|
29
|
+
`openSpec fallback` is available project evidence.
|
|
30
|
+
- Separate Mock service/handler checks from page consumption and record the
|
|
31
|
+
dev/test-only boundary; handler tests alone do not prove page use.
|
|
25
32
|
|
|
26
33
|
## Method And Output
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
Map required checks to fresh evidence, classify gaps, confirm review pass, and state
|
|
36
|
+
only proven changes.
|
|
30
37
|
|
|
31
38
|
Return Markdown headings:
|
|
32
39
|
|
|
33
40
|
- `Changes`: changed behavior and areas.
|
|
41
|
+
- `Mock Decision`, `Mock Files`, `Mock Verification`, `Production Boundary`: status is `passed`, `failed`, `not-required`, `blocked`, or `unavailable`.
|
|
34
42
|
- `Verification Evidence`: table of check, command/source, status, and artifact/result.
|
|
35
43
|
- `Review Result`: exact review verdict and findings.
|
|
36
44
|
- `Known Risks`: missing optional checks and environment caveats.
|
|
37
45
|
- `Follow-up`: concrete work or `None`.
|
|
38
46
|
|
|
47
|
+
When the backend remains unavailable but required mock-backed checks pass, state
|
|
48
|
+
`Frontend status: mock-validated` and `Real integration: pending`. Use a completed
|
|
49
|
+
`<task-id>-real-api-integration-verify` task before changing the latter to complete;
|
|
50
|
+
the follow-up is explicit, not auto-created or auto-executed.
|
|
51
|
+
|
|
39
52
|
Do not edit files. Do not claim complete when review is not pass or a required check
|
|
40
53
|
is failed, not-run, blocked, unavailable, stale, or contradicted.
|
|
@@ -4,15 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
- Type/compile, lint/format, build, and schema/client checks ran when required.
|
|
6
6
|
- Generated output was authorized.
|
|
7
|
-
-
|
|
7
|
+
- Tests cover changed logic/flows and regressions.
|
|
8
8
|
- Browser/e2e/manual evidence exists when explicitly required.
|
|
9
|
-
-
|
|
9
|
+
- Selected-strategy behavior and applicable loading, empty, error, success, disabled,
|
|
10
|
+
permission, retry, and boundary states have evidence from fixed DAG entrypoints.
|
|
11
|
+
- When generated, Mock-specific verification checks service/handler/schema/fixtures;
|
|
12
|
+
behavior evidence separately proves page consumption.
|
|
13
|
+
- For Mock strategies, activation is explicit/non-production and a production/default-
|
|
14
|
+
real-path build with Mock off confirms the real request remains default.
|
|
15
|
+
- `not-needed` has positive readiness/no-remote evidence plus applicable real or
|
|
16
|
+
no-remote behavior evidence. Mock-backed evidence remains frontend-only and never
|
|
17
|
+
satisfies real API integration.
|
|
10
18
|
|
|
11
19
|
## Design And Component Evidence
|
|
12
20
|
|
|
13
|
-
- Claims cite
|
|
14
|
-
-
|
|
15
|
-
- When connector setup/query fails or has no match, evidence shows recursive `openSpec/` search terms, inspected paths, matched headings/lines, and applied rules.
|
|
21
|
+
- Claims cite knowledge-base retrieval or `<repoRoot>/openSpec/**` fallback.
|
|
22
|
+
- Evidence records query/source/version/time or fallback search terms, paths, headings, and applied rules.
|
|
16
23
|
- Relevant `openSpec/` matches become the current-project specification and satisfy source availability; only the knowledge-base connection remains unavailable.
|
|
17
24
|
- Missing both sources blocks explicit compliance or an unresolved required design decision.
|
|
18
25
|
|
|
@@ -32,6 +39,8 @@ Only passed satisfies a required check. Other optional statuses remain disclosed
|
|
|
32
39
|
- Map every criterion to evidence or a named gap.
|
|
33
40
|
- Record review verdict before completion.
|
|
34
41
|
- Do not conflate static, behavior, browser/visual/manual, or knowledge-base proof.
|
|
42
|
+
- If only mock evidence exists, report `Frontend status: mock-validated` and
|
|
43
|
+
`Real integration: pending`, with the actual API verification as follow-up.
|
|
35
44
|
|
|
36
45
|
```markdown
|
|
37
46
|
## Changes
|
|
@@ -42,6 +51,9 @@ Only passed satisfies a required check. Other optional statuses remain disclosed
|
|
|
42
51
|
|---|---|---|---|
|
|
43
52
|
| ... | ... | passed | ... |
|
|
44
53
|
|
|
54
|
+
## Mock Decision / Mock Files / Mock Verification / Production Boundary
|
|
55
|
+
- Status: `passed | failed | not-required | blocked | unavailable`
|
|
56
|
+
|
|
45
57
|
## Review Result
|
|
46
58
|
- Verdict: `VERDICT: pass`
|
|
47
59
|
|
|
@@ -26,7 +26,7 @@ Most repos have a single context:
|
|
|
26
26
|
```
|
|
27
27
|
/
|
|
28
28
|
├── CONTEXT.md
|
|
29
|
-
├──
|
|
29
|
+
├── ai_workspace/loop-agent/
|
|
30
30
|
│ └── adr/
|
|
31
31
|
│ ├── 0001-event-sourced-orders.md
|
|
32
32
|
│ └── 0002-postgres-for-write-model.md
|
|
@@ -38,18 +38,18 @@ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The ma
|
|
|
38
38
|
```
|
|
39
39
|
/
|
|
40
40
|
├── CONTEXT-MAP.md
|
|
41
|
-
├──
|
|
41
|
+
├── ai_workspace/loop-agent/
|
|
42
42
|
│ └── adr/ ← system-wide decisions
|
|
43
43
|
├── src/
|
|
44
44
|
│ ├── ordering/
|
|
45
45
|
│ │ ├── CONTEXT.md
|
|
46
|
-
│ │ └──
|
|
46
|
+
│ │ └── ai_workspace/loop-agent/adr/ ← context-specific decisions
|
|
47
47
|
│ └── billing/
|
|
48
48
|
│ ├── CONTEXT.md
|
|
49
|
-
│ └──
|
|
49
|
+
│ └── ai_workspace/loop-agent/adr/
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `
|
|
52
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `ai_workspace/loop-agent/adr/` exists, create it when the first ADR is needed.
|
|
53
53
|
|
|
54
54
|
## During the session
|
|
55
55
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ADR Format
|
|
2
2
|
|
|
3
|
-
ADRs live in `
|
|
3
|
+
ADRs live in `ai_workspace/loop-agent/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
|
|
4
4
|
|
|
5
|
-
Create the `
|
|
5
|
+
Create the `ai_workspace/loop-agent/adr/` directory lazily — only when the first ADR is needed.
|
|
6
6
|
|
|
7
7
|
## Template
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Only include these when they add genuine value. Most ADRs won't need them.
|
|
|
24
24
|
|
|
25
25
|
## Numbering
|
|
26
26
|
|
|
27
|
-
Scan `
|
|
27
|
+
Scan `ai_workspace/loop-agent/adr/` for the highest existing number and increment by one.
|
|
28
28
|
|
|
29
29
|
## When to offer an ADR
|
|
30
30
|
|
|
@@ -14,12 +14,12 @@ description: 用于 loop-agent 本仓库的初始化能力演化审查,判断
|
|
|
14
14
|
- 新能力是否应该进入目标项目。
|
|
15
15
|
- 新增/修改的 skill 是否应随 npm 包和 `init --profile full` 投影。
|
|
16
16
|
- 目标项目的 `AGENTS.md`、README managed block、治理 docs、scripts 或 templates 是否需要更新。
|
|
17
|
-
- `package.json files` 与 `
|
|
17
|
+
- `package.json files` 与 `ai_workspace/loop-agent/init-surface.manifest.json` 是否仍覆盖真实发布范围。
|
|
18
18
|
- 是否需要目标项目 smoke、init doctor、docs audit 或 package dry-run 证据。
|
|
19
19
|
|
|
20
20
|
## Trigger Tiers
|
|
21
21
|
|
|
22
|
-
按 `
|
|
22
|
+
按 `ai_workspace/loop-agent/init-surface.manifest.json` 的 `evolutionReview.tiers` 判断成本:
|
|
23
23
|
|
|
24
24
|
- `advisory`:只记录提示,不阻塞。
|
|
25
25
|
- `surface-check`:运行 `bash scripts/check-init-surface.sh`;通过即可。
|
|
@@ -32,11 +32,11 @@ description: 用于 loop-agent 本仓库的初始化能力演化审查,判断
|
|
|
32
32
|
审查时逐条回答:
|
|
33
33
|
|
|
34
34
|
1. 本次变更会改变目标项目执行 `loop-agent init --profile full --merge` 后得到的文件、规则或能力吗?
|
|
35
|
-
2. 是否新增、删除或重命名了
|
|
35
|
+
2. 是否新增、删除或重命名了 `.agents/skills/**`,并且目标项目需要 repo-local 可审计副本?
|
|
36
36
|
3. 是否改变了默认 DAG role skills、skill resolution、strict skill audit 或 task prompt 注入?
|
|
37
37
|
4. 是否新增通用治理模板、script matrix、production readiness 或 operator recovery 文档,需要目标项目初始化后可见?
|
|
38
38
|
5. `package.json files` 是否包含所有 npm 运行和初始化所需静态资料?
|
|
39
|
-
6. `
|
|
39
|
+
6. `ai_workspace/loop-agent/init-surface.manifest.json` 是否更新了 package / init / exclude / trigger contract?
|
|
40
40
|
7. 旧目标项目是否只需 advisory、需要手工复制新增文件,还是需要未来 `init audit/update` 迁移能力?
|
|
41
41
|
|
|
42
42
|
## Output
|
|
@@ -44,7 +44,7 @@ description: 用于 loop-agent 本仓库的初始化能力演化审查,判断
|
|
|
44
44
|
轻量审查可以只在 handoff 中说明。高影响审查应写入:
|
|
45
45
|
|
|
46
46
|
```text
|
|
47
|
-
|
|
47
|
+
ai_workspace/loop-agent/reports/YYYY-MM-DD-init-evolution-review.md
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
报告保持短小,包含:
|