rapidkit 0.37.0 → 0.38.0
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/README.md +166 -147
- package/contracts/create-planner-capabilities.v1.json +251 -0
- package/contracts/runtime-command-surface.v1.json +52 -0
- package/dist/autopilot-release-SBPGNGAB.js +1 -0
- package/dist/chunk-2ED6SPXP.js +1 -0
- package/dist/chunk-3R7UJAX5.js +1 -0
- package/dist/{chunk-RUUDLAKJ.js → chunk-5NBYSXOZ.js} +1 -1
- package/dist/chunk-7XW2I6MP.js +13 -0
- package/dist/{chunk-U6QUN6V2.js → chunk-ABPDGFVD.js} +1 -1
- package/dist/chunk-IW3KLQXE.js +2 -0
- package/dist/{chunk-7VSYTOOG.js → chunk-NKNMGWAZ.js} +1 -1
- package/dist/{chunk-IOIWVHRO.js → chunk-TVIOAZ6E.js} +13 -13
- package/dist/chunk-XESEBTPE.js +1 -0
- package/dist/{create-HN5HOGQ4.js → create-Y3XJOKL5.js} +1 -1
- package/dist/index.js +150 -144
- package/dist/{pipeline-BOU4KETN.js → pipeline-C4UCLETO.js} +1 -1
- package/dist/{workspace-2AL5C3QZ.js → workspace-WBKFXH4Z.js} +1 -1
- package/dist/{workspace-agent-sync-V2H6NTGD.js → workspace-agent-sync-3FFFJYKF.js} +1 -1
- package/dist/{workspace-context-KCKNV5VQ.js → workspace-context-V4UGIHSC.js} +1 -1
- package/dist/{workspace-foundation-L6ZBGMVE.js → workspace-foundation-T45HAWKL.js} +1 -1
- package/dist/{workspace-intelligence-3TWXJQ7Y.js → workspace-intelligence-MGL3Z25K.js} +1 -1
- package/dist/{workspace-model-NQVZN5W4.js → workspace-model-IKMGY2BX.js} +1 -1
- package/dist/workspace-run-HOR56FON.js +1 -0
- package/dist/workspace-verify-A3J6D7T2.js +1 -0
- package/docs/AI_DYNAMIC_INTEGRATION.md +440 -0
- package/docs/AI_EXAMPLES.md +419 -0
- package/docs/AI_FEATURES.md +460 -0
- package/docs/AI_QUICKSTART.md +245 -0
- package/docs/DEVELOPMENT.md +88 -0
- package/docs/From Code to Shared Understanding.png +0 -0
- package/docs/OPEN_SOURCE_USER_SCENARIOS.md +170 -0
- package/docs/OPTIMIZATION_GUIDE.md +504 -0
- package/docs/PACKAGE_MANAGER_POLICY.md +25 -0
- package/docs/README.md +121 -0
- package/docs/SECURITY.md +63 -0
- package/docs/SETUP.md +107 -0
- package/docs/UTILITIES.md +221 -0
- package/docs/WORKSPACE_MARKER_SPEC.md +276 -0
- package/docs/ci-workflows.md +56 -0
- package/docs/commands-reference.md +136 -0
- package/docs/config-file-guide.md +295 -0
- package/docs/contracts/ARTIFACT_CATALOG.md +111 -0
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +138 -0
- package/docs/contracts/README.md +71 -0
- package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +98 -0
- package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +74 -0
- package/docs/contracts/rapidkit-cli-contracts.json +239 -0
- package/docs/create-planner-capabilities.md +81 -0
- package/docs/doctor-command.md +263 -0
- package/docs/examples/ci-agent-grounding.yml +62 -0
- package/docs/from-code-to-shared-understanding.md +46 -0
- package/docs/governance-policy.enterprise.example.json +40 -0
- package/docs/mirror-config.enterprise.example.json +60 -0
- package/docs/policies.workspace.example.yml +23 -0
- package/docs/workspace-operations.md +160 -0
- package/docs/workspace-run.md +80 -0
- package/package.json +3 -2
- package/dist/autopilot-release-AUXP2ZIF.js +0 -1
- package/dist/chunk-C7OVQQXT.js +0 -1
- package/dist/chunk-EJGKBFV4.js +0 -2
- package/dist/chunk-UXKB4KGZ.js +0 -13
- package/dist/chunk-YJ24EV3P.js +0 -1
- package/dist/workspace-run-DEXI52KO.js +0 -1
- package/dist/workspace-verify-HBCQNNGU.js +0 -1
- /package/dist/{chunk-D23L2GFT.js → chunk-6E5TBB2C.js} +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Commands Reference
|
|
2
|
+
|
|
3
|
+
Complete CLI syntax for the RapidKit npm wrapper. For behavior and workflows, see [workspace-operations.md](./workspace-operations.md) and [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md).
|
|
4
|
+
|
|
5
|
+
## Workspace lifecycle
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx rapidkit create # Prompts: workspace | project
|
|
9
|
+
npx rapidkit create workspace <name> [--profile <profile>] [--author <name>] [--yes]
|
|
10
|
+
npx rapidkit bootstrap [--profile <profile>] [--json] [--compliance-only]
|
|
11
|
+
npx rapidkit setup <python|node|go|java|dotnet> [--warm-deps]
|
|
12
|
+
npx rapidkit pipeline [--json] [--strict] [--skip-verify] [--skip-analyze] [--skip-autopilot] [--autopilot-mode <audit|safe-fix|enforce>]
|
|
13
|
+
npx rapidkit analyze [--workspace <path>] [--json] [--strict] [--output <file>]
|
|
14
|
+
npx rapidkit readiness [--json] [--strict] [--skip-verify]
|
|
15
|
+
npx rapidkit autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--output <file>] [--since <ref>] [--parallel] [--max-workers <n>]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Recommended CI:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx rapidkit pipeline --json --strict
|
|
22
|
+
npx rapidkit autopilot release --mode enforce --json --output .rapidkit/reports/autopilot-release.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`bootstrap --json --compliance-only` runs compliance checks only (skips init). Default `bootstrap --json` still runs init after compliance checks.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx rapidkit workspace sync [--json]
|
|
29
|
+
npx rapidkit workspace policy show
|
|
30
|
+
npx rapidkit workspace policy set <key> <value>
|
|
31
|
+
npx rapidkit doctor
|
|
32
|
+
npx rapidkit doctor workspace [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
|
|
33
|
+
npx rapidkit doctor project [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
|
|
34
|
+
npx rapidkit workspace list
|
|
35
|
+
npx rapidkit workspace foundation ensure [--force] [--json]
|
|
36
|
+
npx rapidkit workspace share [--output <file>] [--include-paths] [--no-doctor]
|
|
37
|
+
npx rapidkit workspace contract init [--force] [--json]
|
|
38
|
+
npx rapidkit workspace contract inspect [--json]
|
|
39
|
+
npx rapidkit workspace contract verify [--strict] [--json]
|
|
40
|
+
npx rapidkit workspace contract graph [--json]
|
|
41
|
+
npx rapidkit workspace model [--json] [--write] [--strict]
|
|
42
|
+
npx rapidkit workspace context --for-agent [codex|claude|cursor|orca] [--json] [--write] [--no-agent-sync]
|
|
43
|
+
npx rapidkit workspace agent-sync [--write] [--refresh-context] [--strict] [--json] [--target all|copilot,cursor,claude]
|
|
44
|
+
npx rapidkit workspace snapshot [--json]
|
|
45
|
+
npx rapidkit workspace diff --from <snapshot-or-report|git[:ref]> [--json]
|
|
46
|
+
npx rapidkit workspace impact --from <snapshot-or-report> [--scope project:<name>] [--json]
|
|
47
|
+
npx rapidkit workspace verify [--from-impact <file>] [--scope project:<name>] [--strict] [--json]
|
|
48
|
+
npx rapidkit workspace export --output team-workspace.rapidkit-archive.zip
|
|
49
|
+
npx rapidkit workspace archive inspect team-workspace.rapidkit-archive.zip [--json]
|
|
50
|
+
npx rapidkit workspace archive verify team-workspace.rapidkit-archive.zip [--strict] [--json]
|
|
51
|
+
npx rapidkit workspace archive doctor team-workspace.rapidkit-archive.zip [--strict] [--json]
|
|
52
|
+
npx rapidkit workspace hydrate team-workspace.rapidkit-archive.zip --output ./team-workspace
|
|
53
|
+
npx rapidkit import <path|git-url> [--workspace <path>] [--name <project-name>] [--git] [--json]
|
|
54
|
+
npx rapidkit adopt [path] [--workspace <path>] [--name <project-name>] [--dry-run] [--json]
|
|
55
|
+
npx rapidkit snapshot create [name] [--include-projects] [--reason <text>] [--json]
|
|
56
|
+
npx rapidkit snapshot list [--json]
|
|
57
|
+
npx rapidkit snapshot inspect <name> [--json]
|
|
58
|
+
npx rapidkit snapshot restore <name> [--dry-run] [--force] [--json]
|
|
59
|
+
npx rapidkit project archive <name> [--reason <text>] [--dry-run] [--json]
|
|
60
|
+
npx rapidkit project archives [--json]
|
|
61
|
+
npx rapidkit project restore <archive> [--name <project-name>] [--force] [--dry-run] [--json]
|
|
62
|
+
npx rapidkit project delete <name> [--permanent --confirm <name>] [--dry-run] [--json]
|
|
63
|
+
npx rapidkit workspace init
|
|
64
|
+
npx rapidkit workspace run <init|test|build|start> [--affected] [--blast-radius] [--since <ref>] [--parallel] [--max-workers <n>] [--strict] [--json]
|
|
65
|
+
npx rapidkit infra plan [--workspace <path>] [--json] [--dry-run] [--verbose]
|
|
66
|
+
npx rapidkit infra up [--workspace <path>] [--no-plan] [--build]
|
|
67
|
+
npx rapidkit infra down [--workspace <path>] [--volumes]
|
|
68
|
+
npx rapidkit infra status [--workspace <path>] [--json] [--strict]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
See [workspace-run.md](./workspace-run.md) for fleet orchestration semantics.
|
|
72
|
+
|
|
73
|
+
## Project lifecycle
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx rapidkit create project <kit> <name> [--yes] [--skip-install]
|
|
77
|
+
npx rapidkit create frontend <id> <name> [--output <dir>] [--yes] [--skip-install] [--skip-git]
|
|
78
|
+
npx rapidkit project commands [--json]
|
|
79
|
+
npx rapidkit commands --scope project [--json]
|
|
80
|
+
npx rapidkit init
|
|
81
|
+
npx rapidkit dev
|
|
82
|
+
npx rapidkit test
|
|
83
|
+
npx rapidkit build
|
|
84
|
+
npx rapidkit start
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`project commands` shows the effective command contract for the current project. Core-backed FastAPI/NestJS projects can use module commands such as `add` and `modules`. Frontend apps, Go, Spring Boot, .NET, and adopted/imported repositories use runtime lifecycle commands and workspace governance while Core module mutation remains disabled.
|
|
88
|
+
|
|
89
|
+
## Operations
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx rapidkit cache <status|clear|prune|repair>
|
|
93
|
+
npx rapidkit mirror <status|sync|verify|rotate>
|
|
94
|
+
npx rapidkit infra <plan|up|down|status>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
See [workspace-operations.md](./workspace-operations.md#workspace-infrastructure-sidecar) for infra discovery rules.
|
|
98
|
+
|
|
99
|
+
## Profiles
|
|
100
|
+
|
|
101
|
+
- `minimal` — baseline workspace scaffolding
|
|
102
|
+
- `java-only` — Java-focused workspace
|
|
103
|
+
- `python-only` — Python-focused workspace
|
|
104
|
+
- `node-only` — Node.js-focused workspace
|
|
105
|
+
- `go-only` — Go-focused workspace
|
|
106
|
+
- `polyglot` — Python + Node.js + Go + Java
|
|
107
|
+
- `enterprise` — polyglot + governance-oriented checks
|
|
108
|
+
|
|
109
|
+
## Policy modes
|
|
110
|
+
|
|
111
|
+
`mode` in `.rapidkit/policies.yml`:
|
|
112
|
+
|
|
113
|
+
- `warn` (default): report violations, continue
|
|
114
|
+
- `strict`: block incompatible operations
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx rapidkit workspace policy show
|
|
118
|
+
npx rapidkit workspace policy set mode strict
|
|
119
|
+
npx rapidkit workspace policy set dependency_sharing_mode shared-runtime-caches
|
|
120
|
+
npx rapidkit workspace policy set rules.enforce_toolchain_lock true
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Supported keys: `mode`, `dependency_sharing_mode`, `rules.enforce_workspace_marker`, `rules.enforce_toolchain_lock`, `rules.disallow_untrusted_tool_sources`, `rules.enforce_compatibility_matrix`, `rules.require_mirror_lock_for_offline`.
|
|
124
|
+
|
|
125
|
+
## Setup and warm dependencies
|
|
126
|
+
|
|
127
|
+
`setup <runtime>` validates toolchain and updates `.rapidkit/toolchain.lock`.
|
|
128
|
+
|
|
129
|
+
`--warm-deps` adds optional dependency warm-up (Node lock/deps, Go modules). Warm-deps is non-fatal and reports `completed` / `failed` / `skipped`.
|
|
130
|
+
|
|
131
|
+
## See also
|
|
132
|
+
|
|
133
|
+
- [Documentation index](./README.md)
|
|
134
|
+
- [workspace-operations.md](./workspace-operations.md)
|
|
135
|
+
- [workspace-run.md](./workspace-run.md)
|
|
136
|
+
- [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md)
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# 📖 RapidKit Config File Guide
|
|
2
|
+
|
|
3
|
+
## 🎯 Purpose of `rapidkit.config.js`
|
|
4
|
+
|
|
5
|
+
The `rapidkit.config.js` file is an **optional configuration file** that allows you to define default settings for creating workspaces and projects.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📍 File Location
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
📁 Your Project Directory (where you run npx rapidkit)
|
|
13
|
+
├── rapidkit.config.js ← Config file (create manually)
|
|
14
|
+
├── package.json
|
|
15
|
+
└── ...
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Important Note**: This file is **not automatically created**. You must create it manually.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🔍 When to Use
|
|
23
|
+
|
|
24
|
+
### 1️⃣ **Team Development**
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// rapidkit.config.js
|
|
28
|
+
export default {
|
|
29
|
+
workspace: {
|
|
30
|
+
defaultAuthor: 'Your Team Name',
|
|
31
|
+
pythonVersion: '3.10',
|
|
32
|
+
installMethod: 'poetry'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Result**: All team members create workspaces with identical settings.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 2️⃣ **CI/CD Automation**
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
// rapidkit.config.js for CI/CD
|
|
45
|
+
export default {
|
|
46
|
+
workspace: {
|
|
47
|
+
defaultAuthor: 'CI Bot',
|
|
48
|
+
pythonVersion: '3.11',
|
|
49
|
+
installMethod: 'venv'
|
|
50
|
+
},
|
|
51
|
+
projects: {
|
|
52
|
+
skipGit: true, // No git init needed in CI
|
|
53
|
+
skipInstall: false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Usage**:
|
|
59
|
+
```bash
|
|
60
|
+
# In CI/CD pipeline
|
|
61
|
+
npx rapidkit my-workspace --yes
|
|
62
|
+
# Uses config without prompts
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### 3️⃣ **Personal Projects**
|
|
68
|
+
|
|
69
|
+
```javascript
|
|
70
|
+
// rapidkit.config.js
|
|
71
|
+
export default {
|
|
72
|
+
workspace: {
|
|
73
|
+
defaultAuthor: 'John Doe',
|
|
74
|
+
pythonVersion: '3.12'
|
|
75
|
+
},
|
|
76
|
+
projects: {
|
|
77
|
+
defaultKit: 'fastapi.standard', // Always use FastAPI standard template
|
|
78
|
+
addDefaultModules: [
|
|
79
|
+
'prisma',
|
|
80
|
+
'redis',
|
|
81
|
+
'auth-jwt',
|
|
82
|
+
'monitoring'
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Result**: Every new project comes with these modules pre-configured.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 📝 Supported File Formats
|
|
93
|
+
|
|
94
|
+
| File | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `rapidkit.config.js` | ES Module (export default) |
|
|
97
|
+
| `rapidkit.config.mjs` | Explicit ES Module |
|
|
98
|
+
| `rapidkit.config.cjs` | CommonJS (module.exports) |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## ⚙️ Available Configuration Options
|
|
103
|
+
|
|
104
|
+
### **workspace** (Workspace Settings)
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
workspace: {
|
|
108
|
+
defaultAuthor?: string; // Author/team name
|
|
109
|
+
pythonVersion?: '3.10' | '3.11' | '3.12'; // Python version
|
|
110
|
+
installMethod?: 'poetry' | 'venv' | 'pipx'; // Core installation method
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### **projects** (Project Settings)
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
projects: {
|
|
118
|
+
defaultKit?: string; // Default template
|
|
119
|
+
addDefaultModules?: string[]; // Default modules to install
|
|
120
|
+
skipGit?: boolean; // Skip git initialization
|
|
121
|
+
skipInstall?: boolean; // Skip npm install
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🔄 Configuration Priority
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
CLI Arguments > rapidkit.config.js > .rapidkitrc.json > Defaults
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Example**:
|
|
134
|
+
```bash
|
|
135
|
+
# Config file: author='Team A'
|
|
136
|
+
npx rapidkit my-workspace --author "Team B"
|
|
137
|
+
# Result: author='Team B' (CLI overrides config)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 📋 Complete Example
|
|
143
|
+
|
|
144
|
+
```javascript
|
|
145
|
+
/**
|
|
146
|
+
* RapidKit Configuration
|
|
147
|
+
* Place in project root before running `npx rapidkit`
|
|
148
|
+
*/
|
|
149
|
+
export default {
|
|
150
|
+
// Workspace settings
|
|
151
|
+
workspace: {
|
|
152
|
+
defaultAuthor: 'RapidKit Dev Team',
|
|
153
|
+
pythonVersion: '3.10',
|
|
154
|
+
installMethod: 'poetry',
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
// Project settings
|
|
158
|
+
projects: {
|
|
159
|
+
defaultKit: 'fastapi.standard',
|
|
160
|
+
|
|
161
|
+
// Auto-add these modules to new projects
|
|
162
|
+
addDefaultModules: [
|
|
163
|
+
'prisma', // Database ORM
|
|
164
|
+
'redis', // Caching
|
|
165
|
+
'auth-jwt', // Authentication
|
|
166
|
+
'monitoring', // Observability
|
|
167
|
+
],
|
|
168
|
+
|
|
169
|
+
skipGit: false,
|
|
170
|
+
skipInstall: false,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 🚀 Usage Examples
|
|
178
|
+
|
|
179
|
+
### Without Config File (Interactive):
|
|
180
|
+
```bash
|
|
181
|
+
npx rapidkit my-workspace
|
|
182
|
+
# ❓ Prompts:
|
|
183
|
+
# - Author name?
|
|
184
|
+
# - Python version?
|
|
185
|
+
# - Install method?
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### With Config File (Automated):
|
|
189
|
+
```bash
|
|
190
|
+
# 1. Create config
|
|
191
|
+
cat > rapidkit.config.js << 'EOF'
|
|
192
|
+
export default {
|
|
193
|
+
workspace: {
|
|
194
|
+
defaultAuthor: 'My Team',
|
|
195
|
+
pythonVersion: '3.10',
|
|
196
|
+
installMethod: 'poetry'
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
EOF
|
|
200
|
+
|
|
201
|
+
# 2. Run rapidkit
|
|
202
|
+
npx rapidkit my-workspace --yes
|
|
203
|
+
# ✅ No prompts, uses config defaults
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 🔍 Debugging Configuration
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Enable debug mode to see loaded config
|
|
212
|
+
npx rapidkit my-workspace --debug
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Output:
|
|
216
|
+
```
|
|
217
|
+
[DEBUG] User config loaded {}
|
|
218
|
+
[DEBUG] RapidKit config loaded { workspace: { defaultAuthor: 'Team' } }
|
|
219
|
+
[DEBUG] Merged config { author: 'Team', pythonVersion: '3.10' }
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🎯 Common Use Cases
|
|
225
|
+
|
|
226
|
+
### ✅ Recommended Uses:
|
|
227
|
+
|
|
228
|
+
1. **Large Teams**: Standardize settings across developers
|
|
229
|
+
2. **CI/CD**: Automate workspace creation
|
|
230
|
+
3. **Personal Templates**: Always start with specific modules
|
|
231
|
+
4. **Training/Workshops**: Ensure all participants have identical settings
|
|
232
|
+
|
|
233
|
+
### ❌ Not Recommended:
|
|
234
|
+
|
|
235
|
+
1. **One-time Use**: If you're only creating one workspace
|
|
236
|
+
2. **Variable Settings**: If you need different settings each time
|
|
237
|
+
3. **Quick Development**: For rapid testing, interactive prompts are faster
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Additional resources
|
|
242
|
+
|
|
243
|
+
- [Example config](../rapidkit.config.example.js)
|
|
244
|
+
- [commands-reference.md](./commands-reference.md) — CLI syntax
|
|
245
|
+
- [Documentation](https://getrapidkit.com/docs/config) (external)
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 💡 Tips
|
|
250
|
+
|
|
251
|
+
1. **Config is Optional**: You don't need to create this file
|
|
252
|
+
2. **CLI Overrides**: You can always override config with command-line flags
|
|
253
|
+
3. **Auto-detection**: CLI automatically discovers config files
|
|
254
|
+
4. **Type Safety**: Use TypeScript types for IntelliSense support
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 🔗 Related Commands
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Create workspace with config
|
|
262
|
+
npx rapidkit my-workspace --yes
|
|
263
|
+
|
|
264
|
+
# Override config author
|
|
265
|
+
npx rapidkit my-workspace --author "Different Author"
|
|
266
|
+
|
|
267
|
+
# Check environment
|
|
268
|
+
npx rapidkit doctor
|
|
269
|
+
|
|
270
|
+
# Inspect/set workspace policy (recommended over manual YAML edits)
|
|
271
|
+
npx rapidkit workspace policy show
|
|
272
|
+
npx rapidkit workspace policy set mode strict
|
|
273
|
+
npx rapidkit workspace policy set dependency_sharing_mode shared-runtime-caches
|
|
274
|
+
npx rapidkit workspace policy set rules.enforce_toolchain_lock true
|
|
275
|
+
|
|
276
|
+
# List available kits
|
|
277
|
+
npx rapidkit list
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 🛡️ Workspace Policy vs `rapidkit.config.*`
|
|
283
|
+
|
|
284
|
+
- `rapidkit.config.js|mjs|cjs` defines creation defaults and prompt behavior.
|
|
285
|
+
- `.rapidkit/policies.yml` defines runtime governance and enforcement behavior after workspace creation.
|
|
286
|
+
- Preferred policy management path:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
npx rapidkit workspace policy show
|
|
290
|
+
npx rapidkit workspace policy set <key> <value>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
**Last updated:** June 2026 · **CLI version:** 0.35.x
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# RapidKit CLI Artifact Catalog
|
|
2
|
+
|
|
3
|
+
Canonical map of **on-disk artifacts** produced by `rapidkit-npm` commands. Dashboards, VS Code extension, and CI should read paths listed here — not infer from legacy fields (e.g. `workspace.json.projects`).
|
|
4
|
+
|
|
5
|
+
## Authority layers (identity)
|
|
6
|
+
|
|
7
|
+
| Artifact | Path | Writer | Reader purpose |
|
|
8
|
+
| ------------------ | -------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
9
|
+
| Workspace manifest | `.rapidkit/workspace.json` | `create workspace`, `foundation ensure`, `bootstrap` (profile) | Profile, engine, bootstrap metadata — **not** project list |
|
|
10
|
+
| Workspace contract | `.rapidkit/workspace.contract.json` | `workspace sync`, `workspace contract *`, import/adopt | Operational project registry (ports, contracts) |
|
|
11
|
+
| Registry summary | `.rapidkit/workspace-registry.v1.json` | `workspace sync`, contract sync, `registry status --refresh` | **Canonical** project count + authority for UI/CI |
|
|
12
|
+
| Workspace marker | `.rapidkit-workspace` | `create workspace`, `foundation ensure` | Root detection |
|
|
13
|
+
|
|
14
|
+
## Naming conventions
|
|
15
|
+
|
|
16
|
+
| Pattern | Meaning | Examples |
|
|
17
|
+
| ----------------- | -------------------------------------- | ------------------------------------------------------------ |
|
|
18
|
+
| `*-last-run.json` | Latest gate/run evidence | `doctor-last-run.json`, `pipeline-last-run.json` |
|
|
19
|
+
| `*.latest.json` | Rolling alias + timestamped siblings | `bootstrap-compliance.latest.json`, `mirror-ops.latest.json` |
|
|
20
|
+
| Static state | Current model/state (not a single run) | `workspace-model.json`, `workspace.contract.json` |
|
|
21
|
+
|
|
22
|
+
## Governance evidence loop
|
|
23
|
+
|
|
24
|
+
| Command | Primary artifact | Schema version | JSON Schema |
|
|
25
|
+
| ------------------- | --------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------- | ------------------------------------- |
|
|
26
|
+
| `doctor workspace` | `.rapidkit/reports/doctor-last-run.json` | `doctor-workspace-evidence-v1` | `contracts/doctor-workspace-evidence.v1.json` |
|
|
27
|
+
| `doctor project` | `.rapidkit/reports/doctor-project-last-run.json` | `doctor-project-evidence-v1` | `contracts/doctor-project-evidence.v1.json` |
|
|
28
|
+
| `analyze` | `.rapidkit/reports/analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
|
|
29
|
+
| `readiness` | `.rapidkit/reports/release-readiness-last-run.json` | `release-readiness-v1` | `contracts/release-readiness.v1.json` |
|
|
30
|
+
| `pipeline` | `.rapidkit/reports/pipeline-last-run.json` | Also triggers agent grounding sync unless `--no-agent-sync` | `rapidkit-pipeline-v1` | `contracts/pipeline-last-run.v1.json` |
|
|
31
|
+
| `autopilot release` | `.rapidkit/reports/autopilot-release-last-run.json` | `autopilot-release-v1` | — |
|
|
32
|
+
| | `.rapidkit/reports/autopilot-release.json` | (alias, same payload) | — |
|
|
33
|
+
|
|
34
|
+
Side/cache (not gates): `.rapidkit/reports/doctor-workspace-cache.json` (`doctor-workspace-cache-v2`).
|
|
35
|
+
|
|
36
|
+
## Workspace intelligence
|
|
37
|
+
|
|
38
|
+
| Command | Artifact | Schema | Contract file |
|
|
39
|
+
| -------------------------------- | ------------------------------------------------------------------------------------ | --------------------------------- | ---------------------------------------------------------- |
|
|
40
|
+
| `workspace model --write` | `workspace-model.json` | `workspace-model.v1` | `contracts/workspace-intelligence/workspace-model.v1.json` |
|
|
41
|
+
| `workspace snapshot` | `workspace-model-snapshot.json` | `workspace-model-snapshot.v1` | `workspace-model-snapshot.v1.json` |
|
|
42
|
+
| `workspace diff` | `workspace-model-diff-last-run.json` | `workspace-model-diff.v1` | `workspace-model-diff.v1.json` |
|
|
43
|
+
| `workspace impact --from <diff>` | `workspace-impact-last-run.json` | `workspace-impact.v1` | `workspace-impact.v1.json` |
|
|
44
|
+
| `workspace verify` | `workspace-verify-last-run.json` | `workspace-verify.v1` | `workspace-verify.v1.json` |
|
|
45
|
+
| `workspace context --write` | `workspace-context-agent.json` | `workspace-context.v1` | `workspace-context.v1.json` |
|
|
46
|
+
| `workspace agent-sync --write` | `reports/INDEX.json`, `AGENT-GROUNDING.md`, `AGENTS.md`, Copilot/Cursor/Claude hooks | `rapidkit-agent-reports-index.v1` | — |
|
|
47
|
+
|
|
48
|
+
**CLI semantics:** `workspace diff --from` expects a **model or snapshot** baseline. `workspace impact --from` expects a **diff report**.
|
|
49
|
+
|
|
50
|
+
## Operational / platform
|
|
51
|
+
|
|
52
|
+
| Command | Artifact | Notes |
|
|
53
|
+
| -------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------- |
|
|
54
|
+
| `workspace run` | `workspace-run-last.json` | `workspace-run-v1` (multi-stage: `stages.test`, `stages.build`, …) | `contracts/workspace-run-last.v1.json` |
|
|
55
|
+
| `autopilot release` (run stages) | same `workspace-run-last.json` | Autopilot publishes test/build into aggregate (no separate `autopilot-workspace-run-*.json`) | — |
|
|
56
|
+
| `bootstrap` | `bootstrap-compliance-{ts}.json`, `bootstrap-compliance.latest.json` | |
|
|
57
|
+
| `mirror status` | `mirror-ops-{ts}.json`, `mirror-ops.latest.json` | |
|
|
58
|
+
| `mirror` (transparency) | `transparency-evidence-{ts}.json`, `transparency-evidence.latest.json` | |
|
|
59
|
+
| `infra plan` | `infra-plan.json` | `rapidkit.infra-plan.v1` |
|
|
60
|
+
| `workspace archive` | `archive-manifest.json` | Root `.rapidkit/`, handoff |
|
|
61
|
+
| `workspace share` | `reports/share-bundle.json` (default) | Aggregation bundle |
|
|
62
|
+
| `import` / `adopt` | `{project}/.rapidkit/import-readiness.json` | Per project |
|
|
63
|
+
| `workspace contract verify` | `workspace-contract-verify-last-run.json` | CLI verify cache |
|
|
64
|
+
|
|
65
|
+
## Static capability contracts
|
|
66
|
+
|
|
67
|
+
| Contract | Schema version | Consumer purpose |
|
|
68
|
+
| ----------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
69
|
+
| `contracts/runtime-command-surface.v1.json` | `rapidkit-runtime-command-surface-v1` | Runtime commands, scaffold kits, and create planner summary |
|
|
70
|
+
| `contracts/create-planner-capabilities.v1.json` | `rapidkit-create-planner-capabilities-v1` | Native create, external-create-adopt, and adopt-only lanes for CLI, CI, VS Code, and AI planners |
|
|
71
|
+
|
|
72
|
+
## Registry commands
|
|
73
|
+
|
|
74
|
+
| Command | Output |
|
|
75
|
+
| ------------------------------------------------ | -------------------------------------------------------------------------------- |
|
|
76
|
+
| `workspace sync [--json]` | Updates contract + `workspace-registry.v1.json`; JSON includes `registrySummary` |
|
|
77
|
+
| `workspace registry status [--refresh] [--json]` | Reads or publishes registry summary |
|
|
78
|
+
|
|
79
|
+
## Project-scoped reports
|
|
80
|
+
|
|
81
|
+
Under `{project}/.rapidkit/reports/` when commands run at project scope (e.g. project doctor). Workspace-level reports stay under `{workspace}/.rapidkit/reports/`.
|
|
82
|
+
|
|
83
|
+
## Consumer rules
|
|
84
|
+
|
|
85
|
+
1. **Project count:** read `workspace-registry.v1.json` (or run `workspace registry status --json`).
|
|
86
|
+
2. **Release gates:** follow chain doctor → analyze → readiness → verify → autopilot; use `pipeline-last-run.json` for orchestration summary.
|
|
87
|
+
3. **Do not** use `workspace.json.projects` (removed in schema 1.0).
|
|
88
|
+
4. Prefer `schemaVersion` constants in each artifact; legacy `v1` on readiness is accepted when reading old reports.
|
|
89
|
+
5. **Agent grounding:** read `.rapidkit/reports/INDEX.json` first, then `workspace-context-agent.json`; regenerate with `workspace agent-sync --write`.
|
|
90
|
+
|
|
91
|
+
## Agent grounding files (repo hooks)
|
|
92
|
+
|
|
93
|
+
Written by `workspace agent-sync --write` (and by default after `workspace context --for-agent --write`):
|
|
94
|
+
|
|
95
|
+
| Path | Consumer |
|
|
96
|
+
| -------------------------------------------------------- | --------------------------------------------------------- |
|
|
97
|
+
| `AGENTS.md` | Copilot, Cursor, Claude Code, Codex, Grok (open standard) |
|
|
98
|
+
| `.github/copilot-instructions.md` | GitHub Copilot / VS Code Chat |
|
|
99
|
+
| `.github/instructions/rapidkit-evidence.instructions.md` | Copilot scoped `.rapidkit/**` rules |
|
|
100
|
+
| `.github/prompts/rapidkit-diagnose.prompt.md` | Copilot prompt library |
|
|
101
|
+
| `.github/skills/rapidkit-grounding/SKILL.md` | Copilot skills |
|
|
102
|
+
| `.cursor/rules/rapidkit-grounding.mdc` | Cursor always-on rule |
|
|
103
|
+
| `CLAUDE.md` | Claude Code (imports `@AGENTS.md`) |
|
|
104
|
+
| `.claude/rules/rapidkit-evidence.md` | Claude Code scoped evidence rule |
|
|
105
|
+
| `.rapidkit/AGENT-GROUNDING.md` | Tool-agnostic operator doc |
|
|
106
|
+
|
|
107
|
+
## See also
|
|
108
|
+
|
|
109
|
+
- [README.md](./README.md)
|
|
110
|
+
- [COMMAND_OWNERSHIP_MATRIX.md](./COMMAND_OWNERSHIP_MATRIX.md)
|
|
111
|
+
- [commands-reference.md](../commands-reference.md)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Command Ownership Matrix
|
|
2
|
+
|
|
3
|
+
This document defines which layer owns command execution in RapidKit npm CLI (`rapidkit-npm`) versus RapidKit Core (`rapidkit-core`) to prevent runtime conflicts.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- Keep project bootstrapping reliable across Python / Node / Go projects.
|
|
8
|
+
- Avoid conflicting behavior between wrapper and core CLIs.
|
|
9
|
+
- Make delegation behavior explicit and testable.
|
|
10
|
+
|
|
11
|
+
## Ownership Rules
|
|
12
|
+
|
|
13
|
+
### 1) Wrapper-owned commands (never forward to core)
|
|
14
|
+
|
|
15
|
+
These commands are implemented and orchestrated by `rapidkit-npm`:
|
|
16
|
+
|
|
17
|
+
- `readiness`
|
|
18
|
+
- `autopilot`
|
|
19
|
+
- `pipeline`
|
|
20
|
+
- `doctor`
|
|
21
|
+
- `import`
|
|
22
|
+
- `adopt`
|
|
23
|
+
- `snapshot`
|
|
24
|
+
- `workspace`
|
|
25
|
+
- `bootstrap`
|
|
26
|
+
- `setup`
|
|
27
|
+
- `cache`
|
|
28
|
+
- `mirror`
|
|
29
|
+
- `ai`
|
|
30
|
+
- `analyze`
|
|
31
|
+
- `config`
|
|
32
|
+
- `product`
|
|
33
|
+
- `infra`
|
|
34
|
+
- `commands`
|
|
35
|
+
- `shell activate`
|
|
36
|
+
|
|
37
|
+
Reason: workspace-level policy, registry, and platform orchestration live in npm wrapper.
|
|
38
|
+
|
|
39
|
+
### 1.1) Wrapper-owned scoped commands
|
|
40
|
+
|
|
41
|
+
These scoped commands are implemented and orchestrated by `rapidkit-npm`:
|
|
42
|
+
|
|
43
|
+
- `project commands`
|
|
44
|
+
- `project archives`
|
|
45
|
+
- `project archive`
|
|
46
|
+
- `project restore`
|
|
47
|
+
- `project delete`
|
|
48
|
+
|
|
49
|
+
Reason: these are workspace project lifecycle and capability operations with
|
|
50
|
+
archive manifests, safety snapshots, workspace registry side effects, and
|
|
51
|
+
runtime-aware command discovery.
|
|
52
|
+
|
|
53
|
+
`project detect` remains Core-owned because it is the stable machine-readable
|
|
54
|
+
contract used by wrappers to detect Python RapidKit projects.
|
|
55
|
+
|
|
56
|
+
`commands --scope project` is also wrapper-owned. It reports the effective
|
|
57
|
+
project command capability matrix for the currently selected project without
|
|
58
|
+
delegating to Core.
|
|
59
|
+
|
|
60
|
+
### 2) Wrapper-orchestrated project commands
|
|
61
|
+
|
|
62
|
+
These commands are handled by npm wrapper first (runtime-aware + fallback-aware)
|
|
63
|
+
when the project capability matrix marks them as runtime-supported:
|
|
64
|
+
|
|
65
|
+
- `init`
|
|
66
|
+
- `dev`
|
|
67
|
+
- `start`
|
|
68
|
+
- `build`
|
|
69
|
+
- `test`
|
|
70
|
+
- `lint`
|
|
71
|
+
- `format`
|
|
72
|
+
- `help`
|
|
73
|
+
|
|
74
|
+
Reason: generated projects can be Python, Node/NestJS, Go/Fiber, Go/Gin, or
|
|
75
|
+
Spring Boot. Runtime commands must run through the selected project's adapter,
|
|
76
|
+
not through a hard-coded global assumption.
|
|
77
|
+
|
|
78
|
+
### 3) Core module/template commands
|
|
79
|
+
|
|
80
|
+
These commands are supported only when the selected project is Core-backed
|
|
81
|
+
and has module/template support:
|
|
82
|
+
|
|
83
|
+
- `add`
|
|
84
|
+
- `modules`
|
|
85
|
+
- `upgrade`
|
|
86
|
+
- `diff`
|
|
87
|
+
- `merge`
|
|
88
|
+
- `reconcile`
|
|
89
|
+
- `rollback`
|
|
90
|
+
- `uninstall`
|
|
91
|
+
- `checkpoint`
|
|
92
|
+
- `snapshot`
|
|
93
|
+
- `optimize`
|
|
94
|
+
|
|
95
|
+
Dispatch policy:
|
|
96
|
+
|
|
97
|
+
- FastAPI / NestJS Core-backed project → supported and delegated to Core.
|
|
98
|
+
- Go / Spring Boot / ASP.NET Core npm-owned project → blocked with a capability explanation.
|
|
99
|
+
- Unknown project → blocked until project metadata is present.
|
|
100
|
+
|
|
101
|
+
### 4) Global engine/catalog commands
|
|
102
|
+
|
|
103
|
+
These commands are not project-specific even when run inside a project:
|
|
104
|
+
|
|
105
|
+
- `create`
|
|
106
|
+
- `list`
|
|
107
|
+
- `info`
|
|
108
|
+
- `frameworks`
|
|
109
|
+
- `license`
|
|
110
|
+
|
|
111
|
+
`create` remains npm-owned so the wrapper can orchestrate multi-language
|
|
112
|
+
workspace/project generation. The other commands may delegate to Core as engine
|
|
113
|
+
catalog operations.
|
|
114
|
+
|
|
115
|
+
## Dynamic Project Capability Model
|
|
116
|
+
|
|
117
|
+
A pure-core or pure-wrapper model causes regressions in mixed-language workspaces. Hybrid ownership keeps Python compatibility while letting npm wrapper enforce workspace policy and resilient cross-platform fallback behavior.
|
|
118
|
+
|
|
119
|
+
The npm wrapper resolves project capabilities from `.rapidkit/project.json`,
|
|
120
|
+
`.rapidkit/context.json`, and framework/runtime markers. Users and tools can
|
|
121
|
+
inspect the effective command surface with:
|
|
122
|
+
|
|
123
|
+
- `rapidkit project commands`
|
|
124
|
+
- `rapidkit project commands --json`
|
|
125
|
+
- `rapidkit commands --scope project --json`
|
|
126
|
+
|
|
127
|
+
This capability model is the canonical bridge between npm-owned kits and
|
|
128
|
+
Core-backed kits. Adding a future language or framework should update the
|
|
129
|
+
project metadata and runtime detector first, then the capability matrix follows
|
|
130
|
+
without widening the Core/global command surface.
|
|
131
|
+
|
|
132
|
+
## Guard Rails
|
|
133
|
+
|
|
134
|
+
- `shouldForwardToCore()` must return `false` for wrapper-owned and wrapper-orchestrated project commands.
|
|
135
|
+
- `project commands` and `commands --scope project` must never forward to Core.
|
|
136
|
+
- Core module/template commands must be blocked for npm-owned projects that set `module_support: false`.
|
|
137
|
+
- Tests must assert forwarding boundary rules.
|
|
138
|
+
- Changes to ownership should update this file and tests together.
|