specdo 1.0.2

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +308 -0
  3. package/README.zh-CN.md +306 -0
  4. package/bin/specdo.js +3 -0
  5. package/dist/cli/index.d.ts +15 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +297 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/commands/_shared.d.ts +45 -0
  10. package/dist/commands/_shared.d.ts.map +1 -0
  11. package/dist/commands/_shared.js +124 -0
  12. package/dist/commands/_shared.js.map +1 -0
  13. package/dist/commands/apply.d.ts +30 -0
  14. package/dist/commands/apply.d.ts.map +1 -0
  15. package/dist/commands/apply.js +393 -0
  16. package/dist/commands/apply.js.map +1 -0
  17. package/dist/commands/archive.d.ts +25 -0
  18. package/dist/commands/archive.d.ts.map +1 -0
  19. package/dist/commands/archive.js +362 -0
  20. package/dist/commands/archive.js.map +1 -0
  21. package/dist/commands/doctor.d.ts +21 -0
  22. package/dist/commands/doctor.d.ts.map +1 -0
  23. package/dist/commands/doctor.js +180 -0
  24. package/dist/commands/doctor.js.map +1 -0
  25. package/dist/commands/domains.d.ts +14 -0
  26. package/dist/commands/domains.d.ts.map +1 -0
  27. package/dist/commands/domains.js +107 -0
  28. package/dist/commands/domains.js.map +1 -0
  29. package/dist/commands/explore.d.ts +48 -0
  30. package/dist/commands/explore.d.ts.map +1 -0
  31. package/dist/commands/explore.js +378 -0
  32. package/dist/commands/explore.js.map +1 -0
  33. package/dist/commands/init.d.ts +45 -0
  34. package/dist/commands/init.d.ts.map +1 -0
  35. package/dist/commands/init.js +243 -0
  36. package/dist/commands/init.js.map +1 -0
  37. package/dist/commands/list.d.ts +23 -0
  38. package/dist/commands/list.d.ts.map +1 -0
  39. package/dist/commands/list.js +135 -0
  40. package/dist/commands/list.js.map +1 -0
  41. package/dist/commands/propose.d.ts +22 -0
  42. package/dist/commands/propose.d.ts.map +1 -0
  43. package/dist/commands/propose.js +316 -0
  44. package/dist/commands/propose.js.map +1 -0
  45. package/dist/commands/show.d.ts +15 -0
  46. package/dist/commands/show.d.ts.map +1 -0
  47. package/dist/commands/show.js +214 -0
  48. package/dist/commands/show.js.map +1 -0
  49. package/dist/commands/status.d.ts +17 -0
  50. package/dist/commands/status.d.ts.map +1 -0
  51. package/dist/commands/status.js +146 -0
  52. package/dist/commands/status.js.map +1 -0
  53. package/dist/commands/sync.d.ts +21 -0
  54. package/dist/commands/sync.d.ts.map +1 -0
  55. package/dist/commands/sync.js +113 -0
  56. package/dist/commands/sync.js.map +1 -0
  57. package/dist/commands/validate.d.ts +117 -0
  58. package/dist/commands/validate.d.ts.map +1 -0
  59. package/dist/commands/validate.js +446 -0
  60. package/dist/commands/validate.js.map +1 -0
  61. package/dist/core/apply-brief-renderer.d.ts +35 -0
  62. package/dist/core/apply-brief-renderer.d.ts.map +1 -0
  63. package/dist/core/apply-brief-renderer.js +242 -0
  64. package/dist/core/apply-brief-renderer.js.map +1 -0
  65. package/dist/core/config-store.d.ts +190 -0
  66. package/dist/core/config-store.d.ts.map +1 -0
  67. package/dist/core/config-store.js +280 -0
  68. package/dist/core/config-store.js.map +1 -0
  69. package/dist/core/context-store.d.ts +96 -0
  70. package/dist/core/context-store.d.ts.map +1 -0
  71. package/dist/core/context-store.js +426 -0
  72. package/dist/core/context-store.js.map +1 -0
  73. package/dist/core/json-schemas.d.ts +349 -0
  74. package/dist/core/json-schemas.d.ts.map +1 -0
  75. package/dist/core/json-schemas.js +125 -0
  76. package/dist/core/json-schemas.js.map +1 -0
  77. package/dist/core/skill-content/cross-domain.d.ts +12 -0
  78. package/dist/core/skill-content/cross-domain.d.ts.map +1 -0
  79. package/dist/core/skill-content/cross-domain.js +291 -0
  80. package/dist/core/skill-content/cross-domain.js.map +1 -0
  81. package/dist/core/skill-content/protocol-examples.d.ts +13 -0
  82. package/dist/core/skill-content/protocol-examples.d.ts.map +1 -0
  83. package/dist/core/skill-content/protocol-examples.js +190 -0
  84. package/dist/core/skill-content/protocol-examples.js.map +1 -0
  85. package/dist/core/skill-content/workflow-content.d.ts +25 -0
  86. package/dist/core/skill-content/workflow-content.d.ts.map +1 -0
  87. package/dist/core/skill-content/workflow-content.js +1572 -0
  88. package/dist/core/skill-content/workflow-content.js.map +1 -0
  89. package/dist/core/skill-exporter.d.ts +186 -0
  90. package/dist/core/skill-exporter.d.ts.map +1 -0
  91. package/dist/core/skill-exporter.js +922 -0
  92. package/dist/core/skill-exporter.js.map +1 -0
  93. package/dist/core/spec-sync.d.ts +65 -0
  94. package/dist/core/spec-sync.d.ts.map +1 -0
  95. package/dist/core/spec-sync.js +226 -0
  96. package/dist/core/spec-sync.js.map +1 -0
  97. package/dist/core/task-parser.d.ts +58 -0
  98. package/dist/core/task-parser.d.ts.map +1 -0
  99. package/dist/core/task-parser.js +244 -0
  100. package/dist/core/task-parser.js.map +1 -0
  101. package/dist/core/template-renderer.d.ts +51 -0
  102. package/dist/core/template-renderer.d.ts.map +1 -0
  103. package/dist/core/template-renderer.js +362 -0
  104. package/dist/core/template-renderer.js.map +1 -0
  105. package/dist/domains/architecture.d.ts +34 -0
  106. package/dist/domains/architecture.d.ts.map +1 -0
  107. package/dist/domains/architecture.js +341 -0
  108. package/dist/domains/architecture.js.map +1 -0
  109. package/dist/domains/backend.d.ts +35 -0
  110. package/dist/domains/backend.d.ts.map +1 -0
  111. package/dist/domains/backend.js +367 -0
  112. package/dist/domains/backend.js.map +1 -0
  113. package/dist/domains/frontend.d.ts +36 -0
  114. package/dist/domains/frontend.d.ts.map +1 -0
  115. package/dist/domains/frontend.js +373 -0
  116. package/dist/domains/frontend.js.map +1 -0
  117. package/dist/domains/index.d.ts +49 -0
  118. package/dist/domains/index.d.ts.map +1 -0
  119. package/dist/domains/index.js +255 -0
  120. package/dist/domains/index.js.map +1 -0
  121. package/dist/domains/operations.d.ts +37 -0
  122. package/dist/domains/operations.d.ts.map +1 -0
  123. package/dist/domains/operations.js +344 -0
  124. package/dist/domains/operations.js.map +1 -0
  125. package/dist/domains/pool-ranking.d.ts +43 -0
  126. package/dist/domains/pool-ranking.d.ts.map +1 -0
  127. package/dist/domains/pool-ranking.js +153 -0
  128. package/dist/domains/pool-ranking.js.map +1 -0
  129. package/dist/domains/quality.d.ts +45 -0
  130. package/dist/domains/quality.d.ts.map +1 -0
  131. package/dist/domains/quality.js +368 -0
  132. package/dist/domains/quality.js.map +1 -0
  133. package/dist/domains/security.d.ts +19 -0
  134. package/dist/domains/security.d.ts.map +1 -0
  135. package/dist/domains/security.js +364 -0
  136. package/dist/domains/security.js.map +1 -0
  137. package/dist/domains/signal-match.d.ts +25 -0
  138. package/dist/domains/signal-match.d.ts.map +1 -0
  139. package/dist/domains/signal-match.js +67 -0
  140. package/dist/domains/signal-match.js.map +1 -0
  141. package/dist/domains/types.d.ts +354 -0
  142. package/dist/domains/types.d.ts.map +1 -0
  143. package/dist/domains/types.js +12 -0
  144. package/dist/domains/types.js.map +1 -0
  145. package/dist/index.d.ts +9 -0
  146. package/dist/index.d.ts.map +1 -0
  147. package/dist/index.js +9 -0
  148. package/dist/index.js.map +1 -0
  149. package/dist/protocols/index.d.ts +36 -0
  150. package/dist/protocols/index.d.ts.map +1 -0
  151. package/dist/protocols/index.js +85 -0
  152. package/dist/protocols/index.js.map +1 -0
  153. package/dist/protocols/review-to-solid.d.ts +32 -0
  154. package/dist/protocols/review-to-solid.d.ts.map +1 -0
  155. package/dist/protocols/review-to-solid.js +309 -0
  156. package/dist/protocols/review-to-solid.js.map +1 -0
  157. package/dist/utils/prompt.d.ts +37 -0
  158. package/dist/utils/prompt.d.ts.map +1 -0
  159. package/dist/utils/prompt.js +81 -0
  160. package/dist/utils/prompt.js.map +1 -0
  161. package/package.json +80 -0
