feat: 初始化 SCALE OS 工程框架
- 添加 SCALE Engine 配置 (.scale/) - 添加 OpenClaw Agent 配置 (.openclaw/) - 添加知识文档 (AGENTS.md, TOOLS.md) - 添加质量契约和工作流配置 - 添加 22 个工作流模板 - 添加验证脚本和门控脚本 - 添加 skills-registry 技能注册表
This commit is contained in:
29
docs/workflow/templates/api-contract.md
Normal file
29
docs/workflow/templates/api-contract.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# API Contract
|
||||
|
||||
## Endpoint Or Interface
|
||||
|
||||
TBD
|
||||
|
||||
## Request
|
||||
|
||||
TBD
|
||||
|
||||
## Response
|
||||
|
||||
TBD
|
||||
|
||||
## Errors
|
||||
|
||||
TBD
|
||||
|
||||
## Permission Rules
|
||||
|
||||
TBD
|
||||
|
||||
## Compatibility Notes
|
||||
|
||||
TBD
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TBD
|
||||
23
docs/workflow/templates/architecture-review.md
Normal file
23
docs/workflow/templates/architecture-review.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Architecture Review
|
||||
|
||||
## Scope
|
||||
|
||||
- Modules touched:
|
||||
- Public contracts touched:
|
||||
- Data flow touched:
|
||||
|
||||
## Boundary Checks
|
||||
|
||||
- [ ] API/controller layer does not bypass service/usecase layer
|
||||
- [ ] Domain layer is not coupled to infrastructure details
|
||||
- [ ] Repository/ORM usage follows project conventions
|
||||
- [ ] Shared framework components are reused instead of duplicated
|
||||
- [ ] New abstractions remove real complexity
|
||||
|
||||
## Risks
|
||||
|
||||
- TBD
|
||||
|
||||
## Decision
|
||||
|
||||
- Approved/changes required:
|
||||
20
docs/workflow/templates/db-change-plan.md
Normal file
20
docs/workflow/templates/db-change-plan.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# DB Change Plan
|
||||
|
||||
## Schema Or Data Change
|
||||
|
||||
TBD
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
TBD
|
||||
|
||||
## Migration Steps
|
||||
|
||||
TBD
|
||||
|
||||
## Rollback Plan
|
||||
|
||||
TBD
|
||||
|
||||
## Verification
|
||||
TBD
|
||||
17
docs/workflow/templates/docs-impact.md
Normal file
17
docs/workflow/templates/docs-impact.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Docs Impact
|
||||
|
||||
## Code Changes Requiring Docs
|
||||
|
||||
- TBD
|
||||
|
||||
## Documentation Updated
|
||||
|
||||
- TBD
|
||||
|
||||
## No-Docs-Needed Rationale
|
||||
|
||||
TBD
|
||||
|
||||
## Links Checked
|
||||
|
||||
- TBD
|
||||
20
docs/workflow/templates/e2e-plan.md
Normal file
20
docs/workflow/templates/e2e-plan.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# E2E Plan
|
||||
|
||||
## User Paths
|
||||
|
||||
TBD
|
||||
|
||||
## Browser Coverage
|
||||
|
||||
TBD
|
||||
|
||||
## Test Data
|
||||
|
||||
TBD
|
||||
|
||||
## Assertions
|
||||
|
||||
TBD
|
||||
|
||||
## Evidence
|
||||
TBD
|
||||
20
docs/workflow/templates/explore.md
Normal file
20
docs/workflow/templates/explore.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Explore
|
||||
|
||||
## Files Read
|
||||
|
||||
- TBD
|
||||
|
||||
## Current Behavior
|
||||
|
||||
TBD
|
||||
|
||||
## Main Conflict
|
||||
|
||||
TBD
|
||||
|
||||
## Affected Modules
|
||||
|
||||
TBD
|
||||
|
||||
## Evidence
|
||||
TBD
|
||||
32
docs/workflow/templates/github-actions-scale-preflight.yml
Normal file
32
docs/workflow/templates/github-actions-scale-preflight.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: SCALE Preflight
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
preflight:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install project dependencies when present
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f package-lock.json ]; then
|
||||
npm ci
|
||||
elif [ -f package.json ]; then
|
||||
npm install
|
||||
fi
|
||||
|
||||
- name: Run SCALE preflight
|
||||
run: npx @hongmaple0820/scale-engine@latest preflight --service all --preflight-profile ci
|
||||
42
docs/workflow/templates/mini-prd.md
Normal file
42
docs/workflow/templates/mini-prd.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Mini-PRD
|
||||
|
||||
## Background
|
||||
|
||||
TBD
|
||||
|
||||
## Target Users
|
||||
|
||||
TBD
|
||||
|
||||
## Core Scenario
|
||||
|
||||
TBD
|
||||
|
||||
## Non-Goals
|
||||
|
||||
TBD
|
||||
|
||||
## User Path
|
||||
|
||||
TBD
|
||||
|
||||
## Permission Rules
|
||||
|
||||
TBD
|
||||
|
||||
## Data Impact
|
||||
|
||||
TBD
|
||||
|
||||
## Exception Scenarios
|
||||
|
||||
1. TBD
|
||||
2. TBD
|
||||
3. TBD
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TBD
|
||||
|
||||
## Rollback Or Disable Strategy
|
||||
TBD
|
||||
28
docs/workflow/templates/plan.md
Normal file
28
docs/workflow/templates/plan.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Plan
|
||||
|
||||
## Approach
|
||||
|
||||
TBD
|
||||
|
||||
## Boundaries
|
||||
|
||||
TBD
|
||||
|
||||
## Exception Contract
|
||||
|
||||
1. TBD
|
||||
2. TBD
|
||||
3. TBD
|
||||
|
||||
## Rollback Plan
|
||||
|
||||
TBD
|
||||
|
||||
## Human Confirmation
|
||||
|
||||
- Required for L/CRITICAL tasks:
|
||||
- Confirmation source:
|
||||
- Execution boundary approved:
|
||||
|
||||
## Test Strategy
|
||||
TBD
|
||||
8
docs/workflow/templates/pre-push-scale-preflight.sh
Normal file
8
docs/workflow/templates/pre-push-scale-preflight.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
if command -v scale >/dev/null 2>&1; then
|
||||
scale preflight --service all
|
||||
else
|
||||
npx @hongmaple0820/scale-engine@latest preflight --service all
|
||||
fi
|
||||
61
docs/workflow/templates/product-smoke.md
Normal file
61
docs/workflow/templates/product-smoke.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Product Smoke
|
||||
|
||||
## Real Product Path
|
||||
|
||||
Describe the smallest end-to-end path that proves the change works through the real product boundary.
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
UI or client -> gateway/router -> service -> database/storage/queue -> observable result
|
||||
```
|
||||
|
||||
Do not use a green health endpoint as the only proof when the user-facing path depends on routing, authentication, storage, async tasks, browser behavior, or third-party integration.
|
||||
|
||||
## Quick Setup
|
||||
|
||||
1. Open `.scale/product-smoke.json`.
|
||||
2. Replace the example command with one real product path command.
|
||||
3. Set that probe's `enabled` field to `true`.
|
||||
4. Run `scale preflight --profile productSmoke --json`.
|
||||
5. Run `scale runtime final-check --level M --json`.
|
||||
|
||||
`status: "skipped"` means no real product path was exercised. It does not count as completion evidence.
|
||||
|
||||
## Setup
|
||||
|
||||
- Base URL:
|
||||
- Test user or tenant:
|
||||
- Required fixtures:
|
||||
- Services that must be running:
|
||||
|
||||
## Smoke Commands
|
||||
|
||||
| Command | Expected Result | Evidence Artifact |
|
||||
| --- | --- | --- |
|
||||
| TBD | TBD | TBD |
|
||||
|
||||
## Runtime Evidence
|
||||
|
||||
Record at least one runtime evidence item:
|
||||
|
||||
```bash
|
||||
scale runtime record \
|
||||
--kind command \
|
||||
--title "Product smoke: <flow>" \
|
||||
--status passed \
|
||||
--command "<exact smoke command>" \
|
||||
--exit-code 0 \
|
||||
--summary "<business result, task id, status, or observable output>" \
|
||||
--artifacts ".agent/logs/<service>/<smoke>.json" \
|
||||
--metadata-json '{"productSmoke":true,"realProductPath":true}'
|
||||
```
|
||||
|
||||
## Assertions
|
||||
|
||||
- [ ] Request crossed the real product boundary, not only an isolated unit.
|
||||
- [ ] Authentication or user identity path was exercised when relevant.
|
||||
- [ ] Persistence/storage/queue side effect was verified when relevant.
|
||||
- [ ] Async task or eventual state was polled to terminal status when relevant.
|
||||
- [ ] Failure output is specific enough to diagnose the failing layer.
|
||||
- [ ] Runtime artifacts are ignored or deliberately promoted according to resource governance.
|
||||
25
docs/workflow/templates/reality-check.md
Normal file
25
docs/workflow/templates/reality-check.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Reality Check
|
||||
|
||||
## Confirmed
|
||||
|
||||
- TBD
|
||||
|
||||
## Not Verified
|
||||
|
||||
- TBD
|
||||
|
||||
## Stub / Fake / Partial
|
||||
|
||||
- TBD
|
||||
|
||||
## Credential-Gated
|
||||
|
||||
- TBD
|
||||
|
||||
## Environment-Gated
|
||||
|
||||
- TBD
|
||||
|
||||
## User-Visible Risk
|
||||
|
||||
- TBD
|
||||
14
docs/workflow/templates/resource-cleanup.md
Normal file
14
docs/workflow/templates/resource-cleanup.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Resource Cleanup
|
||||
|
||||
## New Resources
|
||||
|
||||
| Resource | Location | Keep / Move / Delete | Reason |
|
||||
| --- | --- | --- | --- |
|
||||
| TBD | TBD | TBD | TBD |
|
||||
|
||||
## Docs Promotion
|
||||
|
||||
- Promote to docs:
|
||||
- Keep in planning:
|
||||
- Keep local/runtime only:
|
||||
- Delete before handoff:
|
||||
25
docs/workflow/templates/resource-impact.md
Normal file
25
docs/workflow/templates/resource-impact.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource Impact
|
||||
|
||||
## Resources Created
|
||||
|
||||
| Path | Type | Git Policy | Retention |
|
||||
| --- | --- | --- | --- |
|
||||
| TBD | canonical-doc/task-artifact/evidence-report/temporary/reusable-script/generated-media/contract/decision-record | commit/ignore/lfs/external/review | TBD |
|
||||
|
||||
## Resources Updated
|
||||
|
||||
- TBD
|
||||
|
||||
## Resources Promoted To Maintained Docs
|
||||
|
||||
- TBD
|
||||
|
||||
## Resources To Delete Or Archive Before Finish
|
||||
|
||||
- TBD
|
||||
|
||||
## Source Of Truth Updates
|
||||
|
||||
- [ ] .scale/resource-policy.json
|
||||
- [ ] .scale/assets.json
|
||||
- [ ] docs/modules/<module>/README.md
|
||||
16
docs/workflow/templates/review.md
Normal file
16
docs/workflow/templates/review.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Review
|
||||
|
||||
## Code Review
|
||||
|
||||
TBD
|
||||
|
||||
## Security Review
|
||||
|
||||
TBD
|
||||
|
||||
## Same-Pattern Scan
|
||||
|
||||
TBD
|
||||
|
||||
## Residual Risks
|
||||
TBD
|
||||
21
docs/workflow/templates/runtime.md
Normal file
21
docs/workflow/templates/runtime.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Runtime Contract
|
||||
|
||||
## Configuration Source
|
||||
|
||||
- Source: TBD
|
||||
- Environment/profile: TBD
|
||||
- Runtime overrides: TBD
|
||||
- Secrets boundary: TBD
|
||||
|
||||
## Service Topology
|
||||
|
||||
| Service | URL Or Command | Config Source | Auth Mode | Status |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| TBD | TBD | TBD | TBD | Not checked |
|
||||
|
||||
## Verification Boundary
|
||||
|
||||
- Confirmed:
|
||||
- Not covered:
|
||||
- Credential-gated:
|
||||
- Environment-gated:
|
||||
26
docs/workflow/templates/security-review.md
Normal file
26
docs/workflow/templates/security-review.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Security Review
|
||||
|
||||
## Assets And Trust Boundaries
|
||||
|
||||
TBD
|
||||
|
||||
## Authorization Rules
|
||||
|
||||
TBD
|
||||
|
||||
## Abuse Cases
|
||||
|
||||
1. TBD
|
||||
2. TBD
|
||||
3. TBD
|
||||
|
||||
## Sensitive Data Impact
|
||||
|
||||
TBD
|
||||
|
||||
## Rollback Or Disable Strategy
|
||||
|
||||
TBD
|
||||
|
||||
## Final Verdict
|
||||
TBD
|
||||
33
docs/workflow/templates/skill-evidence.md
Normal file
33
docs/workflow/templates/skill-evidence.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Skill Evidence
|
||||
|
||||
## Planned Skills
|
||||
|
||||
- TBD
|
||||
|
||||
## Tool Selection Rationale
|
||||
|
||||
TBD
|
||||
|
||||
## Used Skills
|
||||
|
||||
| Skill | Phase | Trigger | Evidence | Status |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| skill-id | plan/build/verify/review | why it was selected | command, screenshot, report, or artifact path | executed/skipped/fallback |
|
||||
|
||||
## Browser Or Web Evidence
|
||||
|
||||
| Tool | Target | Evidence | Result |
|
||||
| --- | --- | --- | --- |
|
||||
| web-access/agent-browser/Chrome DevTools MCP | URL or local target | screenshot, console log, network finding, source URL | passed/failed/skipped |
|
||||
|
||||
## Desktop Or External CLI Evidence
|
||||
|
||||
| Tool | Scope | Safety Boundary | Evidence | Result |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| cua/codex/gemini/opencode/wps/wechat | command or app target | read-only/dry-run/test account/manual approval | output summary, screenshot, or report path | passed/failed/skipped |
|
||||
|
||||
## Skipped Skills
|
||||
|
||||
| Skill | Reason | Fallback Evidence |
|
||||
| --- | --- | --- |
|
||||
| skill-id | why it could not run | manual review, alternate command, or explicit risk |
|
||||
39
docs/workflow/templates/skill-plan.md
Normal file
39
docs/workflow/templates/skill-plan.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Skill Plan
|
||||
|
||||
## Detected Intents
|
||||
|
||||
| Domain | Score | Evidence |
|
||||
| --- | ---: | --- |
|
||||
| | | |
|
||||
|
||||
## Required Skills
|
||||
|
||||
- TBD
|
||||
|
||||
## Recommended Skills
|
||||
|
||||
- TBD
|
||||
|
||||
## Required Artifacts
|
||||
|
||||
- TBD
|
||||
|
||||
## Required Verification Evidence
|
||||
|
||||
- TBD
|
||||
|
||||
## Tool Orchestration
|
||||
|
||||
| Capability | Primary Tool Or Skill | Fallback | Required Evidence |
|
||||
| --- | --- | --- | --- |
|
||||
| UI/UX design | frontend-design, ui-ux-pro-max | awesome-design-md | design-system, ui-spec.md, visual-review.md |
|
||||
| Web research or logged-in pages | web-access | agent-browser, Chrome DevTools MCP | source citations, browser evidence |
|
||||
| Browser E2E | webapp-testing, Playwright | agent-browser, web-access | screenshot, console, network evidence |
|
||||
| Desktop GUI automation | CUA/computer-use | manual verification | desktop screenshot, operator-safety notes |
|
||||
| External agent CLI | codex/gemini/opencode CLI | manual review | version check, exact command output |
|
||||
|
||||
## Skipped Skills
|
||||
|
||||
| Skill | Reason | Fallback Evidence |
|
||||
| --- | --- | --- |
|
||||
| | | |
|
||||
28
docs/workflow/templates/standards-impact.md
Normal file
28
docs/workflow/templates/standards-impact.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Standards Impact
|
||||
|
||||
## Standards Checked
|
||||
|
||||
- [ ] Logging and redaction
|
||||
- [ ] Architecture boundaries
|
||||
- [ ] ORM/database access
|
||||
- [ ] Framework/component conventions
|
||||
- [ ] UI/UX acceptance where user-facing
|
||||
- [ ] Test and verification rigor
|
||||
- [ ] Security-sensitive inputs and outputs
|
||||
|
||||
## Findings
|
||||
|
||||
| Severity | Rule | Path | Decision |
|
||||
| --- | --- | --- | --- |
|
||||
| TBD | TBD | TBD | fix/accept/escalate |
|
||||
|
||||
## Policy Updates
|
||||
|
||||
- [ ] .scale/engineering-standards.json
|
||||
- [ ] .scale/frameworks.json
|
||||
- [ ] docs/standards/
|
||||
|
||||
## Settlement
|
||||
|
||||
- Standards scan:
|
||||
- Standards doctor:
|
||||
19
docs/workflow/templates/summary.md
Normal file
19
docs/workflow/templates/summary.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Summary
|
||||
|
||||
## Delivered Changes
|
||||
|
||||
TBD
|
||||
|
||||
## Remaining Risks
|
||||
|
||||
TBD
|
||||
|
||||
## Follow-Ups
|
||||
|
||||
TBD
|
||||
|
||||
## Metric Row
|
||||
|
||||
| Date | Task | Level | Services | Files Changed | First Verification Pass | Fix Iterations | Artifact Complete | Residual Risk | Final Gate |
|
||||
| --- | --- | --- | --- | ---: | --- | ---: | --- | --- | --- |
|
||||
| | | | | | | | | | |
|
||||
29
docs/workflow/templates/ui-spec.md
Normal file
29
docs/workflow/templates/ui-spec.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# UI Spec
|
||||
|
||||
## User Goal
|
||||
|
||||
TBD
|
||||
|
||||
## Primary Flow
|
||||
|
||||
TBD
|
||||
|
||||
## Interaction States
|
||||
|
||||
- Default:
|
||||
- Loading:
|
||||
- Empty:
|
||||
- Error:
|
||||
- Success:
|
||||
|
||||
## Responsive Behavior
|
||||
|
||||
TBD
|
||||
|
||||
## Accessibility Requirements
|
||||
|
||||
TBD
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TBD
|
||||
18
docs/workflow/templates/verification.md
Normal file
18
docs/workflow/templates/verification.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Verification
|
||||
|
||||
## Commands Run
|
||||
|
||||
| Command | Result | Notes |
|
||||
| --- | --- | --- |
|
||||
| | | |
|
||||
|
||||
## Output Summary
|
||||
|
||||
TBD
|
||||
|
||||
## Failures And Fixes
|
||||
|
||||
TBD
|
||||
|
||||
## Final Status
|
||||
TBD
|
||||
20
docs/workflow/templates/visual-review.md
Normal file
20
docs/workflow/templates/visual-review.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Visual Review
|
||||
|
||||
## Screenshots Or Evidence
|
||||
|
||||
TBD
|
||||
|
||||
## Layout And Responsiveness
|
||||
|
||||
TBD
|
||||
|
||||
## Text Fit And Overlap
|
||||
|
||||
TBD
|
||||
|
||||
## Accessibility Notes
|
||||
|
||||
TBD
|
||||
|
||||
## Final Verdict
|
||||
TBD
|
||||
Reference in New Issue
Block a user