dev-playbooks 2.1.0 → 2.2.1

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,212 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.2.1] - 2025-01-20
9
+
10
+ ### Fixed
11
+ - Fix changelog display in update command
12
+ - Add complete version change records
13
+ - Include CHANGELOG.md in npm publish files
14
+ - Optimize update command performance
15
+ - Add version check caching (10-minute TTL)
16
+ - Avoid slow repeated network requests
17
+
18
+ ---
19
+
20
+ ## [2.2.0] - 2025-01-20
21
+
22
+ ### Added
23
+ - Every Code (`@just-every/code`) support
24
+ - Full Skills system support
25
+ - Skills directory: `~/.code/skills/` or `.code/skills/` (project-level)
26
+ - Uses `AGENTS.md` instruction file
27
+ - Install script now supports `--code-only` and `--with-code` options
28
+ - Version check caching (10-minute TTL) to speed up repeated `update` commands
29
+
30
+ ### Changed
31
+ - Updated README tools support table
32
+
33
+ ---
34
+
35
+ ## [2.1.0] - 2025-01-19
36
+
37
+ ### Added
38
+
39
+ - **Version Changelog Display**: When running `dev-playbooks update`, the CLI now displays a formatted changelog summary showing all changes between the current version and the latest version
40
+ - ✅ Automatic fetch from GitHub: Retrieves CHANGELOG.md from the repository
41
+ - 📋 Smart parsing: Extracts and displays only relevant version changes
42
+ - 🎨 Colorized output: Highlights different types of changes (features, warnings, etc.)
43
+ - 🔗 Graceful fallback: Shows GitHub release link if network fails
44
+ - 📊 Content limit: Displays first 10 lines per version to avoid information overload
45
+
46
+ ### Improved
47
+
48
+ - **User Experience**: Users can now make informed decisions about updates by reviewing what's new before upgrading
49
+
50
+ ---
51
+
52
+ ## [2.0.0] - 2026-01-19
53
+
54
+ ### Added
55
+
56
+ #### 🎯 Human-Friendly Document Templates
57
+
58
+ - **结论先行(Bottom Line Up Front)**: Every document (proposal, design, tasks, verification) now has a 30-second executive summary at the top
59
+ - ✅ What will result: List changes in plain language
60
+ - ❌ What won't result: Clearly state what won't change
61
+ - 📝 One-sentence summary: Understandable even for non-technical people
62
+
63
+ - **需求对齐(Alignment Check)**: Proposal phase now includes guided questions to uncover hidden requirements
64
+ - 👤 Role identification: Quick Starter / Platform Builder / Rapid Validator
65
+ - 🎯 Core requirements: Explicit + hidden requirements
66
+ - 💡 Multi-perspective recommendations: Different recommendations based on different roles
67
+
68
+ - **默认批准机制(Default Approval Mechanism)**: Reduce decision fatigue with auto-approval
69
+ - ⏰ User silence = agreement: Auto-approve after timeout
70
+ - 🎛️ Configurable timeout: proposal 48h / design 24h / tasks 24h / verification 12h
71
+ - 🔒 Retain control: Users can reject or customize at any time
72
+
73
+ - **项目级文档(Project-Level Documents)**: Knowledge retention and decision tracking
74
+ - 📋 User Profile (project-profile.md): Record role, requirements, constraints, preferences
75
+ - 📝 Decision Log (decision-log.md): Record all important decisions for retrospection
76
+
77
+ #### New Document Templates
78
+
79
+ - `skills/_shared/references/文档模板-proposal.md` (Chinese)
80
+ - `skills/_shared/references/文档模板-design.md` (Chinese)
81
+ - `skills/_shared/references/文档模板-tasks.md` (Chinese)
82
+ - `skills/_shared/references/文档模板-verification.md` (Chinese)
83
+ - `skills/_shared/references/文档模板-project-profile.md` (Chinese)
84
+ - `skills/_shared/references/文档模板-decision-log.md` (Chinese)
85
+ - `skills/_shared/references/批准配置说明.md` (Chinese)
86
+ - `skills/_shared/references/document-template-proposal.md` (English)
87
+ - `skills/_shared/references/document-template-design.md` (English)
88
+ - `skills/_shared/references/document-template-tasks.md` (English)
89
+ - `skills/_shared/references/document-template-verification.md` (English)
90
+ - `skills/_shared/references/document-template-project-profile.md` (English)
91
+ - `skills/_shared/references/document-template-decision-log.md` (English)
92
+ - `skills/_shared/references/approval-configuration-guide.md` (English)
93
+
94
+ #### Documentation
95
+
96
+ - Added `docs/v2.0.0-修改总结.md`: Comprehensive summary of v2.0.0 changes
97
+ - Updated README.md with v2.0.0 features section (both Chinese and English versions)
98
+
99
+ ### Changed
100
+
101
+ - **proposal-author skill**: Updated to use new document templates
102
+ - Now generates documents with "Bottom Line Up Front" section
103
+ - Includes "Alignment Check" to uncover hidden requirements
104
+ - Provides multi-perspective recommendations based on user role
105
+ - References new template files in prompts
106
+
107
+ ### Breaking Changes
108
+
109
+ ⚠️ **Document Structure Changes**
110
+
111
+ - Existing proposal.md files do not conform to the new structure
112
+ - Migration may be required for existing projects
113
+ - Old format is still supported but not recommended
114
+
115
+ **Mitigation**:
116
+ - Migration script will be provided in future releases
117
+ - Backward compatibility maintained for reading old format
118
+ - New projects will use new format by default
119
+
120
+ ⚠️ **Approval Mechanism Changes**
121
+
122
+ - Introduces default approval mechanism which may not fit all team workflows
123
+ - Default strategy is `auto_approve` but can be changed to `require_explicit`
124
+
125
+ **Mitigation**:
126
+ - Configurable approval strategy in `.devbooks/config.yaml`
127
+ - Can disable auto-approval for high-risk projects
128
+ - Timeout values are configurable
129
+
130
+ ### Design Philosophy
131
+
132
+ This release is inspired by:
133
+ - Cognitive Load Theory: Minimize extraneous load, maximize germane load
134
+ - Dual Process Theory: Design for both System 1 (fast) and System 2 (slow) thinking
135
+ - Nudge Theory: Use default options to guide better decisions
136
+ - Inverted Pyramid Structure: Put conclusions first, details later
137
+
138
+ **Core Principles**:
139
+ - 🎯 Assume users are non-technical: Use plain language, avoid jargon
140
+ - 🤔 Uncover hidden requirements: Guide users through questions
141
+ - ⏰ Reduce decision fatigue: Default approval with configurable timeout
142
+ - 📋 Knowledge retention: Project-level documents for long-term reference
143
+
144
+ ### Upgrade Guide
145
+
146
+ #### For Existing Projects
147
+
148
+ 1. Update npm package:
149
+ ```bash
150
+ npm install -g dev-playbooks-cn@2.0.0
151
+ # or
152
+ npm install -g dev-playbooks@2.0.0
153
+ ```
154
+
155
+ 2. (Optional) Migrate existing documents:
156
+ ```bash
157
+ # Migration script will be provided in future releases
158
+ devbooks migrate --from 1.x --to 2.0.0
159
+ ```
160
+
161
+ 3. (Optional) Configure approval mechanism:
162
+ Create `.devbooks/config.yaml`:
163
+ ```yaml
164
+ approval:
165
+ default_strategy: auto_approve
166
+ timeout:
167
+ proposal: 48
168
+ design: 24
169
+ tasks: 24
170
+ verification: 12
171
+ ```
172
+
173
+ 4. (Optional) Create project-level documents:
174
+ ```bash
175
+ devbooks init-profile
176
+ devbooks init-decision-log
177
+ ```
178
+
179
+ #### For New Projects
180
+
181
+ New projects will automatically use the new document templates. No migration needed.
182
+
183
+ ### References
184
+
185
+ - Report: "Protocol 2026: Cognitive Compatibility and Human-Computer Communication Standards in the AI-Native Era"
186
+ - Cognitive Load Theory (CLT)
187
+ - Dual Process Theory
188
+ - Nudge Theory
189
+ - Inverted Pyramid Structure
190
+
191
+ ---
192
+
193
+ ## [1.7.4] - 2026-01-18
194
+
195
+ ### Changed
196
+ - Various bug fixes and improvements
197
+
198
+ ---
199
+
200
+ ## [1.7.0] - 2026-01-15
201
+
202
+ ### Added
203
+ - Initial release with 18 skills
204
+ - Support for Claude Code, Codex CLI, and other AI tools
205
+ - Quality gates and role isolation
206
+ - MCP integration support
207
+
208
+ ---
209
+
210
+ [2.0.0]: https://github.com/Darkbluelr/dev-playbooks-cn/compare/v1.7.4...v2.0.0
211
+ [1.7.4]: https://github.com/Darkbluelr/dev-playbooks-cn/compare/v1.7.0...v1.7.4
212
+ [1.7.0]: https://github.com/Darkbluelr/dev-playbooks-cn/releases/tag/v1.7.0
package/README.md CHANGED
@@ -80,6 +80,7 @@ In the proposal phase, guide users through questions:
80
80
  | **Codex CLI** | Full Skills | `AGENTS.md` |
