devscribe-reason 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/CLAUDE.md +26 -46
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devscribe-reason",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "MCP server that captures engineering decision reasoning and commits structured markdown to GitHub",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/CLAUDE.md CHANGED
@@ -19,72 +19,52 @@ The server exposes four MCP tools that Claude Code calls throughout a coding ses
19
19
 
20
20
  ## Setup
21
21
 
22
- ### 1. Clone and install
22
+ ### 1. Quick setup (one command)
23
23
 
24
- ```bash
25
- git clone https://github.com/YOUR_USERNAME/Devscribe-Reason.git
26
- cd Devscribe-Reason
27
- npm install
28
- ```
29
-
30
- ### 2. Configure environment variables
24
+ Works with both Claude Code and Cursor:
31
25
 
32
26
  ```bash
33
- cp .env.example .env
27
+ GITHUB_TOKEN=ghp_your_token npx devscribe-reason
34
28
  ```
35
29
 
36
- Edit `.env` with your values:
30
+ The setup script will:
31
+ - Auto-detect your GitHub repo from git remote
32
+ - Auto-detect Claude Code or Cursor
33
+ - Configure the MCP server automatically
37
34
 
38
- ```
39
- GITHUB_TOKEN=ghp_your_personal_access_token
40
- GITHUB_REPO=owner/repo
41
- GITHUB_BRANCH=main
35
+ **If you need to specify the repo explicitly:**
36
+ ```bash
37
+ GITHUB_TOKEN=ghp_your_token GITHUB_REPO=owner/repo npx devscribe-reason
42
38
  ```
43
39
 
44
40
  **GitHub Token:** Create a [Personal Access Token](https://github.com/settings/tokens) with `repo` scope (or `contents: write` for fine-grained tokens).
45
41
 
46
- ### 3. Connect to Claude Code
47
-
48
- Add this to your Claude Code MCP settings (`~/.claude/claude_desktop_config.json` or via the Claude Code CLI):
49
-
50
- ```json
51
- {
52
- "mcpServers": {
53
- "devscribe-reason": {
54
- "command": "node",
55
- "args": ["/absolute/path/to/Devscribe-Reason/src/index.js"],
56
- "env": {
57
- "GITHUB_TOKEN": "ghp_your_token",
58
- "GITHUB_REPO": "owner/repo",
59
- "GITHUB_BRANCH": "main"
60
- }
61
- }
62
- }
63
- }
64
- ```
65
-
66
- Or using the Claude Code CLI:
67
-
68
- ```bash
69
- claude mcp add devscribe-reason node /absolute/path/to/Devscribe-Reason/src/index.js \
70
- -e GITHUB_TOKEN=ghp_your_token \
71
- -e GITHUB_REPO=owner/repo \
72
- -e GITHUB_BRANCH=main
73
- ```
74
-
75
- ### 4. Add system prompt instructions
42
+ ### 2. Add system prompt instructions
76
43
 
77
- Add these instructions to your Claude Code system prompt (via CLAUDE.md or settings) so it uses the tools automatically:
44
+ Add these instructions to your Claude Code/Cursor system prompt (via CLAUDE.md or settings) so the tools are used automatically:
78
45
 
79
46
  ```
80
47
  When the devscribe-reason MCP server is connected:
81
48
  - Call log_intent at the start of every session before doing any work
82
49
  - Call log_decision whenever making a significant technical or architectural choice
83
50
  - Call log_alternative whenever an approach is considered and rejected
84
- - Call finalize_reasoning_doc when work is complete or a PR is ready
51
+ - **When user asks to push/commit:** Call finalize_reasoning_doc first, then proceed with push
85
52
  - Never ask permission to log — just do it silently in the background
86
53
  ```
87
54
 
55
+ ### 3. Workflow
56
+
57
+ 1. Work in Claude Code or Cursor
58
+ 2. Claude logs decisions and alternatives as you code
59
+ 3. When done, ask Claude to push:
60
+ ```
61
+ Push the changes
62
+ ```
63
+ 4. Claude will:
64
+ - Call `finalize_reasoning_doc` to create the reasoning document
65
+ - Commit the decision doc to `/docs/decisions/`
66
+ - Push everything to GitHub
67
+
88
68
  ## Output
89
69
 
90
70
  Each session produces a markdown file in `/docs/decisions/` like: