sdd-forge 0.1.0-alpha.27 → 0.1.0-alpha.28

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 (78) hide show
  1. package/README.md +30 -26
  2. package/docs/01_overview.md +64 -78
  3. package/docs/02_cli_commands.md +110 -93
  4. package/docs/03_configuration.md +58 -55
  5. package/docs/04_internal_design.md +214 -173
  6. package/docs/ja/01_overview.md +64 -80
  7. package/docs/ja/02_cli_commands.md +142 -103
  8. package/docs/ja/03_configuration.md +49 -49
  9. package/docs/ja/04_internal_design.md +220 -171
  10. package/docs/ja/README.md +14 -10
  11. package/package.json +1 -1
  12. package/src/docs/commands/data.js +3 -0
  13. package/src/docs/commands/default-project.js +10 -1
  14. package/src/docs/commands/readme.js +14 -6
  15. package/src/docs/commands/review.js +161 -6
  16. package/src/docs/commands/setup.js +7 -18
  17. package/src/docs/commands/snapshot.js +208 -0
  18. package/src/docs/commands/text.js +27 -29
  19. package/src/docs/commands/translate.js +7 -7
  20. package/src/docs/commands/upgrade.js +10 -11
  21. package/src/docs/data/docs.js +134 -0
  22. package/src/docs/lib/directive-parser.js +15 -0
  23. package/src/docs/lib/review-parser.js +2 -1
  24. package/src/docs/lib/scanner.js +3 -0
  25. package/src/docs/lib/test-env-detection.js +51 -0
  26. package/src/docs.js +15 -0
  27. package/src/locale/en/messages.json +3 -0
  28. package/src/locale/en/ui.json +95 -0
  29. package/src/locale/ja/messages.json +3 -0
  30. package/src/locale/ja/ui.json +95 -0
  31. package/src/presets/base/templates/en/AGENTS.sdd.md +30 -12
  32. package/src/presets/base/templates/en/development.md +6 -0
  33. package/src/presets/base/templates/en/overview.md +7 -0
  34. package/src/presets/base/templates/en/project_structure.md +5 -0
  35. package/src/presets/base/templates/en/stack_and_ops.md +6 -0
  36. package/src/presets/base/templates/ja/AGENTS.sdd.md +29 -11
  37. package/src/presets/base/templates/ja/development.md +6 -0
  38. package/src/presets/base/templates/ja/overview.md +7 -0
  39. package/src/presets/base/templates/ja/project_structure.md +5 -0
  40. package/src/presets/base/templates/ja/stack_and_ops.md +6 -0
  41. package/src/presets/cakephp2/templates/ja/development.md +4 -0
  42. package/src/presets/cakephp2/templates/ja/project_structure.md +1 -0
  43. package/src/presets/cakephp2/templates/ja/stack_and_ops.md +1 -0
  44. package/src/presets/cli/templates/ja/README.md +3 -0
  45. package/src/presets/cli/templates/ja/commands.md +7 -0
  46. package/src/presets/cli/templates/ja/config.md +7 -0
  47. package/src/presets/laravel/templates/ja/auth_and_session.md +4 -0
  48. package/src/presets/laravel/templates/ja/controller_routes.md +1 -0
  49. package/src/presets/laravel/templates/ja/project_structure.md +2 -0
  50. package/src/presets/laravel/templates/ja/stack_and_ops.md +2 -0
  51. package/src/presets/library/templates/ja/README.md +3 -0
  52. package/src/presets/library/templates/ja/public_api.md +6 -0
  53. package/src/presets/library/templates/ja/usage.md +7 -0
  54. package/src/presets/node-cli/templates/ja/cli_commands.md +7 -0
  55. package/src/presets/node-cli/templates/ja/commands.md +2 -0
  56. package/src/presets/node-cli/templates/ja/config.md +2 -0
  57. package/src/presets/node-cli/templates/ja/configuration.md +7 -0
  58. package/src/presets/node-cli/templates/ja/development.md +2 -0
  59. package/src/presets/node-cli/templates/ja/development_testing.md +8 -0
  60. package/src/presets/node-cli/templates/ja/internal_design.md +8 -0
  61. package/src/presets/node-cli/templates/ja/overview.md +7 -0
  62. package/src/presets/node-cli/templates/ja/project_structure.md +2 -0
  63. package/src/presets/node-cli/templates/ja/stack_and_ops.md +2 -0
  64. package/src/presets/symfony/templates/ja/auth_and_session.md +4 -0
  65. package/src/presets/symfony/templates/ja/controller_routes.md +1 -0
  66. package/src/presets/symfony/templates/ja/project_structure.md +2 -0
  67. package/src/presets/symfony/templates/ja/stack_and_ops.md +2 -0
  68. package/src/presets/webapp/templates/ja/README.md +4 -0
  69. package/src/presets/webapp/templates/ja/auth_and_session.md +7 -0
  70. package/src/presets/webapp/templates/ja/batch_and_shell.md +5 -0
  71. package/src/presets/webapp/templates/ja/business_logic.md +6 -0
  72. package/src/presets/webapp/templates/ja/controller_routes.md +5 -0
  73. package/src/presets/webapp/templates/ja/database_architecture.md +5 -0
  74. package/src/presets/webapp/templates/ja/db_tables.md +3 -0
  75. package/src/presets-cmd.js +8 -2
  76. package/src/sdd-forge.js +1 -0
  77. package/src/specs/commands/gate.js +9 -7
  78. package/src/templates/skills/sdd-flow-start/SKILL.md +97 -16