81
81
  | **Qoder** | Full Skills | `AGENTS.md` |
82
82
  | **OpenCode (oh-my-opencode)** | Full Skills | `AGENTS.md` |
83
+ | **Every Code** | Full Skills | `AGENTS.md` |
83
84
  | **Cursor** | Rules | `.cursor/rules/` |
84
85
  | **Windsurf** | Rules | `.windsurf/rules/` |
85
86
  | **Gemini CLI** | Rules | `GEMINI.md` |
package/bin/devbooks.js CHANGED
@@ -34,6 +34,10 @@ const __dirname = path.dirname(__filename);
34
34
  const CLI_COMMAND = 'dev-playbooks';
35
35
  const XDG_CONFIG_HOME = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');
36
36
 
37
+ // Version check cache configuration
38
+ const VERSION_CACHE_FILE = path.join(os.tmpdir(), `${CLI_COMMAND}-version-cache.json`);
39
+ const VERSION_CACHE_TTL = 10 * 60 * 1000; // 10 minute cache
40
+
37
41
  // ============================================================================
38
42
  // Skills 支持级别定义
39
43
  // ============================================================================
@@ -172,6 +176,19 @@ const AI_TOOLS = [
172
176
  globalSlashDir: path.join(os.homedir(), '.codex', 'prompts'),
173
177
  instructionFile: 'AGENTS.md',
174
178
  available: true
179
+ },
180
+
181
+ // === Every Code / just-every/code (Full Skills Support) ===
182
+ {
183
+ id: 'code',
184
+ name: 'Every Code',
185
+ description: 'Every Code CLI (@just-every/code)',
186
+ skillsSupport: SKILLS_SUPPORT.FULL,
187
+ slashDir: null,
188
+ skillsDir: path.join(os.homedir(), '.code', 'skills'),
189
+ globalSlashDir: null,
190
+ instructionFile: 'AGENTS.md',
191
+ available: true
175
192
  }
