feat(docs): design doc + implementation plan convention (closes #67 phase-1)#156
Closed
Wolfvin wants to merge 1 commit into
Closed
feat(docs): design doc + implementation plan convention (closes #67 phase-1)#156Wolfvin wants to merge 1 commit into
Wolfvin wants to merge 1 commit into
Conversation
…hase-1) Adds Phase 1 of issue #67: a docs convention that requires feature-class PRs to include a design doc and an implementation plan, enforced by CI. What's new: - docs/design/template.md -- Problem, Goal, Changes, Trade-offs, Open Questions, Findings sections. - docs/plans/template.md -- phase-based implementation checklist with acceptance criteria, test strategy, rollout, risks. - docs/design/README.md, docs/plans/README.md -- usage guides. - Four backfilled design docs for features that pre-date the convention: * docs/design/taint-engine.md (issue #49 / PR #140) * docs/design/mcp-server.md * docs/design/plugin-system.md * docs/design/graph-model.md - scripts/check_design_doc.py -- CI check. A PR adding any new file under scripts/commands/, scripts/parsers/<name>_parser.py, scripts/<name>_engine.py, or scripts/mcp_hooks/ MUST also add at least one .md under docs/design/ AND one under docs/plans/. Template and README files do not count. - .github/workflows/require-design-doc.yml -- runs the check on PR opened / synchronize / reopened / labeled / unlabeled. Posts a comment on failure explaining how to fix. - CONTRIBUTING.md -- new 'Design Documents & Implementation Plans' section. - tests/test_check_design_doc.py -- 37 tests including end-to-end with a real temp git repo. - CHANGELOG.md -- entry under [8.2.0]. Exemptions: PRs labeled skip-design-doc, bug, chore, dependencies, refactor, documentation, or test are exempt. PRs that do not add any feature-class file are also exempt. Scope: Phase 1 only. Phase 2 (VitePress homepage) and Phase 3 (live demo) remain open in issue #67. Tests: 37 passed in tests/test_check_design_doc.py. Baseline: 167 passed in tests/{test_check_design_doc,test_command_count, test_cli,test_formatters,test_doctor,test_version_consistency}.py. Pre-existing collection errors (test_rule_engine, test_rule_matcher, test_lsp_server) are environment-driven (missing tree-sitter / LSP in sandbox), not regressions -- see CONTEXT.md.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Closes #67 (Phase 1 only)
Summary
Adds Phase 1 of issue #67: a docs convention that requires feature-class PRs to include a design doc and an implementation plan, enforced by CI.
Phase 2 (VitePress homepage at
codelens.dev) and Phase 3 (live demo with interactive dashboard) remain open — they are multi-week content projects tracked in #67.What's new
Templates + guides
docs/design/template.md— Problem / Goal / Changes / Trade-offs / Open Questions / Findings sections.docs/plans/template.md— phase-based implementation checklist with acceptance criteria, test strategy, rollout, risks.docs/design/README.md,docs/plans/README.md— usage guides for both directories.Backfilled design docs (4 — exceeds the 3+ acceptance criterion)
docs/design/taint-engine.md— AST taint analysis (issue [FEATURE] Taint analysis depth — unified cross-file engine + persistence + library approximation + debug trace #49 / PR feat(taint): consolidate cross-file engine into ast_taint_engine + deprecate semantic_engine (closes #49 phase-1) #140)docs/design/mcp-server.md— MCP server architecture (61 tools, JSON-RPC over stdio)docs/design/plugin-system.md— Plugin system (4 plugin types, 3-tier discovery)docs/design/graph-model.md— SQLite graph model (v8.2:graph_nodes+graph_edges)These are backfills for features that shipped before this convention existed. Each follows the template structure (Problem, Goal, Changes, Trade-offs, Open Questions, Findings) and is grounded in the actual source code.
CI check
scripts/check_design_doc.py— the actual check logic. Pure functions + a thin CLI entry point. A PR adding any new file matching:scripts/commands/<name>.py(new CLI command)scripts/parsers/<name>_parser.py(new tree-sitter parser)scripts/<name>_engine.py(new top-level engine)scripts/mcp_hooks/<name>.py(new MCP hook)MUST also add at least one new
.mdunderdocs/design/AND one underdocs/plans/.template.mdandREADME.mddo NOT count..github/workflows/require-design-doc.yml— runs the check on PRopened/synchronize/reopened/labeled/unlabeled. Posts a comment on failure explaining how to fix.Exemptions
PRs labeled
skip-design-doc,bug,chore,dependencies,refactor,documentation, ortestare exempt. PRs that do not add any feature-class file are also exempt (no-op).Docs update
CONTRIBUTING.md— new 'Design Documents & Implementation Plans' section under 'How Can I Contribute?'. The 'Adding New Parsers or Engines' checklist now includes a step 3: 'Write a design doc'.CHANGELOG.md— entry under[8.2.0] — Unreleased.Tests
tests/test_check_design_doc.py— 37 tests:TestIsFeatureClass— 12 tests covering the feature-class file regex (commands, parsers, engines, mcp_hooks;__init__.pyexemptions; fallback parsers; subpackage files).TestIsDesignOrPlanDoc— 8 tests covering doc detection (correct dir, wrong dir, non-md, template/README exclusion).TestEvaluate— 10 tests covering the policy logic (no-feature pass, both-docs pass, missing-design fail, missing-plan fail, missing-both, exemption labels, case-insensitive labels, template-only does not satisfy).TestEndToEndWithGit— 4 tests creating a real temp git repo, committing files on a branch, and invoking the script as a subprocess.Acceptance criteria check
From issue #67 Phase 1:
docs/design/anddocs/plans/directories exist with templates(Phase 2 and Phase 3 acceptance criteria are out of scope for this PR.)
Tests
tests/test_check_design_doc.py: 37 passed, 0 failedtest_check_design_doc.py,test_command_count.py,test_cli.py,test_formatters.py,test_doctor.py,test_version_consistency.pytest_rule_engine.py,test_rule_matcher.py,test_lsp_server.pyare environment-driven (missingtree-sitter/ LSP in sandbox), NOT regressions — seeCONTEXT.md.Self-check
The new CI check correctly identifies THIS PR as compliant:
(
scripts/check_design_doc.pydoes not match any feature-class pattern — it's a CI helper, not a new command/parser/engine/mcp_hook. So this PR is correctly exempt.)Findings (per pre-flight SKILL.md)
raranosonu58linking to a malicious.apkfile (vitepress_patch_v2.apkhosted atgithub.com/keracocobe/123/releases/download/update/module.apk). This is NOT a taking comment. Suggest BOS delete the spam comment and block the user.skip-design-doclabel is the only override.homepage/directory that does not exist yet. This is out of scope for Phase 1.Related
_skills/pre-flight/SKILL.md,_skills/issue-workflow/SKILL.md,_skills/context-snapshot/CodeLens/CONTEXT.mdWolfvin/worker-skillswill updatecontext-snapshot/CodeLens/CONTEXT.mdwith the new convention (per CONTEXT.md's own instructions).