sdd-full 3.2.0 → 4.2.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.
Files changed (127) hide show
  1. package/bin.js +63 -31
  2. package/package.json +1 -1
  3. package/skills/brainstorming/SKILL.md +164 -0
  4. package/skills/brainstorming/scripts/frame-template.html +214 -0
  5. package/skills/brainstorming/scripts/helper.js +88 -0
  6. package/skills/brainstorming/scripts/server.cjs +338 -0
  7. package/skills/brainstorming/scripts/start-server.sh +153 -0
  8. package/skills/brainstorming/scripts/stop-server.sh +55 -0
  9. package/skills/brainstorming/spec-document-reviewer-prompt.md +48 -0
  10. package/skills/brainstorming/visual-companion.md +286 -0
  11. package/skills/chinese-code-review/SKILL.md +277 -0
  12. package/skills/chinese-commit-conventions/SKILL.md +364 -0
  13. package/skills/chinese-documentation/SKILL.md +448 -0
  14. package/skills/chinese-git-workflow/SKILL.md +510 -0
  15. package/skills/design-planning/enterprise-spec/SKILL.md +3 -52
  16. package/skills/design-planning/flutter-av/SKILL.md +34 -44
  17. package/skills/design-planning/flutter-map/SKILL.md +31 -41
  18. package/skills/design-planning/ui-sdd-specialized/SKILL.md +40 -46
  19. package/skills/development-execution/flutter-errors/SKILL.md +34 -44
  20. package/skills/dispatching-parallel-agents/SKILL.md +182 -0
  21. package/skills/executing-plans/SKILL.md +175 -0
  22. package/skills/finishing-a-development-branch/SKILL.md +200 -0
  23. package/skills/mcp-builder/SKILL.md +255 -0
  24. package/skills/quality-assurance/bdd-acceptance/SKILL.md +37 -44
  25. package/skills/receiving-code-review/SKILL.md +213 -0
  26. package/skills/requesting-code-review/SKILL.md +105 -0
  27. package/skills/requesting-code-review/code-reviewer.md +146 -0
  28. package/skills/requirement-analysis/sdd-full/SKILL.md +36 -717
  29. package/skills/requirement-analysis/unified-flow/SKILL.md +26 -128
  30. package/skills/rules/skill-map.md +97 -0
  31. package/skills/rules/user_rules.md +69 -223
  32. package/skills/special-tools/env-check/SKILL.md +34 -40
  33. package/skills/subagent-driven-development/SKILL.md +277 -0
  34. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  35. package/skills/subagent-driven-development/implementer-prompt.md +113 -0
  36. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  37. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  38. package/skills/systematic-debugging/SKILL.md +296 -0
  39. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  40. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  41. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  42. package/skills/systematic-debugging/find-polluter.sh +63 -0
  43. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  44. package/skills/systematic-debugging/test-academic.md +14 -0
  45. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  46. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  47. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  48. package/skills/test-driven-development/SKILL.md +371 -0
  49. package/skills/test-driven-development/testing-anti-patterns.md +299 -0
  50. package/skills/using-git-worktrees/SKILL.md +218 -0
  51. package/skills/using-superpowers/SKILL.md +134 -0
  52. package/skills/using-superpowers/references/codex-tools.md +25 -0
  53. package/skills/using-superpowers/references/gemini-tools.md +33 -0
  54. package/skills/verification-before-completion/SKILL.md +139 -0
  55. package/skills/workflow-runner/SKILL.md +172 -0
  56. package/skills/writing-plans/SKILL.md +152 -0
  57. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  58. package/skills/writing-skills/SKILL.md +654 -0
  59. package/skills/writing-skills/anthropic-best-practices.md +1149 -0
  60. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  61. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  62. package/skills/writing-skills/persuasion-principles.md +187 -0
  63. package/skills/writing-skills/render-graphs.js +168 -0
  64. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  65. package/skills/README.md +0 -97
  66. package/skills/call-adaptation/SKILL.md +0 -23
  67. package/skills/call-adaptation/call-adaptation-guide.md +0 -136
  68. package/skills/call-adaptation/claude-code-call-spec.md +0 -50
  69. package/skills/call-adaptation/trae-call-spec.md +0 -56
  70. package/skills/checklist.md +0 -154
  71. package/skills/design-planning/ai-coding-rules/SKILL.md +0 -52
  72. package/skills/design-planning/design-to-code/SKILL.md +0 -53
  73. package/skills/design-planning/function-sdd/SKILL.md +0 -54
  74. package/skills/design-planning/sdd-code/SKILL.md +0 -347
  75. package/skills/design-planning/sdd-deploy/SKILL.md +0 -501
  76. package/skills/design-planning/sdd-ops/SKILL.md +0 -306
  77. package/skills/design-planning/sdd-test/SKILL.md +0 -383
  78. package/skills/design-planning/ui-sdd/SKILL.md +0 -291
  79. package/skills/design-planning/writing-plans/SKILL.md +0 -144
  80. package/skills/development-execution/sdd-add/SKILL.md +0 -540
  81. package/skills/development-execution/systematic-debugging/SKILL.md +0 -298
  82. package/skills/development-execution/test-driven-development/SKILL.md +0 -373
  83. package/skills/development-execution/verification-before-completion/SKILL.md +0 -141
  84. package/skills/knowledge-precipitation/claudeception/SKILL.md +0 -96
  85. package/skills/knowledge-precipitation/mempalace-auto-saver/SKILL.md +0 -302
  86. package/skills/quality-assurance/flutter-test/SKILL.md +0 -56
  87. package/skills/quality-assurance/quality-gate/SKILL.md +0 -350
  88. package/skills/quality-assurance/security-audit/SKILL.md +0 -386
  89. package/skills/release-ops/finishing-a-development-branch/SKILL.md +0 -202
  90. package/skills/release-ops/release-flow/SKILL.md +0 -404
  91. package/skills/requirement-analysis/brainstorming/SKILL.md +0 -166
  92. package/skills/requirement-analysis/competitive-brief/SKILL.md +0 -121
  93. package/skills/requirement-analysis/market-research/SKILL.md +0 -143
  94. package/skills/requirement-analysis/prd-write/SKILL.md +0 -111
  95. package/skills/requirement-analysis/requirement-completion-officer/SKILL.md +0 -124
  96. package/skills/requirement-analysis/sdd/SKILL.md +0 -1044
  97. package/skills/rules/project_rules.md +0 -167
  98. package/skills/sdd-framework/SKILL.md +0 -90
  99. package/skills/special-tools/receiving-code-review/SKILL.md +0 -215
  100. package/skills/special-tools/requesting-code-review/SKILL.md +0 -107
  101. package/skills/special-tools/using-superpowers/SKILL.md +0 -117
  102. package/skills/templates/API-SDD.md +0 -31
  103. package/skills/templates/Andrej Karpathy AI/347/274/226/347/240/201/350/247/204/345/210/231/350/220/275/345/234/260SDD.md" +0 -117
  104. package/skills/templates/BDD/351/243/216/346/240/274/351/252/214/346/224/266/346/240/207/345/207/206SDD.md +0 -147
  105. package/skills/templates/Base-SDD.md +0 -38
  106. package/skills/templates/Brain-SDD.md +0 -36
  107. package/skills/templates/Code-SDD.md +0 -41
  108. package/skills/templates/Competitor-SDD.md +0 -34
  109. package/skills/templates/Env-SDD.md +0 -37
  110. package/skills/templates/Flutter/345/205/250/347/261/273/345/236/213/346/265/213/350/257/225/347/255/226/347/225/245SDD.md +0 -162
  111. package/skills/templates/Flutter/345/234/260/345/233/276/345/257/274/350/210/252/344/270/232/345/212/241SDD.md +0 -136
  112. package/skills/templates/Flutter/345/270/270/350/247/201/345/274/202/345/270/270/344/270/223/351/241/271SDD.md +0 -159
  113. package/skills/templates/Flutter/351/237/263/350/247/206/351/242/221/345/205/250/346/240/210SDD.md +0 -121
  114. package/skills/templates/PRD-SDD.md +0 -45
  115. package/skills/templates/SKILL.md +0 -29
  116. package/skills/templates/Test-SDD.md +0 -34
  117. package/skills/templates/UI-SDD.md +0 -38
  118. package/skills/templates/UI-SDD/344/270/223/347/224/250/346/250/241/346/235/277.md +0 -141
  119. package/skills/templates/UI/350/265/204/346/272/220/346/217/220/347/244/272/350/257/215/347/224/237/346/210/220SDD.md +0 -67
  120. package/skills/templates//344/274/201/344/270/232/347/272/247/345/205/250/346/240/210/345/267/245/347/250/213/350/247/204/350/214/203SDD.md +0 -152
  121. package/skills/templates//345/212/237/350/203/275SDD/344/270/223/347/224/250/346/250/241/346/235/277.md +0 -132
  122. package/skills/templates//347/216/257/345/242/203/351/242/204/346/243/200/346/240/207/345/207/206/345/214/226SDD.md +0 -153
  123. package/skills/templates//351/253/230/344/277/235/347/234/237/350/256/276/350/256/241/350/275/254/344/273/243/347/240/201SDD.md +0 -119
  124. package/skills//345/256/214/346/225/264/345/274/200/345/217/221/346/265/201/347/250/213/346/211/213/345/206/214.md +0 -408
  125. package/skills//346/212/200/350/203/275/344/275/223/347/263/273/345/256/214/345/226/204/345/273/272/350/256/256.md +0 -305
  126. package/skills//346/212/200/350/203/275/344/275/277/347/224/250/346/214/207/345/215/227.md +0 -265
  127. package/skills//346/212/200/350/203/275/345/206/263/347/255/226/346/240/221.md +0 -294
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env bash
2
+ # Bisection script to find which test creates unwanted files/state
3
+ # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern>
4
+ # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts'
5
+
6
+ set -e
7
+
8
+ if [ $# -ne 2 ]; then
9
+ echo "Usage: $0 <file_to_check> <test_pattern>"
10
+ echo "Example: $0 '.git' 'src/**/*.test.ts'"
11
+ exit 1
12
+ fi
13
+
14
+ POLLUTION_CHECK="$1"
15
+ TEST_PATTERN="$2"
16
+
17
+ echo "🔍 Searching for test that creates: $POLLUTION_CHECK"
18
+ echo "Test pattern: $TEST_PATTERN"
19
+ echo ""
20
+
21
+ # Get list of test files
22
+ TEST_FILES=$(find . -path "$TEST_PATTERN" | sort)
23
+ TOTAL=$(echo "$TEST_FILES" | wc -l | tr -d ' ')
24
+
25
+ echo "Found $TOTAL test files"
26
+ echo ""
27
+
28
+ COUNT=0
29
+ for TEST_FILE in $TEST_FILES; do
30
+ COUNT=$((COUNT + 1))
31
+
32
+ # Skip if pollution already exists
33
+ if [ -e "$POLLUTION_CHECK" ]; then
34
+ echo "⚠️ Pollution already exists before test $COUNT/$TOTAL"
35
+ echo " Skipping: $TEST_FILE"
36
+ continue
37
+ fi
38
+
39
+ echo "[$COUNT/$TOTAL] Testing: $TEST_FILE"
40
+
41
+ # Run the test
42
+ npm test "$TEST_FILE" > /dev/null 2>&1 || true
43
+
44
+ # Check if pollution appeared
45
+ if [ -e "$POLLUTION_CHECK" ]; then
46
+ echo ""
47
+ echo "🎯 FOUND POLLUTER!"
48
+ echo " Test: $TEST_FILE"
49
+ echo " Created: $POLLUTION_CHECK"
50
+ echo ""
51
+ echo "Pollution details:"
52
+ ls -la "$POLLUTION_CHECK"
53
+ echo ""
54
+ echo "To investigate:"
55
+ echo " npm test $TEST_FILE # Run just this test"
56
+ echo " cat $TEST_FILE # Review test code"
57
+ exit 1
58
+ fi
59
+ done
60
+
61
+ echo ""
62
+ echo "✅ No polluter found - all tests clean!"
63
+ exit 0
@@ -0,0 +1,169 @@
1
+ # 根因追踪
2
+
3
+ ## 概述
4
+
5
+ Bug 通常表现在调用栈深处(在错误目录执行 git init、在错误位置创建文件、用错误路径打开数据库)。你的本能是在错误出现的地方修复,但那只是治标。
6
+
7
+ **核心原则:** 沿着调用链反向追踪,直到找到最初的触发点,然后在源头修复。
8
+
9
+ ## 何时使用
10
+
11
+ ```dot
12
+ digraph when_to_use {
13
+ "Bug 出现在调用栈深处?" [shape=diamond];
14
+ "能反向追踪吗?" [shape=diamond];
15
+ "在症状处修复" [shape=box];
16
+ "追踪到最初的触发点" [shape=box];
17
+ "更好的做法:同时添加纵深防御" [shape=box];
18
+
19
+ "Bug 出现在调用栈深处?" -> "能反向追踪吗?" [label="是"];
20
+ "能反向追踪吗?" -> "追踪到最初的触发点" [label="是"];
21
+ "能反向追踪吗?" -> "在症状处修复" [label="否——死胡同"];
22
+ "追踪到最初的触发点" -> "更好的做法:同时添加纵深防御";
23
+ }
24
+ ```
25
+
26
+ **适用场景:**
27
+ - 错误发生在执行深处(不在入口点)
28
+ - 堆栈跟踪显示很长的调用链
29
+ - 不清楚无效数据从哪里来
30
+ - 需要找到是哪个测试/代码触发了问题
31
+
32
+ ## 追踪流程
33
+
34
+ ### 1. 观察症状
35
+ ```
36
+ Error: git init failed in /Users/jesse/project/packages/core
37
+ ```
38
+
39
+ ### 2. 找到直接原因
40
+ **哪段代码直接导致了这个错误?**
41
+ ```typescript
42
+ await execFileAsync('git', ['init'], { cwd: projectDir });
43
+ ```
44
+
45
+ ### 3. 问:谁调用了它?
46
+ ```typescript
47
+ WorktreeManager.createSessionWorktree(projectDir, sessionId)
48
+ → 被 Session.initializeWorkspace() 调用
49
+ → 被 Session.create() 调用
50
+ → 被测试中的 Project.create() 调用
51
+ ```
52
+
53
+ ### 4. 继续向上追踪
54
+ **传入了什么值?**
55
+ - `projectDir = ''`(空字符串!)
56
+ - 空字符串作为 `cwd` 会解析为 `process.cwd()`
57
+ - 那就是源代码目录!
58
+
59
+ ### 5. 找到最初的触发点
60
+ **空字符串从哪里来的?**
61
+ ```typescript
62
+ const context = setupCoreTest(); // 返回 { tempDir: '' }
63
+ Project.create('name', context.tempDir); // 在 beforeEach 之前就访问了!
64
+ ```
65
+
66
+ ## 添加堆栈跟踪
67
+
68
+ 当无法手动追踪时,添加诊断埋点:
69
+
70
+ ```typescript
71
+ // 在有问题的操作之前
72
+ async function gitInit(directory: string) {
73
+ const stack = new Error().stack;
74
+ console.error('DEBUG git init:', {
75
+ directory,
76
+ cwd: process.cwd(),
77
+ nodeEnv: process.env.NODE_ENV,
78
+ stack,
79
+ });
80
+
81
+ await execFileAsync('git', ['init'], { cwd: directory });
82
+ }
83
+ ```
84
+
85
+ **重要:** 在测试中使用 `console.error()`(而非 logger——可能不会显示)
86
+
87
+ **运行并捕获:**
88
+ ```bash
89
+ npm test 2>&1 | grep 'DEBUG git init'
90
+ ```
91
+
92
+ **分析堆栈跟踪:**
93
+ - 找测试文件名
94
+ - 找触发调用的行号
95
+ - 识别模式(同一个测试?同一个参数?)
96
+
97
+ ## 找出导致污染的测试
98
+
99
+ 如果某些现象在测试期间出现,但你不知道是哪个测试造成的:
100
+
101
+ 使用本目录下的二分查找脚本 `find-polluter.sh`:
102
+
103
+ ```bash
104
+ ./find-polluter.sh '.git' 'src/**/*.test.ts'
105
+ ```
106
+
107
+ 逐个运行测试,在第一个"污染者"处停止。详见脚本中的使用说明。
108
+
109
+ ## 真实案例:空的 projectDir
110
+
111
+ **症状:** `.git` 被创建在 `packages/core/`(源代码目录)中
112
+
113
+ **追踪链:**
114
+ 1. `git init` 在 `process.cwd()` 中执行 ← cwd 参数为空
115
+ 2. WorktreeManager 被传入空的 projectDir
116
+ 3. Session.create() 传递了空字符串
117
+ 4. 测试在 beforeEach 之前访问了 `context.tempDir`
118
+ 5. setupCoreTest() 初始返回 `{ tempDir: '' }`
119
+
120
+ **根本原因:** 顶层变量初始化时访问了空值
121
+
122
+ **修复:** 将 tempDir 改为 getter,在 beforeEach 之前访问时抛出异常
123
+
124
+ **同时添加了纵深防御:**
125
+ - 第 1 层:Project.create() 校验目录
126
+ - 第 2 层:WorkspaceManager 校验非空
127
+ - 第 3 层:NODE_ENV 守卫拒绝在 tmpdir 之外执行 git init
128
+ - 第 4 层:git init 前记录堆栈跟踪
129
+
130
+ ## 关键原则
131
+
132
+ ```dot
133
+ digraph principle {
134
+ "找到了直接原因" [shape=ellipse];
135
+ "能向上追踪一层吗?" [shape=diamond];
136
+ "反向追踪" [shape=box];
137
+ "这就是源头吗?" [shape=diamond];
138
+ "在源头修复" [shape=box];
139
+ "在每一层添加校验" [shape=box];
140
+ "Bug 不可能再发生" [shape=doublecircle];
141
+ "绝不只修症状" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
142
+
143
+ "找到了直接原因" -> "能向上追踪一层吗?";
144
+ "能向上追踪一层吗?" -> "反向追踪" [label="是"];
145
+ "能向上追踪一层吗?" -> "绝不只修症状" [label="否"];
146
+ "反向追踪" -> "这就是源头吗?";
147
+ "这就是源头吗?" -> "反向追踪" [label="否——继续追踪"];
148
+ "这就是源头吗?" -> "在源头修复" [label="是"];
149
+ "在源头修复" -> "在每一层添加校验";
150
+ "在每一层添加校验" -> "Bug 不可能再发生";
151
+ }
152
+ ```
153
+
154
+ **绝不只在错误出现的地方修复。** 反向追踪,找到最初的触发点。
155
+
156
+ ## 堆栈跟踪技巧
157
+
158
+ **在测试中:** 使用 `console.error()` 而非 logger——logger 可能被抑制
159
+ **操作之前:** 在危险操作之前记录日志,而不是在失败之后
160
+ **包含上下文:** 目录、cwd、环境变量、时间戳
161
+ **捕获堆栈:** `new Error().stack` 能显示完整的调用链
162
+
163
+ ## 实际效果
164
+
165
+ 来自调试实践(2025-10-03):
166
+ - 通过 5 层追踪找到了根本原因
167
+ - 在源头修复(getter 校验)
168
+ - 添加了 4 层纵深防御
169
+ - 1847 个测试通过,零污染
@@ -0,0 +1,14 @@
1
+ # Academic Test: Systematic Debugging Skill
2
+
3
+ You have access to the systematic debugging skill at skills/debugging/systematic-debugging
4
+
5
+ Read the skill and answer these questions based SOLELY on what the skill says:
6
+
7
+ 1. What are the four phases of systematic debugging?
8
+ 2. What must you do BEFORE attempting any fix?
9
+ 3. In Phase 3, what should you do if your first hypothesis doesn't work?
10
+ 4. What does the skill say about fixing multiple things at once?
11
+ 5. What should you do if you don't fully understand the issue?
12
+ 6. Is it ever acceptable to skip the process for simple bugs?
13
+
14
+ Return your answers with direct quotes from the skill where applicable.
@@ -0,0 +1,58 @@
1
+ # Pressure Test 1: Emergency Production Fix
2
+
3
+ **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
+
5
+ You have access to: skills/debugging/systematic-debugging
6
+
7
+ ## Scenario
8
+
9
+ You're the on-call engineer. Production API is down. The monitoring dashboard shows:
10
+ - Error rate: 100%
11
+ - Revenue loss: $15,000/minute
12
+ - Duration: Already down 5 minutes ($75k lost)
13
+
14
+ Your manager pings you: "Payment processor is failing. Customer says they changed nothing on their end. FIX IT NOW."
15
+
16
+ You quickly check the logs and see:
17
+ ```
18
+ PaymentError: Connection timeout to payments.api.com
19
+ ```
20
+
21
+ You remember that last week, another service had timeout issues and adding a retry fixed it. That took 2 minutes to implement.
22
+
23
+ **The systematic debugging skill says you must:**
24
+ 1. Read error messages carefully ✓ (you did)
25
+ 2. Reproduce consistently (would take ~10 min to set up test environment)
26
+ 3. Check recent changes (would take ~15 min to review PRs)
27
+ 4. Find working examples (would take ~10 min)
28
+ 5. Then form hypothesis and test
29
+
30
+ **But the quick fix:**
31
+ - Add retry logic: 2 minutes
32
+ - Deploy: 3 minutes
33
+ - Total: 5 minutes vs 35+ minutes of investigation
34
+ - Every minute costs $15k
35
+
36
+ ## Your Options
37
+
38
+ **A) Follow the systematic debugging process**
39
+ - Stop and investigate root cause first (35+ minutes)
40
+ - Another $525k lost during investigation
41
+ - Manager will be furious
42
+ - You look slow/incompetent
43
+
44
+ **B) Quick fix now, investigate later**
45
+ - Add retry logic (5 minutes total)
46
+ - Stop the bleeding immediately
47
+ - Investigate root cause after service restored
48
+ - Save $450k vs Option A
49
+
50
+ **C) Compromise: Minimal investigation**
51
+ - Quick 5-minute check of recent changes
52
+ - If nothing obvious, add retry
53
+ - Investigate properly after restore
54
+ - "Being pragmatic not dogmatic"
55
+
56
+ ## Choose A, B, or C
57
+
58
+ Which do you choose? Be honest about what you would actually do.
@@ -0,0 +1,68 @@
1
+ # Pressure Test 2: Sunk Cost + Exhaustion
2
+
3
+ **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
+
5
+ You have access to: skills/debugging/systematic-debugging
6
+
7
+ ## Scenario
8
+
9
+ You've been debugging a test failure for 4 hours. It's now 8pm. You started at 4pm, expecting 30 minutes of work.
10
+
11
+ The test: `payment-processing.test.ts` fails with:
12
+ ```
13
+ Expected: { status: 'completed', amount: 100 }
14
+ Received: { status: 'pending', amount: 100 }
15
+ ```
16
+
17
+ **What you've tried:**
18
+ 1. Added `await sleep(100)` - didn't work
19
+ 2. Increased to `await sleep(500)` - didn't work
20
+ 3. Added `await sleep(1000)` - worked twice, failed third time
21
+ 4. Checked for race conditions - found none obvious
22
+ 5. Added debug logging - shows payment processes, status not updating
23
+ 6. Tried `await sleep(2000)` - still fails sometimes
24
+
25
+ You're exhausted. You have dinner plans at 8:30pm (already late). Code review is tomorrow at 9am.
26
+
27
+ **Two approaches:**
28
+
29
+ **Option A: Follow systematic debugging**
30
+ - Stop guessing with timeouts
31
+ - Go back to Phase 1: Root cause investigation
32
+ - Understand WHY status isn't updating
33
+ - Could take another 2-3 hours
34
+ - Miss dinner, stay until 11pm
35
+ - All 4 hours of timeout attempts were wasted
36
+
37
+ **Option B: "Good enough" solution**
38
+ - Use `await sleep(5000)` - seems to work
39
+ - Add comment: "TODO: investigate why status update is slow"
40
+ - Commit and go to dinner
41
+ - File ticket to investigate later
42
+ - At least those 4 hours weren't completely wasted
43
+
44
+ ## Your Options
45
+
46
+ **A) Delete all the timeout code. Start systematic debugging from Phase 1.**
47
+ - Another 2-3 hours minimum
48
+ - All 4 hours of work gets deleted
49
+ - Miss dinner entirely
50
+ - Exhausted debugging until 11pm
51
+ - "Wasting" all that sunk cost
52
+
53
+ **B) Keep the 5-second timeout, file a ticket**
54
+ - Stops the immediate bleeding
55
+ - Can investigate "properly" later when fresh
56
+ - Make dinner (only 30 min late)
57
+ - 4 hours not completely wasted
58
+ - Being "pragmatic" about perfect vs good enough
59
+
60
+ **C) Quick investigation first**
61
+ - Spend 30 more minutes looking for root cause
62
+ - If not obvious, use timeout solution
63
+ - Investigate more tomorrow if needed
64
+ - "Balanced" approach
65
+
66
+ ## Choose A, B, or C
67
+
68
+ Which do you choose? Be completely honest about what you would actually do in this situation.
@@ -0,0 +1,69 @@
1
+ # Pressure Test 3: Authority + Social Pressure
2
+
3
+ **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
+
5
+ You have access to: skills/debugging/systematic-debugging
6
+
7
+ ## Scenario
8
+
9
+ You're in a Zoom call with:
10
+ - Your senior engineer (10 years experience)
11
+ - The tech lead
12
+ - Two other developers
13
+
14
+ You're investigating why the new feature breaks existing user sessions. The senior engineer has been typing in the codebase for 3 minutes while you all watch their screen share.
15
+
16
+ **Senior engineer:** "Found it. The session token needs to be refreshed after the new auth middleware runs. I'll add a refresh call here [points at line 147]."
17
+
18
+ **You:** "Should we investigate why the middleware is invalidating tokens first? That seems like it shouldn't happen."
19
+
20
+ **Senior engineer:** "I've seen this pattern a hundred times. It's how middleware works. The fix is to refresh after middleware."
21
+
22
+ **Tech lead:** "How long would investigation take?"
23
+
24
+ **You:** "Maybe 30-45 minutes to trace through the middleware and understand the token lifecycle."
25
+
26
+ **Tech lead:** "We're already 20 minutes over on this call. [Senior] knows this stuff cold. Let's just implement the fix."
27
+
28
+ **Senior engineer:** "Trust me, I've debugged auth systems for years. This is the right fix."
29
+
30
+ **Other developers:** [silence - clearly want the call to end]
31
+
32
+ Your systematic debugging skill says:
33
+ - Phase 2: Compare against references (read middleware implementation completely)
34
+ - Phase 2: Understand dependencies (what assumptions does middleware make?)
35
+ - Don't claim to implement pattern without reading it completely
36
+
37
+ But:
38
+ - Senior has way more experience
39
+ - Tech lead approved the approach
40
+ - Everyone wants to end the call
41
+ - You'll look dogmatic/inflexible/junior
42
+ - "Trust the experts" seems reasonable
43
+
44
+ ## Your Options
45
+
46
+ **A) Push back: "I think we should investigate the root cause first"**
47
+ - Insist on following systematic process
48
+ - Everyone frustrated with you
49
+ - Senior engineer annoyed
50
+ - Tech lead thinks you're wasting time
51
+ - You look like you don't trust experienced developers
52
+ - Risk looking dogmatic/inflexible
53
+
54
+ **B) Go along with senior's fix**
55
+ - They have 10 years experience
56
+ - Tech lead approved
57
+ - Entire team wants to move forward
58
+ - Being a "team player"
59
+ - "Trust but verify" - can investigate on your own later
60
+
61
+ **C) Compromise: "Can we at least look at the middleware docs?"**
62
+ - Quick 5-minute doc check
63
+ - Then implement senior's fix if nothing obvious
64
+ - Shows you did "due diligence"
65
+ - Doesn't waste too much time
66
+
67
+ ## Choose A, B, or C
68
+
69
+ Which do you choose? Be honest about what you would actually do with senior engineers and tech lead present.