Loading...
Loading...
Compare original and translation side by side
_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
mkdir -p ~/.gstack/sessions
touch ~/.gstack/sessions/"$PPID"
_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"
echo "PROACTIVE: $_PROACTIVE"
_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
echo "LAKE_INTRO: $_LAKE_SEEN"
_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
_TEL_START=$(date +%s)
_SESSION_ID="$$-$(date +%s)"
echo "TELEMETRY: ${_TEL:-off}"
echo "TEL_PROMPTED: $_TEL_PROMPTED"
mkdir -p ~/.gstack/analytics
echo '{"skill":"investigate","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
for _PF in ~/.gstack/analytics/.pending-*; do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; donePROACTIVE"false"UPGRADE_AVAILABLE <old> <new>~/.claude/skills/gstack/gstack-upgrade/SKILL.mdJUST_UPGRADED <from> <to>LAKE_INTROnoopen https://garryslist.org/posts/boil-the-ocean
touch ~/.gstack/.completeness-intro-seenopentouchTEL_PROMPTEDnoLAKE_INTROyesHelp gstack get better! Community mode shares usage data (which skills you use, how long they take, crash info) with a stable device ID so we can track trends and fix bugs faster. No code, file paths, or repo names are ever sent. Change anytime with.gstack-config set telemetry off
~/.claude/skills/gstack/bin/gstack-config set telemetry communityHow about anonymous mode? We just learn that someone used gstack — no unique ID, no way to connect sessions. Just a counter that helps us know if anyone's out there.
~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous~/.claude/skills/gstack/bin/gstack-config set telemetry offtouch ~/.gstack/.telemetry-promptedTEL_PROMPTEDyes_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
mkdir -p ~/.gstack/sessions
touch ~/.gstack/sessions/"$PPID"
_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"
echo "PROACTIVE: $_PROACTIVE"
_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
echo "LAKE_INTRO: $_LAKE_SEEN"
_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
_TEL_START=$(date +%s)
_SESSION_ID="$$-$(date +%s)"
echo "TELEMETRY: ${_TEL:-off}"
echo "TEL_PROMPTED: $_TEL_PROMPTED"
mkdir -p ~/.gstack/analytics
echo '{"skill":"investigate","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
for _PF in ~/.gstack/analytics/.pending-*; do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; donePROACTIVE"false"UPGRADE_AVAILABLE <old> <new>~/.claude/skills/gstack/gstack-upgrade/SKILL.mdJUST_UPGRADED <from> <to>LAKE_INTROnoopen https://garryslist.org/posts/boil-the-ocean
touch ~/.gstack/.completeness-intro-seenopentouchTEL_PROMPTEDnoLAKE_INTROyes帮助gstack变得更好!社区模式会共享使用数据(您使用的技能、耗时、崩溃信息)以及一个稳定的设备ID,以便我们跟踪趋势并更快修复bug。我们绝不会发送任何代码、文件路径或仓库名称。您可随时通过更改设置。gstack-config set telemetry off
~/.claude/skills/gstack/bin/gstack-config set telemetry community那匿名模式呢?我们只会了解到有人使用了gstack——不会使用唯一ID,也无法关联会话。仅通过计数器了解是否有用户在使用。
~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous~/.claude/skills/gstack/bin/gstack-config set telemetry offtouch ~/.gstack/.telemetry-promptedTEL_PROMPTEDyes_BRANCHRECOMMENDATION: Choose [X] because [one-line reason]Completeness: X/10A) ... B) ... C) ...(human: ~X / CC: ~Y)_BRANCHRECOMMENDATION: 选择[X],因为[一句话理由]Completeness: X/10A) ... B) ... C) ...(人工:~X / CC: ~Y)| Task type | Human team | CC+gstack | Compression |
|---|---|---|---|
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
| Test writing | 1 day | 15 min | ~50x |
| Feature implementation | 1 week | 30 min | ~30x |
| Bug fix + regression test | 4 hours | 15 min | ~20x |
| Architecture / design | 2 days | 4 hours | ~5x |
| Research / exploration | 1 day | 3 hours | ~3x |
| 任务类型 | 团队人工 | CC+gstack | 压缩比 |
|---|---|---|---|
| 模板代码/脚手架 | 2天 | 15分钟 | ~100x |
| 测试编写 | 1天 | 15分钟 | ~50x |
| 功能实现 | 周 | 30分钟 | ~30x |
| Bug修复+回归测试 | 4小时 | 15分钟 | ~20x |
| 架构/设计 | 2天 | 4小时 | ~5x |
| 研究/探索 | 1天 | 3小时 | ~3x |
~/.claude/skills/gstack/ETHOS.mdjq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true~/.gstack/skills/gstack/ETHOS.mdjq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true_CONTRIBtrue$B js "await fetch(...)"SyntaxError: await is only valid in async functions~/.gstack/contributor-logs/{slug}.mdundefined_CONTRIBtrue$B js "await fetch(...)"SyntaxError: await is only valid in async functions~/.gstack/contributor-logs/{slug}.mdundefined{paste the actual error or unexpected output here}{粘贴实际错误或意外输出}
Slug: lowercase, hyphens, max 60 chars (e.g. `browse-js-no-await`). Skip if file already exists. Max 3 reports per session. File inline and continue — don't stop the workflow. Tell user: "Filed gstack field report: {title}"
Slug:小写、用连字符连接、最多60个字符(例如`browse-js-no-await`)。如果文件已存在则跳过。每个会话最多提交3份报告。内联执行此操作并继续——不要中断工作流。告知用户:“已提交gstack现场报告:{标题}”STATUS: BLOCKED | NEEDS_CONTEXT
REASON: [1-2 sentences]
ATTEMPTED: [what you tried]
RECOMMENDATION: [what the user should do next]STATUS: BLOCKED | NEEDS_CONTEXT
REASON: [1-2句话]
ATTEMPTED: [已尝试的操作]
RECOMMENDATION: [用户下一步应采取的行动]name:~/.gstack/analytics/_TEL_END=$(date +%s)
_TEL_DUR=$(( _TEL_END - _TEL_START ))
rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
~/.claude/skills/gstack/bin/gstack-telemetry-log \
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &SKILL_NAMEOUTCOMEUSED_BROWSE$Bname:~/.gstack/analytics/_TEL_END=$(date +%s)
_TEL_DUR=$(( _TEL_END - _TEL_START ))
rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
~/.claude/skills/gstack/bin/gstack-telemetry-log \
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &SKILL_NAMEOUTCOMEUSED_BROWSE$Bgit log --oneline -20 -- <affected-files>git log --oneline -20 -- <affected-files>[ -x "${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE"STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.gstack}"
mkdir -p "$STATE_DIR"
echo "<detected-directory>/" > "$STATE_DIR/freeze-dir.txt"
echo "Debug scope locked to: <detected-directory>/"<detected-directory>src/auth/<dir>//unfreeze[ -x "${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE"STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.gstack}"
mkdir -p "$STATE_DIR"
echo "<detected-directory>/" > "$STATE_DIR/freeze-dir.txt"
echo "Debug scope locked to: <detected-directory>/"<detected-directory>src/auth/<dir>//unfreeze| Pattern | Signature | Where to look |
|---|---|---|
| Race condition | Intermittent, timing-dependent | Concurrent access to shared state |
| Nil/null propagation | NoMethodError, TypeError | Missing guards on optional values |
| State corruption | Inconsistent data, partial updates | Transactions, callbacks, hooks |
| Integration failure | Timeout, unexpected response | External API calls, service boundaries |
| Configuration drift | Works locally, fails in staging/prod | Env vars, feature flags, DB state |
| Stale cache | Shows old data, fixes on cache clear | Redis, CDN, browser cache, Turbo |
TODOS.mdgit log| 模式 | 特征 | 排查方向 |
|---|---|---|
| 竞态条件 | 间歇性、依赖时序 | 共享状态的并发访问 |
| 空值传播 | NoMethodError、TypeError | 可选值缺少防护检查 |
| 状态损坏 | 数据不一致、部分更新 | 事务、回调、钩子 |
| 集成失败 | 超时、意外响应 | 外部API调用、服务边界 |
| 配置漂移 | 本地正常、 staging/生产环境失败 | 环境变量、功能标志、数据库状态 |
| 缓存过期 | 显示旧数据、清除缓存后恢复 | Redis、CDN、浏览器缓存、Turbo |
TODOS.mdgit log3 hypotheses tested, none match. This may be an architectural issue
rather than a simple bug.
A) Continue investigating — I have a new hypothesis: [describe]
B) Escalate for human review — this needs someone who knows the system
C) Add logging and wait — instrument the area and catch it next time已测试3个假设,均不匹配。这可能是架构问题,而非简单的bug。
A) 继续调查——我有一个新的假设:[描述]
B) 升级处理请人工审核——这需要了解系统的人员处理
C) 添加日志等待——对此区域进行埋点,下次出现时捕获This fix touches N files. That's a large blast radius for a bug fix.
A) Proceed — the root cause genuinely spans these files
B) Split — fix the critical path now, defer the rest
C) Rethink — maybe there's a more targeted approach此修复触及N个文件。对于bug修复来说,影响范围过大。
A) 继续——根本原因确实涉及这些文件
B) 拆分——先修复关键路径推迟其他部分
C) 重新思考——可能有更针对性的方案DEBUG REPORT
════════════════════════════════════════
Symptom: [what the user observed]
Root cause: [what was actually wrong]
Fix: [what was changed, with file:line references]
Evidence: [test output, reproduction attempt showing fix works]
Regression test: [file:line of the new test]
Related: [TODOS.md items, prior bugs in same area, architectural notes]
Status: DONE | DONE_WITH_CONCERNS | BLOCKED
════════════════════════════════════════DEBUG报告
════════════════════════════════════════
症状: [用户观察到的现象]
根本原因: [实际存在的问题]
修复: [更改内容,包含文件:行号引用]
证据: [测试输出、显示修复有效的复现尝试]
回归测试: [新测试的文件:行号]
相关信息: [TODOS.md中的条目、同一区域的过往bug、架构说明]
状态: DONE | DONE_WITH_CONCERNS | BLOCKED
════════════════════════════════════════