package/README.md CHANGED
@@ -1,23 +1,27 @@
1
1
  # <!-- {{data: project.name("")}} -->sdd-forge<!-- {{/data}} -->
2
2
 
3
+ <!-- {{data: docs.langSwitcher("absolute")}} -->
4
+ **English** | [日本語](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/ja/README.md)
5
+ <!-- {{/data}} -->
6
+
3
7
  [![npm version](https://img.shields.io/npm/v/sdd-forge.svg)](https://www.npmjs.com/package/sdd-forge)
4
8
 
5
- > **Alpha:** This tool is currently in alpha. The API, command structure, and configuration format may change without notice. Please avoid using it in production environments.
9
+ > **Alpha:** This tool is currently in alpha. APIs, command structure, and configuration formats may change without notice. Not recommended for production use.
6
10
 
7
11
  **A CLI tool that automatically generates and maintains project documentation using source code analysis + AI.**
8
12
 
9
- It statically analyzes your codebase and combines templates with AI to auto-generate `docs/`.
13
+ Statically analyzes your codebase and combines templates with AI to auto-generate `docs/`.
10
14
  The Spec-Driven Development (SDD) workflow also automates documentation updates when adding features or making changes.
11
15
 
12
16
  ## Features
13
17
 
14
- - **Zero dependencies** — Runs on Node.js 18+ only. No npm dependencies
15
- - **Automatic source code analysis** — Statically analyzes controllers, models, routes, and config files to extract structural data
18
+ - **Zero dependencies** — Runs on Node.js 18+ only. No npm packages required
19
+ - **Automatic source analysis** — Statically analyzes controllers, models, routes, and config files to extract structural data
16
20
  - **AI document generation** — AI automatically expands `{{text}}` directives in templates
17
- - **Template inheritance** — Customizable via 4-layer inheritance: base → arch → preset → project-local
18
- - **SDD workflow** — Manage the spec → gate → implement → forge → review cycle with commands
19
- - **Multilingual support** — Auto-generate documentation in multiple languages via translate / generate modes
20
- - **AI agent integration** — Compatible with Claude Code (skills) and Codex CLI
21
+ - **Template inheritance** — Four-layer inheritance (base → arch → preset → project-local) for full customization
22
+ - **SDD workflow** — Manage the development cycle of spec → gate → implement → forge → review via commands
23
+ - **Multi-language support** — Auto-generate documentation in multiple languages using translate/generate modes
24
+ - **AI agent integration** — Supports Claude Code (skills) and Codex CLI
21
25
  - **Multi-preset** — Supports Node.js CLI / CakePHP2 / Laravel / Symfony
22
26
 
23
27
  ## Quick Start
@@ -41,11 +45,11 @@ pnpm add -g <!-- {{data: project.name("")}} -->sdd-forge<!-- {{/data}} -->
41
45
  # 1. Register your project (interactive wizard)
42
46
  <!-- {{data: project.name("")}} -->sdd-forge<!-- {{/data}} --> setup
43
47
 
44
- # 2. Generate all documentation at once (scan → init → data → text → readme → agents → translate)
48
+ # 2. Generate all documentation (scan → init → data → text → readme → agents → translate)
45
49
  <!-- {{data: project.name("")}} -->sdd-forge<!-- {{/data}} --> build
46
50
  </pre>
47
51
 
48
- This generates `docs/` and `README.md` in one step.
52
+ This will generate `docs/` and `README.md` in one step.
49
53
 
50
54
  ## Commands
51
55
 
@@ -57,12 +61,12 @@ This generates `docs/` and `README.md` in one step.
57
61
  | `build` | Run the full document generation pipeline |
58
62
  | `scan` | Analyze source code → `analysis.json` |
59
63
  | `init` | Initialize `docs/` from templates |
60
- | `data` | Resolve `{{data}}` directives with analysis data |
64
+ | `data` | Resolve `{{data}}` directives with analyzed data |
61
65
  | `text` | Resolve `{{text}}` directives with AI |
62
66
  | `readme` | Auto-generate `README.md` from `docs/` |
63
67
  | `forge` | Iteratively improve documentation with AI |
64
68
  | `review` | Check documentation quality |
65
- | `translate` | Multilingual translation (default language → others) |
69
+ | `translate` | Translate to other languages (from default language) |
66
70
  | `upgrade` | Update preset templates to the latest version |
67
71
 
68
72
  ### SDD Workflow
@@ -70,8 +74,8 @@ This generates `docs/` and `README.md` in one step.
70
74
  | Command | Description |
71
75
  |---|---|
72
76
  | `spec` | Create a spec document + feature branch |
73
- | `gate` | Pre-implementation check for the spec |
74
- | `flow` | Automatically run the SDD workflow |
77
+ | `gate` | Pre-implementation spec check |
78
+ | `flow` | Run the SDD workflow automatically |
75
79
  | `changelog` | Generate change history from specs/ |
76
80
  | `agents` | Update AGENTS.md |
77
81
 
@@ -85,12 +89,12 @@ This generates `docs/` and `README.md` in one step.
85
89
 
86
90
  ## SDD Workflow
87
91
 
88
- The flow for adding features or making changes:
92
+ Feature development and change flow:
89
93
 
90
94
  ```
91
95
  spec Create a spec (feature branch + spec.md)
92
96
 
93
- gate Spec gate check (PASS if no unresolved items)
97
+ gate Spec gate check (PASS when no unresolved issues)
94
98
 
95
99
  implement Write code after gate PASS
96
100
 
@@ -103,25 +107,25 @@ The flow for adding features or making changes:
103
107
 
104
108
  #### Claude Code
105
109
 
106
- Run the SDD workflow with skills:
110
+ Run the SDD workflow using skills:
107
111
 
108
112
  ```
109
- /sdd-flow-start — Start: create spec → gate → implement
110
- /sdd-flow-close — Finish: forge → review → commit → merge
113
+ /sdd-flow-start — Start spec creation → gate → implementation
114
+ /sdd-flow-close — Finish with forge → review → commit → merge
111
115
  ```
112
116
 
113
117
  #### Codex CLI
114
118
 
115
- Run the workflow from a prompt:
119
+ Run the workflow from prompts:
116
120
 
117
121
  ```
118
- $sdd-flow-start — Start: create spec → gate → implement
119
- $sdd-flow-close — Finish: forge → review → commit → merge
122
+ $sdd-flow-start — Start spec creation → gate → implementation
123
+ $sdd-flow-close — Finish with forge → review → commit → merge
120
124
  ```
121
125
 
122
126
  ## Configuration
123
127
 
124
- `sdd-forge setup` generates `.sdd-forge/config.json`.
128
+ Running `sdd-forge setup` generates `.sdd-forge/config.json`.
125
129
 
126
130
  ```jsonc
127
131
  {
@@ -149,9 +153,9 @@ You can add project-specific templates and data sources:
149
153
  <!-- {{data: docs.chapters("Chapter|Overview")}} -->
150
154
  | Chapter | Overview |
151
155
  | --- | --- |
152
- | [01. System Overview](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/01_overview.md) | This chapter provides a structural overview of sdd-forge, a Node.js CLI tool that automates documentation generation … |
153
- | [02. CLI Command Reference](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/02_cli_commands.md) | This chapter covers all 18 subcommands available in `sdd-forge`, organized into documentation generation commands (ro… |
154
- | [03. Configuration and Customization](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/03_configuration.md) | This chapter covers all configuration files used by sdd-forge, the full range of options available in `.sdd-forge/con… |
156
+ | [01. System Overview](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/01_overview.md) | This chapter describes the overall architecture of sdd-forge a Node.js CLI tool that automates documentation genera… |
157
+ | [02. CLI Command Reference](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/02_cli_commands.md) | This chapter covers all 19 subcommands available in `sdd-forge`, organized by their routing layer: documentation comm… |
158
+ | [03. Configuration and Customization](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/03_configuration.md) | |
155
159
  | [04. Internal Design](https://github.com/SpreadWorks/sdd-forge/blob/main/docs/04_internal_design.md) | |
156
160
  <!-- {{/data}} -->
157
161
 
@@ -4,7 +4,9 @@
4
4
 
5
5
  <!-- {{text: Write a 1-2 sentence overview of this chapter. Include the project's architecture and whether it integrates with external systems.}} -->
6
6
 
7
- This chapter provides a structural overview of sdd-forge, a Node.js CLI tool that automates documentation generation through source code analysis and drives feature development via a Spec-Driven Development (SDD) workflow. The tool follows a three-layer command dispatch architecture and integrates with external AI agents (such as Claude CLI) to generate and refine documentation text.
7
+ This chapter provides a high-level view of `sdd-forge`, a Node.js CLI tool built on a three-layer dispatch architecture that automates documentation generation and Spec-Driven Development workflows. The tool integrates with external AI agents (such as Claude CLI) to resolve natural-language directives, and interacts with Git for branch and worktree management during the SDD flow.
8
+
9
+ <!-- {{/text}} -->
8
10
 
9
11
  ## Content
10
12
 
@@ -14,102 +16,86 @@ This chapter provides a structural overview of sdd-forge, a Node.js CLI tool tha
14
16
 
15
17
  ```mermaid
16
18
  flowchart TD
17
- User["User (CLI)"]
18
-
19
- subgraph Entry["Entry Layer"]
20
- SDF["sdd-forge.js\n(Entry Point)"]
21
- end
22
-
23
- subgraph Dispatch["Dispatcher Layer"]
24
- DOCS["docs.js"]
25
- SPEC["spec.js"]
26
- FLOW["flow.js"]
27
- HELP["help.js"]
28
- end
29
-
30
- subgraph Commands["Command Layer"]
31
- SCAN["scan"]
32
- DATA["data"]
33
- TEXT["text"]
34
- FORGE["forge"]
35
- REVIEW["review"]
36
- SPEC_INIT["spec init"]
37
- GATE["gate"]
38
- OTHER["readme / agents / changelog / …"]
39
- end
40
-
41
- subgraph Lib["Core Libraries"]
42
- AGENT["agent.js\n(AI Agent Caller)"]
43
- CONFIG["config.js\n(Config & Paths)"]
44
- SCANNER["scanner.js\n(Source Analyzer)"]
45
- PARSER["directive-parser.js"]
46
- end
47
-
48
- subgraph Storage["File System"]
49
- SRC["Source Code\n(project root)"]
50
- ANALYSIS[".sdd-forge/output/\nanalysis.json / summary.json"]
51
- DOCFILES["docs/*.md\n(generated docs)"]
52
- SPECS["specs/NNN-xxx/spec.md"]
53
- CFGFILE[".sdd-forge/config.json"]
54
- end
55
-
56
- AI["External AI Agent\n(e.g. Claude CLI)"]
57
-
58
- User --> SDF
59
- SDF --> DOCS & SPEC & FLOW & HELP
60
- DOCS --> SCAN & DATA & TEXT & FORGE & REVIEW & OTHER
61
- SPEC --> SPEC_INIT & GATE
62
- SCAN --> SCANNER --> SRC
63
- SCANNER --> ANALYSIS
64
- DATA --> PARSER --> DOCFILES
65
- TEXT --> AGENT --> AI
19
+ CLI["sdd-forge.js\n(CLI Entry Point)"]
20
+
21
+ CLI --> DOCS["docs.js\n(Docs Dispatcher)"]
22
+ CLI --> SPEC["spec.js\n(Spec Dispatcher)"]
23
+ CLI --> FLOW["flow.js\n(SDD Flow)"]
24
+ CLI --> HELP["help.js"]
25
+
26
+ DOCS --> SCAN["scan\n→ analysis.json"]
27
+ DOCS --> INIT["init\n(template → docs/)"]
28
+ DOCS --> DATA["data\n(resolve {{data}} directives)"]
29
+ DOCS --> TEXT["text\n(resolve {{text}} directives)"]
30
+ DOCS --> FORGE["forge / review\n(iterative doc improvement)"]
31
+
32
+ SPEC --> SPECINIT["spec init\n(spec.md + branch)"]
33
+ SPEC --> GATE["gate\n(pre/post gate check)"]
34
+
35
+ SCAN --> AJ[".sdd-forge/output/\nanalysis.json\nsummary.json"]
36
+ AJ --> DATA
37
+ AJ --> TEXT
38
+
39
+ TEXT --> AGENT["AI Agent\n(Claude CLI / configurable)"]
66
40
  FORGE --> AGENT
67
- REVIEW --> AGENT
68
- AGENT --> DOCFILES
69
- CONFIG --> CFGFILE
70
- SPEC_INIT --> SPECS
71
- GATE --> SPECS
41
+
42
+ DATA --> DOCS2["docs/*.md\n(rendered output)"]
43
+ TEXT --> DOCS2
44
+
45
+ GIT["Git\n(branch / worktree)"]
46
+ FLOW --> GIT
47
+ SPECINIT --> GIT
72
48
  ```
73
49
 
50
+ <!-- {{/text}} -->
51
+
74
52
  ### Component Responsibilities
75
53
 
76
54
  <!-- {{text: Describe the major components with their location, responsibilities, and I/O in table format.}} -->
77
55
 
78
56
  | Component | Location | Responsibility | Input | Output |
79
57
  |---|---|---|---|---|
80
- | CLI Entry Point | `src/sdd-forge.js` | Resolves project context; routes subcommands to the appropriate dispatcher | CLI arguments, env vars (`SDD_SOURCE_ROOT`, `SDD_WORK_ROOT`) | Dispatched command execution |
81
- | Docs Dispatcher | `src/docs.js` | Routes `build`, `scan`, `init`, `data`, `text`, `forge`, `review`, and related subcommands | Subcommand name + flags | Delegates to `docs/commands/*.js` |
82
- | Spec Dispatcher | `src/spec.js` | Routes `spec` and `gate` subcommands | Subcommand name + flags | Delegates to `specs/commands/*.js` |
83
- | SDD Flow Runner | `src/flow.js` | Automates the full SDD cycle end-to-end | `--request` prompt string | Orchestrated spec → gate → implement → forge → review sequence |
84
- | Source Scanner | `src/docs/lib/scanner.js` | Parses project source files; extracts modules, routes, and structure | Source root directory | `.sdd-forge/output/analysis.json`, `summary.json` |
85
- | Directive Parser | `src/docs/lib/directive-parser.js` | Parses `{{data}}` and `{{text}}` directives in Markdown templates | `.md` template files | Directive AST for resolvers |
86
- | Data Resolver | `src/docs/lib/resolver-factory.js` | Injects structured analysis data into `{{data}}` directives | `analysis.json`, directive AST | Resolved Markdown sections |
87
- | AI Agent Caller | `src/lib/agent.js` | Invokes external AI agent processes synchronously or asynchronously | Prompt string, agent config | AI-generated text (stdout) |
88
- | Config Manager | `src/lib/config.js` | Loads and validates `.sdd-forge/config.json`; resolves standard paths | `.sdd-forge/` directory | Typed config object, file paths |
89
- | Spec Gate | `src/specs/commands/gate.js` | Validates a spec against pre/post implementation checklists | `spec.md` path, `--phase` flag | PASS / FAIL report |
90
- | Forge Engine | `src/docs/commands/forge.js` | Iteratively improves `docs/` by prompting the AI agent | Change summary prompt, `spec.md` path | Updated `docs/*.md` files |
58
+ | CLI Entry Point | `src/sdd-forge.js` | Parses top-level subcommands, resolves project context via env vars, routes to dispatchers | CLI args, `.sdd-forge/projects.json` | Dispatched command execution |
59
+ | Docs Dispatcher | `src/docs.js` | Routes docs-related subcommands (`build`, `scan`, `init`, `data`, `text`, `forge`, `review`, etc.) | Subcommand + flags | Delegates to `docs/commands/*.js` |
60
+ | Spec Dispatcher | `src/spec.js` | Routes spec-related subcommands (`spec`, `gate`) | Subcommand + flags | Delegates to `specs/commands/*.js` |
61
+ | SDD Flow | `src/flow.js` | Automates the full SDD workflow (spec → gate → implement → forge → review) | `--request` string | Orchestrated workflow execution |
62
+ | Scanner | `src/docs/lib/scanner.js` | Crawls source files, parses PHP/JS/YAML, extracts module structure | Source root path, preset scan config | `analysis.json`, `summary.json` |
63
+ | Directive Parser | `src/docs/lib/directive-parser.js` | Parses `{{data}}`, `{{text}}`, `@block`, `@extends` directives from Markdown files | Markdown file content | Parsed directive AST |
64
+ | Resolver Factory | `src/docs/lib/resolver-factory.js` | Creates data resolvers per preset for resolving `{{data}}` directives | `analysis.json`, preset type | Resolved Markdown tables/values |
65
+ | AI Agent Caller | `src/lib/agent.js` | Calls external AI agents synchronously or asynchronously with prompt injection | Prompt string, agent config | AI-generated text |
66
+ | Config Loader | `src/lib/config.js` | Reads and validates `.sdd-forge/config.json`, manages context and path utilities | `.sdd-forge/` directory | Validated config object, resolved paths |
67
+ | Preset System | `src/presets/` | Provides architecture- and framework-specific scan rules and doc templates | Preset key or type string | Scan config, template files, DataSource classes |
68
+ | Flow State Manager | `src/lib/flow-state.js` | Persists and retrieves SDD flow progress (branch, spec path, worktree info) | `.sdd-forge/current-spec` JSON | Flow state object |
69
+
70
+ <!-- {{/text}} -->
91
71
 
92
72
  ### External Integrations
93
73
 
94
74
  <!-- {{text: If there are external system integrations, describe their purpose and connection method in table format.}} -->
95
75
 
96
- | System | Purpose | Connection Method | Configuration |
76
+ | External System | Purpose | Connection Method | Configuration |
97
77
  |---|---|---|---|
98
- | AI Agent (e.g. Claude CLI) | Generates and refines documentation text for `{{text}}` directives; drives `forge`, `review`, `agents`, and `text` commands | Spawned as a child process via `execFileSync` (sync) or `spawn` (async streaming) in `src/lib/agent.js` | Defined under `providers` in `.sdd-forge/config.json`; selected by `defaultAgent` key |
78
+ | AI Agent (e.g., Claude CLI) | Resolves `{{text}}` directives and iteratively improves docs via `forge` and `review` commands | Spawned as a child process via `execFileSync` (sync) or `spawn` (async) with `stdin: "ignore"` | Defined under `providers` in `.sdd-forge/config.json`; selected via `defaultAgent` |
79
+ | Git | Creates feature branches and worktrees during the SDD flow; used for branch strategy selection | Invoked via `child_process` (`execFileSync`) | Automatic; branch strategy chosen interactively during `sdd-forge spec` or `sdd-forge flow` |
80
+ | npm Registry | Distributes the `sdd-forge` package to end users | `npm publish` CLI (manual, operator-initiated only) | `package.json` `files` field controls published artifacts |
99
81
 
100
- The AI agent is the only external integration. All other operations — file scanning, directive parsing, template merging, spec management — rely exclusively on Node.js built-in modules (`fs`, `path`, `child_process`, `os`). The agent command, arguments, timeout, and system-prompt delivery method (`--system-prompt` or `--system-prompt-file`) are all configurable per project.
82
+ <!-- {{/text}} -->
101
83
 
102
84
  ### Environment Differences
103
85
 
104
86
  <!-- {{text: Describe the configuration differences across environments (local/staging/production).}} -->
105
87
 
106
- As a local CLI tool, sdd-forge does not have distinct deployment environments in the traditional sense. Configuration differences are instead expressed through per-project `.sdd-forge/config.json` settings and environment variables.
88
+ `sdd-forge` is a developer CLI tool and does not have traditional application deployment environments (local/staging/production). Instead, configuration differences arise from how the tool is installed and how each project's `.sdd-forge/config.json` is set up.
107
89
 
108
- | Aspect | Local Development | CI / Automated Pipeline | Multi-Project Setup |
109
- |---|---|---|---|
110
- | Project resolution | Interactive; `--project` flag or `.sdd-forge/projects.json` `default` key | `SDD_SOURCE_ROOT` and `SDD_WORK_ROOT` env vars set explicitly per job | `.sdd-forge/projects.json` registers named projects; `--project <name>` selects the target |
111
- | AI agent | Configured via `providers` + `defaultAgent` in `config.json`; runs interactively | Same config; `stdin: "ignore"` prevents CLI hang in non-TTY environments (`callAgentAsync`) | Each project carries its own `config.json` with independent agent settings |
112
- | Language / output | `lang` and `output.languages` control CLI language and doc output locale | Same config values apply; no separate override mechanism | Per-project `config.json` allows different languages per project |
113
- | Concurrency | `limits.concurrency` (default: 5) controls parallel file processing | Can be raised for faster execution on high-core machines | Independently tunable per project |
114
- | Timeouts | `limits.designTimeoutMs` / per-provider `timeoutMs` | Should be increased for slow CI agents; default constants: 120 s / 180 s / 300 s | Configurable per project |
115
- ```
90
+ | Aspect | Development (source checkout) | Published Package (npm install) |
91
+ |---|---|---|
92
+ | Binary entry | `node src/sdd-forge.js` or `npm link` | `sdd-forge` via PATH (npm global or npx) |
93
+ | Package version | `0.1.0-alpha.x` (alpha tag on npm) | `latest` tag after explicit `npm dist-tag` promotion |
94
+ | `PKG_DIR` resolution | Points to local `src/` directory | Points to installed package `src/` directory |
95
+ | Test execution | `npm run test` against local `tests/` | Not applicable (tests are not published) |
96
+ | AI agent config | Defined per-project in `.sdd-forge/config.json` | Same no environment-level override |
97
+ | Concurrency / timeout | Configurable via `limits.concurrency` and `limits.designTimeoutMs` in `config.json` | Same |
98
+
99
+ Projects analyzed by `sdd-forge` may themselves have environment-specific concerns, but the tool treats the source directory uniformly regardless of the target project's deployment environment.
100
+
101
+ <!-- {{/text}} -->