176
193
  ];
177
194
 
@@ -317,11 +334,32 @@ function getCliVersion() {
317
334
  }
318
335
 
319
336
  /**
320
- * Check if a new version is available on npm
337
+ * Check if a new version is available on npm (with caching)
321
338
  * @returns {Promise<{hasUpdate: boolean, latestVersion: string|null, currentVersion: string}>}
322
339
  */
323
340
  async function checkNpmUpdate() {
324
341
  const currentVersion = getCliVersion();
342
+
343
+ // Check cache
344
+ try {
345
+ if (fs.existsSync(VERSION_CACHE_FILE)) {
346
+ const cache = JSON.parse(fs.readFileSync(VERSION_CACHE_FILE, 'utf-8'));
347
+ const cacheAge = Date.now() - cache.timestamp;
348
+
349
+ // If cache is valid and current version matches cached version, skip network request
350
+ if (cacheAge < VERSION_CACHE_TTL && cache.currentVersion === currentVersion) {
351
+ // If cache shows no update available, return cached result
352
+ if (!cache.hasUpdate) {
353
+ return { hasUpdate: false, latestVersion: cache.latestVersion, currentVersion };
354
+ }
355
+ // If cache shows update available, return cached result
356
+ return { hasUpdate: cache.hasUpdate, latestVersion: cache.latestVersion, currentVersion };
357
+ }
358
+ }
359
+ } catch {
360
+ // Cache read failed, continue with network request
361
+ }
362
+
325
363
  try {
326
364
  const { execSync } = await import('child_process');
327
365
  const latestVersion = execSync(`npm view ${CLI_COMMAND} version`, {
@@ -330,16 +368,29 @@ async function checkNpmUpdate() {
330
368
  stdio: ['pipe', 'pipe', 'pipe']
331
369
  }).trim();
332
370
 
371
+ let hasUpdate = false;
333
372
  if (latestVersion && latestVersion !== currentVersion) {
334
373
  // Simple semver comparison
335
374
  const current = currentVersion.split('.').map(Number);
336
375
  const latest = latestVersion.split('.').map(Number);
337
- const hasUpdate = latest[0] > current[0] ||
376
+ hasUpdate = latest[0] > current[0] ||
338
377
  (latest[0] === current[0] && latest[1] > current[1]) ||
339
378
  (latest[0] === current[0] && latest[1] === current[1] && latest[2] > current[2]);
340
- return { hasUpdate, latestVersion, currentVersion };
341
379
  }
342
- return { hasUpdate: false, latestVersion, currentVersion };
380
+
381
+ // Save cache
382
+ try {
383
+ fs.writeFileSync(VERSION_CACHE_FILE, JSON.stringify({
384
+ timestamp: Date.now(),
385
+ currentVersion,
386
+ latestVersion,
387
+ hasUpdate
388
+ }));
389
+ } catch {
390
+ // Cache write failed, ignore
391
+ }
392
+
393
+ return { hasUpdate, latestVersion, currentVersion };
343
394
  } catch {
344
395
  // Network error or timeout, silently ignore
345
396
  return { hasUpdate: false, latestVersion: null, currentVersion };
@@ -643,6 +694,8 @@ function getNpmIgnoreEntries() {
643
694
  '.opencode/',
644
695
  '.continue/',
645
696
  '.qoder/',
697
+ '.code/',
698
+ '.codex/',
646
699
  '.github/instructions/',
647
700
  '.github/copilot-instructions.md',
648
701
  '',
@@ -737,7 +790,7 @@ function printSkillsSupportInfo() {
737
790
  console.log(chalk.gray('─'.repeat(50)));
738
791
  console.log();
739
792
 
740
- console.log(chalk.green('★ 完整 Skills') + chalk.gray(' - Claude Code, Codex CLI, OpenCode, Qoder'));
793
+ console.log(chalk.green('★ 完整 Skills') + chalk.gray(' - Claude Code, Codex CLI, OpenCode, Qoder, Every Code'));
741
794
  console.log(chalk.gray(' └ 独立的 Skills/Agents 系统,可按需调用,有独立上下文'));
742
795
  console.log();
743
796
 
@@ -857,6 +910,8 @@ function getSkillsDestDir(tool, scope, projectDir) {
857
910
  return path.join(projectDir, '.codex', 'skills');
858
911
  } else if (tool.id === 'opencode') {
859
912
  return path.join(projectDir, '.opencode', 'skill');
913
+ } else if (tool.id === 'code') {
914
+ return path.join(projectDir, '.code', 'skills');
860
915
  }
861
916
  }
862
917
  // Global installation: use tool's defined global directory
@@ -870,8 +925,8 @@ function installSkills(toolIds, projectDir, scope = INSTALL_SCOPE.GLOBAL, update
870
925
  const tool = AI_TOOLS.find(t => t.id === toolId);
871
926
  if (!tool || tool.skillsSupport !== SKILLS_SUPPORT.FULL) continue;
872
927
 
873
- // Claude Code / Codex CLI / OpenCode (incl. oh-my-opencode) share the same Skills format
874
- if ((toolId === 'claude' || toolId === 'codex' || toolId === 'opencode') && tool.skillsDir) {
928
+ // Claude Code / Codex CLI / OpenCode / Every Code share the same Skills format
929
+ if ((toolId === 'claude' || toolId === 'codex' || toolId === 'opencode' || toolId === 'code') && tool.skillsDir) {
875
930
  const skillsSrcDir = path.join(__dirname, '..', 'skills');
876
931
  const skillsDestDir = getSkillsDestDir(tool, scope, projectDir);
877
932
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-playbooks",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "AI-powered spec-driven development workflow",
5
5
  "keywords": [
6
6
  "devbooks",
@@ -25,6 +25,7 @@
25
25
  "dev-playbooks": "bin/devbooks.js"
26
26
  },
27
27
  "files": [
28
+ "CHANGELOG.md",
28
29
  "bin/",
29
30
  "templates/",
30
31
  "skills/",
@@ -4,12 +4,13 @@ set -euo pipefail
4
4
  usage() {
5
5
  cat <<'EOF'
6
6
  Usage:
7
- ./scripts/install-skills.sh [--claude-only|--codex-only|--opencode-only] [--with-opencode] [--with-codex-prompts] [--dry-run] [--no-prune]
7
+ ./scripts/install-skills.sh [--claude-only|--codex-only|--opencode-only|--code-only] [--with-opencode] [--with-code] [--with-codex-prompts] [--dry-run] [--no-prune]
8
8
 
9
9
  Installs DevBooks skills (skills/devbooks-*) to:
10
10
  - Claude Code: ~/.claude/skills/
11
11
  - Codex CLI: $CODEX_HOME/skills (default: ~/.codex/skills/)
12
12
  - OpenCode: $XDG_CONFIG_HOME/opencode/skill (default: ~/.config/opencode/skill/)
13
+ - Every Code: $CODE_HOME/skills (default: ~/.code/skills/)
13
14
 
14
15
  Optionally installs Codex prompt entrypoints (templates/claude-commands/devbooks/*.md) to:
15
16
  - Codex CLI: $CODEX_HOME/prompts (default: ~/.codex/prompts/)
@@ -22,6 +23,7 @@ EOF
22
23
  install_claude=true
23
24
  install_codex=true
24
25
  install_opencode=false
26
+ install_code=false
25
27
  install_codex_prompts=false
26
28
  dry_run=false
27
29
  prune_removed=true
@@ -29,10 +31,12 @@ prune_removed=true
29
31
  while [[ $# -gt 0 ]]; do
30
32
  case "$1" in
31
33
  -h|--help) usage; exit 0 ;;
32
- --claude-only) install_codex=false ;;
33
- --codex-only) install_claude=false ;;
34
- --opencode-only) install_claude=false; install_codex=false; install_opencode=true ;;
34
+ --claude-only) install_codex=false; install_code=false ;;
35
+ --codex-only) install_claude=false; install_code=false ;;
36
+ --opencode-only) install_claude=false; install_codex=false; install_opencode=true; install_code=false ;;
37
+ --code-only) install_claude=false; install_codex=false; install_code=true ;;
35
38
  --with-opencode) install_opencode=true ;;
39
+ --with-code) install_code=true ;;
36
40
  --with-codex-prompts) install_codex_prompts=true ;;
37
41
  --dry-run) dry_run=true ;;
38
42
  --no-prune) prune_removed=false ;;
@@ -229,6 +233,11 @@ if [[ "$install_opencode" == true ]]; then
229
233
  install_into "${xdg_config_home}/opencode/skill"
230
234
  fi
231
235
 
236
+ if [[ "$install_code" == true ]]; then
237
+ code_home="${CODE_HOME:-${HOME}/.code}"
238
+ install_into "${code_home}/skills"
239
+ fi
240
+
232
241
  if [[ "$dry_run" == true ]]; then
233
242
  echo "[dry-run] done"
234
243
  else