Safety Rules Critical : Read and follow global-rules/bash-safety.md for all bash/command execution. Core rules: 1. Always set explicit on bash calls — 30s for tests, 60s for installs, never default 2. Never run unscoped full test suites — use or file paths to limit scope 3. Never use without variable guards , , , or 4. Infinite loops must have hard timeout + budget limits — no unbounded while(True) 5. Redirect stdin with for non-interactive commands A bash timeout that triggers SIGKILL corrupts the terminal FD, crashes opencode's TUI, and forces a GUI restart. 把关 (Pre-Publish Review) 发布前核弹级审查…

\n```\n\n### Distinguishing Meaningful vs Cosmetic Changes\n\n| Category | Examples | Action |\n|----------|----------|--------|\n| **Cosmetic** | Whitespace, trailing newlines, import reorder, formatting | Skip deep review |\n| **Structural** | Renamed files, moved directories, split modules | Track but low priority |\n| **Substantive** | Logic changes, new functions, API modifications | Full review required |\n| **Critical** | Auth, permissions, data handling, external calls | Deep review + security |\n\nDetection rules:\n- **Whitespace-only**: `git diff -w` shows empty → cosmetic\n- **Import reorder**: lines starting with `import` moved within import block → cosmetic\n- **Comment-only**: only `//` or `/* */` lines changed → cosmetic unless docstrings\n- **Lock file changes**: package-lock.json, yarn.lock → structural, skip review\n- **Generated files**: `.map`, `.min.js`, `dist/` → skip\n\n### Parsing Diff Hunk Headers\n\n```\n@@ -start,count +start,count @@\n```\n\n- `count=0`: lines were deleted entirely\n- `count=1` with large `-count`: many lines replaced with one (likely refactored)\n- Multiple `@@` blocks in same file: file has several independent changes → consider splitting\n\n### Change Grouping Strategy\n\nGroup changes by **logical scope**, not file boundaries:\n\n```python\n# Group by module/directory, not individual files\ngroups = {}\nfor file in changed_files:\n module = file.split('/')[0] # top-level directory as group key\n if module not in groups:\n groups[module] = []\n groups[module].append(file)\n\n# Limit to max 10 groups; merge smallest groups if exceeded\nif len(groups) > 10:\n sorted_groups = sorted(groups.items(), key=lambda x: len(x[1]))\n # Merge smallest groups into \"misc\" until under limit\n while len(groups) > 10:\n smallest = sorted_groups.pop(0)\n groups.setdefault('misc', []).extend(smallest[1])\n del groups[smallest[0]]\n```\n\n## Severity Classification / 严重度分类\n\n### Decision Tree\n\n```\nDoes the change modify exported/public API?\n├── YES → Does it break existing callers?\n│ ├── YES → CRITICAL\n│ └── NO → Does it add new optional params/fields?\n│ ├── YES → HIGH\n│ └── NO → MEDIUM (API change, backward compatible)\n└── NO → Does it change runtime behavior?\n ├── YES → Does it affect data flow or error handling?\n │ ├── YES → HIGH\n │ └── NO → MEDIUM\n └── NO → Is it test/docs/config only?\n ├── YES → LOW\n └── NO → MEDIUM (internal refactoring)\n```\n\n### Severity Levels\n\n| Level | Criteria | Examples | Review Depth |\n|-------|----------|----------|-------------|\n| **Critical** | Breaking API changes, security-affecting changes | Removed public method, auth bypass fix, changed return type | Full review + security audit |\n| **High** | New features, behavior changes, data flow changes | New endpoint, changed validation logic, new dependencies | Full review |\n| **Medium** | Internal refactor, non-breaking enhancements, config changes | Extracted helper function, added logging, updated defaults | Standard review |\n| **Low** | Docs, tests, formatting, dependency version bumps | README update, new test case, prettier formatting | Quick scan |\n\n### Breaking Change Detection\n\nA change is **breaking** if any of these hold:\n\n1. **Removed or renamed export**: Previously accessible symbol no longer exported\n2. **Changed function signature**: Parameters added without defaults, parameter order swapped\n3. **Changed return type**: Return type narrows or changes incompatible type\n4. **Changed error behavior**: New exceptions thrown, existing exceptions removed\n5. **Changed default values**: Default behavior of existing config changes\n6. **Removed config option**: Previously supported option no longer exists\n7. **Schema change without migration**: Database/API schema that drops fields\n\nDetection commands:\n\n```bash\n# Check if exported symbols changed\ngit diff \"v${PUBLISHED}\"..HEAD --grep=\"export\\|module\\.exports\\|public\" -- '*.ts' '*.js' '*.py'\n\n# Check if function signatures changed (Python)\ngit diff \"v${PUBLISHED}\"..HEAD -S \"def \" -- '*.py'\n\n# Check for dependency version changes\ngit diff \"v${PUBLISHED}\"..HEAD -- package.json pyproject.toml requirements.txt\n```\n\n### Backward-Compatible Changes\n\nThe following are **not** breaking:\n- Adding new exported function/class\n- Adding optional parameter with default value\n- Adding new field to response (clients ignore unknown fields)\n- Adding new enum variant (if clients use switch-default)\n- Deprecating (without removing) a feature\n- Internal implementation change with same external behavior\n\n## Change Impact Analysis / 变更影响分析\n\nFor each change group, assess impact radius:\n\n```markdown\n## Change Group: {name}\n\n**Files**: {file_count} files, +{added}/-{removed} lines\n**Severity**: {critical|high|medium|low}\n**Breaking**: {yes/no/uncertain}\n**Affected modules**: {list modules touched}\n**Risk areas**: {list areas that could be affected}\n\n### Blast Radius\n- Direct consumers: {who calls this code}\n- Transitive effects: {what depends on direct consumers}\n- Config/deploy impact: {does this need config/deploy changes}\n```","content_type":"text/markdown; charset=utf-8","language":"markdown","size":5887,"content_sha256":"af064a5a91e3d3a9715354262130c29395c2350e9b5eb03e7c762feed50c08d6"},{"filename":"rules/review-roles.md","content":"# Review Roles / 审查角色\n\nFive parallel review perspectives for holistic code review. Each role has specific focus areas and checklists.\n\n## Role 1: Architect / 架构师\n\n**Focus**: Design decisions, API contracts, data flow, system structure.\n\n### Checklist\n\n- [ ] **API contract stability**: Are public interfaces backward-compatible? Breaking changes justified?\n- [ ] **Dependency direction**: Do dependencies point inward (stable depends on volatile, not reverse)?\n- [ ] **Module boundaries**: Are responsibilities clearly separated? No god modules?\n- [ ] **Data flow clarity**: Can you trace data from input to output without jumps across 5+ files?\n- [ ] **Error propagation**: Do errors bubble up to the right handler, not get swallowed mid-chain?\n- [ ] **Scalability impact**: Does this change impose new bottlenecks? O(n²) where before O(n)?\n- [ ] **Configuration design**: Are new configs scoped correctly? No global state hiding in module-level vars?\n- [ ] **Extensibility**: Can the next feature be added without modifying this code (open-closed principle)?\n\n### Red Flags\n\n- Circular dependencies between modules\n- God class/function (>200 lines or >8 responsibilities)\n- New global mutable state\n- Mixed abstraction levels in same module\n- Feature envy: method uses more data from another class than its own\n\n### Assessment Format\n\n```markdown\n### Architecture Review\n\n**Pattern compliance**: {consistent|inconsistent} — {detail}\n**Cohesion score**: {high|medium|low} — {explanation}\n**Coupling score**: {low|medium|high} — {explanation}\n\n**Decisions**:\n- ✅ {good decision with permalink}\n- ❌ {problematic decision with permalink}\n- ⚠️ {questionable decision with permalink}\n\n**Recommendation**: {pass|improve|reject}\n```\n\n## Role 2: Developer / 开发者\n\n**Focus**: Code quality, patterns, error handling, readability, maintainability.\n\n### Checklist\n\n- [ ] **Naming clarity**: Do names reveal intent without comments? No `data`, `info`, `result` abstractions\n- [ ] **Function length**: Functions \u003c30 lines. If longer, can it be decomposed?\n- [ ] **DRY**: No duplicated logic within 3+ locations. Extracted to shared utility if duplicated\n- [ ] **Error handling**: Every external call wrapped in try/except. Errors include context, not bare messages\n- [ ] **Magic numbers**: No unexplained literals. Named constants or config values\n- [ ] **Type safety**: Type hints on all function signatures. No `Any` without justification\n- [ ] **Null/None handling**: Explicit None checks, no silent None propagation\n- [ ] **Code comments**: Comments explain \"why\", not \"what\". No commented-out code blocks\n- [ ] **Immutability**: Prefer immutable data where possible, avoid unnecessary mutation\n\n### Code Smell Detection\n\n| Smell | Detection | Action |\n|-------|-----------|--------|\n| Long method | >30 lines | Extract method |\n| Deep nesting | >3 levels | Guard clauses, early return |\n| Feature envy | Uses more data from other class than own | Move method |\n| Shotgun surgery | One change touches 5+ files | Consolidate into module |\n| Primitive obsession | Overuse of raw types | Introduce small class/dataclass |\n| Dead code | Unreachable paths or unused exports | Remove |\n\n### Assessment Format\n\n```markdown\n### Developer Review\n\n**Readability**: {excellent|good|needs-work}\n**Complexity**: {low|medium|high} — cyclomatic {number}\n**Technical debt**: {none|minor|moderate|significant}\n\n**Issues found**:\n1. [{severity}] {file}:{line} — {description} [evidence permalink]\n2. ...\n\n**Recommendation**: {pass|pass-with-notes|improve|reject}\n```\n\n## Role 3: Tester / 测试员\n\n**Focus**: Test coverage, edge cases, failure modes, observability, testability.\n\n### Checklist\n\n- [ ] **New code has tests**: Every new function/class has corresponding test case\n- [ ] **Edge cases covered**: Empty input, None/null, overflow, off-by-one, concurrent access\n- [ ] **Error paths tested**: Exception handling tested, not just happy path\n- [ ] **Integration coverage**: Cross-module interactions tested, not just unit isolation\n- [ ] **Test independence**: Tests don't depend on execution order, external state, or timing\n- [ ] **Observability**: Can failures be diagnosed from logs/error messages alone?\n- [ ] **Test naming**: `test_{scenario}_{expected_outcome}` pattern, not `test_function_works`\n- [ ] **Coverage regression**: New code doesn't lower overall coverage percentage\n\n### Test Gap Analysis\n\n```markdown\n### Test Coverage Matrix\n\n| Module | Lines Changed | Tests Added | Coverage | Gap |\n|--------|--------------|-------------|----------|-----|\n| auth | +120 | 8 tests | 78% | Missing: token expiry, invalid format |\n| api | +45 | 3 tests | 85% | Missing: rate limit edge case |\n| config | +10 | 1 test | 92% | Adequate |\n```\n\n### Failure Mode Analysis\n\nFor each new failure path introduced:\n\n1. **What fails?** — Specific code path\n2. **How it manifests?** — Error message, exception type, log pattern\n3. **Can it be detected?** — Monitoring metric, alert, or only user report\n4. **Recovery path** — Auto-retry, fallback, or manual intervention\n\n### Assessment Format\n\n```markdown\n### Test Review\n\n**Overall coverage**: {percentage} (threshold: {config_threshold}%)\n**New code coverage**: {percentage}\n**Missing critical tests**: {list}\n\n**Edge cases identified**:\n1. {edge_case} — {tested/missing} [permalink]\n2. ...\n\n**Observability**: {adequate|needs-logging|needs-metrics}\n\n**Recommendation**: {pass|needs-more-tests|reject}\n```\n\n## Role 4: Security / 安全专家\n\n**Focus**: Input validation, auth/perm checks, secrets exposure, dependency risks, attack surface.\n\n### Checklist\n\n- [ ] **Input validation**: All external inputs validated (type, length, format, range)\n- [ ] **Auth checks**: Every sensitive endpoint verifies authentication and authorization\n- [ ] **Secrets handling**: No hardcoded credentials, API keys, tokens in source code\n- [ ] **SQL injection**: All queries use parameterized statements, no string concatenation\n- [ ] **XSS prevention**: All user-rendered content escaped, no `v-html` with untrusted data\n- [ ] **Dependency audit**: New dependencies scanned for known CVEs\n- [ ] **Least privilege**: New permissions are minimum required, no overly broad access\n- [ ] **Data exposure**: Error messages don't leak internal details, stack traces, or env vars\n- [ ] **Rate limiting**: New endpoints have rate limiting if externally exposed\n\n### Secret Detection Patterns\n\n```bash\n# Scan for potential secrets\ngit diff \"v${PUBLISHED}\"..HEAD -S \"API_KEY\\|SECRET\\|PASSWORD\\|TOKEN\\|PRIVATE_KEY\" --unified=0\n\n# Check for accidentally committed .env\ngit diff \"v${PUBLISHED}\"..HEAD -- '.env*' '*.pem' '*.key'\n\n# Verify .gitignore covers sensitive patterns\ngit check-ignore .env .env.local secrets.json\n```\n\n### Dependency Risk Assessment\n\n```markdown\n### Dependency Changes\n\n| Package | Version Change | Known CVEs | License | Risk |\n|---------|---------------|------------|---------|------|\n| express | 4.17→4.18 | None | MIT | Low |\n| lodash | 4.17.20→4.17.21 | CVE-2021-23337 | MIT | Medium |\n```\n\n### Assessment Format\n\n```markdown\n### Security Review\n\n**Risk level**: {low|medium|high|critical}\n**Attack surface**: {shrunk|unchanged|expanded}\n\n**Findings**:\n- [{severity}] {description} [evidence permalink]\n - Impact: {what could happen}\n - Remediation: {how to fix}\n\n**Recommendation**: {pass|pass-with-conditions|block}\n```\n\n## Role 5: Docs / 文档\n\n**Focus**: README accuracy, API doc completeness, changelog, migration guides.\n\n### Checklist\n\n- [ ] **README updated**: New features documented, removed features noted, examples work\n- [ ] **API docs complete**: All public methods/classes documented with parameters, returns, exceptions\n- [ ] **Changelog entry**: Added under appropriate section (Breaking/Feature/Fix)\n- [ ] **Migration guide**: For breaking changes, guide for upgrading from previous version\n- [ ] **Type docs**: New types documented, removed types noted\n- [ ] **Code examples**: New features have runnable examples in docs\n- [ ] **Version references**: Version numbers in docs match actual version\n- [ ] **Link integrity**: No broken links in documentation\n\n### Doc Completeness Score\n\n```markdown\n### Doc Coverage\n\n| Area | Status | Gap |\n|------|--------|-----|\n| README | ✅ Updated | — |\n| API reference | ⚠️ Partial | Missing: `newFunction()`, `Config.new_option` |\n| Changelog | ❌ Missing | No entry for this release |\n| Migration guide | N/A | No breaking changes |\n| Examples | ⚠️ Stale | Example for old API still present |\n```\n\n### Assessment Format\n\n```markdown\n### Docs Review\n\n**Completeness**: {complete|mostly-complete|partial|incomplete}\n**Accuracy**: {accurate|minor-errors|misleading}\n\n**Required updates**:\n1. {file}:{line} — {what needs updating} [permalink]\n2. ...\n\n**Recommendation**: {pass|needs-updates|block}\n```\n\n## Synthesis / 综合\n\nAfter all 5 roles report, combine into final assessment:\n\n```markdown\n## Review Synthesis\n\n| Role | Verdict | Critical Issues | Minor Issues |\n|------|---------|----------------|-------------|\n| Architect | {pass/improve/reject} | {n} | {n} |\n| Developer | {pass/pass-with-notes/improve/reject} | {n} | {n} |\n| Tester | {pass/needs-more-tests/reject} | {n} | {n} |\n| Security | {pass/pass-with-conditions/block} | {n} | {n} |\n| Docs | {pass/needs-updates/block} | {n} | {n} |\n\n**Overall**: {ready/needs-fixes/not-ready}\n**Blocking issues**: {count}\n**Action items**: {sorted by severity}\n```","content_type":"text/markdown; charset=utf-8","language":"markdown","size":9468,"content_sha256":"05bc3cdc2a357b0353f8cef8d0d91701221439c4922c70bcb0ba885c2ba5465d"},{"filename":"rules/version-bump.md","content":"# Version Bump Rules / 版本升级规则\n\nSemantic versioning decisions based on change types. Determines whether to bump major, minor, or patch.\n\n## SemVer Decision Framework / 语义版本决策框架\n\n### Core Rule\n\n```\nGiven a version MAJOR.MINOR.PATCH:\n\nMAJOR → Breaking changes (incompatible API changes)\nMINOR → New features (backward-compatible additions)\nPATCH → Bug fixes (backward-compatible bug fixes)\n```\n\n### Decision Tree\n\n```\nIs there any breaking change?\n├── YES → BUMP MAJOR (1.x.y → 2.0.0)\n│ └── Even ONE breaking change = major bump\n│ └── Document ALL breaking changes in changelog\n└── NO → Is there any new feature?\n ├── YES → BUMP MINOR (1.2.y → 1.3.0)\n │ └── Even ONE new feature = minor bump\n │ └── Can also include patches in same release\n └── NO → Is there any bug fix?\n ├── YES → BUMP PATCH (1.2.3 → 1.2.4)\n │ └── Only if NO new features and NO breaking changes\n └── NO → No version bump needed\n └── Docs-only or cosmetic-only changes\n```\n\n## Breaking Change Detection / 破坏性变更检测\n\n### Definite Breaking Changes → Major Bump\n\n1. **Removed public API**: Function, class, method, or export removed\n2. **Changed function signature**: Parameter removed or added without default, parameter order changed\n3. **Changed return type**: Return type changed to incompatible type\n4. **Changed error types**: Different exceptions raised, existing exceptions no longer raised\n5. **Changed defaults**: Default value of existing option changed (changes behavior for existing users)\n6. **Removed config options**: Previously supported option no longer exists\n7. **Database schema change**: Column removed, type changed without migration\n8. **Protocol change**: API endpoint removed, request/response format changed\n\nDetection commands:\n\n```bash\n# Detect removed exports (JavaScript)\ngit diff \"v${PUBLISHED}\"..HEAD -S \"export \" -- '*.ts' '*.js' | grep \"^-.*export\"\n\n# Detect removed public functions (Python)\ngit diff \"v${PUBLISHED}\"..HEAD -S \"def \" -- '*.py' | grep \"^-.*def \" | grep -v \"^-.*def _\"\n\n# Detect changed function signatures\ngit diff \"v${PUBLISHED}\"..HEAD -- '*.py' | grep -A2 \"^-.*def \" | grep -v \"^--\"\n```\n\n### Possibly Breaking → Investigate Further\n\n| Pattern | Why Possibly Breaking | How to Verify |\n|---------|---------------------|---------------|\n| New required parameter | Callers must provide it | Check if parameter has default value |\n| Changed error message | Downstream code may parse messages | Check if anyone uses `str(exception)` |\n| Changed logging format | Log parsers may break | Check monitoring/alerting dependencies |\n| Dependency major bump | Transitive breaking change | Check dependency's changelog |\n| Changed file structure | Import paths change | Check if re-exports maintained |\n\n### Definite Non-Breaking → Minor or Patch\n\n- Added new public function/class/method\n- Added optional parameter with default value\n- Added new field to response object (clients ignore unknown)\n- Added new API endpoint\n- Fixed bug that was returning wrong data\n- Improved error messages (without changing exception types)\n- Performance improvement\n- Documentation update\n\n## Version Detection / 版本检测\n\n### npm Package\n\n```bash\n# Get all published versions\nnpm view package-name versions --json 2>/dev/null\n\n# Get latest published version\nPUBLISHED=$(npm view package-name version 2>/dev/null || echo \"0.0.0\")\n\n# Get local version\nLOCAL=$(node -p \"require('./package.json').version\" 2>/dev/null || echo \"unknown\")\n\n# Check if version already published\nnpm view \"package-name@${LOCAL}\" version 2>/dev/null && echo \"ALREADY PUBLISHED\" || echo \"NEW VERSION\"\n```\n\n### Python Package\n\n```bash\n# Get all published versions from PyPI\npip index versions package-name 2>/dev/null | head -1\n\n# Or via API\ncurl -s \"https://pypi.org/pypi/package-name/json\" 2>/dev/null | python3 -c \"import sys,json; print(json.load(sys.stdin)['info']['version'])\"\n\n# Get local version\nLOCAL=$(python3 -c \"import configparser; c=configparser.ConfigParser(); c.read('pyproject.toml'); print(c['project']['version'])\" 2>/dev/null || echo \"unknown\")\n\n# Alternative: parse from __init__.py or _version.py\nLOCAL=$(python3 -c \"from package import __version__; print(__version__)\")\n```\n\n### Git Tags\n\n```bash\n# List all version tags\ngit tag -l 'v*' --sort=-version:refname | head -20\n\n# Get latest tag\nLATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo \"v0.0.0\")\n\n# Commits since last tag\ngit log \"${LATEST_TAG}..HEAD\" --oneline\n```\n\n## Change Analysis → Version Recommendation / 变更分析到版本建议\n\n### Step 1: Categorize All Changes\n\n```bash\n# Get commit messages since last release\ngit log \"v${PUBLISHED}\"..HEAD --pretty=format:\"%s\" | while read -r msg; do\n type=$(echo \"$msg\" | sed -n 's/^\\(feat\\|fix\\|refactor\\|docs\\|chore\\|perf\\|test\\|build\\|ci\\)(\\(.*\\)):.*$/\\1/p')\n scope=$(echo \"$msg\" | sed -n 's/^\\(feat\\|fix\\|refactor\\|docs\\|chore\\|perf\\|test\\|build\\|ci\\)(\\(.*\\)):.*$/\\2/p')\n echo \"${type:-other}|${scope:-global}|${msg}\"\ndone\n```\n\n### Step 2: Map to Version Impact\n\n| Conventional Commit Type | Version Impact | Unless |\n|-------------------------|---------------|--------|\n| `feat!` or `feat!(` | MAJOR | — |\n| `feat` | MINOR | — |\n| `fix` | PATCH | — |\n| `perf` | PATCH | — |\n| `refactor` | NONE* | Unless it changes public API |\n| `docs` | NONE | — |\n| `test` | NONE | — |\n| `chore` | NONE | — |\n| `ci` | NONE | — |\n| `build` | NONE | Unless dependency major bump |\n\n*Merge to highest impact across all commits.\n\n### Step 3: Generate Recommendation\n\n```markdown\n## Version Recommendation\n\n**Current version**: {current}\n**Recommended version**: {recommended}\n**Bump type**: {major|minor|patch}\n\n### Justification\n\n**Breaking changes** ({count}):\n- {description} [commit permalink]\n\n**New features** ({count}):\n- {description} [commit permalink]\n\n**Bug fixes** ({count}):\n- {description} [commit permalink]\n\n### Pre-release Considerations\n\n- [ ] All breaking changes documented in migration guide\n- [ ] Deprecation warnings added in previous minor release (if applicable)\n- [ ] Changelog entry prepared\n- [ ] Package version updated in all manifest files\n```\n\n## Pre-release Checklist / 发布前清单\n\nBefore finalizing version bump:\n\n1. **Version consistency**: Same version in `package.json`, `pyproject.toml`, `__init__.py`, `CHANGELOG.md`\n2. **Changelog entry**: Added under `[Unreleased]` or new version heading\n3. **No snapshot dependencies**: No `*` or `latest` version ranges in production deps\n4. **Lock file updated**: `package-lock.json` or `poetry.lock` committed and matching\n5. **Git tag ready**: Tag format matches existing convention (`v1.2.3` or `1.2.3`)","content_type":"text/markdown; charset=utf-8","language":"markdown","size":6825,"content_sha256":"8150bfd2b98ec04517940ac630452a25695e61a103efef93ec37c2c07c8299a1"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":2},"content":[{"text":"Safety Rules","type":"text"}]},{"type":"paragraph","content":[{"text":"Critical","type":"text","marks":[{"type":"strong"}]},{"text":": Read and follow [global-rules/bash-safety.md](file:///Users/fred/.config/opencode/skills/global-rules/rules/bash-safety.md) for all bash/command execution.","type":"text"}]},{"type":"paragraph","content":[{"text":"Core rules:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Always set explicit ","type":"text","marks":[{"type":"strong"}]},{"text":"timeout","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" on bash calls","type":"text","marks":[{"type":"strong"}]},{"text":" — 30s for tests, 60s for installs, never default","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Never run unscoped full test suites","type":"text","marks":[{"type":"strong"}]},{"text":" — use ","type":"text"},{"text":"-k","type":"text","marks":[{"type":"code_inline"}]},{"text":" or file paths to limit scope","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Never use ","type":"text","marks":[{"type":"strong"}]},{"text":"rm -rf","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" without variable guards","type":"text","marks":[{"type":"strong"}]},{"text":", ","type":"text"},{"text":"curl|bash","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"sudo","type":"text","marks":[{"type":"code_inline"}]},{"text":", or ","type":"text"},{"text":"kill -9","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Infinite loops must have hard timeout + budget limits","type":"text","marks":[{"type":"strong"}]},{"text":" — no unbounded while(True)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Redirect stdin","type":"text","marks":[{"type":"strong"}]},{"text":" with ","type":"text"},{"text":"\u003c /dev/null","type":"text","marks":[{"type":"code_inline"}]},{"text":" for non-interactive commands","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"A bash timeout that triggers SIGKILL corrupts the terminal FD, crashes opencode's TUI, and forces a GUI restart.","type":"text"}]},{"type":"heading","attrs":{"level":1},"content":[{"text":"把关 (Pre-Publish Review)","type":"text"}]},{"type":"paragraph","content":[{"text":"发布前核弹级审查。三层审查确保发布质量。 Nuclear-grade pre-publish review. Three-layer review ensures release quality.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Commands","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Command","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/把关","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"启动完整发布前审查","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/把关 check","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"检查未发布变更","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/把关 version","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"建议版本升级","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/把关 report","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"生成审查报告","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/review","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Start full pre-publish review","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/review check","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Check unpublished changes","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/review version","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Suggest version bump","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"三层审查架构/Three-Layer Review","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"┌─────────────────────────────────────────────────────────────────────┐\n│ 发布前三层审查/Pre-Publish Review │\n├─────────────────────────────────────────────────────────────────────┤\n│ │\n│ Layer 1: 逐变更审查/Per-Change (最多 10 个智能体) │\n│ ├── 变更组 A 深度分析/Group A deep analysis │\n│ ├── 变更组 B 深度分析/Group B deep analysis │\n│ └── ... │\n│ │\n│ Layer 2: 整体审查/Holistic (5 角色并行/5 roles) │\n│ ├── 架构师/Architect: 架构合规性 │\n│ ├── 开发者/Developer: 代码质量 │\n│ ├── 测试员/Tester: 测试覆盖 │\n│ ├── 安全专家/Security: 安全检查 │\n│ └── 文档/Docs: 文档完整性 │\n│ │\n│ Layer 3: 综合评估/Synthesis (1 个智能体) │\n│ └── 汇总所有审查结果,给出发行建议/Summary & recommendation │\n│ │\n└─────────────────────────────────────────────────────────────────────┘","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"审查流程/Review Workflow","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 0: 检测未发布变更/Detect Changes","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 获取已发布版本/Get published version\nPUBLISHED=$(npm view package-name version 2>/dev/null || echo \"not published\")\n\n# 获取本地版本/Get local version\nLOCAL=$(node -p \"require('./package.json').version\" 2>/dev/null || echo \"unknown\")\n\n# 获取变更列表/Get commit list\ngit log \"v${PUBLISHED}\"..HEAD --oneline\n\n# 获取变更文件/Get changed files\ngit diff --name-only \"v${PUBLISHED}\"..HEAD\n\n# 获取变更统计/Get diff stats\ngit diff \"v${PUBLISHED}\"..HEAD --stat","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 1: 变更分组/Group Changes","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## 变更分组/Change Groups\n\n### 新功能/Features (feat)\n| 范围/Scope | 文件/Files | 行数/Lines | 复杂度/Complexity |\n|-----------|-----------|-----------|-----------------|\n| auth | +150/-30 | +120 | 中/Medium |\n\n### Bug 修复/Bug Fixes (fix)\n| 范围/Scope | 文件/Files | 行数/Lines | 复杂度/Complexity |\n|-----------|-----------|-----------|-----------------|\n| api | +20/-15 | +5 | 低/Low |\n\n### 重构/Refactoring (refactor)\n...\n\n### 文档/Documentation (docs)\n...","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 2: 逐变更审查/Per-Change Review","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## 变更审查报告/Change Review - {scope}\n\n**变更类型/Type**: {feat/fix/refactor}\n**影响文件/Files**: {file_list}\n**代码变更/Changes**: +{added}/-{removed}\n\n### 正确性/Correctness\n- [ ] 逻辑正确/Logic correct\n- [ ] 边界处理/Edge cases\n- [ ] 错误处理/Error handling\n\n### 测试覆盖/Test Coverage\n- [ ] 有单元测试/Unit tests\n- [ ] 有集成测试/Integration tests\n- [ ] 边界测试/Edge case tests\n\n### 代码质量/Code Quality\n- [ ] 命名清晰/Clear naming\n- [ ] 函数简短/Short functions\n- [ ] 无重复代码/No duplication\n\n### 证据链接/Evidence Links\n- [文件链接](https://github.com/...)#L10-L50","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 3: 整体审查/Holistic Review","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## 整体审查报告/Holistic Review\n\n### 架构审查/Architecture\n**通过/Pass**:\n- ✅ 架构设计合理/Design reasonable\n- ✅ 模块划分清晰/Modules clear\n\n**改进/Improve**:\n- ⚠️ 建议增加配置层/Add config layer\n\n### 代码审查/Code\n**通过/Pass**:\n- ✅ 代码风格一致/Consistent style\n- ✅ 无严重问题/No critical issues\n\n**改进/Improve**:\n- ⚠️ 部分函数过长/Some functions too long\n\n### 测试审查/Tests\n**通过/Pass**:\n- ✅ 核心功能有测试/Core tested\n\n**改进/Improve**:\n- ⚠️ 边界测试不足/Edge tests insufficient\n\n### 安全审查/Security\n...\n\n### 文档审查/Docs\n...","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 4: 综合评估/Synthesis","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## 发布综合评估/Release Assessment\n\n**版本建议/Version**: {patch/minor/major}\n**发布风险/Risk**: {低/Low/中/Medium/高/High}\n\n### 审查汇总/Summary\n| 层次/Layer | 状态/Status | 问题数/Issues |\n|-----------|------------|--------------|\n| 逐变更/Per-Change | ✅/⚠️ | {count} |\n| 整体/Holistic | ✅/⚠️ | {count} |\n| 综合/Synthesis | ✅/⚠️ | {count} |\n\n### 发布清单/Checklist\n- [ ] 所有 P0 问题已解决/All P0 resolved\n- [ ] 测试覆盖率达标/Coverage达标\n- [ ] 文档已更新/Docs updated\n- [ ] 版本号已升级/Version bumped\n\n### 决策/Decision\n{可以发布/Ready / 需要修复/Fix needed / 不建议发布/Not ready}","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"版本建议规则/Version Rules","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"【版本升级/Version Bump】\n\nMajor (主版本):\n- 有破坏性变更/Breaking changes\n- API 不兼容/API incompatible\n\nMinor (次版本):\n- 有新功能/New features\n- 向后兼容/Backward compatible\n\nPatch (修订号):\n- 只有 Bug 修复/Bug fixes only\n- 文档更新/Docs only","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"输出报告/Output Reports","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"/tmp/{YYYYMMDD-HHmmss}/\n├── changes.md # 变更分析/Change analysis\n├── per-change-*.md # 逐变更审查/Per-change review\n├── holistic.md # 整体审查/Holistic review\n└── release-review.md # 综合报告/Final report","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"使用示例/Examples","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"用户/User: /把关\n\n→ Phase 0: 检测未发布变更/Detect changes\n→ Phase 1: 变更分组/Group changes\n→ Phase 2: 逐变更审查/Per-change review (parallel)\n→ Phase 3: 整体审查/Holistic review (5 roles)\n→ Phase 4: 综合评估/Synthesis\n→ 输出发行建议/Output recommendation","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Integration with Other Skills / 与其他技能集成","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"/architect review","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"master-architect","type":"text","marks":[{"type":"strong"}]},{"text":" for architectural review during the Layer 2 holistic phase. Run ","type":"text"},{"text":"/architect review","type":"text","marks":[{"type":"code_inline"}]},{"text":" to validate module cohesion, interface contracts, and test coverage alongside ba-guan's own multi-role analysis.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"/安检","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"an-jian","type":"text","marks":[{"type":"strong"}]},{"text":" for security audit. Run ","type":"text"},{"text":"/安检 scan","type":"text","marks":[{"type":"code_inline"}]},{"text":" as a dedicated security pass, then feed results into ba-guan's Layer 2 security review for the final report.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"/审视 \u003cURL>","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"shen-shi","type":"text","marks":[{"type":"strong"}]},{"text":" for GitHub-based code review patterns. Apply ","type":"text"},{"text":"/审视","type":"text","marks":[{"type":"code_inline"}]},{"text":" to analyze related PRs and issues before finalizing the release assessment, borrowing evidence-based review methodology.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"/iterate \u003cn>","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"iteration-manager","type":"text","marks":[{"type":"strong"}]},{"text":" for iterative improvement cycles after review. When ba-guan's report identifies issues, run ","type":"text"},{"text":"/iterate 3","type":"text","marks":[{"type":"code_inline"}]},{"text":" to fix them and re-verify before the final ","type":"text"},{"text":"/把关","type":"text","marks":[{"type":"code_inline"}]},{"text":" decision.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Rules","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rules/change-detection.md","type":"text","marks":[{"type":"link","attrs":{"href":"rules/change-detection.md","title":null}}]},{"text":" - 变更检测/Change Detection","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rules/review-roles.md","type":"text","marks":[{"type":"link","attrs":{"href":"rules/review-roles.md","title":null}}]},{"text":" - 审查角色/Review Roles","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rules/version-bump.md","type":"text","marks":[{"type":"link","attrs":{"href":"rules/version-bump.md","title":null}}]},{"text":" - 版本规则/Version Rules","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"配置选项/Configuration","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"参数/Param","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"默认值/Default","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"说明/Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"change_groups","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"10","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"最大变更组数/Max groups","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"reviewers","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"5","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"审查角色数/Reviewers","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coverage_threshold","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"70%","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"测试覆盖阈值/Coverage threshold","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"常见问题与排查 / Troubleshooting","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"审查无变更可发现 / No changes detected","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"症状/Symptom","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"/把关 check","type":"text","marks":[{"type":"code_inline"}]},{"text":" 报告0个变更 / reports zero changes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"解决/Fix","type":"text","marks":[{"type":"strong"}]},{"text":": 检查 ","type":"text"},{"text":"git diff --stat","type":"text","marks":[{"type":"code_inline"}]},{"text":" 是否有变更;确认分支追踪正确;使用 ","type":"text"},{"text":"/把关 check --unstaged","type":"text","marks":[{"type":"code_inline"}]},{"text":" 包含未暂存变更","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"审查角色冲突建议 / Conflicting review recommendations","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"症状/Symptom","type":"text","marks":[{"type":"strong"}]},{"text":": 架构师和开发者给出相反建议 / Architect and Developer give opposite recommendations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"解决/Fix","type":"text","marks":[{"type":"strong"}]},{"text":": 使用 ","type":"text"},{"text":"/把关 --synthesize","type":"text","marks":[{"type":"code_inline"}]},{"text":" 触发综合器汇总;手动审查冲突点;设定优先级:安全 > 架构 > 测试 > 文档","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"逐变更审查超时 / Per-change review timeout","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"症状/Symptom","type":"text","marks":[{"type":"strong"}]},{"text":": 单次变更审查超过5分钟上限 / Single change review exceeds 5min limit","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"解决/Fix","type":"text","marks":[{"type":"strong"}]},{"text":": 减少每个变更组的文件数;使用 ","type":"text"},{"text":"/把关 --max-files 5","type":"text","marks":[{"type":"code_inline"}]},{"text":" 限制每组文件数;增加 ","type":"text"},{"text":"--timeout","type":"text","marks":[{"type":"code_inline"}]},{"text":" 参数","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"边界情况 / Edge Cases","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"空仓库首次发布","type":"text","marks":[{"type":"strong"}]},{"text":": 绕过错层分析,只做整体评审和文档检查","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"大量变更(>100文件)","type":"text","marks":[{"type":"strong"}]},{"text":": 自动分组到10个智能体上限;超过部分排队处理","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Monorepo发布","type":"text","marks":[{"type":"strong"}]},{"text":": 使用 ","type":"text"},{"text":"--scope \u003cpackage>","type":"text","marks":[{"type":"code_inline"}]},{"text":" 限定审查范围到单个包","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"紧急发布","type":"text","marks":[{"type":"strong"}]},{"text":": 使用 ","type":"text"},{"text":"/把关 --urgent","type":"text","marks":[{"type":"code_inline"}]},{"text":" 跳过文档审查层,仅做安全+架构审查","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"回滚发布","type":"text","marks":[{"type":"strong"}]},{"text":": 比较回滚前后的diff,标记回滚引入的新风险","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"版本历史 / Version History","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"版本","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"日期","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"变更","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1.0.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2026-04-01","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"初始版本,三层审查架构","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1.1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2026-05-09","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"添加安全规则,集成,排查,边界情况,3个rule文件","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"See Also / 相关技能","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/安检","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"an-jian","type":"text","marks":[{"type":"strong"}]},{"text":" — 整体审查中的安全审计层 / Security audit layer in holistic review","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/architect review","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"master-architect","type":"text","marks":[{"type":"strong"}]},{"text":" — 整体审查中的架构审查层 / Architecture review layer in holistic review","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/合并","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"he-bing","type":"text","marks":[{"type":"strong"}]},{"text":" — 审查通过后的 PR 工作流 / PR workflow after review passes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/审视","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"shen-shi","type":"text","marks":[{"type":"strong"}]},{"text":" — 基于 GitHub 的代码审查模式 / GitHub-based code review patterns","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"ba-guan","author":"@skillopedia","source":{"stars":6,"repo_name":"skills","origin_url":"https://github.com/cycleuser/skills/blob/HEAD/skills/ba-guan/SKILL.md","repo_owner":"cycleuser","body_sha256":"59c1841c054703d9c9fcb3b45df61089653499be02286530be9e1f532d7e3e98","cluster_key":"42cdfd24e6acf8fb72cd0ce24ba0565112deba4545c9aa8aacb46c25cb48fa70","clean_bundle":{"format":"clean-skill-bundle-v1","source":"cycleuser/skills/skills/ba-guan/SKILL.md","attachments":[{"id":"de27f7d4-e555-52c3-882c-d669dc93ba0d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/de27f7d4-e555-52c3-882c-d669dc93ba0d/attachment.md","path":"rules/change-detection.md","size":5887,"sha256":"af064a5a91e3d3a9715354262130c29395c2350e9b5eb03e7c762feed50c08d6","contentType":"text/markdown; charset=utf-8"},{"id":"c98645a5-f2db-57d0-8d09-ba91c5e340db","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c98645a5-f2db-57d0-8d09-ba91c5e340db/attachment.md","path":"rules/review-roles.md","size":9468,"sha256":"05bc3cdc2a357b0353f8cef8d0d91701221439c4922c70bcb0ba885c2ba5465d","contentType":"text/markdown; charset=utf-8"},{"id":"55ae3a4b-a489-570a-a280-dc18ae6695e1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/55ae3a4b-a489-570a-a280-dc18ae6695e1/attachment.md","path":"rules/version-bump.md","size":6825,"sha256":"8150bfd2b98ec04517940ac630452a25695e61a103efef93ec37c2c07c8299a1","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"df7ee9bfc7ebf15a4d4868db52c9da377a177e25384519d022d29e2ccbbe8408","attachment_count":3,"text_attachments":3,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/ba-guan/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"security","category_label":"Security"},"exact_dupes_collapsed_into_this":0},"license":"MIT","version":"v1","category":"security","import_tag":"clean-skills-v1","description":"Pre-publish review with multi-layer deep analysis for code quality assurance before release.\n\nTriggers when: Preparing to publish an npm package, needing pre-release review, or checking code change quality.\n\nCommands:\n- /把关 - Start full pre-publish review\n- /把关 check - Check unpublished changes\n- /把关 version - Suggest version bump\n- /把关 report - Generate review report\n- /review \u003ctask> - English command for pre-publish review\n\nCapabilities: Detect unpublished changes, per-change deep analysis, multi-role review (architect/developer/tester/security/docs), version suggestion, release risk assessment\n"}},"renderedAt":1782980931973}

Safety Rules Critical : Read and follow global-rules/bash-safety.md for all bash/command execution. Core rules: 1. Always set explicit on bash calls — 30s for tests, 60s for installs, never default 2. Never run unscoped full test suites — use or file paths to limit scope 3. Never use without variable guards , , , or 4. Infinite loops must have hard timeout + budget limits — no unbounded while(True) 5. Redirect stdin with for non-interactive commands A bash timeout that triggers SIGKILL corrupts the terminal FD, crashes opencode's TUI, and forces a GUI restart. 把关 (Pre-Publish Review) 发布前核弹级审查…