* feat(#4221): gsd-secret-read-guard PreToolUse hook + registration Add hooks/gsd-secret-read-guard.js, a blocking PreToolUse guard on Read|Grep|Bash that denies reads of .env, .env.<suffix> and .secrets (the .env.example/.sample/.template/.dist templates stay readable). Read checks file_path; Grep checks an explicit path and judges the glob per brace alternative; Bash runs a two-pass token scan (quotes, comments, redirects with fd digits, separators, $( )/backtick/<( ) recursion, heredoc bodies never scanned as commands, nested bash -c/eval rescans, git <ref>:<path> shapes) with a closed non-reading exemption set for existence checks. Fail-open crash policy; 1 MiB commands are denied as command-too-large; more than 64 glob alternatives as glob-too-complex. Why: Claude Code 2.1.259 makes every `cd DIR && grep …` compound prompt for approval whenever any Read() deny rule exists, even in auto mode. A hook denial is not a permission rule and never arms that check. The installer-written deny rules are retired in the follow-up commit. Registration: hooks.json (Read|Grep|Bash, timeout 5), build-hooks HOOKS_TO_COPY, managed-hooks-registry, runtime-hooks-surface (blocking guard with BLOCKING_GUARD_TIMEOUT_S; Kimi ReadFile|Grep|Shell), shell-command-projection managed sets, installer-migration-report, OpenCode/Kilo plugin (grep tool mapping, include -> glob, dispatch), docs tables in five locales, ADR-766 always-on list, regen:derived fixtures, and a new table-driven unit suite. * test(#4221): pin the secret-read guard in existing hook gates Register gsd-secret-read-guard.js in every existing hook gate: the hooks-crash-policy table (deny row; 6 -> 7 deny cases), plugin-manifest REQUIRED_HOOKS and its Read|Grep|Bash group, docs-hooks-table-parity EXPECTED_SURFACE_HOOKS, install.test MANAGED_JS_HOOKS, install-minimal- hooks JS_HOOKS/BLOCKING_GUARDS, portable-node-runner GUARD_HOOKS, kilo-upgrades PLUGIN_GUARD_HOOKS, the Kimi normalization-parity and typed-payload floors, the OpenCode adapter (grep mapping, include -> glob, three dispatch tests) and a Kimi TOML matcher assertion. * fix(#4221): retire installer Read() deny rules (legacy filter) Rename GSD_CLAUDE_DENY_PERMISSIONS to GSD_CLAUDE_LEGACY_DENY_PERMISSIONS and stop adding the three Read(.env) / Read(.env.*) / Read(.secrets) strings. mergeClaudePermissions now only filters them out of an existing permissions.deny: an absent deny key stays absent, a malformed one is still repaired to [], and an array emptied by the filter is deleted so no `"deny": []` residue is left. Uninstall filters the same legacy list and, symmetric with the Antigravity branch, drops an emptied allow or deny key and an emptied permissions object. Unlike the #2278 allow-side migration there is no surviving current deny list, so the constant is renamed rather than mirrored. Removal is byte-exact: a hand-written identical rule is indistinguishable from the installer's and is removed too (the manifest never recorded permission strings). USER-GUIDE and CONTEXT.md updated. * test(#4221): flip install-regressions deny-rule assertions to the retired shape The fresh-merge, non-destructive merge, idempotency, end-to-end install, reinstall and uninstall assertions now expect no Read(.env*) deny rules and no permissions.deny key on a fresh install; the deny:null repair case is kept. A new describe block covers the legacy filter: retired strings removed with a user entry kept, partial sets, near-miss strings untouched, idempotency, GSD-only deny array deleted, a pre-existing empty deny preserved, and uninstall symmetry for allow/deny/permissions. * chore(#4221): add changeset fragment for PR #4236 * fix(#4221): case-fold names; scan shell stdin and xargs pipes Review round 1 (trek-e): - Blocker: secret-name matching is now case-insensitive in the Read, Grep (path and glob) and Bash paths, so `.ENV` / `.Secrets` on a case-insensitive filesystem are recognized as the same secret file. - Major: a shell interpreter's script is now scanned wherever it comes from. The tokenizer keeps heredoc bodies as per-segment tokens and records separator operators; pass 2 groups by segment id and resolves bash/sh/zsh/dash/ksh/su invocation mode: `-c` (including combined `-lc`) scans the script operand, a file operand is checked as a file (a `<( )` operand's echo/printf output is reconstructed), otherwise stdin is the script and heredocs, here-strings and a piped echo/printf source are scanned. `eval` joins all its operands; `source`/`.` handle process substitution. Data heredocs (`cat <<EOF`, the commit-message shape) stay unscanned. - Major: `… | xargs <cmd>` checks the upstream segment's operands as file names when the sub-command reads (`echo .env | xargs cat`, `find . -name .env | xargs cat`); `-a`/`--arg-file` suppresses the inference; a shell sub-command's `-c` script is scanned. Header, USER-GUIDE bullet and changeset updated; documented gaps now include piped scripts from non-echo sources and `exec`/`timeout` wrappers. 60 new suite cases pin the block and allow shapes. --------- Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
GSD Core 文档
文档按四个象限组织:教程通过实践帮助你学习,操作指南解决具体任务,参考文档提供权威信息,概念说明探讨设计理念与决策。
语言版本:English · Português (pt-BR) · 日本語 · 简体中文
Tutorials
How-to guides
- 在你的运行时上安装 — 适用于全部 16 个受支持运行时的安装步骤
- 讨论一个阶段 — 在规划开始前记录实现决策
- 规划一个阶段 — 执行调研、分解工作并验证计划质量
- 执行一个阶段 — 使用全新上下文的子代理以并行波次运行计划
- 验证并交付 — 审查已完成的工作、诊断失败并创建 PR
- 自主运行阶段 — 使用自主模式进行无人值守的阶段执行
- 处理快速临时任务 — 使用
/gsd-quick和/gsd-fast处理阶段循环之外的临时工作 - 配置模型配置文件 — 在高质量、均衡和经济模型层级之间切换
- 设置跨 AI 审查 — 配置第二个 AI 对主代理生成的代码进行审查
- 使用工作流并行工作 — 使用工作流同时运行独立的工作线
- 使用工作空间隔离工作 — 使用工作空间对实验性或高风险变更进行沙箱隔离
- 调试失败的执行 — 诊断并从中断或不完整的阶段执行中恢复
- 探索与草图 — 在提交计划之前,使用
/gsd-spike和/gsd-sketch进行探索性工作 - 设计 UI 阶段 — 使用 UI 阶段循环处理前端和视觉工作
- 从追踪器 Issue 驱动 GSD — 从 GitHub、Linear 或 Jira issue 启动一个阶段
- 从 GSD 2 迁移 — 将现有的 GSD 2 项目升级到 GSD Core
- 更新 GSD — 重新运行安装程序以获取最新版本
- 恢复与故障排查 — 修复常见问题、重建上下文并卸载
Reference
- 命令 — 每个命令的标志和示例
- 配置 — 完整配置模式、模型配置文件、Git 分支策略
- CLI 工具 —
gsd-tools.cjs用于工作流和代理的编程式 API - 功能特性 — 完整功能索引
- 清单 — 已安装的技能与界面映射
- STATE.md 模式 —
.planning/STATE.md的逐字段参考 - CONTEXT.md 模式 —
.planning/phases/<N>/CONTEXT.md的逐字段参考 - PLAN.md 模式 —
.planning/phases/<N>/PLAN.md的逐字段参考 - 规划产物 — 所有
.planning/文件及其作用
Explanation
- 上下文工程 — 上下文腐化如何形成,以及 GSD Core 如何防止它
- 阶段循环 — 讨论 → 规划 → 执行 → 验证 → 交付循环的设计原理
- 多代理编排 — 子代理的生成、范围界定和协调方式
- 安全模型 — 信任边界、权限和安全自动化
- 架构 — 系统架构、代理模型和数据流
- 讨论模式 —
/gsd-discuss-phase的假设模式与访谈模式 - 上下文监控 — 上下文窗口监控钩子架构
- Issue 驱动编排 — 使用现有原语从追踪器 issue 驱动 GSD 的方案
Related
- 根目录 README — 首页、快速开始和文档概览
- 变更日志 — 发布历史