{"id":"e000e954-304d-4766-9ea8-e24923b53570","entityType":"agent","slug":"clawhub-leeshunee-kinema-tdd-injector","name":"Kinema's TDD Injector (CLAUDE.md generator)","canonicalUrl":"https://www.xpersona.co/agent/clawhub-leeshunee-kinema-tdd-injector","canonicalPath":"/agent/clawhub-leeshunee-kinema-tdd-injector","generatedAt":"2026-10-11T10:52:17.069Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":null},"description":"一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Skill: Kinema's TDD Injector (CLAUDE.md generator) Owner: leeshunee Summary: 一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Tags: latest:1.4.1 Version history: v1.4.1 | 2026-07-16T07:42:19.607Z | user 新增 Codex / AGENTS.md 双端注入目标：render.py --target claude|codex，共享模板与升级规则；参数化指令文件名与 AI co-author；UTF-8 BOM 兼容","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1782xm9gtwjg6m1vnxsad9zc583qs9v:kinema-tdd-injector","sourceUrl":"https://clawhub.ai/leeshunee/kinema-tdd-injector","homepage":"https://clawhub.ai/leeshunee/skills/kinema-tdd-injector","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/leeshunee/kinema-tdd-injector","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/leeshunee/skills/kinema-tdd-injector","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":null},"stars":null,"forks":null,"downloads":1111,"packageName":null,"latestVersion":"1.4.1","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:33:22.729Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T08:33:22.796Z","lastCrawledAt":"2026-10-11T08:33:22.729Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T08:33:22.729Z","lastVerifiedAt":null,"highlights":[{"version":"1.4.1","createdAt":"2026-07-16T07:42:19.607Z","changelog":"新增 Codex / AGENTS.md 双端注入目标：render.py --target claude|codex，共享模板与升级规则；参数化指令文件名与 AI co-author；UTF-8 BOM 兼容。","fileCount":8,"zipByteSize":28911},{"version":"1.4.0","createdAt":"2026-06-04T08:18:25.045Z","changelog":"新增配置注入来源问卷(Q15)与配置唯一入口铁律(§.2.1)","fileCount":8,"zipByteSize":28684},{"version":"1.3.0","createdAt":"2026-06-04T07:10:18.888Z","changelog":"testenv 阶段深化：前端改为 Playwright GUI e2e（连真实后端+真实库、写 *.spec.ts）；前后端 testenv 本地运行许可分开询问（Q13/Q14）并条件化执行者；testenv 连接配置与库内容归属测试系统、禁止硬编码；触发时机=复杂 Plan 任务完成；头部新增 injector-version 标识与升级反解；新增 Playwright MCP 编写提示。","fileCount":8,"zipByteSize":28165},{"version":"1.2.1","createdAt":"2026-06-02T05:54:43.369Z","changelog":"仓库结构合规化：新增 plugin.json 清单、ONBOARDING 迁移至 references/、gitignore 补充缓存排除（PATCH，无功能变更）","fileCount":8,"zipByteSize":26234},{"version":"1.1.2","createdAt":"2026-05-29T01:56:12.196Z","changelog":"Unified third-tier test naming to testenv-integration","fileCount":8,"zipByteSize":20292},{"version":"1.1.1","createdAt":"2026-05-29T01:43:25.013Z","changelog":"Unified uv run usage, simplified ONBOARDING.md","fileCount":8,"zipByteSize":20444},{"version":"1.1.0","createdAt":"2026-05-29T01:41:00.403Z","changelog":"Documentation updates: README style, installation guide. License changed to GPL v3.","fileCount":8,"zipByteSize":20362},{"version":"1.0.0","createdAt":"2026-05-28T09:42:58.785Z","changelog":"Initial release: Three-tier testing system, conftest architecture, coverage thresholds, Jinja2 template rendering","fileCount":8,"zipByteSize":20266}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1782xm9gtwjg6m1vnxsad9zc583qs9v:kinema-tdd-injector","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T10:52:17.065Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":null},"readme":"Skill: Kinema's TDD Injector (CLAUDE.md generator)\n\nOwner: leeshunee\n\nSummary: 一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定...\n\nTags: latest:1.4.1\n\nVersion history:\n\nv1.4.1 | 2026-07-16T07:42:19.607Z | user\n\n新增 Codex / AGENTS.md 双端注入目标：render.py --target claude|codex，共享模板与升级规则；参数化指令文件名与 AI co-author；UTF-8 BOM 兼容。\n\nv1.4.0 | 2026-06-04T08:18:25.045Z | user\n\n新增配置注入来源问卷(Q15)与配置唯一入口铁律(§.2.1)\n\nv1.3.0 | 2026-06-04T07:10:18.888Z | user\n\ntestenv 阶段深化：前端改为 Playwright GUI e2e（连真实后端+真实库、写 *.spec.ts）；前后端 testenv 本地运行许可分开询问（Q13/Q14）并条件化执行者；testenv 连接配置与库内容归属测试系统、禁止硬编码；触发时机=复杂 Plan 任务完成；头部新增 injector-version 标识与升级反解；新增 Playwright MCP 编写提示。\n\nv1.2.1 | 2026-06-02T05:54:43.369Z | user\n\n仓库结构合规化：新增 plugin.json 清单、ONBOARDING 迁移至 references/、gitignore 补充缓存排除（PATCH，无功能变更）\n\nv1.1.2 | 2026-05-29T01:56:12.196Z | user\n\nUnified third-tier test naming to testenv-integration\n\nv1.1.1 | 2026-05-29T01:43:25.013Z | user\n\nUnified uv run usage, simplified ONBOARDING.md\n\nv1.1.0 | 2026-05-29T01:41:00.403Z | user\n\nDocumentation updates: README style, installation guide. License changed to GPL v3.\n\nv1.0.0 | 2026-05-28T09:42:58.785Z | user\n\nInitial release: Three-tier testing system, conftest architecture, coverage thresholds, Jinja2 template rendering\n\nArchive index:\n\nArchive v1.4.1: 8 files, 28911 bytes\n\nFiles: evals/evals.json (8212b), LICENSE (35823b), README.md (2731b), references/ONBOARDING.md (2514b), scripts/render.py (2254b), skill-card.md (2180b), SKILL.md (16492b), _meta.json (138b)\n\nFile v1.4.1:SKILL.md\n\n---\r\nname: kinema-tdd-injector\r\ndisplayName: \"Kinema's TDD Injector (CLAUDE.md generator)\"\r\nversion: 1.4.1\r\ndescription: |\r\n  一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定。每个仓库只运行一次——这**不是**开发期间的常驻助手。当用户说出诸如 \"把测试规范注入到这个仓库\" / \"init tdd standard here\" / \"set up testing methodology\" / \"import kinema's test rules\" 之类的话时，请主动提及本 skill。如果检测到仓库已被注入过，进入升级模式而非拒绝。\r\n---\r\n\r\n# Kinema TDD 方法论注入器\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n- **GitHub**: https://github.com/KinemaClawWorkspace/kinema-tdd-injector\r\n\r\n## ⚠️ Before First Use | 首次使用必读\r\n\r\n**首次使用此 skill 前，必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**\r\n\r\n- **首次配置** → 读取 references/ONBOARDING.md 完成全部步骤\r\n- **环境不可用**（jinja2 未安装、模板加载失败）→ 读取 references/ONBOARDING.md Troubleshooting 排查修复\r\n- **配置完成后** → 直接使用下方工作流\r\n\r\n一次性生成器，为目标仓库写入一份定制的 `CLAUDE.md`。**每个仓库仅运行一次**（升级除外），**不是**开发期间的助手。\r\n\r\n## 渲染机制\r\n\r\n本 skill 使用 **Jinja2 模板**渲染：\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── SKILL.md              ← 你正在读\r\n├── assets/\r\n│   └── claude_md.j2      ← 单一模板（含全部条件分支）\r\n└── scripts/\r\n    └── render.py         ← 渲染脚本（jinja2 依赖）\r\n```\r\n\r\n**渲染流程**：收集用户回答 → 构造 params dict → 调 `render.py` 输出到目标仓库根目录的临时文件 `<repo>/.kinema-claude.draft.md` → 与既有 `CLAUDE.md` 比对 → 决定写入策略 → 清理临时文件。\r\n\r\n**临时文件位置**：始终在目标仓库根目录，命名 `.kinema-claude.draft.md`（以 `.` 开头便于 .gitignore 屏蔽）。流程结束后必须删除。\r\n\r\n---\r\n\r\n## 产出范围\r\n\r\nCLAUDE.md 会包含以下章节（依据用户回答动态裁剪）：\r\n\r\n1. 核心原则（三阶 / 两阶矩阵）\r\n2. 测试路径三层命名规则 + 拆分规则 + 数据目录\r\n3. Agent 自动行为规范\r\n4. 网络边界规则\r\n5. 依赖声明（A/B/C 三种模式之一）\r\n6. Conftest / Fixture 治理\r\n7. 覆盖率门槛 + 强制点（A/B/C/D 四种之一）\r\n8. 各阶段测试编写规范（含前端 testenv Playwright e2e 子节）\r\n9. 快速参考命令\r\n10. Commit message（A/B/C 三种之一）\r\n11. 前端包管理器（如有前端）\r\n12. Python 编码规范（可选，由 Q12 控制；与前后端解耦）——含配置唯一入口规则（§.2.1，由 Q15 决定配置来源示例）\r\n\r\n---\r\n\r\n## 何时拒绝 / 何时进入升级模式\r\n\r\n**拒绝条件**：仓库主要源码包含 **非 Python 且非 TS/JS 的语言**（顶层包里有 Go / Rust / Java / C++ 等）。零散脚本或 `.md` 文件不算。告知用户：\"本规范目前只覆盖 Python + TS/JS，检测到 X 语言，无法生成。\"\r\n\r\n**升级模式**：目标仓库现有 `CLAUDE.md` 已包含 `<!-- kinema-tdd-injector: injected -->` 标记。这种情况**不拒绝**，进入升级模式：\r\n1. 告知用户检测到既有注入，问是否要升级。读取头部 `injector-version:` 标识符并与本 SKILL.md 当前 `version` 比对；若旧版本低于当前，进入升级模式时告知版本差异（如\"检测到 v1.3.0，当前 v1.4.0，建议升级\"）。无该标识符（更早产物）按未知旧版处理。\r\n2. 同意后，从既有 CLAUDE.md 中**反解**上次的回答（覆盖率阈值、依赖模式、commit 风格、强制点、包管理器、自动触发设置、testenv 本地运行许可、配置来源），作为问卷默认值。\r\n3. 用户回车即沿用旧值，输入新值即覆盖。\r\n4. 反解失败的字段回退到出厂默认。\r\n\r\n---\r\n\r\n## 工作流\r\n\r\n### 步骤 1 —— 确认目标仓库与语言栈\r\n\r\n请用户确认**目标仓库根目录**（默认：当前工作目录）。扫描：\r\n\r\n- 顶层文件和目录\r\n- 最多 3 层深度内的所有 `pyproject.toml`、`package.json`、`Cargo.toml`、`go.mod`、`pom.xml`、`build.gradle`、`*.csproj`\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` / `build.gradle` / `*.csproj`，立即拒绝。\r\n\r\n### 步骤 2 —— 发现顶层包\r\n\r\n**不要**默认 `backend/` + `frontend/`。通过文件标志发现：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json`（且有 `tsconfig.json` 或 `.ts` / `.tsx` 文件） → TS/JS 包\r\n- 仅 `package.json` 无 TS → 纯 JS 包\r\n\r\n探测源码根：\r\n- Python：读 `pyproject.toml` 的包配置；否则寻找含 `__init__.py` 的目录\r\n- TS/JS：读 `package.json` 的 `main` / `module`；否则回退 `src/`\r\n\r\n向用户列出并确认。\r\n\r\n### 步骤 2.5 —— 检测测试根目录\r\n\r\n本规范统一使用 `tests/`。扫描根目录：\r\n- 已有 `tests/` → 沿用\r\n- 已有 `test/` / `__tests__/` / `spec/` / `specs/` → **必须询问用户**：\r\n  > 检测到根目录已有 `{{现有目录}}/`，但本规范要求 `tests/`。请选择：\r\n  > A. 仍按规范写入 CLAUDE.md（`tests/` 为目标，迁移留给后续）  (推荐)\r\n  > B. 让本 skill 现在就 `git mv {{现有目录}} tests` 后再生成\r\n  > C. 中止\r\n- 无任何测试目录 → 不询问，直接按 `tests/` 写入\r\n\r\n### 步骤 3 —— 按前后端存在性分支\r\n\r\ntestenv 阶段是否启用，由 `testenv_integration` 控制（前后端可各自有第三阶）：启用且有后端 → 后端 API e2e；启用且有前端 → 前端 Playwright GUI e2e。\r\n\r\n- **Python + TS/JS** → 完整三阶（后端 API e2e + 前端 Playwright e2e）\r\n- **仅 Python** → Python 侧完整三阶，模板渲染时 `frontend=False`\r\n- **仅 TS/JS** → 询问是否启用前端 testenv e2e：\r\n  > 未检测到 Python 后端包。是否为前端启用 testenv 阶段（Playwright GUI e2e，连**外部部署的真实后端 + 真实库**）？\r\n  > A. 启用前端 testenv e2e（三阶；`testenv_integration=true`，写 `tests/testenv-integration/<frontend_pkg>/*.spec.ts`）  (推荐)\r\n  > B. 仅两阶（unit + dev-integration；`testenv_integration=false`）\r\n  > C. 中止\r\n\r\n**前端 testenv e2e 的 Playwright MCP 前提**：当用户启用前端 testenv（无论纯前端还是 monorepo），编写/调试 Playwright e2e 通常需要 **Playwright MCP**（交互式驱动真实浏览器辅助生成选择器）。该 MCP 一般由系统/运行环境**已提供**；若检测不到（工具列表中无 Playwright MCP），**提醒用户安装 Playwright MCP** 后再进行 e2e 编写。注入流程本身不被阻塞——这只是后续写 e2e 的前提提示。\r\n\r\n### 步骤 4 —— 确认输出语言\r\n\r\n> 是否使用中文写入 CLAUDE.md？（默认：是）\r\n\r\n若用户选英文，渲染后由 Claude 翻译。模板本身仅支持中文（章节标题、表头），翻译可在渲染后做后处理。\r\n\r\n### 步骤 5 —— 参数问卷\r\n\r\n| # | 问题 | 默认 |\r\n|---|------|------|\r\n| Q1 | 自动测试触发时机（多选）：bug 修复后 / 新功能开发完成 / 重构导致接口变更 | 全选 |\r\n| Q2 | 自动触发哪些阶段：仅 unit / unit + dev-integration | unit + dev-integration |\r\n| Q3 | 依赖声明模式：A 单源 pyproject / B pyproject + 编译 requirements / C 仅 requirements | B |\r\n| Q4 | 后端覆盖率总阈值 | 80 |\r\n| Q5 | 后端每文件覆盖率兜底 | 50 |\r\n| Q6 | 前端覆盖率总阈值 | 60 |\r\n| Q7 | 前端每文件覆盖率兜底 | 50 |\r\n| Q8 | 强制点：A 本地 hook / B 仅 CI / C 双保险 / D 不强制 | A |\r\n| Q9 | Commit 风格：A CC 中文 / B CC 英文 / C 自由 | A |\r\n| Q10 | 前端包管理器：pnpm / npm / yarn / bun | pnpm |\r\n| Q11 | AI 协作署名加入 commit footer | 是 |\r\n| Q12 | 是否注入 Python 编码规范章节 | 是 |\r\n| Q13 | 后端 testenv 是否允许在开发本地运行（仅当 backend 且 testenv_integration）。许可 → Agent 在复杂 Plan 任务完成时自动跑一次；否则用户在测试服务器手动执行 | 否 |\r\n| Q14 | 前端 testenv（Playwright e2e）是否允许在开发本地运行（仅当 frontend 且 testenv_integration） | 否 |\r\n| Q15 | 配置注入来源（仅当 `python_standards`）：A `.env`+环境变量 / B TOML / C YAML | A |\r\n\r\n无前端 → 跳 Q6 Q7 Q10 Q14。无后端 → 跳 Q3 Q4 Q5 Q13。**无 testenv 阶段（`testenv_integration=false`）→ Q13 Q14 都跳过**。升级模式下：以反解的旧值替代默认。\r\n\r\n**Q15 仅当 `python_standards=true` 时提问**（与配置唯一入口规则 §{{ ps }}.2.1 配套），决定模板渲染哪种 `BaseSettings` 加载示例：A→`config_source=\"env\"`、B→`\"toml\"`、C→`\"yaml\"`。**用户若选预制三项之外的组合模式**（如\"环境变量优先 + TOML 兜底\"），把 `config_source` 置为描述该组合的字符串（如 `\"env+toml\"`），模板会渲染占位说明，**并由你在注入流程中当场为该项目写出对应的 `config.py` 存储 / 加载方案**（在 `settings_customise_sources` 内显式排序多个 source），写入产物后再继续。`python_standards=false` 时不提问，`config_source` 不写入（模板 `| default('env')` 兜底，但该章节本身不渲染）。\r\n\r\n**Q12 始终提问，与前后端存在性无关**——该章节为 package-agnostic 的语义级编码规范，渲染门 `python_standards` 与 `backend` 解耦，纯前端仓库也可注入。\r\n\r\n### 步骤 6 —— 构造 params 并渲染\r\n\r\n把问卷答案 + 步骤 1–3 探测结果整合为 params dict，写入 `<repo>/.kinema-params.tmp.json`。例：\r\n\r\n```json\r\n{\r\n  \"backend\": true,\r\n  \"frontend\": true,\r\n  \"testenv_integration\": true,\r\n  \"testenv_backend_local\": false,\r\n  \"testenv_frontend_local\": false,\r\n  \"injector_version\": \"1.4.0\",\r\n  \"backend_pkg\": \"backend\",\r\n  \"backend_src_root\": \"app\",\r\n  \"frontend_pkg\": \"frontend\",\r\n  \"frontend_src_root\": \"src\",\r\n  \"frontend_pkg_manager\": \"pnpm\",\r\n  \"frontend_lockfile\": \"pnpm-lock.yaml\",\r\n  \"pkg_list\": \"backend (Python), frontend (TypeScript)\",\r\n  \"pkg_list_inline\": \"`backend/`、`frontend/`\",\r\n  \"source_root_list\": \"`backend/app/`、`frontend/src/`\",\r\n  \"auto_trigger_events\": [\"bug 修复后\", \"新功能开发完成\", \"重构导致接口变更\"],\r\n  \"auto_trigger_stages\": [\"unit\", \"dev-integration\"],\r\n  \"dep_mode\": \"B\",\r\n  \"backend_cov_total\": 80,\r\n  \"backend_cov_per_file\": 50,\r\n  \"frontend_cov_total\": 60,\r\n  \"frontend_cov_per_file\": 50,\r\n  \"enforcement\": \"A\",\r\n  \"commit_style\": \"A\",\r\n  \"ai_signature\": true,\r\n  \"python_standards\": true,\r\n  \"config_source\": \"env\"\r\n}\r\n```\r\n\r\n- `injector_version` 取本 SKILL.md frontmatter 的 `version`（当前 `1.4.0`），写入产物头部 `injector-version:` 标识符，供升级时比对。\r\n- `testenv_backend_local` / `testenv_frontend_local` 来自 Q13 / Q14；被跳过的题按默认 `false` 填入（模板对未提供项也用 `| default(false)` 兜底，但应显式写入便于升级反解）。\r\n\r\n**渲染命令**（在 skill 目录下执行；`uv run --with` 自动管理 jinja2 依赖）：\r\n\r\n```bash\r\nuv run --with jinja2 python \"<skill_root>/scripts/render.py\" \\\r\n  --target claude \\\r\n  --params \"<repo>/.kinema-params.tmp.json\" \\\r\n  --out \"<repo>/.kinema-claude.draft.md\"\r\n```\r\n\r\n若 `uv` 不可用，报告错误并让用户安装 `uv`（https://docs.astral.sh/uv/getting-started/installation/）后重试。不允许直接调用 `python`。\r\n\r\n### 步骤 7 —— 与既有 CLAUDE.md 对比 + 写入\r\n\r\n读 `<repo>/.kinema-claude.draft.md` 与 `<repo>/CLAUDE.md`（若存在）：\r\n\r\n**Case 1：无既有 CLAUDE.md**\r\n→ 直接 `mv .kinema-claude.draft.md CLAUDE.md`，删除 `.kinema-params.tmp.json`。\r\n\r\n**Case 2：既有 CLAUDE.md，无冲突**\r\n\r\n冲突判定：既有文件含**任一**以下迹象 → 视为冲突\r\n- 标题含\"测试\" / \"test\" / \"TDD\" / \"pytest\" / \"vitest\" / \"覆盖率\" / \"coverage\" / \"conftest\" / \"fixture\"\r\n- 标题与本次注入的 H1/H2/H3 完全一致\r\n\r\n无冲突 → 直接将 draft 内容**追加**到既有 CLAUDE.md 末尾（前后加一行 `---` 分隔），删除临时文件，告知用户已追加。\r\n\r\n**Case 3：既有 CLAUDE.md 有冲突**\r\n\r\n向用户呈现 diff 摘要：\r\n\r\n```\r\n检测到既有 CLAUDE.md 与本次注入存在冲突章节：\r\n\r\n【既有保留】不冲突的章节将原样保留：\r\n  - \"## CodeGraph 使用\"\r\n  - \"## 业务域常识\"\r\n\r\n【冲突需协商】以下章节既存在于既有 CLAUDE.md 又会被本次注入：\r\n  - \"## 测试规范\"  → 旧 xxx 行 / 新 yyy 行\r\n  - \"## Commit Message\"\r\n\r\n请选择融合方法：\r\n  A. 用本次注入覆盖既有冲突章节，保留不冲突章节\r\n  B. 在文件末尾追加本次注入全文，旧规则保留（可能出现规则重复 / 矛盾）\r\n  C. 让我看完整 diff 后再决定\r\n  D. 中止\r\n```\r\n\r\n依据用户选择写入。Case A 实施时：解析既有 markdown 的 H2/H3 章节边界，定位冲突章节区间，整段替换为 draft 中对应区间内容；非冲突章节原样保留。\r\n\r\n### 步骤 8 —— 清理 + 注入后提示\r\n\r\n无论哪条路径，最后都必须：\r\n- 删除 `<repo>/.kinema-claude.draft.md`\r\n- 删除 `<repo>/.kinema-params.tmp.json`\r\n\r\n然后输出：\r\n\r\n```\r\n✅ CLAUDE.md 已生成 / 更新。\r\n\r\n下一步：现有 tests/ 目录可能不符合新规范。本 skill 不自动迁移，\r\n建议你接下来：\r\n\r\n  1. 让 Claude 审计 tests/ 目录违规项（命名、目录结构、conftest 分层、fixture 命名）\r\n  2. 分批迁移：每批 commit 一次，先后端再前端\r\n  3. 迁移完成后启用 git hook（如果你选了强制点 A 或 C）\r\n\r\n需要现在就开始审计吗？\r\n```\r\n\r\n除非用户明确同意，**不要**自行开始审计 / 迁移。\r\n\r\n---\r\n\r\n## 输出格式硬约束\r\n\r\n- CLAUDE.md 第一行必须是 `<!-- kinema-tdd-injector: injected -->`\r\n- 例子里所有路径用发现的顶层包名（不要写死 `backend` / `frontend`）\r\n- 章节编号保持稳定\r\n\r\n## 失败模式\r\n\r\n- **0 个包**：报告并请用户手动声明 / 中止\r\n- **5+ 个包**（monorepo）：列出包名并请用户筛选要纳入规范的包\r\n- **render.py 失败**（jinja2 未装 / 模板语法错）：报告完整 stderr，让用户确认 `uv` 可用后重试。不允许直接调用 `python`\r\n\r\n## 升级模式反解规则（简要）\r\n\r\n升级模式下需从既有 CLAUDE.md 反解出旧参数，对应正则 / 字符串匹配建议：\r\n\r\n| 参数 | 反解方式 |\r\n|---|---|\r\n| `backend_cov_total` | 搜索\"≥ NN%\" 在\"后端\"行附近 |\r\n| `frontend_cov_total` | 同上\"前端\"行 |\r\n| `dep_mode` | 看 §5 是否提到\"requirements.txt\"、\"uv pip compile\"、\"pyproject.toml 唯一\" |\r\n| `enforcement` | 看 §7.4 标题文本是 \"本地 git hook\" / \"CI\" / \"双保险\" / \"不设强制点\" |\r\n| `commit_style` | 看 §10 是中文标题还是英文，或含\"自由格式\" |\r\n| `frontend_pkg_manager` | 看 §11 提到的工具名 |\r\n| `ai_signature` | 看是否含 \"Co-Authored-By\" |\r\n| `python_standards` | 检测既有 CLAUDE.md 是否含 \"## ... Python 编码规范\" 标题 → true，否则 false |\r\n| `config_source` | 看 §{{ ps }}.2.1 \"本项目配置来源\"措辞：含\"环境变量 + `.env`\" → `env`；含\"TOML\" → `toml`；含\"YAML\" → `yaml`；否则取其标注的自定义组合字符串。无该子节（旧版产物）→ 默认 `env` |\r\n| `testenv_backend_local` | 看 §3.3 后端块措辞：含\"允许…开发本地运行\"/\"Agent…自动执行\" → true；\"用户在测试服务器手动执行\"/\"Agent **不得**自行执行\" → false |\r\n| `testenv_frontend_local` | 看 §3.3 前端块措辞，规则同上 |\r\n| `injector_version` | 从头部 `<!-- ... injector-version: X -->` 标识符提取；与当前 SKILL.md `version` 比对，旧版本 < 当前则提示\"建议升级到 vX\"。无标识符 → 视为未知旧版 |\r\n\r\n反解不到的字段，直接回退到出厂默认（同步骤 5 的默认列）。`testenv_*_local` 反解不到时默认 `false`。\n\nFile v1.4.1:README.md\n\n# Kinema TDD Injector\n\n一次性 TDD 方法论注入器，同时支持 Claude Code、Codex 与 OpenClaw：\n\n- Claude Code 生成或升级根级 `CLAUDE.md`\n- Codex 生成或升级根级 `AGENTS.md`\n- 两端共享同一套问卷、Jinja2 模板、冲突合并和升级反解规则\n\n## 核心特性\n\n> 对话式问卷 → 平台化渲染 → 与既有持久指令智能融合 → 开箱即用的 TDD 规范\n\n### 三阶测试体系\n\n| 阶段 | 跑什么 | 何时跑 |\n|------|--------|--------|\n| **unit** | 单文件纯函数 / 类 | 每次保存 |\n| **dev-integration** | 跨模块真实依赖（数据库 / 文件系统） | 提交前 |\n| **testenv-integration** | 后端 API e2e + 前端 Playwright GUI e2e | 按问卷配置自动或手动执行 |\n\n此外包含分层 conftest、fixture 治理、网络/IO 边界、覆盖率门槛、Commit message 规范和可选\nPython 编码规范。\n\n## 安装\n\n### Claude Code\n\n```text\n/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace\n/plugin install kinema-tdd-injector@kinema-skills-marketplace\n```\n\n### Codex\n\n```bash\ncodex plugin marketplace add KinemaClawWorkspace/kinema-skills-marketplace\ncodex plugin add kinema-tdd-injector@kinema-skills-marketplace\n```\n\n安装或更新后开启一个新会话，让客户端加载新的 skill。\n\n### OpenClaw\n\n```bash\nopenclaw skills install kinema-tdd-injector\n```\n\n## 触发方式\n\n```text\n把测试规范注入到这个仓库\ninit tdd standard here\nset up testing methodology\nimport kinema's test rules\n升级已有的 Kinema TDD 规范\n```\n\n首次使用需读取 [references/ONBOARDING.md](references/ONBOARDING.md)。\n\n## 双端实现\n\n共享渲染器通过 target 选择输出平台：\n\n```bash\nuv run --with jinja2 python scripts/render.py --target claude --params params.json --out CLAUDE.md\nuv run --with jinja2 python scripts/render.py --target codex --params params.json --out AGENTS.md\n```\n\n`--target` 默认为 `claude`，因此现有 Claude/OpenClaw 调用保持兼容。\n\n## 文件结构\n\n```text\nkinema-tdd-injector/\n├── .claude-plugin/plugin.json       # Claude Code 清单\n├── .codex-plugin/plugin.json        # Codex 清单\n├── skills/kinema-tdd-injector/      # Codex skill 适配层\n├── SKILL.md                          # Claude/OpenClaw 完整工作流\n├── assets/claude_md.j2               # 双端共享模板\n├── scripts/render.py                 # --target claude|codex\n├── evals/evals.json\n└── references/ONBOARDING.md\n```\n\n## 作者\n\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\n\n## 许可证\n\n[GNU General Public License v3.0](LICENSE)\n\nFile v1.4.1:_meta.json\n\n{\n  \"ownerId\": \"kn7cjsf9pc9x1tmreq1dahs90s83p9y0\",\n  \"slug\": \"kinema-tdd-injector\",\n  \"version\": \"1.4.1\",\n  \"publishedAt\": 1784187739607\n}\n\nFile v1.4.1:references/ONBOARDING.md\n\n# Kinema TDD Injector Onboarding\n\n> 本文档指导 AI Agent 完成 Claude Code 与 Codex 共用渲染环境的首次检查。\n\n## Prerequisites | 前置条件\n\n- `uv` 包管理器\n- 目标仓库为 Python 或 TypeScript/JavaScript 项目\n\n## Step 1: 检测 Jinja2\n\n```bash\nuv run --with jinja2 python -c \"import jinja2; print(jinja2.__version__)\"\n```\n\n无需手动安装 jinja2，`uv run --with` 会自动处理依赖。\n\n## Step 2: 验证共享模板\n\n确认插件根目录存在 `assets/claude_md.j2`。该文件是 Claude/Codex 共用模板，渲染器会按\n`--target` 注入平台名称、指令文件名和 co-author 身份。\n\n```bash\nuv run --with jinja2 python -c \"\nfrom jinja2 import FileSystemLoader, Environment\nenv = Environment(loader=FileSystemLoader('<plugin_root>/assets'))\ntemplate = env.get_template('claude_md.j2')\nprint('template loaded:', template.name)\n\"\n```\n\n## Step 3: 验证渲染器\n\n```bash\nuv run --with jinja2 python <plugin_root>/scripts/render.py --help\n```\n\n渲染目标：\n\n```bash\n# Claude Code（默认 target，显式写出便于审计）\nuv run --with jinja2 python <plugin_root>/scripts/render.py \\\n  --target claude \\\n  --params <repo>/.kinema-params.tmp.json \\\n  --out <repo>/.kinema-claude.draft.md\n\n# Codex\nuv run --with jinja2 python <plugin_root>/scripts/render.py \\\n  --target codex \\\n  --params <repo>/.kinema-params.tmp.json \\\n  --out <repo>/.kinema-agents.draft.md\n```\n\n参数 JSON 支持 UTF-8 与带 BOM 的 UTF-8；最终输出统一为无 BOM UTF-8。\n\n## Step 4: 目标仓库语言检测\n\n使用本 skill 时，Agent 会自动扫描目标仓库：\n\n- 含 `pyproject.toml` → Python 包\n- 含 `package.json` + `tsconfig.json` → TypeScript 包\n- 含 `package.json` 无 TS → JavaScript 包\n\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` → **拒绝执行**（规范仅支持 Python + TS/JS）。\n\n## Troubleshooting | 故障排除\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| `ModuleNotFoundError: No module named 'jinja2'` | uv 未正确调用 | 确认使用 `uv run --with jinja2` |\n| `TemplateNotFound: claude_md.j2` | 模板路径错误 | 从插件根目录定位 `assets/`，不要从 Codex skill 子目录猜测路径 |\n| `JSONDecodeError` | 参数文件不是有效 JSON | 确认文件为 UTF-8/UTF-8 BOM 且没有尾随逗号 |\n| `SyntaxError` in render.py | Python 版本过低 | 升级 Python 或通过 `uv python install` 管理 |\n| 目标仓库含 Go/Rust | 规范不支持 | 告知用户本规范仅支持 Python + TS/JS |\n\nFile v1.4.1:skill-card.md\n\n## Description:\n\nGenerates or upgrades persistent repository instructions that encode Kinema's TDD methodology for Python and TypeScript/JavaScript projects.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[leeshunee](https://clawhub.ai/user/leeshunee)\n\n### License/Terms of Use:\n\nGNU General Public License v3.0\n\n## Use Case:\n\nDevelopers and engineering teams use this skill to initialize or upgrade repository-level TDD guidance before implementation work. It produces tailored agent instruction files for supported Python and TypeScript/JavaScript repositories.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill writes persistent repository agent instructions that can influence future agent behavior.\n\nMitigation: Confirm the exact target file and review the generated diff before accepting changes.\n\nRisk: The skill can write application configuration code when a custom configuration source is requested.\n\nMitigation: Avoid the custom config.py path unless you explicitly want application code changed.\n\nRisk: The renderer depends on Jinja2 at execution time.\n\nMitigation: Use a pinned or locked Jinja2 environment when running the renderer.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/leeshunee/skills/kinema-tdd-injector)\n- [README](artifact/README.md)\n- [Kinema TDD Injector Onboarding](artifact/references/ONBOARDING.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown instruction file content with supporting shell commands and configuration guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Writes persistent repository agent instructions after target detection, questionnaire input, rendering, and diff review.]\n\n## Skill Version(s):\n\n1.4.1 (source: SKILL.md frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.4.1:evals/evals.json\n\n{\r\n  \"skill_name\": \"kinema-tdd-injector\",\r\n  \"evals\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"pure-python-backend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml。没有前端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 backend（Python）\",\r\n        \"无前端时按用户选择 frontend 字段填 false\",\r\n        \"渲染时 frontend 相关块全部隐藏\",\r\n        \"生成的 CLAUDE.md 不包含 pnpm / vitest / frontend 字样\",\r\n        \"包含 tests/testenv-integration/backend/ 阶段（除非用户明确禁用）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"name\": \"pure-ts-frontend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 frontend/ 包，里面有 src/ 源码根、package.json 和 pnpm-lock.yaml。没有后端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 frontend\",\r\n        \"渲染时 backend 相关块全部隐藏\",\r\n        \"纯前端可启用 testenv e2e（Playwright，连外部部署的真实后端 + 真实库）；testenv_integration 由用户选择，不强制 false\",\r\n        \"生成的 CLAUDE.md 不包含 uv / pyproject 字样\",\r\n        \"若启用 testenv，出现 tests/testenv-integration/frontend/ 与 *.spec.ts，且连接配置/库内容由测试系统提供（不硬编码）\",\r\n        \"若用户选两阶（testenv_integration=false），则不出现第三阶，且 §1 说明前端仅有 unit + dev-integration\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"name\": \"monorepo-standard\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/（app/ + pyproject.toml）和 frontend/（src/ + package.json + pnpm-lock.yaml）。\",\r\n      \"expected_behavior\": [\r\n        \"识别出 backend + frontend 两个包\",\r\n        \"backend_pkg=backend, frontend_pkg=frontend\",\r\n        \"backend_src_root=app, frontend_src_root=src\",\r\n        \"frontend_pkg_manager=pnpm\",\r\n        \"渲染的 CLAUDE.md 同时包含两栈的规范\",\r\n        \"三阶测试体系完整呈现\",\r\n        \"前端出现 Playwright e2e 第三阶：tests/testenv-integration/frontend/<journey>.spec.ts，且 §2.6 标注 1:1 对齐豁免\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 4,\r\n      \"name\": \"monorepo-nonstandard-names\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 server/（src/ + pyproject.toml）和 web/（lib/ + package.json + yarn.lock）。\",\r\n      \"expected_behavior\": [\r\n        \"识别 backend_pkg=server, frontend_pkg=web\",\r\n        \"backend_src_root=src, frontend_src_root=lib\",\r\n        \"frontend_pkg_manager=yarn\",\r\n        \"frontend_lockfile=yarn.lock\",\r\n        \"tests/unit/server/ 与 tests/unit/web/ 在 CLAUDE.md 中出现\",\r\n        \"不假设标准名 backend/frontend\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 5,\r\n      \"name\": \"existing-claude-md-merge\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，内容是一段 50 行的项目背景介绍（与测试规范无关）。\",\r\n      \"expected_behavior\": [\r\n        \"渲染到临时文件 CLAUDE.md.kinema.draft.md\",\r\n        \"对比现有 CLAUDE.md，检测无语义冲突（项目背景 vs 测试规范）\",\r\n        \"向用户确认追加策略后追加\",\r\n        \"保留 marker 注释 <!-- kinema-tdd-injector: injected --> 以支持后续 upgrade\",\r\n        \"不覆盖用户已有内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 6,\r\n      \"name\": \"third-party-language-reject\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 go.mod、main.go、cmd/、internal/。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 Go 语言\",\r\n        \"直接拒绝，不进入问卷\",\r\n        \"告知用户：本 skill 仅支持 Python + TypeScript\",\r\n        \"不生成任何文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 7,\r\n      \"name\": \"upgrade-mode\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，文件顶部含 marker <!-- kinema-tdd-injector: injected --> 与上次参数 JSON 块。\",\r\n      \"expected_behavior\": [\r\n        \"识别 upgrade 模式\",\r\n        \"解析旧参数 JSON 作为问卷默认值\",\r\n        \"向用户展示'保留旧值还是修改'选项\",\r\n        \"渲染后整体替换 marker 区块，而非追加\",\r\n        \"保留 marker 外的用户内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 8,\r\n      \"name\": \"test-root-conflict\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库根目录已存在 test/（单数）目录，里面有用户自定义测试。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 test/ 与 skill 默认的 tests/ 冲突\",\r\n        \"向用户确认：是改用现有 test/、迁移到 tests/、还是中止\",\r\n        \"若用户选'保留 test/'，模板里的所有 tests/ 路径替换为 test/\",\r\n        \"不擅自做文件移动，仅生成规范文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 9,\r\n      \"name\": \"python-standards-injection\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml，没有前端。问卷进行到 Q12「是否注入 Python 编码规范章节」时，用户选「是」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷中出现 Q12「是否注入 Python 编码规范章节」，且无条件提问（即使没有前端也照样问）\",\r\n        \"构造的 params 含 python_standards: true\",\r\n        \"渲染的 CLAUDE.md 末尾包含「Python 编码规范」章节\",\r\n        \"该章节包含关键字 SecretStr、_secret_string、ruff、pydantic、from_domain、G004\",\r\n        \"因仅有后端，该章节编号为「## 11. Python 编码规范」\",\r\n        \"若用户在 Q12 选「否」，则 python_standards: false，渲染结果完全不含该章节，且章节号无断档（停在 §10 Commit）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\n      \"id\": 10,\n      \"name\": \"testenv-local-permission-and-config-ownership\",\r\n      \"prompt\": \"为这个 monorepo 生成 CLAUDE.md。仓库结构：backend/（app/ + pyproject.toml）+ frontend/（src/ + package.json + pnpm-lock.yaml）。启用 testenv 阶段。问卷 Q13（后端 testenv 本地运行）选「是」，Q14（前端 Playwright e2e 本地运行）选「否」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷分别提问 Q13（后端 testenv 本地运行）与 Q14（前端 testenv 本地运行），互不绑定\",\r\n        \"构造 params 含 testenv_backend_local: true、testenv_frontend_local: false、injector_version 取当前版本\",\r\n        \"后端 testenv 块渲染为'允许本地运行 / Agent 在复杂 Plan 任务完成时自动跑一次'，不含'Agent 不得自行执行'\",\r\n        \"前端 testenv 块渲染为'用户手动 / 测试系统执行'，含'Agent 不得自行执行'\",\r\n        \"§3.3 含配置归属铁律：DB/外部连接配置与库 seed 由测试系统提供，禁止硬编码、禁止依赖开发本地配置\",\r\n        \"testenv e2e 触发时机为'复杂 Plan 任务完成时'，且仅在本地许可时自动触发，不进每次提交链\",\r\n        \"头部 injector-version 标识符与当前 SKILL.md version 一致\"\r\n      ],\n      \"files\": []\n    },\n    {\n      \"id\": 11,\n      \"name\": \"codex-agents-md-target\",\n      \"prompt\": \"使用 Codex 为这个 Python + TypeScript monorepo 注入 Kinema TDD 规范。\",\n      \"expected_behavior\": [\n        \"读取 skills/kinema-tdd-injector/SKILL.md 后继续完整读取根级 SKILL.md 与 references/ONBOARDING.md\",\n        \"调用 render.py 时显式传入 --target codex\",\n        \"草稿路径为 .kinema-agents.draft.md，最终写入根级 AGENTS.md\",\n        \"不创建、不读取为升级源且不修改 CLAUDE.md\",\n        \"渲染结果标题包含 AGENTS.md，适用对象包含 Codex\",\n        \"扫描并保留子目录 AGENTS.md 的就近覆盖语义\",\n        \"AI 协作署名启用时使用 Codex <codex@openai.com>\"\n      ],\n      \"files\": []\n    }\n  ]\r\n}\n\nFile v1.4.1:LICENSE\n\nGNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n                            Preamble\r\n\r\n  The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n  The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works.  By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users.  We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors.  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n  To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights.  Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received.  You must make sure that they, too, receive\r\nor can get the source code.  And you must show them these terms so they\r\nknow their rights.\r\n\r\n  Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n  For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software.  For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n  Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so.  This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software.  The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable.  Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts.  If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n  Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary.  To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n                       TERMS AND CONDITIONS\r\n\r\n  0. Definitions.\r\n\r\n  \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n  \"The Program\" refers to any copyrightable work licensed under this\r\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n  To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy.  The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n  A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n  To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy.  Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n  To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies.  Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n  An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License.  If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n  1. Source Code.\r\n\r\n  The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it.  \"Object code\" means any non-source\r\nform of a work.\r\n\r\n  A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n  The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form.  A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n  The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities.  However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work.  For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n  The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n  The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n  2. Basic Permissions.\r\n\r\n  All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met.  This License explicitly affirms your unlimited\r\npermission to run the unmodified Program.  The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work.  This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n  You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force.  You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright.  Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n  Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below.  Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n  No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n  When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n  4. Conveying Verbatim Copies.\r\n\r\n  You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n  You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n  5. Conveying Modified Source Versions.\r\n\r\n  You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n    a) The work must carry prominent notices stating that you modified\r\n    it, and giving a relevant date.\r\n\r\n    b) The work must carry prominent notices stating that it is\r\n    released under this License and any conditions added under section\r\n    7.  This requirement modifies the requirement in section 4 to\r\n    \"keep intact all notices\".\r\n\r\n    c) You must license the entire work, as a whole, under this\r\n    License to anyone who comes into possession of a copy.  This\r\n    License will therefore apply, along with any applicable section 7\r\n    additional terms, to the whole of the work, and all its parts,\r\n    regardless of how they are packaged.  This License gives no\r\n    permission to license the work in any other way, but it does not\r\n    invalidate such permission if you have separately received it.\r\n\r\n    d) If the work has interactive user interfaces, each must display\r\n    Appropriate Legal Notices; however, if the Program has interactive\r\n    interfaces that do not display Appropriate Legal Notices, your\r\n    work need not make them do so.\r\n\r\n  A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit.  Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n  6. Conveying Non-Source Forms.\r\n\r\n  You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n    a) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by the\r\n    Corresponding Source fixed on a durable physical medium\r\n    customarily used for software interchange.\r\n\r\n    b) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by a\r\n    written offer, valid for at least three years and valid for as\r\n    long as you offer spare parts or customer support for that product\r\n    model, to give anyone who possesses the object code either (1) a\r\n    copy of the Corresponding Source for all the software in the\r\n    product that is covered by this License, on a durable physical\r\n    medium customarily used for software interchange, for a price no\r\n    more than your reasonable cost of physically performing this\r\n    conveying of source, or (2) access to copy the\r\n    Corresponding Source from a network server at no charge.\r\n\r\n    c) Convey individual copies of the object code with a copy of the\r\n    written offer to provide the Corresponding Source.  This\r\n    alternative is allowed only occasionally and noncommercially, and\r\n    only if you received the object code with such an offer, in accord\r\n    with subsection 6b.\r\n\r\n    d) Convey the object code by offering access from a designated\r\n    place (gratis or for a charge), and offer equivalent access to the\r\n    Corresponding Source in the same way through the same place at no\r\n    further charge.  You need not require recipients to copy the\r\n    Corresponding Source along with the object code.  If the place to\r\n    copy the object code is a network server, the Corresponding Source\r\n    may be on a different server (operated by you or a third party)\r\n    that supports equivalent copying facilities, provided you maintain\r\n    clear directions next to the object code saying where to find the\r\n    Corresponding Source.  Regardless of what server hosts the\r\n    Corresponding Source, you remain obligated to ensure that it is\r\n    available for as long as needed to satisfy these requirements.\r\n\r\n    e) Convey the object code using peer-to-peer transmission, provided\r\n    you inform other peers where the object code and Corresponding\r\n    Source of the work are being offered to the general public at no\r\n    charge under subsection 6d.\r\n\r\n  A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n  A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling.  In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage.  For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product.  A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n  \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source.  The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n  If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information.  But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n  The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed.  Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n  Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n  7. Additional Terms.\r\n\r\n  \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law.  If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n  When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit.  (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.)  You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n  Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n    a) Disclaiming warranty or limiting liability differently from the\r\n    terms of sections 15 and 16 of this License; or\r\n\r\n    b) Requiring preservation of specified reasonable legal notices or\r\n    author attributions in that material or in the Appropriate Legal\r\n    Notices displayed by works containing it; or\r\n\r\n    c) Prohibiting misrepresentation of the origin of that material, or\r\n    requiring that modified versions of such material be marked in\r\n    reasonable ways as different from the original version; or\r\n\r\n    d) Limiting the use for publicity purposes of names of licensors or\r\n    authors of the material; or\r\n\r\n    e) Declining to grant rights under trademark law for use of some\r\n    trade names, trademarks, or service marks; or\r\n\r\n    f) Requiring indemnification of licensors and authors of that\r\n    material by anyone who conveys the material (or modified versions of\r\n    it) with contractual assumptions of liability to the recipient, for\r\n    any liability that these contractual assumptions directly impose on\r\n    those licensors and authors.\r\n\r\n  All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10.  If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term.  If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n  If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n  Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n  8. Termination.\r\n\r\n  You may not propagate or modify a covered work except as expressly\r\nprovided under this License.  Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n  However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n  Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n  Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License.  If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n  9. Acceptance Not Required for Having Copies.\r\n\r\n  You are not required to accept this License in order to receive or\r\nrun a copy of the Program.  Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance.  However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work.  These actions infringe copyright if you do\r\nnot accept this License.  Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n  10. Automatic Licensing of Downstream Recipients.\r\n\r\n  Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License.  You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n  An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations.  If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n  You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License.  For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n  11. Patents.\r\n\r\n  A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based.  The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n  A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version.  For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n  In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement).  To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n  If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients.  \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n  If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n  A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License.  You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n  Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n  12. No Surrender of Others' Freedom.\r\n\r\n  If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all.  For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n  13. Use with the GNU Affero General Public License.\r\n\r\n  Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work.  The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n  14. Revised Versions of this License.\r\n\r\n  The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time.  Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n  Each version is given a distinguishing version number.  If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation.  If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n  If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n  Later license versions may give you additional or different\r\npermissions.  However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n  15. Disclaimer of Warranty.\r\n\r\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. Limitation of Liability.\r\n\r\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n  17. Interpretation of Sections 15 and 16.\r\n\r\n  If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n                     END OF TERMS AND CONDITIONS\r\n\r\n            How to Apply These Terms to Your New Programs\r\n\r\n  If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n  To do so, attach the following notices to the program.  It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the program's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n  If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n    <program>  Copyright (C) <year>  <name of author>\r\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n    This is free software, and you are welcome to redistribute it\r\n    under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License.  Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n  You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n<https://www.gnu.org/licenses/>.\r\n\r\n  The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs.  If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library.  If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License.  But first, please read\r\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n\nArchive v1.4.0: 8 files, 28684 bytes\n\nFiles: evals/evals.json (7458b), LICENSE (35823b), README.md (3226b), references/ONBOARDING.md (2394b), scripts/render.py (1544b), skill-card.md (2692b), SKILL.md (16471b), _meta.json (138b)\n\nFile v1.4.0:SKILL.md\n\n---\r\nname: kinema-tdd-injector\r\ndisplayName: \"Kinema's TDD Injector (CLAUDE.md generator)\"\r\nversion: 1.4.0\r\ndescription: |\r\n  一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定。每个仓库只运行一次——这**不是**开发期间的常驻助手。当用户说出诸如 \"把测试规范注入到这个仓库\" / \"init tdd standard here\" / \"set up testing methodology\" / \"import kinema's test rules\" 之类的话时，请主动提及本 skill。如果检测到仓库已被注入过，进入升级模式而非拒绝。\r\n---\r\n\r\n# Kinema TDD 方法论注入器\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n- **GitHub**: https://github.com/KinemaClawWorkspace/kinema-tdd-injector\r\n\r\n## ⚠️ Before First Use | 首次使用必读\r\n\r\n**首次使用此 skill 前，必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**\r\n\r\n- **首次配置** → 读取 references/ONBOARDING.md 完成全部步骤\r\n- **环境不可用**（jinja2 未安装、模板加载失败）→ 读取 references/ONBOARDING.md Troubleshooting 排查修复\r\n- **配置完成后** → 直接使用下方工作流\r\n\r\n一次性生成器，为目标仓库写入一份定制的 `CLAUDE.md`。**每个仓库仅运行一次**（升级除外），**不是**开发期间的助手。\r\n\r\n## 渲染机制\r\n\r\n本 skill 使用 **Jinja2 模板**渲染：\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── SKILL.md              ← 你正在读\r\n├── assets/\r\n│   └── claude_md.j2      ← 单一模板（含全部条件分支）\r\n└── scripts/\r\n    └── render.py         ← 渲染脚本（jinja2 依赖）\r\n```\r\n\r\n**渲染流程**：收集用户回答 → 构造 params dict → 调 `render.py` 输出到目标仓库根目录的临时文件 `<repo>/.kinema-claude.draft.md` → 与既有 `CLAUDE.md` 比对 → 决定写入策略 → 清理临时文件。\r\n\r\n**临时文件位置**：始终在目标仓库根目录，命名 `.kinema-claude.draft.md`（以 `.` 开头便于 .gitignore 屏蔽）。流程结束后必须删除。\r\n\r\n---\r\n\r\n## 产出范围\r\n\r\nCLAUDE.md 会包含以下章节（依据用户回答动态裁剪）：\r\n\r\n1. 核心原则（三阶 / 两阶矩阵）\r\n2. 测试路径三层命名规则 + 拆分规则 + 数据目录\r\n3. Agent 自动行为规范\r\n4. 网络边界规则\r\n5. 依赖声明（A/B/C 三种模式之一）\r\n6. Conftest / Fixture 治理\r\n7. 覆盖率门槛 + 强制点（A/B/C/D 四种之一）\r\n8. 各阶段测试编写规范（含前端 testenv Playwright e2e 子节）\r\n9. 快速参考命令\r\n10. Commit message（A/B/C 三种之一）\r\n11. 前端包管理器（如有前端）\r\n12. Python 编码规范（可选，由 Q12 控制；与前后端解耦）——含配置唯一入口规则（§.2.1，由 Q15 决定配置来源示例）\r\n\r\n---\r\n\r\n## 何时拒绝 / 何时进入升级模式\r\n\r\n**拒绝条件**：仓库主要源码包含 **非 Python 且非 TS/JS 的语言**（顶层包里有 Go / Rust / Java / C++ 等）。零散脚本或 `.md` 文件不算。告知用户：\"本规范目前只覆盖 Python + TS/JS，检测到 X 语言，无法生成。\"\r\n\r\n**升级模式**：目标仓库现有 `CLAUDE.md` 已包含 `<!-- kinema-tdd-injector: injected -->` 标记。这种情况**不拒绝**，进入升级模式：\r\n1. 告知用户检测到既有注入，问是否要升级。读取头部 `injector-version:` 标识符并与本 SKILL.md 当前 `version` 比对；若旧版本低于当前，进入升级模式时告知版本差异（如\"检测到 v1.3.0，当前 v1.4.0，建议升级\"）。无该标识符（更早产物）按未知旧版处理。\r\n2. 同意后，从既有 CLAUDE.md 中**反解**上次的回答（覆盖率阈值、依赖模式、commit 风格、强制点、包管理器、自动触发设置、testenv 本地运行许可、配置来源），作为问卷默认值。\r\n3. 用户回车即沿用旧值，输入新值即覆盖。\r\n4. 反解失败的字段回退到出厂默认。\r\n\r\n---\r\n\r\n## 工作流\r\n\r\n### 步骤 1 —— 确认目标仓库与语言栈\r\n\r\n请用户确认**目标仓库根目录**（默认：当前工作目录）。扫描：\r\n\r\n- 顶层文件和目录\r\n- 最多 3 层深度内的所有 `pyproject.toml`、`package.json`、`Cargo.toml`、`go.mod`、`pom.xml`、`build.gradle`、`*.csproj`\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` / `build.gradle` / `*.csproj`，立即拒绝。\r\n\r\n### 步骤 2 —— 发现顶层包\r\n\r\n**不要**默认 `backend/` + `frontend/`。通过文件标志发现：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json`（且有 `tsconfig.json` 或 `.ts` / `.tsx` 文件） → TS/JS 包\r\n- 仅 `package.json` 无 TS → 纯 JS 包\r\n\r\n探测源码根：\r\n- Python：读 `pyproject.toml` 的包配置；否则寻找含 `__init__.py` 的目录\r\n- TS/JS：读 `package.json` 的 `main` / `module`；否则回退 `src/`\r\n\r\n向用户列出并确认。\r\n\r\n### 步骤 2.5 —— 检测测试根目录\r\n\r\n本规范统一使用 `tests/`。扫描根目录：\r\n- 已有 `tests/` → 沿用\r\n- 已有 `test/` / `__tests__/` / `spec/` / `specs/` → **必须询问用户**：\r\n  > 检测到根目录已有 `{{现有目录}}/`，但本规范要求 `tests/`。请选择：\r\n  > A. 仍按规范写入 CLAUDE.md（`tests/` 为目标，迁移留给后续）  (推荐)\r\n  > B. 让本 skill 现在就 `git mv {{现有目录}} tests` 后再生成\r\n  > C. 中止\r\n- 无任何测试目录 → 不询问，直接按 `tests/` 写入\r\n\r\n### 步骤 3 —— 按前后端存在性分支\r\n\r\ntestenv 阶段是否启用，由 `testenv_integration` 控制（前后端可各自有第三阶）：启用且有后端 → 后端 API e2e；启用且有前端 → 前端 Playwright GUI e2e。\r\n\r\n- **Python + TS/JS** → 完整三阶（后端 API e2e + 前端 Playwright e2e）\r\n- **仅 Python** → Python 侧完整三阶，模板渲染时 `frontend=False`\r\n- **仅 TS/JS** → 询问是否启用前端 testenv e2e：\r\n  > 未检测到 Python 后端包。是否为前端启用 testenv 阶段（Playwright GUI e2e，连**外部部署的真实后端 + 真实库**）？\r\n  > A. 启用前端 testenv e2e（三阶；`testenv_integration=true`，写 `tests/testenv-integration/<frontend_pkg>/*.spec.ts`）  (推荐)\r\n  > B. 仅两阶（unit + dev-integration；`testenv_integration=false`）\r\n  > C. 中止\r\n\r\n**前端 testenv e2e 的 Playwright MCP 前提**：当用户启用前端 testenv（无论纯前端还是 monorepo），编写/调试 Playwright e2e 通常需要 **Playwright MCP**（交互式驱动真实浏览器辅助生成选择器）。该 MCP 一般由系统/运行环境**已提供**；若检测不到（工具列表中无 Playwright MCP），**提醒用户安装 Playwright MCP** 后再进行 e2e 编写。注入流程本身不被阻塞——这只是后续写 e2e 的前提提示。\r\n\r\n### 步骤 4 —— 确认输出语言\r\n\r\n> 是否使用中文写入 CLAUDE.md？（默认：是）\r\n\r\n若用户选英文，渲染后由 Claude 翻译。模板本身仅支持中文（章节标题、表头），翻译可在渲染后做后处理。\r\n\r\n### 步骤 5 —— 参数问卷\r\n\r\n| # | 问题 | 默认 |\r\n|---|------|------|\r\n| Q1 | 自动测试触发时机（多选）：bug 修复后 / 新功能开发完成 / 重构导致接口变更 | 全选 |\r\n| Q2 | 自动触发哪些阶段：仅 unit / unit + dev-integration | unit + dev-integration |\r\n| Q3 | 依赖声明模式：A 单源 pyproject / B pyproject + 编译 requirements / C 仅 requirements | B |\r\n| Q4 | 后端覆盖率总阈值 | 80 |\r\n| Q5 | 后端每文件覆盖率兜底 | 50 |\r\n| Q6 | 前端覆盖率总阈值 | 60 |\r\n| Q7 | 前端每文件覆盖率兜底 | 50 |\r\n| Q8 | 强制点：A 本地 hook / B 仅 CI / C 双保险 / D 不强制 | A |\r\n| Q9 | Commit 风格：A CC 中文 / B CC 英文 / C 自由 | A |\r\n| Q10 | 前端包管理器：pnpm / npm / yarn / bun | pnpm |\r\n| Q11 | AI 协作署名加入 commit footer | 是 |\r\n| Q12 | 是否注入 Python 编码规范章节 | 是 |\r\n| Q13 | 后端 testenv 是否允许在开发本地运行（仅当 backend 且 testenv_integration）。许可 → Agent 在复杂 Plan 任务完成时自动跑一次；否则用户在测试服务器手动执行 | 否 |\r\n| Q14 | 前端 testenv（Playwright e2e）是否允许在开发本地运行（仅当 frontend 且 testenv_integration） | 否 |\r\n| Q15 | 配置注入来源（仅当 `python_standards`）：A `.env`+环境变量 / B TOML / C YAML | A |\r\n\r\n无前端 → 跳 Q6 Q7 Q10 Q14。无后端 → 跳 Q3 Q4 Q5 Q13。**无 testenv 阶段（`testenv_integration=false`）→ Q13 Q14 都跳过**。升级模式下：以反解的旧值替代默认。\r\n\r\n**Q15 仅当 `python_standards=true` 时提问**（与配置唯一入口规则 §{{ ps }}.2.1 配套），决定模板渲染哪种 `BaseSettings` 加载示例：A→`config_source=\"env\"`、B→`\"toml\"`、C→`\"yaml\"`。**用户若选预制三项之外的组合模式**（如\"环境变量优先 + TOML 兜底\"），把 `config_source` 置为描述该组合的字符串（如 `\"env+toml\"`），模板会渲染占位说明，**并由你在注入流程中当场为该项目写出对应的 `config.py` 存储 / 加载方案**（在 `settings_customise_sources` 内显式排序多个 source），写入产物后再继续。`python_standards=false` 时不提问，`config_source` 不写入（模板 `| default('env')` 兜底，但该章节本身不渲染）。\r\n\r\n**Q12 始终提问，与前后端存在性无关**——该章节为 package-agnostic 的语义级编码规范，渲染门 `python_standards` 与 `backend` 解耦，纯前端仓库也可注入。\r\n\r\n### 步骤 6 —— 构造 params 并渲染\r\n\r\n把问卷答案 + 步骤 1–3 探测结果整合为 params dict，写入 `<repo>/.kinema-params.tmp.json`。例：\r\n\r\n```json\r\n{\r\n  \"backend\": true,\r\n  \"frontend\": true,\r\n  \"testenv_integration\": true,\r\n  \"testenv_backend_local\": false,\r\n  \"testenv_frontend_local\": false,\r\n  \"injector_version\": \"1.4.0\",\r\n  \"backend_pkg\": \"backend\",\r\n  \"backend_src_root\": \"app\",\r\n  \"frontend_pkg\": \"frontend\",\r\n  \"frontend_src_root\": \"src\",\r\n  \"frontend_pkg_manager\": \"pnpm\",\r\n  \"frontend_lockfile\": \"pnpm-lock.yaml\",\r\n  \"pkg_list\": \"backend (Python), frontend (TypeScript)\",\r\n  \"pkg_list_inline\": \"`backend/`、`frontend/`\",\r\n  \"source_root_list\": \"`backend/app/`、`frontend/src/`\",\r\n  \"auto_trigger_events\": [\"bug 修复后\", \"新功能开发完成\", \"重构导致接口变更\"],\r\n  \"auto_trigger_stages\": [\"unit\", \"dev-integration\"],\r\n  \"dep_mode\": \"B\",\r\n  \"backend_cov_total\": 80,\r\n  \"backend_cov_per_file\": 50,\r\n  \"frontend_cov_total\": 60,\r\n  \"frontend_cov_per_file\": 50,\r\n  \"enforcement\": \"A\",\r\n  \"commit_style\": \"A\",\r\n  \"ai_signature\": true,\r\n  \"python_standards\": true,\r\n  \"config_source\": \"env\"\r\n}\r\n```\r\n\r\n- `injector_version` 取本 SKILL.md frontmatter 的 `version`（当前 `1.4.0`），写入产物头部 `injector-version:` 标识符，供升级时比对。\r\n- `testenv_backend_local` / `testenv_frontend_local` 来自 Q13 / Q14；被跳过的题按默认 `false` 填入（模板对未提供项也用 `| default(false)` 兜底，但应显式写入便于升级反解）。\r\n\r\n**渲染命令**（在 skill 目录下执行；`uv run --with` 自动管理 jinja2 依赖）：\r\n\r\n```bash\r\nuv run --with jinja2 python \"<skill_root>/scripts/render.py\" \\\r\n  --params \"<repo>/.kinema-params.tmp.json\" \\\r\n  --out \"<repo>/.kinema-claude.draft.md\"\r\n```\r\n\r\n若 `uv` 不可用，报告错误并让用户安装 `uv`（https://docs.astral.sh/uv/getting-started/installation/）后重试。不允许直接调用 `python`。\r\n\r\n### 步骤 7 —— 与既有 CLAUDE.md 对比 + 写入\r\n\r\n读 `<repo>/.kinema-claude.draft.md` 与 `<repo>/CLAUDE.md`（若存在）：\r\n\r\n**Case 1：无既有 CLAUDE.md**\r\n→ 直接 `mv .kinema-claude.draft.md CLAUDE.md`，删除 `.kinema-params.tmp.json`。\r\n\r\n**Case 2：既有 CLAUDE.md，无冲突**\r\n\r\n冲突判定：既有文件含**任一**以下迹象 → 视为冲突\r\n- 标题含\"测试\" / \"test\" / \"TDD\" / \"pytest\" / \"vitest\" / \"覆盖率\" / \"coverage\" / \"conftest\" / \"fixture\"\r\n- 标题与本次注入的 H1/H2/H3 完全一致\r\n\r\n无冲突 → 直接将 draft 内容**追加**到既有 CLAUDE.md 末尾（前后加一行 `---` 分隔），删除临时文件，告知用户已追加。\r\n\r\n**Case 3：既有 CLAUDE.md 有冲突**\r\n\r\n向用户呈现 diff 摘要：\r\n\r\n```\r\n检测到既有 CLAUDE.md 与本次注入存在冲突章节：\r\n\r\n【既有保留】不冲突的章节将原样保留：\r\n  - \"## CodeGraph 使用\"\r\n  - \"## 业务域常识\"\r\n\r\n【冲突需协商】以下章节既存在于既有 CLAUDE.md 又会被本次注入：\r\n  - \"## 测试规范\"  → 旧 xxx 行 / 新 yyy 行\r\n  - \"## Commit Message\"\r\n\r\n请选择融合方法：\r\n  A. 用本次注入覆盖既有冲突章节，保留不冲突章节\r\n  B. 在文件末尾追加本次注入全文，旧规则保留（可能出现规则重复 / 矛盾）\r\n  C. 让我看完整 diff 后再决定\r\n  D. 中止\r\n```\r\n\r\n依据用户选择写入。Case A 实施时：解析既有 markdown 的 H2/H3 章节边界，定位冲突章节区间，整段替换为 draft 中对应区间内容；非冲突章节原样保留。\r\n\r\n### 步骤 8 —— 清理 + 注入后提示\r\n\r\n无论哪条路径，最后都必须：\r\n- 删除 `<repo>/.kinema-claude.draft.md`\r\n- 删除 `<repo>/.kinema-params.tmp.json`\r\n\r\n然后输出：\r\n\r\n```\r\n✅ CLAUDE.md 已生成 / 更新。\r\n\r\n下一步：现有 tests/ 目录可能不符合新规范。本 skill 不自动迁移，\r\n建议你接下来：\r\n\r\n  1. 让 Claude 审计 tests/ 目录违规项（命名、目录结构、conftest 分层、fixture 命名）\r\n  2. 分批迁移：每批 commit 一次，先后端再前端\r\n  3. 迁移完成后启用 git hook（如果你选了强制点 A 或 C）\r\n\r\n需要现在就开始审计吗？\r\n```\r\n\r\n除非用户明确同意，**不要**自行开始审计 / 迁移。\r\n\r\n---\r\n\r\n## 输出格式硬约束\r\n\r\n- CLAUDE.md 第一行必须是 `<!-- kinema-tdd-injector: injected -->`\r\n- 例子里所有路径用发现的顶层包名（不要写死 `backend` / `frontend`）\r\n- 章节编号保持稳定\r\n\r\n## 失败模式\r\n\r\n- **0 个包**：报告并请用户手动声明 / 中止\r\n- **5+ 个包**（monorepo）：列出包名并请用户筛选要纳入规范的包\r\n- **render.py 失败**（jinja2 未装 / 模板语法错）：报告完整 stderr，让用户确认 `uv` 可用后重试。不允许直接调用 `python`\r\n\r\n## 升级模式反解规则（简要）\r\n\r\n升级模式下需从既有 CLAUDE.md 反解出旧参数，对应正则 / 字符串匹配建议：\r\n\r\n| 参数 | 反解方式 |\r\n|---|---|\r\n| `backend_cov_total` | 搜索\"≥ NN%\" 在\"后端\"行附近 |\r\n| `frontend_cov_total` | 同上\"前端\"行 |\r\n| `dep_mode` | 看 §5 是否提到\"requirements.txt\"、\"uv pip compile\"、\"pyproject.toml 唯一\" |\r\n| `enforcement` | 看 §7.4 标题文本是 \"本地 git hook\" / \"CI\" / \"双保险\" / \"不设强制点\" |\r\n| `commit_style` | 看 §10 是中文标题还是英文，或含\"自由格式\" |\r\n| `frontend_pkg_manager` | 看 §11 提到的工具名 |\r\n| `ai_signature` | 看是否含 \"Co-Authored-By\" |\r\n| `python_standards` | 检测既有 CLAUDE.md 是否含 \"## ... Python 编码规范\" 标题 → true，否则 false |\r\n| `config_source` | 看 §{{ ps }}.2.1 \"本项目配置来源\"措辞：含\"环境变量 + `.env`\" → `env`；含\"TOML\" → `toml`；含\"YAML\" → `yaml`；否则取其标注的自定义组合字符串。无该子节（旧版产物）→ 默认 `env` |\r\n| `testenv_backend_local` | 看 §3.3 后端块措辞：含\"允许…开发本地运行\"/\"Agent…自动执行\" → true；\"用户在测试服务器手动执行\"/\"Agent **不得**自行执行\" → false |\r\n| `testenv_frontend_local` | 看 §3.3 前端块措辞，规则同上 |\r\n| `injector_version` | 从头部 `<!-- ... injector-version: X -->` 标识符提取；与当前 SKILL.md `version` 比对，旧版本 < 当前则提示\"建议升级到 vX\"。无标识符 → 视为未知旧版 |\r\n\r\n反解不到的字段，直接回退到出厂默认（同步骤 5 的默认列）。`testenv_*_local` 反解不到时默认 `false`。\n\nFile v1.4.0:README.md\n\n# Kinema TDD Injector\r\n\r\n一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论。\r\n\r\n## 核心特性\r\n\r\n> **一句话**：对话式问卷 → 渲染定制 CLAUDE.md → 与既有文件智能融合 → 开箱即用的 TDD 规范\r\n\r\n### 三阶测试体系\r\n\r\n| 阶段 | 跑什么 | 何时跑 |\r\n|------|--------|--------|\r\n| **unit** | 单文件纯函数 / 类 | 每次保存 |\r\n| **dev-integration** | 跨模块真实依赖（数据库 / 文件系统） | 提交前 |\r\n| **testenv-integration** | 后端 API e2e（直连真实库）+ 前端 Playwright GUI e2e（连真实后端 + 真实库） | 连接配置由测试系统提供；本地许可时复杂任务完成自动触发，否则用户手动 |\r\n\r\n### Commit Hook 强制网关\r\n\r\n覆盖率不达标，commit 直接拦截。支持 `pre-commit` 本地 hook、CI 远端校验、双保险三种强制模式。\r\n\r\n### 无痛升级\r\n\r\n- **一键融合既有 CLAUDE.md** — 自动检测冲突章节，智能合并，非冲突内容原样保留\r\n- **一键更新 KDD 版本** — 反解上次问卷答案作为默认值，回车即沿用，无需重新填写\r\n\r\n### 规范全家桶\r\n\r\n分层 conftest 架构 · 网络/IO 边界规范 · 测试路径三层命名 · Fixture 治理规则 · 覆盖率门槛配置 · Commit message 规范 · 前端 Playwright GUI e2e（连真实后端 + 真实库，配置归属测试系统）\r\n\r\n## 安装\r\n\r\n### 方法一：通过 Claude Code Marketplace\r\n\r\n1. 添加 Marketplace：\r\n\r\n```\r\n/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace\r\n```\r\n\r\n2. 安装 Skill：\r\n\r\n```\r\n/plugin install kinema-tdd-injector@kinema-skills-marketplace\r\n```\r\n\r\n1. 查看已安装的 Skill：\r\n\r\n```\r\n/plugin list\r\n```\r\n\r\n### 方法二：通过 ClawHub OpenClaw\r\n\r\n```bash\r\nopenclaw skills install kinema-tdd-injector\r\n```\r\n\r\n## 适用场景\r\n\r\n| 场景 | 说明 |\r\n|------|------|\r\n| 新仓库初始化 | 对话式问卷 → 一键生成完整 TDD 规范 |\r\n| 已有仓库注入 | 智能检测既有 CLAUDE.md，冲突章节协商合并 |\r\n| 版本升级 | 反解旧参数，回车沿用，一键更新到最新 KDD 规范 |\r\n\r\n## 触发方式\r\n\r\n本 skill 为 OpenClaw/Claude Code 技能，安装后可通过对话触发：\r\n\r\n```\r\n把测试规范注入到这个仓库\r\ninit tdd standard here\r\nset up testing methodology\r\nimport kinema's test rules\r\n```\r\n\r\n首次使用需完成 [references/ONBOARDING.md](references/ONBOARDING.md) 环境配置（安装 jinja2）。\r\n\r\n## 文件结构\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── .claude-plugin/\r\n│   └── plugin.json       # Claude Code 插件清单\r\n├── SKILL.md              # Skill 定义文件\r\n├── assets/\r\n│   └── claude_md.j2      # Jinja2 模板\r\n├── scripts/\r\n│   └── render.py         # 渲染脚本\r\n├── evals/\r\n│   └── evals.json        # 评估配置\r\n└── references/\r\n    └── ONBOARDING.md     # 首次配置引导\r\n```\r\n\r\n## 作者\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n\r\n## 许可证\r\n\r\n[GNU General Public License v3.0](LICENSE)\n\nFile v1.4.0:_meta.json\n\n{\n  \"ownerId\": \"kn7cjsf9pc9x1tmreq1dahs90s83p9y0\",\n  \"slug\": \"kinema-tdd-injector\",\n  \"version\": \"1.4.0\",\n  \"publishedAt\": 1780561105045\n}\n\nFile v1.4.0:references/ONBOARDING.md\n\n# Kinema TDD Injector Onboarding\r\n\r\n> 本文档指导 AI Agent 完成首次环境配置。按顺序执行，遇到问题时参考 Troubleshooting。\r\n\r\n## Prerequisites | 前置条件\r\n\r\n- `uv` 包管理器\r\n- 目标仓库为 Python 或 TypeScript/JavaScript 项目\r\n\r\n## Step 1: 检测 Jinja2\r\n\r\n### 检测\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"import jinja2; print(jinja2.__version__)\"\r\n```\r\n\r\n**期望输出**: 版本号（如 `3.1.2`）\r\n\r\n无需手动安装 jinja2，`uv run --with` 会自动处理依赖。\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"import jinja2; print('✅ jinja2 ready')\"\r\n```\r\n\r\n## Step 2: 验证模板文件\r\n\r\n### 检测\r\n\r\n```bash\r\nls <skill_dir>/assets/claude_md.j2\r\n```\r\n\r\n**期望输出**: 文件路径\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"\r\nfrom jinja2 import FileSystemLoader, Environment\r\nenv = Environment(loader=FileSystemLoader('<skill_dir>/assets'))\r\ntemplate = env.get_template('claude_md.j2')\r\nprint('✅ template loaded')\r\n\"\r\n```\r\n\r\n## Step 3: 测试渲染脚本\r\n\r\n### 检测\r\n\r\n```bash\r\nls <skill_dir>/scripts/render.py\r\n```\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python <skill_dir>/scripts/render.py --help\r\n```\r\n\r\n**期望输出**: 帮助信息或无错误退出\r\n\r\n## Step 4: 目标仓库语言检测\r\n\r\n使用本 skill 时，Agent 会自动扫描目标仓库：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json` + `tsconfig.json` → TypeScript 包\r\n- 含 `package.json` 无 TS → JavaScript 包\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` → **拒绝执行**（规范仅支持 Python + TS/JS）\r\n\r\n## Troubleshooting | 故障排除\r\n\r\n| 错误 | 原因 | 解决方案 |\r\n|------|------|----------|\r\n| `ModuleNotFoundError: No module named 'jinja2'` | uv 未正确调用 | 确认使用 `uv run --with jinja2` |\r\n| `TemplateNotFound: claude_md.j2` | 模板路径错误 | 确认 `<skill_dir>` 正确，检查 `assets/` 目录 |\r\n| `SyntaxError` in render.py | Python 版本过低 | 升级 Python 或通过 `uv python install` 管理 |\r\n| 目标仓库含 Go/Rust | 规范不支持 | 告知用户：\"本规范仅支持 Python + TS/JS\" |\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# 渲染命令（jinja2 由 uv run --with 自动管理）\r\nuv run --with jinja2 python <skill_dir>/scripts/render.py \\\r\n  --params <repo>/.kinema-params.tmp.json \\\r\n  --out <repo>/.kinema-claude.draft.md\r\n```\n\nFile v1.4.0:skill-card.md\n\n## Description: <br>\nGenerates or updates a repository CLAUDE.md file that injects Kinema's TDD methodology, test structure, coverage gates, network and IO boundaries, fixture rules, and related development conventions. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[leeshunee](https://clawhub.ai/user/leeshunee) <br>\n\n### License/Terms of Use: <br>\nGNU General Public License v3.0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering agents use this skill to initialize or upgrade repository-level TDD guidance in CLAUDE.md for supported Python and TypeScript/JavaScript projects. It is intended as a one-time repository instruction injector before normal development work, with an upgrade path for previously injected repositories. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can persistently change repository-level agent instructions in CLAUDE.md. <br>\nMitigation: Review the generated CLAUDE.md diff before accepting changes, especially testing rules, automatic behavior, and enforcement guidance. <br>\nRisk: Optional workflows may change project structure or code through paths such as test directory moves or custom config.py generation. <br>\nMitigation: Avoid git mv and custom configuration-generation paths unless those repository mutations are explicitly intended and reviewed. <br>\nRisk: Generated guidance may introduce testing, coverage, dependency, or commit conventions that conflict with existing project practices. <br>\nMitigation: Use the documented conflict review path for existing CLAUDE.md content and confirm repository owners accept the resulting conventions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/leeshunee/kinema-tdd-injector) <br>\n- [README](README.md) <br>\n- [Onboarding guide](references/ONBOARDING.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance and repository file changes, with shell commands and configuration parameters used during generation] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces persistent CLAUDE.md guidance and temporary render inputs that should be cleaned up after execution.] <br>\n\n## Skill Version(s): <br>\n1.4.0 (source: SKILL.md frontmatter and server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.4.0:evals/evals.json\n\n{\r\n  \"skill_name\": \"kinema-tdd-injector\",\r\n  \"evals\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"pure-python-backend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml。没有前端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 backend（Python）\",\r\n        \"无前端时按用户选择 frontend 字段填 false\",\r\n        \"渲染时 frontend 相关块全部隐藏\",\r\n        \"生成的 CLAUDE.md 不包含 pnpm / vitest / frontend 字样\",\r\n        \"包含 tests/testenv-integration/backend/ 阶段（除非用户明确禁用）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"name\": \"pure-ts-frontend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 frontend/ 包，里面有 src/ 源码根、package.json 和 pnpm-lock.yaml。没有后端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 frontend\",\r\n        \"渲染时 backend 相关块全部隐藏\",\r\n        \"纯前端可启用 testenv e2e（Playwright，连外部部署的真实后端 + 真实库）；testenv_integration 由用户选择，不强制 false\",\r\n        \"生成的 CLAUDE.md 不包含 uv / pyproject 字样\",\r\n        \"若启用 testenv，出现 tests/testenv-integration/frontend/ 与 *.spec.ts，且连接配置/库内容由测试系统提供（不硬编码）\",\r\n        \"若用户选两阶（testenv_integration=false），则不出现第三阶，且 §1 说明前端仅有 unit + dev-integration\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"name\": \"monorepo-standard\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/（app/ + pyproject.toml）和 frontend/（src/ + package.json + pnpm-lock.yaml）。\",\r\n      \"expected_behavior\": [\r\n        \"识别出 backend + frontend 两个包\",\r\n        \"backend_pkg=backend, frontend_pkg=frontend\",\r\n        \"backend_src_root=app, frontend_src_root=src\",\r\n        \"frontend_pkg_manager=pnpm\",\r\n        \"渲染的 CLAUDE.md 同时包含两栈的规范\",\r\n        \"三阶测试体系完整呈现\",\r\n        \"前端出现 Playwright e2e 第三阶：tests/testenv-integration/frontend/<journey>.spec.ts，且 §2.6 标注 1:1 对齐豁免\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 4,\r\n      \"name\": \"monorepo-nonstandard-names\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 server/（src/ + pyproject.toml）和 web/（lib/ + package.json + yarn.lock）。\",\r\n      \"expected_behavior\": [\r\n        \"识别 backend_pkg=server, frontend_pkg=web\",\r\n        \"backend_src_root=src, frontend_src_root=lib\",\r\n        \"frontend_pkg_manager=yarn\",\r\n        \"frontend_lockfile=yarn.lock\",\r\n        \"tests/unit/server/ 与 tests/unit/web/ 在 CLAUDE.md 中出现\",\r\n        \"不假设标准名 backend/frontend\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 5,\r\n      \"name\": \"existing-claude-md-merge\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，内容是一段 50 行的项目背景介绍（与测试规范无关）。\",\r\n      \"expected_behavior\": [\r\n        \"渲染到临时文件 CLAUDE.md.kinema.draft.md\",\r\n        \"对比现有 CLAUDE.md，检测无语义冲突（项目背景 vs 测试规范）\",\r\n        \"向用户确认追加策略后追加\",\r\n        \"保留 marker 注释 <!-- kinema-tdd-injector: injected --> 以支持后续 upgrade\",\r\n        \"不覆盖用户已有内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 6,\r\n      \"name\": \"third-party-language-reject\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 go.mod、main.go、cmd/、internal/。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 Go 语言\",\r\n        \"直接拒绝，不进入问卷\",\r\n        \"告知用户：本 skill 仅支持 Python + TypeScript\",\r\n        \"不生成任何文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 7,\r\n      \"name\": \"upgrade-mode\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，文件顶部含 marker <!-- kinema-tdd-injector: injected --> 与上次参数 JSON 块。\",\r\n      \"expected_behavior\": [\r\n        \"识别 upgrade 模式\",\r\n        \"解析旧参数 JSON 作为问卷默认值\",\r\n        \"向用户展示'保留旧值还是修改'选项\",\r\n        \"渲染后整体替换 marker 区块，而非追加\",\r\n        \"保留 marker 外的用户内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 8,\r\n      \"name\": \"test-root-conflict\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库根目录已存在 test/（单数）目录，里面有用户自定义测试。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 test/ 与 skill 默认的 tests/ 冲突\",\r\n        \"向用户确认：是改用现有 test/、迁移到 tests/、还是中止\",\r\n        \"若用户选'保留 test/'，模板里的所有 tests/ 路径替换为 test/\",\r\n        \"不擅自做文件移动，仅生成规范文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 9,\r\n      \"name\": \"python-standards-injection\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml，没有前端。问卷进行到 Q12「是否注入 Python 编码规范章节」时，用户选「是」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷中出现 Q12「是否注入 Python 编码规范章节」，且无条件提问（即使没有前端也照样问）\",\r\n        \"构造的 params 含 python_standards: true\",\r\n        \"渲染的 CLAUDE.md 末尾包含「Python 编码规范」章节\",\r\n        \"该章节包含关键字 SecretStr、_secret_string、ruff、pydantic、from_domain、G004\",\r\n        \"因仅有后端，该章节编号为「## 11. Python 编码规范」\",\r\n        \"若用户在 Q12 选「否」，则 python_standards: false，渲染结果完全不含该章节，且章节号无断档（停在 §10 Commit）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 10,\r\n      \"name\": \"testenv-local-permission-and-config-ownership\",\r\n      \"prompt\": \"为这个 monorepo 生成 CLAUDE.md。仓库结构：backend/（app/ + pyproject.toml）+ frontend/（src/ + package.json + pnpm-lock.yaml）。启用 testenv 阶段。问卷 Q13（后端 testenv 本地运行）选「是」，Q14（前端 Playwright e2e 本地运行）选「否」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷分别提问 Q13（后端 testenv 本地运行）与 Q14（前端 testenv 本地运行），互不绑定\",\r\n        \"构造 params 含 testenv_backend_local: true、testenv_frontend_local: false、injector_version 取当前版本\",\r\n        \"后端 testenv 块渲染为'允许本地运行 / Agent 在复杂 Plan 任务完成时自动跑一次'，不含'Agent 不得自行执行'\",\r\n        \"前端 testenv 块渲染为'用户手动 / 测试系统执行'，含'Agent 不得自行执行'\",\r\n        \"§3.3 含配置归属铁律：DB/外部连接配置与库 seed 由测试系统提供，禁止硬编码、禁止依赖开发本地配置\",\r\n        \"testenv e2e 触发时机为'复杂 Plan 任务完成时'，且仅在本地许可时自动触发，不进每次提交链\",\r\n        \"头部 injector-version 标识符与当前 SKILL.md version 一致\"\r\n      ],\r\n      \"files\": []\r\n    }\r\n  ]\r\n}\n\nFile v1.4.0:LICENSE\n\nGNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n                            Preamble\r\n\r\n  The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n  The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works.  By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users.  We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors.  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n  To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights.  Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received.  You must make sure that they, too, receive\r\nor can get the source code.  And you must show them these terms so they\r\nknow their rights.\r\n\r\n  Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n  For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software.  For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n  Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so.  This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software.  The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable.  Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts.  If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n  Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary.  To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n                       TERMS AND CONDITIONS\r\n\r\n  0. Definitions.\r\n\r\n  \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n  \"The Program\" refers to any copyrightable work licensed under this\r\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n  To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy.  The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n  A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n  To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy.  Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n  To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies.  Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n  An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License.  If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n  1. Source Code.\r\n\r\n  The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it.  \"Object code\" means any non-source\r\nform of a work.\r\n\r\n  A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n  The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form.  A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n  The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities.  However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work.  For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n  The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n  The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n  2. Basic Permissions.\r\n\r\n  All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met.  This License explicitly affirms your unlimited\r\npermission to run the unmodified Program.  The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work.  This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n  You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force.  You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright.  Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n  Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below.  Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n  No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n  When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n  4. Conveying Verbatim Copies.\r\n\r\n  You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n  You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n  5. Conveying Modified Source Versions.\r\n\r\n  You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n    a) The work must carry prominent notices stating that you modified\r\n    it, and giving a relevant date.\r\n\r\n    b) The work must carry prominent notices stating that it is\r\n    released under this License and any conditions added under section\r\n    7.  This requirement modifies the requirement in section 4 to\r\n    \"keep intact all notices\".\r\n\r\n    c) You must license the entire work, as a whole, under this\r\n    License to anyone who comes into possession of a copy.  This\r\n    License will therefore apply, along with any applicable section 7\r\n    additional terms, to the whole of the work, and all its parts,\r\n    regardless of how they are packaged.  This License gives no\r\n    permission to license the work in any other way, but it does not\r\n    invalidate such permission if you have separately received it.\r\n\r\n    d) If the work has interactive user interfaces, each must display\r\n    Appropriate Legal Notices; however, if the Program has interactive\r\n    interfaces that do not display Appropriate Legal Notices, your\r\n    work need not make them do so.\r\n\r\n  A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit.  Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n  6. Conveying Non-Source Forms.\r\n\r\n  You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n    a) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by the\r\n    Corresponding Source fixed on a durable physical medium\r\n    customarily used for software interchange.\r\n\r\n    b) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by a\r\n    written offer, valid for at least three years and valid for as\r\n    long as you offer spare parts or customer support for that product\r\n    model, to give anyone who possesses the object code either (1) a\r\n    copy of the Corresponding Source for all the software in the\r\n    product that is covered by this License, on a durable physical\r\n    medium customarily used for software interchange, for a price no\r\n    more than your reasonable cost of physically performing this\r\n    conveying of source, or (2) access to copy the\r\n    Corresponding Source from a network server at no charge.\r\n\r\n    c) Convey individual copies of the object code with a copy of the\r\n    written offer to provide the Corresponding Source.  This\r\n    alternative is allowed only occasionally and noncommercially, and\r\n    only if you received the object code with such an offer, in accord\r\n    with subsection 6b.\r\n\r\n    d) Convey the object code by offering access from a designated\r\n    place (gratis or for a charge), and offer equivalent access to the\r\n    Corresponding Source in the same way through the same place at no\r\n    further charge.  You need not require recipients to copy the\r\n    Corresponding Source along with the object code.  If the place to\r\n    copy the object code is a network server, the Corresponding Source\r\n    may be on a different server (operated by you or a third party)\r\n    that supports equivalent copying facilities, provided you maintain\r\n    clear directions next to the object code saying where to find the\r\n    Corresponding Source.  Regardless of what server hosts the\r\n    Corresponding Source, you remain obligated to ensure that it is\r\n    available for as long as needed to satisfy these requirements.\r\n\r\n    e) Convey the object code using peer-to-peer transmission, provided\r\n    you inform other peers where the object code and Corresponding\r\n    Source of the work are being offered to the general public at no\r\n    charge under subsection 6d.\r\n\r\n  A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n  A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling.  In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage.  For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product.  A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n  \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source.  The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n  If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information.  But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n  The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed.  Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n  Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n  7. Additional Terms.\r\n\r\n  \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law.  If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n  When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit.  (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.)  You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n  Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n    a) Disclaiming warranty or limiting liability differently from the\r\n    terms of sections 15 and 16 of this License; or\r\n\r\n    b) Requiring preservation of specified reasonable legal notices or\r\n    author attributions in that material or in the Appropriate Legal\r\n    Notices displayed by works containing it; or\r\n\r\n    c) Prohibiting misrepresentation of the origin of that material, or\r\n    requiring that modified versions of such material be marked in\r\n    reasonable ways as different from the original version; or\r\n\r\n    d) Limiting the use for publicity purposes of names of licensors or\r\n    authors of the material; or\r\n\r\n    e) Declining to grant rights under trademark law for use of some\r\n    trade names, trademarks, or service marks; or\r\n\r\n    f) Requiring indemnification of licensors and authors of that\r\n    material by anyone who conveys the material (or modified versions of\r\n    it) with contractual assumptions of liability to the recipient, for\r\n    any liability that these contractual assumptions directly impose on\r\n    those licensors and authors.\r\n\r\n  All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10.  If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term.  If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n  If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n  Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n  8. Termination.\r\n\r\n  You may not propagate or modify a covered work except as expressly\r\nprovided under this License.  Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n  However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n  Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n  Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License.  If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n  9. Acceptance Not Required for Having Copies.\r\n\r\n  You are not required to accept this License in order to receive or\r\nrun a copy of the Program.  Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance.  However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work.  These actions infringe copyright if you do\r\nnot accept this License.  Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n  10. Automatic Licensing of Downstream Recipients.\r\n\r\n  Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License.  You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n  An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations.  If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n  You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License.  For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n  11. Patents.\r\n\r\n  A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based.  The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n  A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version.  For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n  In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement).  To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n  If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients.  \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n  If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n  A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License.  You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n  Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n  12. No Surrender of Others' Freedom.\r\n\r\n  If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all.  For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n  13. Use with the GNU Affero General Public License.\r\n\r\n  Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work.  The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n  14. Revised Versions of this License.\r\n\r\n  The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time.  Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n  Each version is given a distinguishing version number.  If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation.  If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n  If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n  Later license versions may give you additional or different\r\npermissions.  However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n  15. Disclaimer of Warranty.\r\n\r\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. Limitation of Liability.\r\n\r\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n  17. Interpretation of Sections 15 and 16.\r\n\r\n  If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n                     END OF TERMS AND CONDITIONS\r\n\r\n            How to Apply These Terms to Your New Programs\r\n\r\n  If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n  To do so, attach the following notices to the program.  It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the program's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n  If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n    <program>  Copyright (C) <year>  <name of author>\r\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n    This is free software, and you are welcome to redistribute it\r\n    under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License.  Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n  You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n<https://www.gnu.org/licenses/>.\r\n\r\n  The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs.  If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library.  If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License.  But first, please read\r\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n\nArchive v1.3.0: 8 files, 28165 bytes\n\nFiles: evals/evals.json (7458b), LICENSE (35823b), README.md (3226b), references/ONBOARDING.md (2394b), scripts/render.py (1544b), skill-card.md (2713b), SKILL.md (15231b), _meta.json (138b)\n\nFile v1.3.0:SKILL.md\n\n---\r\nname: kinema-tdd-injector\r\ndisplayName: \"Kinema's TDD Injector (CLAUDE.md generator)\"\r\nversion: 1.3.0\r\ndescription: |\r\n  一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定。每个仓库只运行一次——这**不是**开发期间的常驻助手。当用户说出诸如 \"把测试规范注入到这个仓库\" / \"init tdd standard here\" / \"set up testing methodology\" / \"import kinema's test rules\" 之类的话时，请主动提及本 skill。如果检测到仓库已被注入过，进入升级模式而非拒绝。\r\n---\r\n\r\n# Kinema TDD 方法论注入器\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n- **GitHub**: https://github.com/KinemaClawWorkspace/kinema-tdd-injector\r\n\r\n## ⚠️ Before First Use | 首次使用必读\r\n\r\n**首次使用此 skill 前，必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**\r\n\r\n- **首次配置** → 读取 references/ONBOARDING.md 完成全部步骤\r\n- **环境不可用**（jinja2 未安装、模板加载失败）→ 读取 references/ONBOARDING.md Troubleshooting 排查修复\r\n- **配置完成后** → 直接使用下方工作流\r\n\r\n一次性生成器，为目标仓库写入一份定制的 `CLAUDE.md`。**每个仓库仅运行一次**（升级除外），**不是**开发期间的助手。\r\n\r\n## 渲染机制\r\n\r\n本 skill 使用 **Jinja2 模板**渲染：\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── SKILL.md              ← 你正在读\r\n├── assets/\r\n│   └── claude_md.j2      ← 单一模板（含全部条件分支）\r\n└── scripts/\r\n    └── render.py         ← 渲染脚本（jinja2 依赖）\r\n```\r\n\r\n**渲染流程**：收集用户回答 → 构造 params dict → 调 `render.py` 输出到目标仓库根目录的临时文件 `<repo>/.kinema-claude.draft.md` → 与既有 `CLAUDE.md` 比对 → 决定写入策略 → 清理临时文件。\r\n\r\n**临时文件位置**：始终在目标仓库根目录，命名 `.kinema-claude.draft.md`（以 `.` 开头便于 .gitignore 屏蔽）。流程结束后必须删除。\r\n\r\n---\r\n\r\n## 产出范围\r\n\r\nCLAUDE.md 会包含以下章节（依据用户回答动态裁剪）：\r\n\r\n1. 核心原则（三阶 / 两阶矩阵）\r\n2. 测试路径三层命名规则 + 拆分规则 + 数据目录\r\n3. Agent 自动行为规范\r\n4. 网络边界规则\r\n5. 依赖声明（A/B/C 三种模式之一）\r\n6. Conftest / Fixture 治理\r\n7. 覆盖率门槛 + 强制点（A/B/C/D 四种之一）\r\n8. 各阶段测试编写规范（含前端 testenv Playwright e2e 子节）\r\n9. 快速参考命令\r\n10. Commit message（A/B/C 三种之一）\r\n11. 前端包管理器（如有前端）\r\n12. Python 编码规范（可选，由 Q12 控制；与前后端解耦）\r\n\r\n---\r\n\r\n## 何时拒绝 / 何时进入升级模式\r\n\r\n**拒绝条件**：仓库主要源码包含 **非 Python 且非 TS/JS 的语言**（顶层包里有 Go / Rust / Java / C++ 等）。零散脚本或 `.md` 文件不算。告知用户：\"本规范目前只覆盖 Python + TS/JS，检测到 X 语言，无法生成。\"\r\n\r\n**升级模式**：目标仓库现有 `CLAUDE.md` 已包含 `<!-- kinema-tdd-injector: injected -->` 标记。这种情况**不拒绝**，进入升级模式：\r\n1. 告知用户检测到既有注入，问是否要升级。读取头部 `injector-version:` 标识符并与本 SKILL.md 当前 `version` 比对；若旧版本低于当前，进入升级模式时告知版本差异（如\"检测到 v1.2.1，当前 v1.3.0，建议升级\"）。无该标识符（更早产物）按未知旧版处理。\r\n2. 同意后，从既有 CLAUDE.md 中**反解**上次的回答（覆盖率阈值、依赖模式、commit 风格、强制点、包管理器、自动触发设置、testenv 本地运行许可），作为问卷默认值。\r\n3. 用户回车即沿用旧值，输入新值即覆盖。\r\n4. 反解失败的字段回退到出厂默认。\r\n\r\n---\r\n\r\n## 工作流\r\n\r\n### 步骤 1 —— 确认目标仓库与语言栈\r\n\r\n请用户确认**目标仓库根目录**（默认：当前工作目录）。扫描：\r\n\r\n- 顶层文件和目录\r\n- 最多 3 层深度内的所有 `pyproject.toml`、`package.json`、`Cargo.toml`、`go.mod`、`pom.xml`、`build.gradle`、`*.csproj`\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` / `build.gradle` / `*.csproj`，立即拒绝。\r\n\r\n### 步骤 2 —— 发现顶层包\r\n\r\n**不要**默认 `backend/` + `frontend/`。通过文件标志发现：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json`（且有 `tsconfig.json` 或 `.ts` / `.tsx` 文件） → TS/JS 包\r\n- 仅 `package.json` 无 TS → 纯 JS 包\r\n\r\n探测源码根：\r\n- Python：读 `pyproject.toml` 的包配置；否则寻找含 `__init__.py` 的目录\r\n- TS/JS：读 `package.json` 的 `main` / `module`；否则回退 `src/`\r\n\r\n向用户列出并确认。\r\n\r\n### 步骤 2.5 —— 检测测试根目录\r\n\r\n本规范统一使用 `tests/`。扫描根目录：\r\n- 已有 `tests/` → 沿用\r\n- 已有 `test/` / `__tests__/` / `spec/` / `specs/` → **必须询问用户**：\r\n  > 检测到根目录已有 `{{现有目录}}/`，但本规范要求 `tests/`。请选择：\r\n  > A. 仍按规范写入 CLAUDE.md（`tests/` 为目标，迁移留给后续）  (推荐)\r\n  > B. 让本 skill 现在就 `git mv {{现有目录}} tests` 后再生成\r\n  > C. 中止\r\n- 无任何测试目录 → 不询问，直接按 `tests/` 写入\r\n\r\n### 步骤 3 —— 按前后端存在性分支\r\n\r\ntestenv 阶段是否启用，由 `testenv_integration` 控制（前后端可各自有第三阶）：启用且有后端 → 后端 API e2e；启用且有前端 → 前端 Playwright GUI e2e。\r\n\r\n- **Python + TS/JS** → 完整三阶（后端 API e2e + 前端 Playwright e2e）\r\n- **仅 Python** → Python 侧完整三阶，模板渲染时 `frontend=False`\r\n- **仅 TS/JS** → 询问是否启用前端 testenv e2e：\r\n  > 未检测到 Python 后端包。是否为前端启用 testenv 阶段（Playwright GUI e2e，连**外部部署的真实后端 + 真实库**）？\r\n  > A. 启用前端 testenv e2e（三阶；`testenv_integration=true`，写 `tests/testenv-integration/<frontend_pkg>/*.spec.ts`）  (推荐)\r\n  > B. 仅两阶（unit + dev-integration；`testenv_integration=false`）\r\n  > C. 中止\r\n\r\n**前端 testenv e2e 的 Playwright MCP 前提**：当用户启用前端 testenv（无论纯前端还是 monorepo），编写/调试 Playwright e2e 通常需要 **Playwright MCP**（交互式驱动真实浏览器辅助生成选择器）。该 MCP 一般由系统/运行环境**已提供**；若检测不到（工具列表中无 Playwright MCP），**提醒用户安装 Playwright MCP** 后再进行 e2e 编写。注入流程本身不被阻塞——这只是后续写 e2e 的前提提示。\r\n\r\n### 步骤 4 —— 确认输出语言\r\n\r\n> 是否使用中文写入 CLAUDE.md？（默认：是）\r\n\r\n若用户选英文，渲染后由 Claude 翻译。模板本身仅支持中文（章节标题、表头），翻译可在渲染后做后处理。\r\n\r\n### 步骤 5 —— 参数问卷\r\n\r\n| # | 问题 | 默认 |\r\n|---|------|------|\r\n| Q1 | 自动测试触发时机（多选）：bug 修复后 / 新功能开发完成 / 重构导致接口变更 | 全选 |\r\n| Q2 | 自动触发哪些阶段：仅 unit / unit + dev-integration | unit + dev-integration |\r\n| Q3 | 依赖声明模式：A 单源 pyproject / B pyproject + 编译 requirements / C 仅 requirements | B |\r\n| Q4 | 后端覆盖率总阈值 | 80 |\r\n| Q5 | 后端每文件覆盖率兜底 | 50 |\r\n| Q6 | 前端覆盖率总阈值 | 60 |\r\n| Q7 | 前端每文件覆盖率兜底 | 50 |\r\n| Q8 | 强制点：A 本地 hook / B 仅 CI / C 双保险 / D 不强制 | A |\r\n| Q9 | Commit 风格：A CC 中文 / B CC 英文 / C 自由 | A |\r\n| Q10 | 前端包管理器：pnpm / npm / yarn / bun | pnpm |\r\n| Q11 | AI 协作署名加入 commit footer | 是 |\r\n| Q12 | 是否注入 Python 编码规范章节 | 是 |\r\n| Q13 | 后端 testenv 是否允许在开发本地运行（仅当 backend 且 testenv_integration）。许可 → Agent 在复杂 Plan 任务完成时自动跑一次；否则用户在测试服务器手动执行 | 否 |\r\n| Q14 | 前端 testenv（Playwright e2e）是否允许在开发本地运行（仅当 frontend 且 testenv_integration） | 否 |\r\n\r\n无前端 → 跳 Q6 Q7 Q10 Q14。无后端 → 跳 Q3 Q4 Q5 Q13。**无 testenv 阶段（`testenv_integration=false`）→ Q13 Q14 都跳过**。升级模式下：以反解的旧值替代默认。\r\n\r\n**Q12 始终提问，与前后端存在性无关**——该章节为 package-agnostic 的语义级编码规范，渲染门 `python_standards` 与 `backend` 解耦，纯前端仓库也可注入。\r\n\r\n### 步骤 6 —— 构造 params 并渲染\r\n\r\n把问卷答案 + 步骤 1–3 探测结果整合为 params dict，写入 `<repo>/.kinema-params.tmp.json`。例：\r\n\r\n```json\r\n{\r\n  \"backend\": true,\r\n  \"frontend\": true,\r\n  \"testenv_integration\": true,\r\n  \"testenv_backend_local\": false,\r\n  \"testenv_frontend_local\": false,\r\n  \"injector_version\": \"1.3.0\",\r\n  \"backend_pkg\": \"backend\",\r\n  \"backend_src_root\": \"app\",\r\n  \"frontend_pkg\": \"frontend\",\r\n  \"frontend_src_root\": \"src\",\r\n  \"frontend_pkg_manager\": \"pnpm\",\r\n  \"frontend_lockfile\": \"pnpm-lock.yaml\",\r\n  \"pkg_list\": \"backend (Python), frontend (TypeScript)\",\r\n  \"pkg_list_inline\": \"`backend/`、`frontend/`\",\r\n  \"source_root_list\": \"`backend/app/`、`frontend/src/`\",\r\n  \"auto_trigger_events\": [\"bug 修复后\", \"新功能开发完成\", \"重构导致接口变更\"],\r\n  \"auto_trigger_stages\": [\"unit\", \"dev-integration\"],\r\n  \"dep_mode\": \"B\",\r\n  \"backend_cov_total\": 80,\r\n  \"backend_cov_per_file\": 50,\r\n  \"frontend_cov_total\": 60,\r\n  \"frontend_cov_per_file\": 50,\r\n  \"enforcement\": \"A\",\r\n  \"commit_style\": \"A\",\r\n  \"ai_signature\": true,\r\n  \"python_standards\": true\r\n}\r\n```\r\n\r\n- `injector_version` 取本 SKILL.md frontmatter 的 `version`（当前 `1.3.0`），写入产物头部 `injector-version:` 标识符，供升级时比对。\r\n- `testenv_backend_local` / `testenv_frontend_local` 来自 Q13 / Q14；被跳过的题按默认 `false` 填入（模板对未提供项也用 `| default(false)` 兜底，但应显式写入便于升级反解）。\r\n\r\n**渲染命令**（在 skill 目录下执行；`uv run --with` 自动管理 jinja2 依赖）：\r\n\r\n```bash\r\nuv run --with jinja2 python \"<skill_root>/scripts/render.py\" \\\r\n  --params \"<repo>/.kinema-params.tmp.json\" \\\r\n  --out \"<repo>/.kinema-claude.draft.md\"\r\n```\r\n\r\n若 `uv` 不可用，报告错误并让用户安装 `uv`（https://docs.astral.sh/uv/getting-started/installation/）后重试。不允许直接调用 `python`。\r\n\r\n### 步骤 7 —— 与既有 CLAUDE.md 对比 + 写入\r\n\r\n读 `<repo>/.kinema-claude.draft.md` 与 `<repo>/CLAUDE.md`（若存在）：\r\n\r\n**Case 1：无既有 CLAUDE.md**\r\n→ 直接 `mv .kinema-claude.draft.md CLAUDE.md`，删除 `.kinema-params.tmp.json`。\r\n\r\n**Case 2：既有 CLAUDE.md，无冲突**\r\n\r\n冲突判定：既有文件含**任一**以下迹象 → 视为冲突\r\n- 标题含\"测试\" / \"test\" / \"TDD\" / \"pytest\" / \"vitest\" / \"覆盖率\" / \"coverage\" / \"conftest\" / \"fixture\"\r\n- 标题与本次注入的 H1/H2/H3 完全一致\r\n\r\n无冲突 → 直接将 draft 内容**追加**到既有 CLAUDE.md 末尾（前后加一行 `---` 分隔），删除临时文件，告知用户已追加。\r\n\r\n**Case 3：既有 CLAUDE.md 有冲突**\r\n\r\n向用户呈现 diff 摘要：\r\n\r\n```\r\n检测到既有 CLAUDE.md 与本次注入存在冲突章节：\r\n\r\n【既有保留】不冲突的章节将原样保留：\r\n  - \"## CodeGraph 使用\"\r\n  - \"## 业务域常识\"\r\n\r\n【冲突需协商】以下章节既存在于既有 CLAUDE.md 又会被本次注入：\r\n  - \"## 测试规范\"  → 旧 xxx 行 / 新 yyy 行\r\n  - \"## Commit Message\"\r\n\r\n请选择融合方法：\r\n  A. 用本次注入覆盖既有冲突章节，保留不冲突章节\r\n  B. 在文件末尾追加本次注入全文，旧规则保留（可能出现规则重复 / 矛盾）\r\n  C. 让我看完整 diff 后再决定\r\n  D. 中止\r\n```\r\n\r\n依据用户选择写入。Case A 实施时：解析既有 markdown 的 H2/H3 章节边界，定位冲突章节区间，整段替换为 draft 中对应区间内容；非冲突章节原样保留。\r\n\r\n### 步骤 8 —— 清理 + 注入后提示\r\n\r\n无论哪条路径，最后都必须：\r\n- 删除 `<repo>/.kinema-claude.draft.md`\r\n- 删除 `<repo>/.kinema-params.tmp.json`\r\n\r\n然后输出：\r\n\r\n```\r\n✅ CLAUDE.md 已生成 / 更新。\r\n\r\n下一步：现有 tests/ 目录可能不符合新规范。本 skill 不自动迁移，\r\n建议你接下来：\r\n\r\n  1. 让 Claude 审计 tests/ 目录违规项（命名、目录结构、conftest 分层、fixture 命名）\r\n  2. 分批迁移：每批 commit 一次，先后端再前端\r\n  3. 迁移完成后启用 git hook（如果你选了强制点 A 或 C）\r\n\r\n需要现在就开始审计吗？\r\n```\r\n\r\n除非用户明确同意，**不要**自行开始审计 / 迁移。\r\n\r\n---\r\n\r\n## 输出格式硬约束\r\n\r\n- CLAUDE.md 第一行必须是 `<!-- kinema-tdd-injector: injected -->`\r\n- 例子里所有路径用发现的顶层包名（不要写死 `backend` / `frontend`）\r\n- 章节编号保持稳定\r\n\r\n## 失败模式\r\n\r\n- **0 个包**：报告并请用户手动声明 / 中止\r\n- **5+ 个包**（monorepo）：列出包名并请用户筛选要纳入规范的包\r\n- **render.py 失败**（jinja2 未装 / 模板语法错）：报告完整 stderr，让用户确认 `uv` 可用后重试。不允许直接调用 `python`\r\n\r\n## 升级模式反解规则（简要）\r\n\r\n升级模式下需从既有 CLAUDE.md 反解出旧参数，对应正则 / 字符串匹配建议：\r\n\r\n| 参数 | 反解方式 |\r\n|---|---|\r\n| `backend_cov_total` | 搜索\"≥ NN%\" 在\"后端\"行附近 |\r\n| `frontend_cov_total` | 同上\"前端\"行 |\r\n| `dep_mode` | 看 §5 是否提到\"requirements.txt\"、\"uv pip compile\"、\"pyproject.toml 唯一\" |\r\n| `enforcement` | 看 §7.4 标题文本是 \"本地 git hook\" / \"CI\" / \"双保险\" / \"不设强制点\" |\r\n| `commit_style` | 看 §10 是中文标题还是英文，或含\"自由格式\" |\r\n| `frontend_pkg_manager` | 看 §11 提到的工具名 |\r\n| `ai_signature` | 看是否含 \"Co-Authored-By\" |\r\n| `python_standards` | 检测既有 CLAUDE.md 是否含 \"## ... Python 编码规范\" 标题 → true，否则 false |\r\n| `testenv_backend_local` | 看 §3.3 后端块措辞：含\"允许…开发本地运行\"/\"Agent…自动执行\" → true；\"用户在测试服务器手动执行\"/\"Agent **不得**自行执行\" → false |\r\n| `testenv_frontend_local` | 看 §3.3 前端块措辞，规则同上 |\r\n| `injector_version` | 从头部 `<!-- ... injector-version: X -->` 标识符提取；与当前 SKILL.md `version` 比对，旧版本 < 当前则提示\"建议升级到 vX\"。无标识符 → 视为未知旧版 |\r\n\r\n反解不到的字段，直接回退到出厂默认（同步骤 5 的默认列）。`testenv_*_local` 反解不到时默认 `false`。\n\nFile v1.3.0:README.md\n\n# Kinema TDD Injector\r\n\r\n一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论。\r\n\r\n## 核心特性\r\n\r\n> **一句话**：对话式问卷 → 渲染定制 CLAUDE.md → 与既有文件智能融合 → 开箱即用的 TDD 规范\r\n\r\n### 三阶测试体系\r\n\r\n| 阶段 | 跑什么 | 何时跑 |\r\n|------|--------|--------|\r\n| **unit** | 单文件纯函数 / 类 | 每次保存 |\r\n| **dev-integration** | 跨模块真实依赖（数据库 / 文件系统） | 提交前 |\r\n| **testenv-integration** | 后端 API e2e（直连真实库）+ 前端 Playwright GUI e2e（连真实后端 + 真实库） | 连接配置由测试系统提供；本地许可时复杂任务完成自动触发，否则用户手动 |\r\n\r\n### Commit Hook 强制网关\r\n\r\n覆盖率不达标，commit 直接拦截。支持 `pre-commit` 本地 hook、CI 远端校验、双保险三种强制模式。\r\n\r\n### 无痛升级\r\n\r\n- **一键融合既有 CLAUDE.md** — 自动检测冲突章节，智能合并，非冲突内容原样保留\r\n- **一键更新 KDD 版本** — 反解上次问卷答案作为默认值，回车即沿用，无需重新填写\r\n\r\n### 规范全家桶\r\n\r\n分层 conftest 架构 · 网络/IO 边界规范 · 测试路径三层命名 · Fixture 治理规则 · 覆盖率门槛配置 · Commit message 规范 · 前端 Playwright GUI e2e（连真实后端 + 真实库，配置归属测试系统）\r\n\r\n## 安装\r\n\r\n### 方法一：通过 Claude Code Marketplace\r\n\r\n1. 添加 Marketplace：\r\n\r\n```\r\n/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace\r\n```\r\n\r\n2. 安装 Skill：\r\n\r\n```\r\n/plugin install kinema-tdd-injector@kinema-skills-marketplace\r\n```\r\n\r\n1. 查看已安装的 Skill：\r\n\r\n```\r\n/plugin list\r\n```\r\n\r\n### 方法二：通过 ClawHub OpenClaw\r\n\r\n```bash\r\nopenclaw skills install kinema-tdd-injector\r\n```\r\n\r\n## 适用场景\r\n\r\n| 场景 | 说明 |\r\n|------|------|\r\n| 新仓库初始化 | 对话式问卷 → 一键生成完整 TDD 规范 |\r\n| 已有仓库注入 | 智能检测既有 CLAUDE.md，冲突章节协商合并 |\r\n| 版本升级 | 反解旧参数，回车沿用，一键更新到最新 KDD 规范 |\r\n\r\n## 触发方式\r\n\r\n本 skill 为 OpenClaw/Claude Code 技能，安装后可通过对话触发：\r\n\r\n```\r\n把测试规范注入到这个仓库\r\ninit tdd standard here\r\nset up testing methodology\r\nimport kinema's test rules\r\n```\r\n\r\n首次使用需完成 [references/ONBOARDING.md](references/ONBOARDING.md) 环境配置（安装 jinja2）。\r\n\r\n## 文件结构\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── .claude-plugin/\r\n│   └── plugin.json       # Claude Code 插件清单\r\n├── SKILL.md              # Skill 定义文件\r\n├── assets/\r\n│   └── claude_md.j2      # Jinja2 模板\r\n├── scripts/\r\n│   └── render.py         # 渲染脚本\r\n├── evals/\r\n│   └── evals.json        # 评估配置\r\n└── references/\r\n    └── ONBOARDING.md     # 首次配置引导\r\n```\r\n\r\n## 作者\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n\r\n## 许可证\r\n\r\n[GNU General Public License v3.0](LICENSE)\n\nFile v1.3.0:_meta.json\n\n{\n  \"ownerId\": \"kn7cjsf9pc9x1tmreq1dahs90s83p9y0\",\n  \"slug\": \"kinema-tdd-injector\",\n  \"version\": \"1.3.0\",\n  \"publishedAt\": 1780557018888\n}\n\nFile v1.3.0:references/ONBOARDING.md\n\n# Kinema TDD Injector Onboarding\r\n\r\n> 本文档指导 AI Agent 完成首次环境配置。按顺序执行，遇到问题时参考 Troubleshooting。\r\n\r\n## Prerequisites | 前置条件\r\n\r\n- `uv` 包管理器\r\n- 目标仓库为 Python 或 TypeScript/JavaScript 项目\r\n\r\n## Step 1: 检测 Jinja2\r\n\r\n### 检测\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"import jinja2; print(jinja2.__version__)\"\r\n```\r\n\r\n**期望输出**: 版本号（如 `3.1.2`）\r\n\r\n无需手动安装 jinja2，`uv run --with` 会自动处理依赖。\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"import jinja2; print('✅ jinja2 ready')\"\r\n```\r\n\r\n## Step 2: 验证模板文件\r\n\r\n### 检测\r\n\r\n```bash\r\nls <skill_dir>/assets/claude_md.j2\r\n```\r\n\r\n**期望输出**: 文件路径\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python -c \"\r\nfrom jinja2 import FileSystemLoader, Environment\r\nenv = Environment(loader=FileSystemLoader('<skill_dir>/assets'))\r\ntemplate = env.get_template('claude_md.j2')\r\nprint('✅ template loaded')\r\n\"\r\n```\r\n\r\n## Step 3: 测试渲染脚本\r\n\r\n### 检测\r\n\r\n```bash\r\nls <skill_dir>/scripts/render.py\r\n```\r\n\r\n### 验证\r\n\r\n```bash\r\nuv run --with jinja2 python <skill_dir>/scripts/render.py --help\r\n```\r\n\r\n**期望输出**: 帮助信息或无错误退出\r\n\r\n## Step 4: 目标仓库语言检测\r\n\r\n使用本 skill 时，Agent 会自动扫描目标仓库：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json` + `tsconfig.json` → TypeScript 包\r\n- 含 `package.json` 无 TS → JavaScript 包\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` → **拒绝执行**（规范仅支持 Python + TS/JS）\r\n\r\n## Troubleshooting | 故障排除\r\n\r\n| 错误 | 原因 | 解决方案 |\r\n|------|------|----------|\r\n| `ModuleNotFoundError: No module named 'jinja2'` | uv 未正确调用 | 确认使用 `uv run --with jinja2` |\r\n| `TemplateNotFound: claude_md.j2` | 模板路径错误 | 确认 `<skill_dir>` 正确，检查 `assets/` 目录 |\r\n| `SyntaxError` in render.py | Python 版本过低 | 升级 Python 或通过 `uv python install` 管理 |\r\n| 目标仓库含 Go/Rust | 规范不支持 | 告知用户：\"本规范仅支持 Python + TS/JS\" |\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# 渲染命令（jinja2 由 uv run --with 自动管理）\r\nuv run --with jinja2 python <skill_dir>/scripts/render.py \\\r\n  --params <repo>/.kinema-params.tmp.json \\\r\n  --out <repo>/.kinema-claude.draft.md\r\n```\n\nFile v1.3.0:skill-card.md\n\n## Description: <br>\nGenerates or updates a repository CLAUDE.md file with Kinema's TDD methodology, including staged testing rules, coverage thresholds, fixture governance, and commit conventions for Python and TypeScript/JavaScript projects. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[leeshunee](https://clawhub.ai/user/leeshunee) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering teams use this skill to initialize or upgrade repository-level TDD guidance before implementation work. It is intended for Python and TypeScript/JavaScript repositories and produces a customized CLAUDE.md through an interactive questionnaire and merge workflow. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Published capability metadata claims financial authority and purchase capability that are not supported by the artifact behavior. <br>\nMitigation: Review capability tags before installation and do not grant financial or purchase authority based on this skill's documented workflow. <br>\nRisk: The skill can create, merge, or update repository CLAUDE.md guidance and may ask about renaming test directories. <br>\nMitigation: Invoke it only for intentional TDD-guidance injection, review the generated CLAUDE.md before accepting it, and confirm explicitly before any test-directory rename. <br>\nRisk: Broad testing-related prompts could trigger repository-level guidance changes when the user only wanted ordinary test help. <br>\nMitigation: Prefer explicit invocation phrases such as initializing or importing Kinema TDD rules, and avoid enabling the skill for general testing questions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/leeshunee/kinema-tdd-injector) <br>\n- [README.md](README.md) <br>\n- [ONBOARDING.md](references/ONBOARDING.md) <br>\n- [evals.json](evals/evals.json) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Markdown, Shell commands, Configuration, Guidance] <br>\n**Output Format:** [Markdown file with configuration-specific testing guidance and inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces or merges a CLAUDE.md document after repository scanning and user-selected testing-policy parameters.] <br>\n\n## Skill Version(s): <br>\n1.3.0 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.3.0:evals/evals.json\n\n{\r\n  \"skill_name\": \"kinema-tdd-injector\",\r\n  \"evals\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"pure-python-backend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml。没有前端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 backend（Python）\",\r\n        \"无前端时按用户选择 frontend 字段填 false\",\r\n        \"渲染时 frontend 相关块全部隐藏\",\r\n        \"生成的 CLAUDE.md 不包含 pnpm / vitest / frontend 字样\",\r\n        \"包含 tests/testenv-integration/backend/ 阶段（除非用户明确禁用）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"name\": \"pure-ts-frontend\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 frontend/ 包，里面有 src/ 源码根、package.json 和 pnpm-lock.yaml。没有后端代码。\",\r\n      \"expected_behavior\": [\r\n        \"扫描仓库，识别出仅有 frontend\",\r\n        \"渲染时 backend 相关块全部隐藏\",\r\n        \"纯前端可启用 testenv e2e（Playwright，连外部部署的真实后端 + 真实库）；testenv_integration 由用户选择，不强制 false\",\r\n        \"生成的 CLAUDE.md 不包含 uv / pyproject 字样\",\r\n        \"若启用 testenv，出现 tests/testenv-integration/frontend/ 与 *.spec.ts，且连接配置/库内容由测试系统提供（不硬编码）\",\r\n        \"若用户选两阶（testenv_integration=false），则不出现第三阶，且 §1 说明前端仅有 unit + dev-integration\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"name\": \"monorepo-standard\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/（app/ + pyproject.toml）和 frontend/（src/ + package.json + pnpm-lock.yaml）。\",\r\n      \"expected_behavior\": [\r\n        \"识别出 backend + frontend 两个包\",\r\n        \"backend_pkg=backend, frontend_pkg=frontend\",\r\n        \"backend_src_root=app, frontend_src_root=src\",\r\n        \"frontend_pkg_manager=pnpm\",\r\n        \"渲染的 CLAUDE.md 同时包含两栈的规范\",\r\n        \"三阶测试体系完整呈现\",\r\n        \"前端出现 Playwright e2e 第三阶：tests/testenv-integration/frontend/<journey>.spec.ts，且 §2.6 标注 1:1 对齐豁免\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 4,\r\n      \"name\": \"monorepo-nonstandard-names\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 server/（src/ + pyproject.toml）和 web/（lib/ + package.json + yarn.lock）。\",\r\n      \"expected_behavior\": [\r\n        \"识别 backend_pkg=server, frontend_pkg=web\",\r\n        \"backend_src_root=src, frontend_src_root=lib\",\r\n        \"frontend_pkg_manager=yarn\",\r\n        \"frontend_lockfile=yarn.lock\",\r\n        \"tests/unit/server/ 与 tests/unit/web/ 在 CLAUDE.md 中出现\",\r\n        \"不假设标准名 backend/frontend\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 5,\r\n      \"name\": \"existing-claude-md-merge\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，内容是一段 50 行的项目背景介绍（与测试规范无关）。\",\r\n      \"expected_behavior\": [\r\n        \"渲染到临时文件 CLAUDE.md.kinema.draft.md\",\r\n        \"对比现有 CLAUDE.md，检测无语义冲突（项目背景 vs 测试规范）\",\r\n        \"向用户确认追加策略后追加\",\r\n        \"保留 marker 注释 <!-- kinema-tdd-injector: injected --> 以支持后续 upgrade\",\r\n        \"不覆盖用户已有内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 6,\r\n      \"name\": \"third-party-language-reject\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 go.mod、main.go、cmd/、internal/。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 Go 语言\",\r\n        \"直接拒绝，不进入问卷\",\r\n        \"告知用户：本 skill 仅支持 Python + TypeScript\",\r\n        \"不生成任何文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 7,\r\n      \"name\": \"upgrade-mode\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库已有 CLAUDE.md，文件顶部含 marker <!-- kinema-tdd-injector: injected --> 与上次参数 JSON 块。\",\r\n      \"expected_behavior\": [\r\n        \"识别 upgrade 模式\",\r\n        \"解析旧参数 JSON 作为问卷默认值\",\r\n        \"向用户展示'保留旧值还是修改'选项\",\r\n        \"渲染后整体替换 marker 区块，而非追加\",\r\n        \"保留 marker 外的用户内容\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 8,\r\n      \"name\": \"test-root-conflict\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库根目录已存在 test/（单数）目录，里面有用户自定义测试。\",\r\n      \"expected_behavior\": [\r\n        \"检测到 test/ 与 skill 默认的 tests/ 冲突\",\r\n        \"向用户确认：是改用现有 test/、迁移到 tests/、还是中止\",\r\n        \"若用户选'保留 test/'，模板里的所有 tests/ 路径替换为 test/\",\r\n        \"不擅自做文件移动，仅生成规范文件\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 9,\r\n      \"name\": \"python-standards-injection\",\r\n      \"prompt\": \"为这个仓库生成 CLAUDE.md。仓库结构：根目录有 backend/ 包，里面有 app/ 源码根和 pyproject.toml，没有前端。问卷进行到 Q12「是否注入 Python 编码规范章节」时，用户选「是」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷中出现 Q12「是否注入 Python 编码规范章节」，且无条件提问（即使没有前端也照样问）\",\r\n        \"构造的 params 含 python_standards: true\",\r\n        \"渲染的 CLAUDE.md 末尾包含「Python 编码规范」章节\",\r\n        \"该章节包含关键字 SecretStr、_secret_string、ruff、pydantic、from_domain、G004\",\r\n        \"因仅有后端，该章节编号为「## 11. Python 编码规范」\",\r\n        \"若用户在 Q12 选「否」，则 python_standards: false，渲染结果完全不含该章节，且章节号无断档（停在 §10 Commit）\"\r\n      ],\r\n      \"files\": []\r\n    },\r\n    {\r\n      \"id\": 10,\r\n      \"name\": \"testenv-local-permission-and-config-ownership\",\r\n      \"prompt\": \"为这个 monorepo 生成 CLAUDE.md。仓库结构：backend/（app/ + pyproject.toml）+ frontend/（src/ + package.json + pnpm-lock.yaml）。启用 testenv 阶段。问卷 Q13（后端 testenv 本地运行）选「是」，Q14（前端 Playwright e2e 本地运行）选「否」。\",\r\n      \"expected_behavior\": [\r\n        \"问卷分别提问 Q13（后端 testenv 本地运行）与 Q14（前端 testenv 本地运行），互不绑定\",\r\n        \"构造 params 含 testenv_backend_local: true、testenv_frontend_local: false、injector_version 取当前版本\",\r\n        \"后端 testenv 块渲染为'允许本地运行 / Agent 在复杂 Plan 任务完成时自动跑一次'，不含'Agent 不得自行执行'\",\r\n        \"前端 testenv 块渲染为'用户手动 / 测试系统执行'，含'Agent 不得自行执行'\",\r\n        \"§3.3 含配置归属铁律：DB/外部连接配置与库 seed 由测试系统提供，禁止硬编码、禁止依赖开发本地配置\",\r\n        \"testenv e2e 触发时机为'复杂 Plan 任务完成时'，且仅在本地许可时自动触发，不进每次提交链\",\r\n        \"头部 injector-version 标识符与当前 SKILL.md version 一致\"\r\n      ],\r\n      \"files\": []\r\n    }\r\n  ]\r\n}\n\nFile v1.3.0:LICENSE\n\nGNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n                            Preamble\r\n\r\n  The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n  The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works.  By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users.  We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors.  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n  To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights.  Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms\n\nArchive v1.2.1: 8 files, 26234 bytes\n\nFiles: evals/evals.json (5661b), LICENSE (35823b), README.md (3000b), references/ONBOARDING.md (2394b), scripts/render.py (1544b), skill-card.md (2319b), SKILL.md (12484b), _meta.json (138b)\n\nArchive v1.1.2: 8 files, 20292 bytes\n\nFiles: assets/claude_md.j2 (21982b), evals/evals.json (4565b), ONBOARDING.md (2304b), README.md (1916b), scripts/render.py (1497b), skill-card.md (2430b), SKILL.md (11687b), _meta.json (138b)\n\nArchive v1.1.1: 8 files, 20444 bytes\n\nFiles: assets/claude_md.j2 (21860b), evals/evals.json (4559b), ONBOARDING.md (2304b), README.md (1912b), scripts/render.py (1497b), skill-card.md (2698b), SKILL.md (11684b), _meta.json (138b)\n\nArchive v1.1.0: 8 files, 20362 bytes\n\nFiles: assets/claude_md.j2 (21860b), evals/evals.json (4559b), ONBOARDING.md (2474b), README.md (1912b), scripts/render.py (1497b), skill-card.md (2305b), SKILL.md (11610b), _meta.json (138b)\n\nArchive v1.0.0: 8 files, 20266 bytes\n\nFiles: assets/claude_md.j2 (21860b), evals/evals.json (4559b), ONBOARDING.md (2474b), README.md (1210b), scripts/render.py (1497b), skill-card.md (2919b), SKILL.md (11610b), _meta.json (138b)","readmeExcerpt":"Skill: Kinema's TDD Injector (CLAUDE.md generator) Owner: leeshunee Summary: 一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Tags: latest:1.4.1 Version history: v1.4.1 | 2026-07-16T07:42:19.607Z | user 新增 Codex / AGENTS.md 双端注入目标：render.py --target claude|codex，共享模板与升级规则；参数化指令文件名与 AI co-author；UTF-8 BOM 兼容","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace\n/plugin install kinema-tdd-injector@kinema-skills-marketplace"},{"language":"bash","snippet":"codex plugin marketplace add KinemaClawWorkspace/kinema-skills-marketplace\ncodex plugin add kinema-tdd-injector@kinema-skills-marketplace"},{"language":"bash","snippet":"openclaw skills install kinema-tdd-injector"},{"language":"text","snippet":"把测试规范注入到这个仓库\ninit tdd standard here\nset up testing methodology\nimport kinema's test rules\n升级已有的 Kinema TDD 规范"},{"language":"bash","snippet":"uv run --with jinja2 python scripts/render.py --target claude --params params.json --out CLAUDE.md\nuv run --with jinja2 python scripts/render.py --target codex --params params.json --out AGENTS.md"},{"language":"text","snippet":"kinema-tdd-injector/\n├── .claude-plugin/plugin.json       # Claude Code 清单\n├── .codex-plugin/plugin.json        # Codex 清单\n├── skills/kinema-tdd-injector/      # Codex skill 适配层\n├── SKILL.md                          # Claude/OpenClaw 完整工作流\n├── assets/claude_md.j2               # 双端共享模板\n├── scripts/render.py                 # --target claude|codex\n├── evals/evals.json\n└── references/ONBOARDING.md"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: kinema-tdd-injector\r\ndisplayName: \"Kinema's TDD Injector (CLAUDE.md generator)\"\r\nversion: 1.4.1\r\ndescription: |\r\n  一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定。每个仓库只运行一次——这**不是**开发期间的常驻助手。当用户说出诸如 \"把测试规范注入到这个仓库\" / \"init tdd standard here\" / \"set up testing methodology\" / \"import kinema's test rules\" 之类的话时，请主动提及本 skill。如果检测到仓库已被注入过，进入升级模式而非拒绝。\r\n---\r\n\r\n# Kinema TDD 方法论注入器\r\n\r\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\r\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\r\n- **GitHub**: https://github.com/KinemaClawWorkspace/kinema-tdd-injector\r\n\r\n## ⚠️ Before First Use | 首次使用必读\r\n\r\n**首次使用此 skill 前，必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**\r\n\r\n- **首次配置** → 读取 references/ONBOARDING.md 完成全部步骤\r\n- **环境不可用**（jinja2 未安装、模板加载失败）→ 读取 references/ONBOARDING.md Troubleshooting 排查修复\r\n- **配置完成后** → 直接使用下方工作流\r\n\r\n一次性生成器，为目标仓库写入一份定制的 `CLAUDE.md`。**每个仓库仅运行一次**（升级除外），**不是**开发期间的助手。\r\n\r\n## 渲染机制\r\n\r\n本 skill 使用 **Jinja2 模板**渲染：\r\n\r\n```\r\nkinema-tdd-injector/\r\n├── SKILL.md              ← 你正在读\r\n├── assets/\r\n│   └── claude_md.j2      ← 单一模板（含全部条件分支）\r\n└── scripts/\r\n    └── render.py         ← 渲染脚本（jinja2 依赖）\r\n```\r\n\r\n**渲染流程**：收集用户回答 → 构造 params dict → 调 `render.py` 输出到目标仓库根目录的临时文件 `<repo>/.kinema-claude.draft.md` → 与既有 `CLAUDE.md` 比对 → 决定写入策略 → 清理临时文件。\r\n\r\n**临时文件位置**：始终在目标仓库根目录，命名 `.kinema-claude.draft.md`（以 `.` 开头便于 .gitignore 屏蔽）。流程结束后必须删除。\r\n\r\n---\r\n\r\n## 产出范围\r\n\r\nCLAUDE.md 会包含以下章节（依据用户回答动态裁剪）：\r\n\r\n1. 核心原则（三阶 / 两阶矩阵）\r\n2. 测试路径三层命名规则 + 拆分规则 + 数据目录\r\n3. Agent 自动行为规范\r\n4. 网络边界规则\r\n5. 依赖声明（A/B/C 三种模式之一）\r\n6. Conftest / Fixture 治理\r\n7. 覆盖率门槛 + 强制点（A/B/C/D 四种之一）\r\n8. 各阶段测试编写规范（含前端 testenv Playwright e2e 子节）\r\n9. 快速参考命令\r\n10. Commit message（A/B/C 三种之一）\r\n11. 前端包管理器（如有前端）\r\n12. Python 编码规范（可选，由 Q12 控制；与前后端解耦）——含配置唯一入口规则（§.2.1，由 Q15 决定配置来源示例）\r\n\r\n---\r\n\r\n## 何时拒绝 / 何时进入升级模式\r\n\r\n**拒绝条件**：仓库主要源码包含 **非 Python 且非 TS/JS 的语言**（顶层包里有 Go / Rust / Java / C++ 等）。零散脚本或 `.md` 文件不算。告知用户：\"本规范目前只覆盖 Python + TS/JS，检测到 X 语言，无法生成。\"\r\n\r\n**升级模式**：目标仓库现有 `CLAUDE.md` 已包含 `<!-- kinema-tdd-injector: injected -->` 标记。这种情况**不拒绝**，进入升级模式：\r\n1. 告知用户检测到既有注入，问是否要升级。读取头部 `injector-version:` 标识符并与本 SKILL.md 当前 `version` 比对；若旧版本低于当前，进入升级模式时告知版本差异（如\"检测到 v1.3.0，当前 v1.4.0，建议升级\"）。无该标识符（更早产物）按未知旧版处理。\r\n2. 同意后，从既有 CLAUDE.md 中**反解**上次的回答（覆盖率阈值、依赖模式、commit 风格、强制点、包管理器、自动触发设置、testenv 本地运行许可、配置来源），作为问卷默认值。\r\n3. 用户回车即沿用旧值，输入新值即覆盖。\r\n4. 反解失败的字段回退到出厂默认。\r\n\r\n---\r\n\r\n## 工作流\r\n\r\n### 步骤 1 —— 确认目标仓库与语言栈\r\n\r\n请用户确认**目标仓库根目录**（默认：当前工作目录）。扫描：\r\n\r\n- 顶层文件和目录\r\n- 最多 3 层深度内的所有 `pyproject.toml`、`package.json`、`Cargo.toml`、`go.mod`、`pom.xml`、`build.gradle`、`*.csproj`\r\n\r\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` / `build.gradle` / `*.csproj`，立即拒绝。\r\n\r\n### 步骤 2 —— 发现顶层包\r\n\r\n**不要**默认 `backend/` + `frontend/`。通过文件标志发现：\r\n\r\n- 含 `pyproject.toml` → Python 包\r\n- 含 `package.json`（且有 `tsconfig.json` 或 `.ts` / `.tsx` 文件） → TS/JS 包\r\n- 仅 `package.json` 无 TS → 纯 JS 包\r\n\r\n探测源码根：\r\n- Python：读 `pyproject.toml` 的包配置"},{"path":"README.md","content":"# Kinema TDD Injector\n\n一次性 TDD 方法论注入器，同时支持 Claude Code、Codex 与 OpenClaw：\n\n- Claude Code 生成或升级根级 `CLAUDE.md`\n- Codex 生成或升级根级 `AGENTS.md`\n- 两端共享同一套问卷、Jinja2 模板、冲突合并和升级反解规则\n\n## 核心特性\n\n> 对话式问卷 → 平台化渲染 → 与既有持久指令智能融合 → 开箱即用的 TDD 规范\n\n### 三阶测试体系\n\n| 阶段 | 跑什么 | 何时跑 |\n|------|--------|--------|\n| **unit** | 单文件纯函数 / 类 | 每次保存 |\n| **dev-integration** | 跨模块真实依赖（数据库 / 文件系统） | 提交前 |\n| **testenv-integration** | 后端 API e2e + 前端 Playwright GUI e2e | 按问卷配置自动或手动执行 |\n\n此外包含分层 conftest、fixture 治理、网络/IO 边界、覆盖率门槛、Commit message 规范和可选\nPython 编码规范。\n\n## 安装\n\n### Claude Code\n\n```text\n/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace\n/plugin install kinema-tdd-injector@kinema-skills-marketplace\n```\n\n### Codex\n\n```bash\ncodex plugin marketplace add KinemaClawWorkspace/kinema-skills-marketplace\ncodex plugin add kinema-tdd-injector@kinema-skills-marketplace\n```\n\n安装或更新后开启一个新会话，让客户端加载新的 skill。\n\n### OpenClaw\n\n```bash\nopenclaw skills install kinema-tdd-injector\n```\n\n## 触发方式\n\n```text\n把测试规范注入到这个仓库\ninit tdd standard here\nset up testing methodology\nimport kinema's test rules\n升级已有的 Kinema TDD 规范\n```\n\n首次使用需读取 [references/ONBOARDING.md](references/ONBOARDING.md)。\n\n## 双端实现\n\n共享渲染器通过 target 选择输出平台：\n\n```bash\nuv run --with jinja2 python scripts/render.py --target claude --params params.json --out CLAUDE.md\nuv run --with jinja2 python scripts/render.py --target codex --params params.json --out AGENTS.md\n```\n\n`--target` 默认为 `claude`，因此现有 Claude/OpenClaw 调用保持兼容。\n\n## 文件结构\n\n```text\nkinema-tdd-injector/\n├── .claude-plugin/plugin.json       # Claude Code 清单\n├── .codex-plugin/plugin.json        # Codex 清单\n├── skills/kinema-tdd-injector/      # Codex skill 适配层\n├── SKILL.md                          # Claude/OpenClaw 完整工作流\n├── assets/claude_md.j2               # 双端共享模板\n├── scripts/render.py                 # --target claude|codex\n├── evals/evals.json\n└── references/ONBOARDING.md\n```\n\n## 作者\n\n- **Author**: [LeeShunEE](https://github.com/LeeShunEE)\n- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)\n\n## 许可证\n\n[GNU General Public License v3.0](LICENSE)"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cjsf9pc9x1tmreq1dahs90s83p9y0\",\n  \"slug\": \"kinema-tdd-injector\",\n  \"version\": \"1.4.1\",\n  \"publishedAt\": 1784187739607\n}"},{"path":"references/ONBOARDING.md","content":"# Kinema TDD Injector Onboarding\n\n> 本文档指导 AI Agent 完成 Claude Code 与 Codex 共用渲染环境的首次检查。\n\n## Prerequisites | 前置条件\n\n- `uv` 包管理器\n- 目标仓库为 Python 或 TypeScript/JavaScript 项目\n\n## Step 1: 检测 Jinja2\n\n```bash\nuv run --with jinja2 python -c \"import jinja2; print(jinja2.__version__)\"\n```\n\n无需手动安装 jinja2，`uv run --with` 会自动处理依赖。\n\n## Step 2: 验证共享模板\n\n确认插件根目录存在 `assets/claude_md.j2`。该文件是 Claude/Codex 共用模板，渲染器会按\n`--target` 注入平台名称、指令文件名和 co-author 身份。\n\n```bash\nuv run --with jinja2 python -c \"\nfrom jinja2 import FileSystemLoader, Environment\nenv = Environment(loader=FileSystemLoader('<plugin_root>/assets'))\ntemplate = env.get_template('claude_md.j2')\nprint('template loaded:', template.name)\n\"\n```\n\n## Step 3: 验证渲染器\n\n```bash\nuv run --with jinja2 python <plugin_root>/scripts/render.py --help\n```\n\n渲染目标：\n\n```bash\n# Claude Code（默认 target，显式写出便于审计）\nuv run --with jinja2 python <plugin_root>/scripts/render.py \\\n  --target claude \\\n  --params <repo>/.kinema-params.tmp.json \\\n  --out <repo>/.kinema-claude.draft.md\n\n# Codex\nuv run --with jinja2 python <plugin_root>/scripts/render.py \\\n  --target codex \\\n  --params <repo>/.kinema-params.tmp.json \\\n  --out <repo>/.kinema-agents.draft.md\n```\n\n参数 JSON 支持 UTF-8 与带 BOM 的 UTF-8；最终输出统一为无 BOM UTF-8。\n\n## Step 4: 目标仓库语言检测\n\n使用本 skill 时，Agent 会自动扫描目标仓库：\n\n- 含 `pyproject.toml` → Python 包\n- 含 `package.json` + `tsconfig.json` → TypeScript 包\n- 含 `package.json` 无 TS → JavaScript 包\n\n若发现 `Cargo.toml` / `go.mod` / `pom.xml` → **拒绝执行**（规范仅支持 Python + TS/JS）。\n\n## Troubleshooting | 故障排除\n\n| 错误 | 原因 | 解决方案 |\n|------|------|----------|\n| `ModuleNotFoundError: No module named 'jinja2'` | uv 未正确调用 | 确认使用 `uv run --with jinja2` |\n| `TemplateNotFound: claude_md.j2` | 模板路径错误 | 从插件根目录定位 `assets/`，不要从 Codex skill 子目录猜测路径 |\n| `JSONDecodeError` | 参数文件不是有效 JSON | 确认文件为 UTF-8/UTF-8 BOM 且没有尾随逗号 |\n| `SyntaxError` in render.py | Python 版本过低 | 升级 Python 或通过 `uv python install` 管理 |\n| 目标仓库含 Go/Rust | 规范不支持 | 告知用户本规范仅支持 Python + TS/JS |"},{"path":"skill-card.md","content":"## Description:\n\nGenerates or upgrades persistent repository instructions that encode Kinema's TDD methodology for Python and TypeScript/JavaScript projects.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[leeshunee](https://clawhub.ai/user/leeshunee)\n\n### License/Terms of Use:\n\nGNU General Public License v3.0\n\n## Use Case:\n\nDevelopers and engineering teams use this skill to initialize or upgrade repository-level TDD guidance before implementation work. It produces tailored agent instruction files for supported Python and TypeScript/JavaScript repositories.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill writes persistent repository agent instructions that can influence future agent behavior.\n\nMitigation: Confirm the exact target file and review the generated diff before accepting changes.\n\nRisk: The skill can write application configuration code when a custom configuration source is requested.\n\nMitigation: Avoid the custom config.py path unless you explicitly want application code changed.\n\nRisk: The renderer depends on Jinja2 at execution time.\n\nMitigation: Use a pinned or locked Jinja2 environment when running the renderer.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/leeshunee/skills/kinema-tdd-injector)\n- [README](artifact/README.md)\n- [Kinema TDD Injector Onboarding](artifact/references/ONBOARDING.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown instruction file content with supporting shell commands and configuration guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Writes persistent repository agent instructions after target detection, questionnaire input, rendering, and diff review.]\n\n## Skill Version(s):\n\n1.4.1 (source: SKILL.md frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Skill: Kinema's TDD Injector (CLAUDE.md generator) Owner: leeshunee Summary: 一次性注入器，为目标仓库生成定制版 CLAUDE.md 记忆文件，植入 kinema 的 TDD 方法论（三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理）。适用场景：用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Tags: latest:1.4.1 Version history: v1.4.1 | 2026-07-16T07:42:19.607Z | user 新增 Codex / AGENTS.md 双端注入目标：render.py --target claude|codex，共享模板与升级规则；参数化指令文件名与 AI co-author；UTF-8 BOM 兼容","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1066,"uniquenessScore":49,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T08:33:22.796Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T10:52:17.069Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}