@ibotor/smart-trellis 0.5.23 → 0.5.24
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/README.md +143 -213
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +2 -0
- package/dist/configurators/shared.js.map +1 -1
- package/dist/migrations/manifests/0.5.23.json +9 -0
- package/dist/templates/common/bundled-skills/trellis-dev-preflight/SKILL.md +162 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/SKILL.md +82 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/docs/overview.md +331 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/evals/evals.json +50 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/copy-fidelity.md +56 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/decision-tree.md +102 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/formatting-fidelity.md +37 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/framework-rules.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/report-format.md +23 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/safe-refactor-boundaries.md +158 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/scope-control.md +49 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/severity.md +105 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/small-change-fast-path.md +51 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/references/verification-selection.md +81 -0
- package/dist/templates/common/bundled-skills/trellis-quality-review/scripts/diff_scans.sh +145 -0
- package/dist/templates/common/bundled-skills/verification-before-completion/SKILL.md +139 -0
- package/dist/templates/common/commands/micro-task.md +33 -0
- package/dist/templates/trellis/workflow.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Verification Selection
|
|
2
|
+
|
|
3
|
+
Use this reference before reporting completion or correctness. The goal is to choose the smallest verification set that gives confidence for the current frontend diff without expanding into unrelated legacy cleanup.
|
|
4
|
+
|
|
5
|
+
## Core Rule
|
|
6
|
+
|
|
7
|
+
Verification should match the risk introduced by the current diff:
|
|
8
|
+
|
|
9
|
+
- Tiny localized UI/copy/style/config changes can use the small-change fast path and diff inspection only.
|
|
10
|
+
- Type, data, state, validation, routing, API, component-boundary, or framework-boundary changes need targeted commands.
|
|
11
|
+
- Full build is reserved for changes that affect bundling, routes/pages, framework config, server/client boundaries, or when lighter checks cannot cover the risk.
|
|
12
|
+
|
|
13
|
+
Always inspect project scripts and nearby docs/config before inventing commands.
|
|
14
|
+
|
|
15
|
+
## Command Discovery Order
|
|
16
|
+
|
|
17
|
+
Prefer project-defined scripts over raw tool invocations:
|
|
18
|
+
|
|
19
|
+
1. Read `package.json` scripts.
|
|
20
|
+
2. Check project docs or local agent instructions if already relevant to the task.
|
|
21
|
+
3. Check framework config only when needed: `vite.config.*`, `next.config.*`, `tsconfig*.json`, `eslint.config.*`, `.eslintrc*`, `vitest.config.*`, `jest.config.*`, `playwright.config.*`.
|
|
22
|
+
4. Prefer the package manager already used by the project: lockfiles and scripts reveal `pnpm`, `npm`, `yarn`, or `bun`.
|
|
23
|
+
|
|
24
|
+
Do not add dependencies or modify configs just to run verification.
|
|
25
|
+
|
|
26
|
+
## Selection Matrix
|
|
27
|
+
|
|
28
|
+
| Diff signal | Verification default |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Small-change fast path | Diff inspection only; no broad lint/typecheck/test/build by default |
|
|
31
|
+
| `.vue` template/script/style changes | Project lint plus Vue/typecheck script when available, such as `vue-tsc` or `typecheck` |
|
|
32
|
+
| Vue props/emits/composable/store changes | Typecheck plus targeted tests if present |
|
|
33
|
+
| React/TSX component changes | Project lint plus TypeScript check when available |
|
|
34
|
+
| Next.js route/page/server-client boundary changes | Lint/typecheck plus build when boundary or route behavior risk is meaningful |
|
|
35
|
+
| Type definitions or shared contracts changed | Typecheck; targeted tests for consumers when present |
|
|
36
|
+
| Form validation, data mapping, formatter, parser, permission logic | Targeted unit tests; typecheck if TypeScript is involved |
|
|
37
|
+
| API call shape or request/response mapping changed | Typecheck plus targeted integration/unit tests if available |
|
|
38
|
+
| Styling-only but not fast-path | Scoped lint/style check if project has one; otherwise diff inspection plus optional visual/manual note |
|
|
39
|
+
| Suspicious added debug/type-suppression lines fixed | Re-run the scan or scoped lint that would catch the issue |
|
|
40
|
+
| Formatter conflict | Prefer scoped lint with formatting rules disabled when preserving scope; report the conflict |
|
|
41
|
+
|
|
42
|
+
## Running Strategy
|
|
43
|
+
|
|
44
|
+
1. Start with the narrowest command that covers the changed files or feature.
|
|
45
|
+
2. Prefer targeted tests over full test suites when a clear target exists.
|
|
46
|
+
3. Run full lint/typecheck/build only when the diff risk justifies it or project scripts are fast and standard.
|
|
47
|
+
4. If a command is unavailable, do not invent a replacement blindly; report that no matching script was found.
|
|
48
|
+
5. If the user explicitly asked to skip verification, skip it and report that instruction.
|
|
49
|
+
|
|
50
|
+
## Failure Handling
|
|
51
|
+
|
|
52
|
+
When a command fails:
|
|
53
|
+
|
|
54
|
+
1. Read the output and identify the failing file or test.
|
|
55
|
+
2. Decide whether the failure is related to the current diff.
|
|
56
|
+
3. If related, fix within scope and rerun the relevant command.
|
|
57
|
+
4. If unrelated or historical, do not expand scope; report it under Notes with evidence.
|
|
58
|
+
5. Do not claim verification passed if any required command failed.
|
|
59
|
+
6. If partial verification passed, say exactly which commands passed and which failed.
|
|
60
|
+
|
|
61
|
+
## Final Report Evidence
|
|
62
|
+
|
|
63
|
+
In the `Verified` section, include:
|
|
64
|
+
|
|
65
|
+
- exact command
|
|
66
|
+
- exit status
|
|
67
|
+
- short result summary
|
|
68
|
+
- if skipped, the explicit reason
|
|
69
|
+
|
|
70
|
+
Examples:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Verified:
|
|
74
|
+
- `pnpm lint -- src/pages/Settings.vue` exited 0.
|
|
75
|
+
- `pnpm vue-tsc --noEmit` exited 1 due to pre-existing errors in src/legacy/*; no errors referenced the touched files.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Verified:
|
|
80
|
+
- Used small-change fast path: skipped lint/typecheck/test/build because only one table column width changed and diff inspection confirmed scope.
|
|
81
|
+
```
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
mode="base"
|
|
5
|
+
base_ref="HEAD"
|
|
6
|
+
json=0
|
|
7
|
+
files_only=0
|
|
8
|
+
|
|
9
|
+
usage() {
|
|
10
|
+
cat <<'EOF'
|
|
11
|
+
Usage: diff_scans.sh [--base REF] [--cached] [--files] [--json]
|
|
12
|
+
|
|
13
|
+
Modes:
|
|
14
|
+
--base REF Scan git diff against REF. Defaults to HEAD.
|
|
15
|
+
--cached Scan staged changes.
|
|
16
|
+
--files Only print changed frontend files.
|
|
17
|
+
--json Print a JSON summary instead of sectioned text.
|
|
18
|
+
-h, --help Show this help.
|
|
19
|
+
EOF
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
while [[ $# -gt 0 ]]; do
|
|
23
|
+
case "$1" in
|
|
24
|
+
--base)
|
|
25
|
+
mode="base"
|
|
26
|
+
base_ref="${2:?--base requires a ref}"
|
|
27
|
+
shift 2
|
|
28
|
+
;;
|
|
29
|
+
--cached|--staged)
|
|
30
|
+
mode="cached"
|
|
31
|
+
shift
|
|
32
|
+
;;
|
|
33
|
+
--files)
|
|
34
|
+
files_only=1
|
|
35
|
+
shift
|
|
36
|
+
;;
|
|
37
|
+
--json)
|
|
38
|
+
json=1
|
|
39
|
+
shift
|
|
40
|
+
;;
|
|
41
|
+
-h|--help)
|
|
42
|
+
usage
|
|
43
|
+
exit 0
|
|
44
|
+
;;
|
|
45
|
+
*)
|
|
46
|
+
mode="base"
|
|
47
|
+
base_ref="$1"
|
|
48
|
+
shift
|
|
49
|
+
;;
|
|
50
|
+
esac
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
frontend_globs=(-- '*.vue' '*.ts' '*.tsx' '*.jsx' '*.js' '*.css' '*.scss')
|
|
54
|
+
code_globs=(-- '*.vue' '*.ts' '*.tsx' '*.jsx' '*.js')
|
|
55
|
+
|
|
56
|
+
git_diff() {
|
|
57
|
+
if [[ "$mode" == "cached" ]]; then
|
|
58
|
+
git diff --cached "$@"
|
|
59
|
+
else
|
|
60
|
+
git diff "$base_ref" "$@"
|
|
61
|
+
fi
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
diff_label() {
|
|
65
|
+
if [[ "$mode" == "cached" ]]; then
|
|
66
|
+
echo "--cached"
|
|
67
|
+
else
|
|
68
|
+
echo "$base_ref"
|
|
69
|
+
fi
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
json_array() {
|
|
73
|
+
python3 -c 'import json,sys; print(json.dumps(sys.stdin.read().splitlines()))'
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
json_string() {
|
|
77
|
+
python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))'
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
changed_files() {
|
|
81
|
+
git_diff --name-only --diff-filter=ACMRTUXB "${frontend_globs[@]}" || true
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
scan() {
|
|
85
|
+
local title="$1"
|
|
86
|
+
local pattern="$2"
|
|
87
|
+
shift 2
|
|
88
|
+
echo
|
|
89
|
+
echo "== $title =="
|
|
90
|
+
git_diff -U0 "$@" | rg "$pattern" || true
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if [[ "$files_only" -eq 1 && "$json" -eq 0 ]]; then
|
|
94
|
+
changed_files
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
if [[ "$json" -eq 1 ]]; then
|
|
99
|
+
files="$(changed_files)"
|
|
100
|
+
suspicious="$(git_diff -U0 "${code_globs[@]}" | rg '^\+[^+].*(eslint-disable|@ts-ignore|@ts-expect-error|console\.log|debugger|TODO|FIXME)' || true)"
|
|
101
|
+
ts_risks="$(git_diff -U0 "${code_globs[@]}" | rg '^\+[^+].*(:\s*any\b|as\s+any\b|as\s+unknown\s+as|!\.|\w!\b)' || true)"
|
|
102
|
+
vue_risks="$(git_diff -U0 -- '*.vue' | rg '^\+[^+].*(v-model:|watch\s*\([^\n]*deep\s*:\s*true|defineProps\([^\n]*\)\.[A-Za-z_$][\w$]*\s*=)' || true)"
|
|
103
|
+
react_next_risks="$(git_diff -U0 "${code_globs[@]}" | rg '^\+[^+].*(use client|dangerouslySetInnerHTML|window\.|document\.|localStorage\.|sessionStorage\.)' || true)"
|
|
104
|
+
copy_changes="$(git_diff -U0 "${code_globs[@]}" | rg '^[+-][^+-].*(label|title|placeholder|help|message|Radio|Checkbox|Button|Tooltip|content|confirmText|cancelText|text-|aria-label|alt=|请选择|请输入|验证|账户|服务商|域名|说明|提示)' || true)"
|
|
105
|
+
|
|
106
|
+
printf '{\n'
|
|
107
|
+
printf ' "mode": %s,\n' "$(printf '%s' "$(diff_label)" | json_string)"
|
|
108
|
+
printf ' "changed_files": %s,\n' "$(printf '%s' "$files" | json_array)"
|
|
109
|
+
printf ' "suspicious_patterns": %s,\n' "$(printf '%s' "$suspicious" | json_array)"
|
|
110
|
+
printf ' "typescript_risks": %s,\n' "$(printf '%s' "$ts_risks" | json_array)"
|
|
111
|
+
printf ' "vue_risks": %s,\n' "$(printf '%s' "$vue_risks" | json_array)"
|
|
112
|
+
printf ' "react_next_risks": %s,\n' "$(printf '%s' "$react_next_risks" | json_array)"
|
|
113
|
+
printf ' "potential_copy_changes": %s\n' "$(printf '%s' "$copy_changes" | json_array)"
|
|
114
|
+
printf '}\n'
|
|
115
|
+
exit 0
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
label="$(diff_label)"
|
|
119
|
+
|
|
120
|
+
echo "== Diff scan mode =="
|
|
121
|
+
echo "$label"
|
|
122
|
+
|
|
123
|
+
echo
|
|
124
|
+
echo "== Changed frontend files =="
|
|
125
|
+
changed_files
|
|
126
|
+
|
|
127
|
+
scan "Added-line suspicious patterns" '^\+[^+].*(eslint-disable|@ts-ignore|@ts-expect-error|console\.log|debugger|TODO|FIXME)' "${code_globs[@]}"
|
|
128
|
+
|
|
129
|
+
scan "TypeScript risk patterns on added lines" '^\+[^+].*(:\s*any\b|as\s+any\b|as\s+unknown\s+as|!\.|\w!\b)' "${code_globs[@]}"
|
|
130
|
+
|
|
131
|
+
scan "Vue risk patterns on added lines" '^\+[^+].*(v-model:|watch\s*\([^\n]*deep\s*:\s*true|defineProps\([^\n]*\)\.[A-Za-z_$][\w$]*\s*=)' -- '*.vue'
|
|
132
|
+
|
|
133
|
+
scan "React/Next/browser-boundary risk patterns on added lines" '^\+[^+].*(use client|dangerouslySetInnerHTML|window\.|document\.|localStorage\.|sessionStorage\.)' "${code_globs[@]}"
|
|
134
|
+
|
|
135
|
+
scan "Potential copy/accessibility text changes" '^[+-][^+-].*(label|title|placeholder|help|message|Radio|Checkbox|Button|Tooltip|content|confirmText|cancelText|text-|aria-label|alt=|请选择|请输入|验证|账户|服务商|域名|说明|提示)' "${code_globs[@]}"
|
|
136
|
+
|
|
137
|
+
echo
|
|
138
|
+
echo "== Formatting check hint =="
|
|
139
|
+
echo "For each modified existing file, compare:"
|
|
140
|
+
echo " git diff $label -- path/to/file"
|
|
141
|
+
if [[ "$mode" == "cached" ]]; then
|
|
142
|
+
echo " git diff --cached -w -- path/to/file"
|
|
143
|
+
else
|
|
144
|
+
echo " git diff -w $base_ref -- path/to/file"
|
|
145
|
+
fi
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Before Completion
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Claiming work is complete without verification is dishonesty, not efficiency.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Evidence before claims, always.
|
|
13
|
+
|
|
14
|
+
**Violating the letter of this rule is violating the spirit of this rule.**
|
|
15
|
+
|
|
16
|
+
## The Iron Law
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If you haven't run the verification command in this message, you cannot claim it passes.
|
|
23
|
+
|
|
24
|
+
## The Gate Function
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
BEFORE claiming any status or expressing satisfaction:
|
|
28
|
+
|
|
29
|
+
1. IDENTIFY: What command proves this claim?
|
|
30
|
+
2. RUN: Execute the FULL command (fresh, complete)
|
|
31
|
+
3. READ: Full output, check exit code, count failures
|
|
32
|
+
4. VERIFY: Does output confirm the claim?
|
|
33
|
+
- If NO: State actual status with evidence
|
|
34
|
+
- If YES: State claim WITH evidence
|
|
35
|
+
5. ONLY THEN: Make the claim
|
|
36
|
+
|
|
37
|
+
Skip any step = lying, not verifying
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Common Failures
|
|
41
|
+
|
|
42
|
+
| Claim | Requires | Not Sufficient |
|
|
43
|
+
|-------|----------|----------------|
|
|
44
|
+
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
|
|
45
|
+
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
|
|
46
|
+
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
|
|
47
|
+
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
|
|
48
|
+
| Regression test works | Red-green cycle verified | Test passes once |
|
|
49
|
+
| Agent completed | VCS diff shows changes | Agent reports "success" |
|
|
50
|
+
| Requirements met | Line-by-line checklist | Tests passing |
|
|
51
|
+
|
|
52
|
+
## Red Flags - STOP
|
|
53
|
+
|
|
54
|
+
- Using "should", "probably", "seems to"
|
|
55
|
+
- Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
|
|
56
|
+
- About to commit/push/PR without verification
|
|
57
|
+
- Trusting agent success reports
|
|
58
|
+
- Relying on partial verification
|
|
59
|
+
- Thinking "just this once"
|
|
60
|
+
- Tired and wanting work over
|
|
61
|
+
- **ANY wording implying success without having run verification**
|
|
62
|
+
|
|
63
|
+
## Rationalization Prevention
|
|
64
|
+
|
|
65
|
+
| Excuse | Reality |
|
|
66
|
+
|--------|---------|
|
|
67
|
+
| "Should work now" | RUN the verification |
|
|
68
|
+
| "I'm confident" | Confidence ≠ evidence |
|
|
69
|
+
| "Just this once" | No exceptions |
|
|
70
|
+
| "Linter passed" | Linter ≠ compiler |
|
|
71
|
+
| "Agent said success" | Verify independently |
|
|
72
|
+
| "I'm tired" | Exhaustion ≠ excuse |
|
|
73
|
+
| "Partial check is enough" | Partial proves nothing |
|
|
74
|
+
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
75
|
+
|
|
76
|
+
## Key Patterns
|
|
77
|
+
|
|
78
|
+
**Tests:**
|
|
79
|
+
```
|
|
80
|
+
✅ [Run test command] [See: 34/34 pass] "All tests pass"
|
|
81
|
+
❌ "Should pass now" / "Looks correct"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Regression tests (TDD Red-Green):**
|
|
85
|
+
```
|
|
86
|
+
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
|
|
87
|
+
❌ "I've written a regression test" (without red-green verification)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Build:**
|
|
91
|
+
```
|
|
92
|
+
✅ [Run build] [See: exit 0] "Build passes"
|
|
93
|
+
❌ "Linter passed" (linter doesn't check compilation)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Requirements:**
|
|
97
|
+
```
|
|
98
|
+
✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
|
|
99
|
+
❌ "Tests pass, phase complete"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Agent delegation:**
|
|
103
|
+
```
|
|
104
|
+
✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
|
|
105
|
+
❌ Trust agent report
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Why This Matters
|
|
109
|
+
|
|
110
|
+
From 24 failure memories:
|
|
111
|
+
- your human partner said "I don't believe you" - trust broken
|
|
112
|
+
- Undefined functions shipped - would crash
|
|
113
|
+
- Missing requirements shipped - incomplete features
|
|
114
|
+
- Time wasted on false completion → redirect → rework
|
|
115
|
+
- Violates: "Honesty is a core value. If you lie, you'll be replaced."
|
|
116
|
+
|
|
117
|
+
## When To Apply
|
|
118
|
+
|
|
119
|
+
**ALWAYS before:**
|
|
120
|
+
- ANY variation of success/completion claims
|
|
121
|
+
- ANY expression of satisfaction
|
|
122
|
+
- ANY positive statement about work state
|
|
123
|
+
- Committing, PR creation, task completion
|
|
124
|
+
- Moving to next task
|
|
125
|
+
- Delegating to agents
|
|
126
|
+
|
|
127
|
+
**Rule applies to:**
|
|
128
|
+
- Exact phrases
|
|
129
|
+
- Paraphrases and synonyms
|
|
130
|
+
- Implications of success
|
|
131
|
+
- ANY communication suggesting completion/correctness
|
|
132
|
+
|
|
133
|
+
## The Bottom Line
|
|
134
|
+
|
|
135
|
+
**No shortcuts for verification.**
|
|
136
|
+
|
|
137
|
+
Run the command. Read the output. THEN claim the result.
|
|
138
|
+
|
|
139
|
+
This is non-negotiable.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 微型快速任务
|
|
2
|
+
|
|
3
|
+
这是一个小改动快速通道。用户触发 `/trellis Micro Task`、`micro-task`
|
|
4
|
+
或“微型快速任务”时,按本指令执行;不要创建 Trellis task,不进入完整
|
|
5
|
+
Plan → Execute → Finish 流程,也不要默认派发 sub-agent。
|
|
6
|
+
|
|
7
|
+
## 默认执行顺序
|
|
8
|
+
|
|
9
|
+
1. 加载 `trellis-dev-preflight`,让它完成范围锁定和验证计划。
|
|
10
|
+
2. 读取与当前需求直接相关的文件上下文。
|
|
11
|
+
3. 必要时加载领域 skill,例如 Vue 任务加载 `vue-best-practices`,React
|
|
12
|
+
或 Next.js 任务加载 `vercel-react-best-practices`。
|
|
13
|
+
4. 直接定位并实现,保持最小 diff。
|
|
14
|
+
5. 运行最小必要验证;优先 scoped lint、typecheck、相关测试或必要的手动检查。
|
|
15
|
+
6. 加载 `verification-before-completion`,基于新鲜验证证据再做完成声明。
|
|
16
|
+
7. 简短总结:说明改了什么、验证了什么、是否存在历史失败或未验证风险。
|
|
17
|
+
|
|
18
|
+
## 禁止默认触发
|
|
19
|
+
|
|
20
|
+
微型任务默认禁止触发重型规划、分支、sub-agent 或 code review 流程,包括:
|
|
21
|
+
|
|
22
|
+
- Superpowers: `brainstorming`、`writing-plans`、`using-git-worktrees`、
|
|
23
|
+
`subagent-driven-development`、`requesting-code-review`
|
|
24
|
+
- Trellis: `trellis-brainstorm`、`trellis-before-dev`、`trellis-check`、
|
|
25
|
+
`trellis-continue`、`trellis-finish-work`、`trellis-quality-review`
|
|
26
|
+
|
|
27
|
+
只有当用户明确要求,或当前任务已经不再是微型任务时,才切换到对应流程。
|
|
28
|
+
|
|
29
|
+
## 降级规则
|
|
30
|
+
|
|
31
|
+
如果实现前发现任务涉及多模块设计、接口契约变更、大范围重构、复杂测试策略、
|
|
32
|
+
多轮需求澄清,或无法在当前范围内安全完成,停止微型通道并建议改用常规 Trellis
|
|
33
|
+
任务流程。
|
|
@@ -155,7 +155,7 @@ Phase 3: Finish → distill lessons + wrap-up
|
|
|
155
155
|
[workflow-state:no_task]
|
|
156
156
|
No active task. **A Direct answer** — pure Q&A / explanation / lookup / chat; no file writes + one-line answer + repo reads ≤ 2 files → AI judges, no override needed.
|
|
157
157
|
**B Create a task** — any implementation / code change / build / refactor work. Entry sequence: (1) `python3 ./.trellis/scripts/task.py create "<title>"` to create the task (status=planning, breadcrumb switches to [workflow-state:planning] for brainstorm + jsonl phase guidance) → (2) load `trellis-brainstorm` skill to discuss requirements with the user and iterate on prd.md → (3) once prd is done and jsonl is curated, run `task.py start <task-dir>` to enter [workflow-state:in_progress] for the implementation skeleton. **"It looks small" is NOT grounds for downgrading B to A or C**.
|
|
158
|
-
**C Inline change** (per-turn only, escape hatch for B) — the user's CURRENT message MUST contain one of: "skip trellis" / "no task" / "just do it" / "don't create a task" / "跳过 trellis" / "别走流程" / "小修一下" / "直接改" / "先别建任务" → briefly acknowledge ("ok, skipping trellis flow this turn"), then inline. **Without seeing one of these phrases you must NOT inline on your own**; do not invent an override the user never said.
|
|
158
|
+
**C Inline change** (per-turn only, escape hatch for B) — the user's CURRENT message MUST contain one of: "/trellis Micro Task" / "/trellis:micro-task" / "微型快速任务" / "skip trellis" / "no task" / "just do it" / "don't create a task" / "跳过 trellis" / "别走流程" / "小修一下" / "直接改" / "先别建任务" → briefly acknowledge ("ok, skipping trellis flow this turn"), then inline. **Without seeing one of these phrases you must NOT inline on your own**; do not invent an override the user never said.
|
|
159
159
|
[/workflow-state:no_task]
|
|
160
160
|
|
|
161
161
|
<!-- Per-turn breadcrumb: shown when there is no active task and
|