From bbecc510d3c3d4060d61e5c28b075c1e21ad5ab6 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:03:47 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 ++++++++ README.md | 3 ++ commands/implement-tests.md | 5 +++ commands/implement.md | 8 +++++ commands/plan.md | 15 +++++++++ commands/skip.md | 1 + commands/update-docs.md | 11 +++++++ plugin.lock.json | 61 +++++++++++++++++++++++++++++++++++++ 8 files changed, 116 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/implement-tests.md create mode 100644 commands/implement.md create mode 100644 commands/plan.md create mode 100644 commands/skip.md create mode 100644 commands/update-docs.md create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..3fc44bd --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "doc-driven-development", + "description": "Documentation-driven development workflow for planning and implementing code changes based on markdown documentation", + "version": "1.0.4", + "author": { + "name": "Cliff Brake", + "email": "cbrake@bec-systems.com" + }, + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..87a1f50 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# doc-driven-development + +Documentation-driven development workflow for planning and implementing code changes based on markdown documentation diff --git a/commands/implement-tests.md b/commands/implement-tests.md new file mode 100644 index 0000000..8da0bf9 --- /dev/null +++ b/commands/implement-tests.md @@ -0,0 +1,5 @@ +Implement tests for features described in the documentation (`*.md`) and +`plans/` directory changes - see changes with `git diff`. + +Note for this command, the documentation is driving the test code changes, not +the other way around. diff --git a/commands/implement.md b/commands/implement.md new file mode 100644 index 0000000..52b4938 --- /dev/null +++ b/commands/implement.md @@ -0,0 +1,8 @@ +Implement code changes for features described in the documentation (`*.md`) and +`plans/` directory changes - see changes with `git diff`. + +Note for this command, the documentation is driving the code changes, not the +other way around. + +After the plan is updated, update the plan with any changes and change the +status in the plan file to `Implemented`. diff --git a/commands/plan.md b/commands/plan.md new file mode 100644 index 0000000..309e1e7 --- /dev/null +++ b/commands/plan.md @@ -0,0 +1,15 @@ +Create a plan file named `plans/-"$ARGUMENTS".md`. Replace spaces +with '-' in the filename. + +If a plan already exists that has not be committed, then update that plan. + +Then switch to plan mode and create a plan for coding the current changes and +untracked files (start with `git diff` and `git status`) described in the +README.md and other documentation files. Note, in this phase, we are using +documentation to drive the code, not the other way around. When the plan is +complete, write it to the plan file. + +The documentation may be written in past tense as if the feature already exists. +Assume any changes that have not been committed have not been implemented yet, +even though they are described as already implemented. This is a side effect of +documentation driven development. diff --git a/commands/skip.md b/commands/skip.md new file mode 100644 index 0000000..c88f250 --- /dev/null +++ b/commands/skip.md @@ -0,0 +1 @@ +Skip this edit/command and continue what you were doing. diff --git a/commands/update-docs.md b/commands/update-docs.md new file mode 100644 index 0000000..b348427 --- /dev/null +++ b/commands/update-docs.md @@ -0,0 +1,11 @@ +Update any relevant documentation to accurately reflect the current code changes (`git diff`) +and fill in any missing information. Some guidelines: + +- Be concise. AI tends to generate very verbose/wordy documentation. Don't do that. +- Don't add trivial examples that users can easily figure out. +- Avoid duplicated information when possible. + +Update `CLAUDE.md` with any architectural or technical details. + +Also, update the `CHANGELOG.md` to describe changes as benefits to the user. It should not +include technical details of the change - that is what `git log` is for. diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..e517b5c --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:cbrake/claude-plugins:doc-driven-development", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "994b2f2d4f014d36e55cba24ff90f26c521a2107", + "treeHash": "037dbce7bcfaab2ed8e382d75e39903aa28043e416de5662580941e37212d7ac", + "generatedAt": "2025-11-28T10:14:30.867999Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "doc-driven-development", + "description": "Documentation-driven development workflow for planning and implementing code changes based on markdown documentation", + "version": "1.0.4" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "7bb17f1ea8e130686053e50229625c3e2664bc13368dc1ffe3ef41cc49c3ed76" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "5f6034e6e0cf2eaa2a775110bb920384baa4bd98cf94b20ffe2e0560ca3ecdb2" + }, + { + "path": "commands/implement.md", + "sha256": "4e2549ae0eee96ad2f16ecf59d43b1f28fb8619e67527d3f371f520d28f6ef23" + }, + { + "path": "commands/update-docs.md", + "sha256": "7074dadaea314f57817529f5a727af368407ab76361b40393bce8a8abe1cbb14" + }, + { + "path": "commands/skip.md", + "sha256": "acec5ed712ccf488f1a7fadf2f9adc0aad7ac35afffa0bde4ff6d1fb9d269737" + }, + { + "path": "commands/plan.md", + "sha256": "a76a60ce5f115e6a405ce1703d86b9e3a996139a56587d7ac7a866cd085ef798" + }, + { + "path": "commands/implement-tests.md", + "sha256": "f94f811da73c11d06b59fac49a4bb1fae86926931e04a92091841ee956bb7911" + } + ], + "dirSha256": "037dbce7bcfaab2ed8e382d75e39903aa28043e416de5662580941e37212d7ac" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file