@@ -0,0 +1,368 @@
1
+ /**
2
+ * Quality Domain Module
3
+ *
4
+ * 来源 (11 个,不含 review-to-solid):
5
+ * - content/skills/code-reviewer/SKILL.md (45 行) + references/review-checklist.md (26 行)
6
+ * 正确性 / 安全 / 可维护性 / 性能 / 测试 5 维评审顺序
7
+ * - content/skills/test-driven-development/SKILL.md (32 行)
8
+ * Red-Green-Refactor 循环 + 行为命名 + 集成边界优先
9
+ * - content/skills/systematic-debugging/SKILL.md (31 行)
10
+ * 5 步根因调查工作流(Reproduce/Localize/Trace/Fix/Verify)
11
+ * - content/skills/verification-before-completion/SKILL.md (49 行)
12
+ * 完成前必须有新鲜证据;不得依赖旧 output / 子代理报告
13
+ * - content/skills/performance-profiling/SKILL.md (65 行)
14
+ * 基线 → 热点 → 根因 → 优化 → 验证;前后端性能拆分
15
+ * - content/skills/webapp-testing/SKILL.md (39 行)
16
+ * Playwright 轻量 e2e + 降级链 (browser → jsdom → component → http)
17
+ * - content/roles/04-quality-security/code-reviewer.toml (42 行)
18
+ * evidence-driven review,1 normal + 1 failure path 验证
19
+ * - content/roles/04-quality-security/debugger.toml (42 行)
20
+ * fault-origin isolation,假设 vs 证据分离
21
+ * - content/roles/04-quality-security/qa-expert.toml (42 行)
22
+ * risk-based test scope;release gating
23
+ * - content/roles/04-quality-security/test-automator.toml (42 行)
24
+ * deterministic regression coverage;行为契约断言
25
+ * - content/roles/04-quality-security/performance-engineer.toml (42 行)
26
+ * bottleneck identification with measurement evidence
27
+ *
28
+ * 压缩方法:
29
+ * 1. code-reviewer 5 维评审顺序 → design.checklist 顶部 + implement.focusAreas
30
+ * 2. TDD Red-Green-Refactor → design.patterns + implement.patterns
31
+ * 3. systematic-debugging 5 步 → implement.focusAreas + implement.patterns
32
+ * 4. verification-before-completion 红旗短语 → implement.antiPatterns
33
+ * 5. performance-profiling 5 步工作流 → design.patterns + verify.checklist
34
+ * 6. webapp-testing 降级链 → implement.patterns
35
+ * 7. 5 个 role 的 quality checks → verify.checklist
36
+ *
37
+ * 与相邻领域的边界:
38
+ * - 单词 'n+1' / 'query plan' / 'slow query' 归 backend;quality 用通用 'profile' / 'bottleneck'
39
+ * - 'lighthouse' / 'core web vitals' / 'lcp' 归 frontend
40
+ * - review-to-solid 不在此处;它是独立 Protocol,由 apply 命令显式注入
41
+ * - 'review' 单词归 quality;operations 用多词 'pr description' / 'pr template'
42
+ */
43
+ export const qualityDomain = {
44
+ name: 'quality',
45
+ description: 'Code review, debugging, test strategy (TDD/automation/QA), performance profiling, and verification discipline',
46
+ // ── Explore: 需求澄清 ─────────────────────────────────────
47
+ explore: {
48
+ signals: [
49
+ // 评审 / 代码质量
50
+ 'review', 'code review', 'pr review', 'diff review', 'code reviewer',
51
+ 'review comment', 'review feedback',
52
+ // 测试方法论
53
+ 'test', 'tdd', 'red green refactor', 'unit test', 'integration test',
54
+ 'e2e', 'end-to-end test', 'contract test', 'snapshot test',
55
+ 'fixture', 'mock', 'flaky', 'flaky test', 'deterministic test',
56
+ 'regression test', 'test coverage', 'coverage gap', 'test plan',
57
+ 'playwright', 'jsdom',
58
+ // 调试 / 根因
59
+ 'bug', 'debug', 'debugging', 'root cause', 'repro', 'reproduce',
60
+ 'reproducer', 'minimal reproduction', 'stack trace', 'failure mode',
61
+ 'intermittent failure', 'bisect',
62
+ // 验证 / 证据
63
+ 'verify', 'verification', 'fresh evidence', 'smoke test',
64
+ 'verification evidence',
65
+ // 性能方法论(与 backend / frontend 切分:通用方法论词)
66
+ 'performance profiling', 'baseline metric', 'before/after benchmark',
67
+ 'hotspot', 'bottleneck', 'memory leak', 'heap snapshot',
68
+ 'performance regression', 'performance budget',
69
+ ],
70
+ questions: {
71
+ defaultCount: 8,
72
+ items: [
73
+ // ── Tier 1: 变更范围与风险 (priority 10) ──────────────
74
+ {
75
+ text: 'What is the user-facing or system-facing change here, and what is the highest-risk failure mode if we get it wrong?',
76
+ id: 'failure-mode',
77
+ signals: ['test', 'quality', 'review', 'failure', 'risk', 'change', 'user', 'system'],
78
+ priority: 10,
79
+ },
80
+ {
81
+ text: 'Which invariants must this change preserve? How will we know if any are violated (assertions, tests, monitoring)?',
82
+ signals: ['invariant', 'preserve', 'assert', 'test', 'monitoring', 'contract', 'guarantee', 'property'],
83
+ priority: 9,
84
+ requiresAnswer: ['quality:failure-mode'],
85
+ },
86
+ {
87
+ text: 'What is the current test coverage on the affected code paths, and which paths are currently uncovered?',
88
+ signals: ['coverage', 'test', 'uncovered', 'code', 'path', 'branch', 'line', 'missing'],
89
+ priority: 9,
90
+ },
91
+ // ── Tier 2: 测试策略 (priority 9) ─────────────────────
92
+ {
93
+ text: 'What is the test strategy mix? (unit for logic, integration for data/API boundaries, e2e for critical user flows) — what ratio?',
94
+ signals: ['test', 'unit', 'integration', 'e2e', 'strategy', 'testing', 'pyramid', 'trophy'],
95
+ priority: 9,
96
+ },
97
+ {
98
+ text: 'What are the concrete test cases for the happy path, error path, edge cases, and boundary conditions? Name at least 5.',
99
+ signals: ['test', 'case', 'happy path', 'error', 'edge case', 'boundary', 'scenario', 'coverage'],
100
+ priority: 8,
101
+ },
102
+ {
103
+ text: 'Are there property-based or fuzz tests for parsers, validators, serializers, or any code that consumes untrusted input?',
104
+ signals: ['property-based', 'fuzz', 'parser', 'validator', 'serializer', 'untrusted', 'input', 'fast-check'],
105
+ priority: 7,
106
+ },
107
+ {
108
+ text: 'How are async and concurrent code paths tested? (race conditions, timeout scenarios, retry exhaustion, partial failure)',
109
+ signals: ['async', 'concurrent', 'race', 'timeout', 'retry', 'test', 'flake', 'non-deterministic'],
110
+ priority: 7,
111
+ },
112
+ // ── Tier 3: 测试数据与环境 (priority 7) ──────────────
113
+ {
114
+ text: 'How is test data generated? (fixtures, factories, property-based generators) — does test data cover edge cases and production-like volumes?',
115
+ signals: ['test', 'data', 'fixture', 'factory', 'generate', 'seed', 'mock', 'stub', 'edge'],
116
+ priority: 7,
117
+ },
118
+ {
119
+ text: 'Are integration tests isolated from each other? (no shared mutable state, each test sets up and tears down its own data)',
120
+ signals: ['integration', 'test', 'isolation', 'shared', 'setup', 'teardown', 'database', 'state'],
121
+ priority: 7,
122
+ },
123
+ {
124
+ text: 'Do tests run deterministically? Are there time-dependent, random, or order-dependent tests that could be flaky?',
125
+ signals: ['deterministic', 'flaky', 'test', 'time', 'random', 'order', 'race', 'non-deterministic', 'retry'],
126
+ priority: 7,
127
+ },
128
+ // ── Tier 4: TDD 纪律 (priority 7) ─────────────────────
129
+ {
130
+ text: 'Are you following TDD for this change? (test first → see it fail → minimal implementation → refactor) — or is there a reason not to?',
131
+ signals: ['tdd', 'test-driven', 'test-first', 'red-green-refactor', 'discipline', 'workflow'],
132
+ priority: 7,
133
+ },
134
+ {
135
+ text: 'What is the falsifiability of each test? Can the test actually fail when the code is wrong (no false-positives or always-green tests)?',
136
+ signals: ['test', 'falsifiable', 'false-positive', 'assertion', 'green', 'verify', 'prove'],
137
+ priority: 6,
138
+ },
139
+ // ── Tier 5: Bug 调查与调试 (priority 7) ──────────────
140
+ {
141
+ text: 'For bug fixes: do we have a minimal reproducer? Have we separated confirmed evidence from hypotheses? Can we reproduce reliably?',
142
+ id: 'bug-reproducer',
143
+ signals: ['bug', 'debug', 'reproducer', 'reproduce', 'evidence', 'hypothesis', 'root cause', 'investigation', 'fix'],
144
+ priority: 8,
145
+ },
146
+ {
147
+ text: 'What is the root cause, not just the symptom? Have we verified that the fix addresses the root cause and not just the observable effect?',
148
+ signals: ['root cause', 'bug', 'fix', 'symptom', 'verify', 'investigation', '5 whys', 'fishbone'],
149
+ priority: 8,
150
+ requiresAnswer: ['quality:bug-reproducer'],
151
+ },
152
+ {
153
+ text: 'Is there a regression test that would have caught this bug before it shipped? Add it now.',
154
+ signals: ['regression', 'test', 'bug', 'caught', 'prevent', 'shipped', 'automated'],
155
+ priority: 8,
156
+ requiresAnswer: ['quality:bug-reproducer'],
157
+ },
158
+ // ── Tier 6: 代码审查 (priority 7) ─────────────────────
159
+ {
160
+ text: 'What code review checklist applies to this change? (security, performance, correctness, style, test coverage — which dimensions matter most?)',
161
+ signals: ['code review', 'review', 'checklist', 'security', 'performance', 'correctness', 'style', 'pr'],
162
+ priority: 7,
163
+ },
164
+ {
165
+ text: 'Is the diff reviewable and scoped? Are there abstractions introduced without removing repeated complexity? Any unrelated changes mixed in?',
166
+ signals: ['diff', 'review', 'scope', 'abstraction', 'unrelated', 'clean', 'focused'],
167
+ priority: 7,
168
+ },
169
+ {
170
+ text: 'Have you reviewed your own diff before asking for review? (self-review catches ~30% of issues before wasting reviewer time)',
171
+ signals: ['self-review', 'review', 'diff', 'pr', 'check', 'before'],
172
+ priority: 6,
173
+ },
174
+ // ── Tier 7: 性能测试 (priority 6-7) ──────────────────
175
+ {
176
+ text: 'For performance work: what is the measured baseline (p50/p95/p99), the target, and which workload shape produced the bottleneck?',
177
+ signals: ['performance', 'benchmark', 'baseline', 'p50', 'p95', 'p99', 'profile', 'bottleneck', 'latency', 'throughput'],
178
+ priority: 8,
179
+ },
180
+ {
181
+ text: 'Is there a load test or stress test that validates the system under production-like concurrency and volume?',
182
+ signals: ['load test', 'stress test', 'performance', 'benchmark', 'k6', 'artillery', 'jmeter', 'concurrency', 'volume'],
183
+ priority: 7,
184
+ },
185
+ {
186
+ text: 'Have memory leaks, goroutine leaks (Go), or event listener leaks (JS) been checked? Is there a heap profile or memory snapshot before/after?',
187
+ signals: ['memory leak', 'profile', 'heap', 'snapshot', 'goroutine', 'listener', 'leak', 'gc', 'oom'],
188
+ priority: 6,
189
+ },
190
+ // ── Tier 8: 验证 (priority 7-8) ──────────────────────
191
+ {
192
+ text: 'What verification command actually proves the claim "this is done"? Has it been run with output captured as evidence?',
193
+ signals: ['verification', 'prove', 'done', 'evidence', 'output', 'check', 'command', 'test', 'validate'],
194
+ priority: 8,
195
+ },
196
+ {
197
+ text: 'Has the change been tested in a staging or pre-production environment with production-like data and traffic?',
198
+ signals: ['staging', 'pre-production', 'test', 'production-like', 'data', 'traffic', 'environment'],
199
+ priority: 7,
200
+ },
201
+ {
202
+ text: 'What is the rollback or follow-up plan if this change fails after merge? Who notices, how fast, and how do we recover?',
203
+ signals: ['rollback', 'failure', 'merge', 'recover', 'incident', 'revert', 'monitoring', 'alert'],
204
+ priority: 8,
205
+ },
206
+ // ── Tier 9: 代码质量 (priority 6) ────────────────────
207
+ {
208
+ text: 'Are there any code smells? (deep nesting >4 levels, functions >50 lines, magic numbers, duplicated logic, commented-out code)',
209
+ signals: ['code smell', 'nesting', 'refactor', 'duplicate', 'magic number', 'comment', 'clean code', 'maintain'],
210
+ priority: 6,
211
+ },
212
+ {
213
+ text: 'Is error handling comprehensive? Are errors explicitly handled at every level, or are there silent swallows and bare catch blocks?',
214
+ signals: ['error', 'handling', 'catch', 'swallow', 'silent', 'exception', 'try', 'propagate', 'log'],
215
+ priority: 7,
216
+ },
217
+ {
218
+ text: 'Are there any hardcoded values that should be configuration? (URLs, timeouts, thresholds, feature flags, credentials)',
219
+ signals: ['hardcoded', 'configuration', 'constant', 'magic number', 'env', 'flag', 'timeout', 'url'],
220
+ priority: 6,
221
+ },
222
+ // ── Tier 10: 文档与可维护性 (priority 5-6) ────────────
223
+ {
224
+ text: 'Is there sufficient documentation for the next developer? (complex algorithms explained, design decisions justified, non-obvious constraints noted)',
225
+ signals: ['documentation', 'comment', 'readme', 'explain', 'decision', 'constraint', 'maintain'],
226
+ priority: 5,
227
+ },
228
+ {
229
+ text: 'Are there any dead code paths, unused imports, or deprecated functions that should be cleaned up in this change?',
230
+ signals: ['dead code', 'unused', 'import', 'deprecated', 'cleanup', 'remove', 'legacy', 'stale'],
231
+ priority: 5,
232
+ },
233
+ {
234
+ text: 'Is the changelog or release notes updated for user-facing changes? Does it describe the what and why, not just the how?',
235
+ signals: ['changelog', 'release notes', 'documentation', 'user', 'change', 'communicate'],
236
+ priority: 5,
237
+ },
238
+ ],
239
+ },
240
+ },
241
+ // ── Design: 设计阶段 ─────────────────────────────────────
242
+ design: {
243
+ checklist: [
244
+ // 评审顺序 (code-reviewer)
245
+ 'Review order is correctness → safety → maintainability → performance → tests; do not skip layers',
246
+ 'Intent of the change is articulated before review starts: what user-facing or system-facing behavior is changing and why',
247
+ 'Invariants the change must preserve are listed before hunting for violations',
248
+ 'Mechanical changes (rename / format / lint) are separated from behavioral deltas in the review surface',
249
+ 'For large diffs: entry points and high-risk files (auth / payments / data writes) are reviewed first',
250
+ // 测试策略 (qa-expert + test-automator + TDD)
251
+ 'Test plan maps each critical risk to at least one validation path (positive / negative / boundary)',
252
+ 'For new behavior: failing test exists before implementation (TDD red phase), expressing behavior at the public interface',
253
+ 'Test names describe behavior (what), not implementation (how)',
254
+ 'Regression coverage prioritizes high-risk paths; full exhaustive coverage is not the goal',
255
+ 'Test fixtures and data setup minimize flakiness and hidden coupling between tests',
256
+ 'For bug fixes: a regression test reproduces the bug before the fix, fails for the right reason, and passes after',
257
+ // 调试 / 根因 (systematic-debugging + debugger)
258
+ 'For bug reports: confirmed evidence is separated from hypotheses before recommending action',
259
+ 'Hypothesis ranking includes confidence level and what disconfirming evidence would look like',
260
+ 'Fix strategy removes the cause, not just the symptom; defense-in-depth is considered for high-blast-radius bugs',
261
+ // 性能 (performance-profiling + performance-engineer)
262
+ 'Performance work has a measured baseline and a target metric — not "feels slow" / "should be faster"',
263
+ 'Bottleneck claim cites measurement source and confidence level; optimization targets the dominant cost center',
264
+ 'Before/after validation plan is concrete and reproducible',
265
+ // 验证纪律 (verification-before-completion)
266
+ 'Every "done" claim has an identified verification command and expected pass criteria recorded ahead of time',
267
+ 'Release gating criteria are explicit; go/no-go decision signals are listed before review starts',
268
+ ],
269
+ patterns: {
270
+ 'Five-Layer Review Order': 'Always review in this fixed order: Correctness (edge cases, invariants, error handling) → Safety (security, data, secrets) → Maintainability (structure, naming, interfaces) → Performance (hot paths, I/O, allocations, queries) → Tests (do they fail before fix? cover risky behavior?). One layer per pass on large diffs.',
271
+ 'Red-Green-Refactor TDD Loop': 'Red: write a failing test expressing desired behavior at the public interface — ensure it fails for the right reason, not setup error. Green: smallest change to pass, no extra behavior. Refactor: improve structure while keeping tests green; do not change behavior in this phase.',
272
+ 'Reproduce → Localize → Trace → Fix → Verify': 'Standard root-cause workflow. Reproduce: capture exact steps and error output. Localize: shrink failing scope to smallest file/test/input. Trace: follow data and control flow to first wrong state. Fix: smallest change addressing the root cause. Verify: re-run the failing test and related checks.',
273
+ 'Baseline → Hotspots → Optimize → Verify': 'Standard performance workflow. Establish baseline metrics (response time, throughput, memory). Identify hotspots via profiler (CPU / memory / I/O / network). Apply targeted fixes to highest-impact areas only. Re-measure to confirm improvement without regression.',
274
+ 'Risk-Based Test Scope': 'Test scope is proportional to user impact × change complexity, not "test everything". Map each P1 risk to at least one validation path. Boundary and negative cases get explicit coverage; happy-path-only is a downgrade.',
275
+ 'Webapp Testing Fallback Order': 'When real-browser automation is unavailable: Playwright → DOM-level integration (jsdom) → component / state tests → HTTP health checks (curl -I). State exactly what was verified and what remains unverified at the real-browser layer.',
276
+ 'Verification-Before-Completion Gate': 'Before reporting success: identify the proving command, run it now (not earlier), read actual output and exit status, compare to the claim, only then report. No "should work now" / "looks good to me" / "agent said it passed".',
277
+ },
278
+ antiPatterns: [
279
+ 'Reviewing only the diff without understanding intent — leads to nitpicks on lines that should not exist at all',
280
+ 'Snapshot-only assertions on complex output — passes regardless of actual behavior; freezes implementation, not contract',
281
+ 'Calling something "fixed" before reproducing the original symptom — common path to regressions in production',
282
+ 'Treating exhaustive coverage as a goal — wastes engineering time and obscures which tests guard which behavior',
283
+ 'Defaulting to "let us add a test later" when fixing bugs — the fix is unverifiable without the regression test',
284
+ 'Optimizing without measurement — kills readability and frequently slows the actual hot path',
285
+ 'Mocking what you do not own at every boundary — couples tests to implementation, makes refactors painful',
286
+ 'Using shared mutable state across test cases — produces order-dependent failures that look intermittent',
287
+ ],
288
+ },
289
+ // ── Implement: 实施阶段 ──────────────────────────────────
290
+ implement: {
291
+ focusAreas: [
292
+ // 评审执行 (code-reviewer + role)
293
+ 'Review comments are Actionable (what to change) + Why (risk/benefit) + Scope (must-fix vs nice-to-have)',
294
+ 'Severity reflects probability and blast radius, not style preference; nits are labeled as nits',
295
+ 'Findings cite concrete code locations and user-impact relevance — not "this could be cleaner"',
296
+ 'For large diffs: skim mechanical changes, deep-review behavioral deltas; preserve invariants explicitly',
297
+ // 调试 (systematic-debugging + debugger)
298
+ 'No fixes without root-cause investigation — symptoms-only patches are explicitly rejected',
299
+ 'Diagnostic logging added at component boundaries when stuck; removed or down-leveled before merge',
300
+ 'Minimal reproduction case constructed to shrink problem space; bisect used to isolate introduction point',
301
+ 'Concurrency / timing / ordering assumptions made explicit when investigating intermittent failures',
302
+ // 测试 (TDD + test-automator + qa-expert)
303
+ 'Tests start from the public interface (API / function / UI behavior), not private helpers',
304
+ 'Tests are deterministic: time, randomness, network, and filesystem are controlled or stubbed at the boundary',
305
+ 'Mocking is bounded: prefer integration at boundaries; mock only slow / flaky external systems',
306
+ 'Bug fixes ship with a regression test that fails before the fix and passes after',
307
+ 'Test runtime cost and parallelization tradeoffs are documented when CI time changes materially',
308
+ // 性能 (performance-profiling + performance-engineer)
309
+ 'Profiling produces a measurement report — CPU / memory / I/O / network — not a hunch',
310
+ 'Caching layers (when introduced) declare key strategy, TTL, invalidation policy, and observability hooks',
311
+ 'Frontend perf work distinguishes bundle issues (tree-shaking, code splitting, dynamic imports) from runtime issues (re-renders, virtualization, debounce)',
312
+ 'Memory work uses heap snapshots / leak detection — not "memory feels high"',
313
+ // 验证 (verification-before-completion)
314
+ 'Identify the proving command before claiming completion; run fresh, do not rely on old output',
315
+ 'Subagent / tool success reports are not trusted without reviewing actual output',
316
+ 'When verification was not run, say so explicitly instead of implying success',
317
+ ],
318
+ patterns: {
319
+ 'Actionable Review Comment': 'Every review comment follows: WHAT to change → WHY (risk or benefit) → SCOPE (must-fix / nice-to-have / nit). No naked "this is wrong" or "could be cleaner". Reviewer owns the comment\'s utility, not the author\'s reaction.',
320
+ 'Bug-First Regression Test': 'For every bug fix: (1) write a test that reproduces the symptom, (2) confirm it fails for the right reason, (3) apply the fix, (4) confirm the test passes. The test is committed alongside the fix; it is the regression guard.',
321
+ 'Diagnostic Logging at Boundaries': 'When stuck on a bug: add structured logging at component boundaries (entry / exit / error path), reproduce, capture, then remove or down-level the logging before merging. Logging earns its keep through evidence, not habit.',
322
+ 'Profile-Then-Optimize': 'Never optimize without a profile. Capture baseline → run profiler → identify hotspot → apply targeted fix → re-measure. Document the baseline number and the after number in the PR description.',
323
+ 'Webapp Testing with Stable Locators': 'Playwright tests select by stable locator (role / accessible name / data-testid), assert visible text and URL changes, and use explicit minimal timeouts. Recon (screenshot / DOM list / console capture) before automation.',
324
+ 'Fresh Verification Evidence': 'Before claiming "tests pass" / "build succeeds" / "bug fixed" / "ready for PR": run the proving command now, capture output, compare to claim, then report. Old output is not evidence.',
325
+ },
326
+ antiPatterns: [
327
+ 'Saying "should work now" / "looks good to me" / "probably fixed" / "agent said it passed" — these are explicit red flags from verification-before-completion',
328
+ 'Trusting subagent or tool success reports without reviewing the actual output',
329
+ 'Substituting one verification check for another (running unit tests when an integration test was the contract)',
330
+ 'Reusing old command output as evidence for a new claim — even one minute later, the codebase may have changed',
331
+ 'Adding tests that pass without exercising the changed behavior — "test coverage" goes up, regression risk does not go down',
332
+ 'Catching exceptions in tests just to make them green — silent failures in production, green CI in dev',
333
+ 'Sorting an entire list to find min/max in hot paths, or running unbounded loops over user input — easy class of perf regression',
334
+ 'Building hypotheses into the fix without disconfirming evidence — confirmation bias produces patches that work locally and break in prod',
335
+ 'Treating "we will add tests after launch" as acceptable for a non-prototype change',
336
+ ],
337
+ },
338
+ // ── Verify: 验证阶段 ─────────────────────────────────────
339
+ verify: {
340
+ checklist: [
341
+ // 代码评审产出
342
+ 'Review report contains: Summary, Major Issues (must-fix), Minor Suggestions, Test Plan, Follow-ups (non-blocking)',
343
+ 'Each finding has: location, severity, evidence, and recommended action',
344
+ 'Severity calibration sanity-check: P1 items would actually ship user-impacting failure, P3 items are not promoted',
345
+ // 测试与覆盖
346
+ 'Tests cover risky logic and failure modes — not just happy paths',
347
+ 'Test assertions are meaningful (behavior contract), not snapshot-everything',
348
+ 'For bug fixes: regression test exists, was confirmed to fail before fix, and now passes',
349
+ 'Test suite runs deterministically — no order dependencies, no flaky tests landing as "intermittent"',
350
+ 'CI runtime impact is acceptable; if increased materially, justified in the PR description',
351
+ // 调试 / 根因
352
+ 'For each bug investigation: root-cause statement is supported by evidence, not asserted from intuition',
353
+ 'Fix removes the trigger condition; recurrence risk is explicitly addressed (defense-in-depth where blast radius is high)',
354
+ 'One success path and one failure path exercised after the fix to confirm no collateral regression',
355
+ // 性能
356
+ 'Performance change includes before/after measurements from a reproducible workload',
357
+ 'Optimization targets the dominant cost center; minor noise improvements are explicitly labeled',
358
+ 'Regression risk and fallback strategy documented for any non-trivial perf change',
359
+ // 验证证据
360
+ 'All "this is done / fixed / passing" claims have fresh verification evidence captured (command + output + exit status)',
361
+ 'Skipped or unrun checks are listed explicitly — no implied success',
362
+ 'Environment-specific verifications that could not run locally are called out for runtime / staging confirmation',
363
+ // QA 发布门
364
+ 'Release gating criteria are met: critical risks have at least one validation path, blockers are zero or explicitly accepted',
365
+ ],
366
+ },
367
+ };
368
+ //# sourceMappingURL=quality.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality.js","sourceRoot":"","sources":["../../src/domains/quality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,+GAA+G;IAEjH,yDAAyD;IAEzD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,YAAY;YACZ,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe;YACpE,gBAAgB,EAAE,iBAAiB;YACnC,QAAQ;YACR,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB;YACpE,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe;YAC1D,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,oBAAoB;YAC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BAA8B;YAC9B,yGAAyG;YACzG,gGAAgG;YAChG,+FAA+F;YAC/F,yGAAyG;YACzG,uCAAuC;YACvC,2FAA2F;YAC3F,mGAAmG;YACnG,0GAA0G;YAC1G,oGAAoG;YACpG,wCAAwC;YACxC,2FAA2F;YAC3F,8GAA8G;YAC9G,+FAA+F;YAC/F,kFAAkF;YAClF,gGAAgG;YAChG,oDAAoD;YACpD,sFAAsF;YACtF,0GAA0G;YAC1G,2JAA2J;YAC3J,4EAA4E;YAC5E,sCAAsC;YACtC,+FAA+F;YAC/F,iFAAiF;YACjF,8EAA8E;SAC/E;QAED,QAAQ,EAAE;YACR,2BAA2B,EACzB,iOAAiO;YACnO,2BAA2B,EACzB,kOAAkO;YACpO,kCAAkC,EAChC,gOAAgO;YAClO,uBAAuB,EACrB,kMAAkM;YACpM,qCAAqC,EACnC,8NAA8N;YAChO,6BAA6B,EAC3B,yLAAyL;SAC5L;QAED,YAAY,EAAE;YACZ,8JAA8J;YAC9J,+EAA+E;YAC/E,gHAAgH;YAChH,+GAA+G;YAC/G,4HAA4H;YAC5H,uGAAuG;YACvG,iIAAiI;YACjI,0IAA0I;YAC1I,oFAAoF;SACrF;KACF;IAED,wDAAwD;IAExD,MAAM,EAAE;QACN,SAAS,EAAE;YACT,SAAS;YACT,mHAAmH;YACnH,wEAAwE;YACxE,mHAAmH;YACnH,QAAQ;YACR,kEAAkE;YAClE,6EAA6E;YAC7E,yFAAyF;YACzF,qGAAqG;YACrG,2FAA2F;YAC3F,UAAU;YACV,wGAAwG;YACxG,0HAA0H;YAC1H,mGAAmG;YACnG,KAAK;YACL,oFAAoF;YACpF,gGAAgG;YAChG,kFAAkF;YAClF,OAAO;YACP,wHAAwH;YACxH,oEAAoE;YACpE,iHAAiH;YACjH,SAAS;YACT,6HAA6H;SAC9H;KACF;CACF,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Security Domain Module
3
+ *
4
+ * 来源:
5
+ * - content/skills/security-hardening/SKILL.md (51 行)
6
+ * OWASP Top 10 审计、安全标头、CVE 扫描、密钥管理
7
+ * - content/roles/04-quality-security/security-auditor.toml (42 行)
8
+ * 安全审计方法、攻击面分析、风险排序
9
+ *
10
+ * 压缩方法:
11
+ * 1. OWASP Top 10 表格 → design.checklist + implement.antiPatterns
12
+ * 2. 安全标头模板 → design.patterns["Security Headers"]
13
+ * 3. 审计工作流 → verify.checklist
14
+ * 4. security-auditor focus areas → implement.focusAreas
15
+ * 5. 原始代码示例/Python脚本 → 丢弃(用户有自己的代码库)
16
+ */
17
+ import type { DomainModule } from './types.js';
18
+ export declare const securityDomain: DomainModule;
19
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/domains/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,cAAc,EAAE,YAqY5B,CAAC"}