Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1c47c1d
feat(rpgkit): package bundle mode + workspace AI config (v0.1.3)
HuYaSen May 18, 2026
1f8809a
docs(rpgkit): document bundle mode, --legacy-download/--pull, .rpgkit…
HuYaSen May 18, 2026
4df0a90
fix(rpgkit): post-review bug fixes in 0.1.3 plumbing
HuYaSen May 18, 2026
f5aad31
fix(rpgkit): third-pass review — workspace config commit + P4 sed-safety
HuYaSen May 19, 2026
28ee752
feat(rpgkit): version command compares local vs latest, shows upgrade…
HuYaSen May 19, 2026
4aa1359
feat(cli): route MCP and git hooks via global rpgkit command (Batch A)
HuYaSen May 19, 2026
190c1ab
refactor(scripts): route next_action hints via rpgkit script (Batch B…
HuYaSen May 19, 2026
a74c7ef
feat(cli): drop workspace scripts copy + rewrite templates (Batch B-3…
HuYaSen May 19, 2026
3c1d7c1
docs: reflect rpgkit script + global scripts dir (Batch B-8)
HuYaSen May 19, 2026
e3f212c
fix(plan-02): post-implementation review fixes
HuYaSen May 19, 2026
2bd355b
fix(plan-02): route remaining workspace-script lookups via packaged dir
HuYaSen May 19, 2026
454c917
fix(plan-02): sweep remaining script-path references (real bugs + doc…
HuYaSen May 19, 2026
98d25e3
feat(cli): auto-snapshot .rpgkit/ via private inner git (Plan 03)
HuYaSen May 19, 2026
83cc59e
feat(cli): auto-register rpg-tools in Copilot CLI global MCP config
HuYaSen May 20, 2026
a0e5b78
fix(templates): drop deprecated `mode: agent` from 3 prompts
HuYaSen May 20, 2026
816398d
feat(rpgkit): move runtime state out of workspace (scripts, docs, tests)
HuYaSen May 21, 2026
2cd0c64
feat(cli): home-side storage helpers, walker guard, hook dispatcher
HuYaSen May 21, 2026
bd03c1f
fix(rpgkit/_inner_git): strip inherited GIT_* env in inner-git calls
HuYaSen May 22, 2026
5c21470
fix(rpgkit/scripts): print only file basename to avoid path leakage
HuYaSen May 22, 2026
660207f
feat(rpgkit/cli): tee 'rpgkit script' stdout into logs/<stage>.log
HuYaSen May 22, 2026
a6af6d8
fix(llm_client): tolerate session trace outside workspace root
HuYaSen May 22, 2026
782ce1c
fix(hooks): retire pre-commit; rely on post-commit + post-merge only
HuYaSen May 22, 2026
71b0be5
docs: refresh for home-side runtime store + retired pre-commit hook
HuYaSen May 22, 2026
f15f55c
chore(lint): mirror markdownlint config inside RPG-Kit for local runs
HuYaSen May 22, 2026
6ecc2fa
fix(cli): remove browser-dependent view-graph command
HuYaSen May 22, 2026
b0a4458
docs(readme): align multilingual README guidance
HuYaSen May 22, 2026
ea05e7d
Merge remote-tracking branch 'origin/main' into dev/rpgkit-global-ins…
HuYaSen May 22, 2026
c9cb889
fix(rpgkit): address Copilot PR #56 review feedback
HuYaSen May 22, 2026
3abb5b2
fix(rpgkit): address Copilot PR #56 follow-up review
HuYaSen May 22, 2026
c07d9f1
feat(rpgkit): slug-based workspace ids with overflow hash suffix
HuYaSen May 22, 2026
5bcc0a7
refactor(rpgkit-cli): drop --pull, rename --no-pull to --no-upgrade
HuYaSen May 22, 2026
66fef31
refactor(rpgkit-cli): drop CLI flags for release-zip provisioning cha…
HuYaSen May 22, 2026
563fb7e
Potential fix for pull request finding
QingtaoLi1 May 23, 2026
4685069
Potential fix for pull request finding
QingtaoLi1 May 23, 2026
b7b0268
feat(rpgkit): add /rpgkit.plan facade consolidating decoder pipeline
HuYaSen May 22, 2026
e2d9258
test(rpgkit): add unit tests for plan.py orchestrator logic
HuYaSen May 22, 2026
9062de4
fix(rpgkit): pass --json to all check_*.py in plan.py orchestrator
HuYaSen May 22, 2026
f914c87
Merge remote-tracking branch 'origin/main' into dev/rpgkit-consolidat…
QingtaoLi1 May 25, 2026
afe0053
[fix] _script_argv() supports potential extensions.
QingtaoLi1 May 25, 2026
19e098d
[fix] Fix mislead for users into looking in the wrong place
QingtaoLi1 May 25, 2026
759612e
[fix] data_flow_viz.html path.
QingtaoLi1 May 25, 2026
9b65959
[fix] logs path.
QingtaoLi1 May 25, 2026
88f89e8
[fix] data path.
QingtaoLi1 May 25, 2026
cfa1cca
[decoder] Add consolidated command: feature_construct.
QingtaoLi1 May 27, 2026
96e58ee
[decoder] Normalize checker status field.
QingtaoLi1 May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions RPG-Kit/README.hi-IN.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ uvx --from "git+https://github.com/microsoft/RPG-ZeroRepo.git#subdirectory=RPG-K
/rpgkit.feature_build
/rpgkit.feature_refactor
[Optional] /rpgkit.feature_edit <edit instructions>
/rpgkit.build_skeleton
/rpgkit.build_data_flow
/rpgkit.design_base_classes
/rpgkit.design_interfaces
/rpgkit.plan_tasks
/rpgkit.plan
/rpgkit.code_gen
[Optional] /rpgkit.rpg_edit <edit instructions>
```
Expand Down Expand Up @@ -241,7 +237,7 @@ rpgkit update

## आगामी सुविधाएँ

- **सरल जनरेशन कमांड्स:** वर्तमान बहु-चरण जनरेशन प्रवाह को कम कमांड्स में मर्ज किया जाएगा, जैसे `/rpgkit.generate_repo`, `/rpgkit.generate_feature` और `/rpgkit.plan`।
- **सरल जनरेशन कमांड्स:** वर्तमान बहु-चरण जनरेशन प्रवाह को कम कमांड्स में मर्ज किया जाएगा, जैसे `/rpgkit.generate_repo` और `/rpgkit.generate_feature``/rpgkit.plan` 0.1.4 में रिलीज़ हो चुका है
- **बहु-भाषा समर्थन:** Go, C++, Rust, JavaScript/TypeScript और अन्य के लिए समर्थन जोड़ा जाएगा।
- **अधिक प्लेटफ़ॉर्म एकीकरण:** विभिन्न सिस्टम्स पर विभिन्न AI कोडिंग एजेंट्स के लिए CLI और VS Code एक्सटेंशन वर्कफ़्लो में RPG-Kit समर्थन।

Expand Down
8 changes: 2 additions & 6 deletions RPG-Kit/README.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ uvx --from "git+https://github.com/microsoft/RPG-ZeroRepo.git#subdirectory=RPG-K
/rpgkit.feature_build
/rpgkit.feature_refactor
[Optional] /rpgkit.feature_edit <edit instructions>
/rpgkit.build_skeleton
/rpgkit.build_data_flow
/rpgkit.design_base_classes
/rpgkit.design_interfaces
/rpgkit.plan_tasks
/rpgkit.plan
/rpgkit.code_gen
[Optional] /rpgkit.rpg_edit <edit instructions>
```
Expand Down Expand Up @@ -241,7 +237,7 @@ rpgkit update

## 今後の機能

- **よりシンプルな生成コマンド:** 現在の多段階の生成フローを、`/rpgkit.generate_repo``/rpgkit.generate_feature``/rpgkit.plan` などのより少ないコマンドにまとめます
- **よりシンプルな生成コマンド:** 現在の多段階の生成フローを、`/rpgkit.generate_repo``/rpgkit.generate_feature` などのより少ないコマンドにまとめます。`/rpgkit.plan` は 0.1.4 でリリース済みです
- **多言語サポート:** Go、C++、Rust、JavaScript/TypeScript などのサポートを追加します。
- **より多くのプラットフォーム連携:** さまざまなシステム上の異なる AI コーディングエージェントについて、CLI と VS Code 拡張ワークフローを横断して RPG-Kit をサポートします。

Expand Down
8 changes: 2 additions & 6 deletions RPG-Kit/README.ko-KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ uvx --from "git+https://github.com/microsoft/RPG-ZeroRepo.git#subdirectory=RPG-K
/rpgkit.feature_build
/rpgkit.feature_refactor
[Optional] /rpgkit.feature_edit <edit instructions>
/rpgkit.build_skeleton
/rpgkit.build_data_flow
/rpgkit.design_base_classes
/rpgkit.design_interfaces
/rpgkit.plan_tasks
/rpgkit.plan
/rpgkit.code_gen
[Optional] /rpgkit.rpg_edit <edit instructions>
```
Expand Down Expand Up @@ -241,7 +237,7 @@ rpgkit update

## 예정된 기능

- **더 간단한 생성 커맨드:** 현재의 다단계 생성 흐름을 `/rpgkit.generate_repo`, `/rpgkit.generate_feature`, `/rpgkit.plan` 등 더 적은 커맨드로 통합합니다.
- **더 간단한 생성 커맨드:** 현재의 다단계 생성 흐름을 `/rpgkit.generate_repo`, `/rpgkit.generate_feature` 등 더 적은 커맨드로 통합합니다. `/rpgkit.plan` 은 0.1.4 에서 출시되었습니다.
- **다국어 지원:** Go, C++, Rust, JavaScript/TypeScript 등을 추가로 지원합니다.
- **더 많은 플랫폼 통합:** 다양한 시스템에서 서로 다른 AI 코딩 에이전트의 CLI 및 VS Code 확장 워크플로에 걸쳐 RPG-Kit을 지원합니다.

Expand Down
8 changes: 2 additions & 6 deletions RPG-Kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ Use this path when you want RPG-Kit to turn requirements into a new codebase.
/rpgkit.feature_build
/rpgkit.feature_refactor
[Optional] /rpgkit.feature_edit <edit instructions>
/rpgkit.build_skeleton
/rpgkit.build_data_flow
/rpgkit.design_base_classes
/rpgkit.design_interfaces
/rpgkit.plan_tasks
/rpgkit.plan
/rpgkit.code_gen
[Optional] /rpgkit.rpg_edit <edit instructions>
```
Expand Down Expand Up @@ -241,7 +237,7 @@ rpgkit update

## Upcoming Features

- **Simpler generation commands:** merge the current multi-step generation flow into fewer commands, such as `/rpgkit.generate_repo`, `/rpgkit.generate_feature`, and `/rpgkit.plan`.
- **Simpler generation commands:** merge the current multi-step generation flow into fewer commands, such as `/rpgkit.generate_repo` and `/rpgkit.generate_feature`. `/rpgkit.plan` has shipped in 0.1.4.
- **Multi-language support:** add support for Go, C++, Rust, JavaScript/TypeScript, and more.
- **More platform integrations:** support RPG-Kit across CLI and VS Code extension workflows for different AI coding agents on different systems.

Expand Down
8 changes: 2 additions & 6 deletions RPG-Kit/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ uvx --from "git+https://github.com/microsoft/RPG-ZeroRepo.git#subdirectory=RPG-K
/rpgkit.feature_build
/rpgkit.feature_refactor
[Optional] /rpgkit.feature_edit <edit instructions>
/rpgkit.build_skeleton
/rpgkit.build_data_flow
/rpgkit.design_base_classes
/rpgkit.design_interfaces
/rpgkit.plan_tasks
/rpgkit.plan
/rpgkit.code_gen
[Optional] /rpgkit.rpg_edit <edit instructions>
```
Expand Down Expand Up @@ -241,7 +237,7 @@ rpgkit update

## 即将推出的功能

- **更简化的生成命令**:把当前多步骤的生成流程合并为更少的命令,例如 `/rpgkit.generate_repo``/rpgkit.generate_feature``/rpgkit.plan`。
- **更简化的生成命令**:把当前多步骤的生成流程合并为更少的命令,例如 `/rpgkit.generate_repo``/rpgkit.generate_feature``/rpgkit.plan` 已在 0.1.4 中发布
- **多语言支持**:增加对 Go、C++、Rust、JavaScript/TypeScript 等的支持。
- **更多平台集成**:在不同系统上跨 CLI 和 VS Code 扩展工作流支持不同的 AI 编码智能体。

Expand Down
128 changes: 123 additions & 5 deletions RPG-Kit/docs/commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# /rpgkit Commands Reference

RPG-Kit provides 13 slash commands that work in three paths:
RPG-Kit provides 15 slash commands that work in three paths:

- **Forward pipeline:** Requirements → Repository Planning Graph (RPG) → Code
- **Reverse encoder:** Existing code → RPG
Expand All @@ -14,21 +14,31 @@ RPG-Kit provides 13 slash commands that work in three paths:

| Command | Description |
| ------- | ----------- |
| `/rpgkit.feature_construct <desc>` | Run Phase 1 feature specification, build, and refactor in one step — recommended |
| `/rpgkit.feature_spec <desc>` | Create structured feature specifications from user input or `docs/` files |
| `/rpgkit.feature_build` | Generate and expand the feature tree from specifications |
| `/rpgkit.feature_refactor` | Refactor feature tree into modular component architecture |
| `/rpgkit.feature_edit <instr>` | Edit feature tree nodes before skeleton planning — optional |

> `/rpgkit.feature_construct` is the simplest way to drive Phase 1 end-to-end. Use
> the individual Phase 1 commands only when you want to debug or re-run a
> specific stage.

### Phase 2: RPG Construction and Planning

| Command | Description |
| ------- | ----------- |
| `/rpgkit.plan` | Run all five Phase-2 stages in one step with automatic resume — recommended |
| `/rpgkit.build_skeleton` | Build repository file skeleton from component architecture; creates `.rpgkit/data/rpg.json` |
| `/rpgkit.build_data_flow` | Build inter-component data flow DAG and update the RPG |
| `/rpgkit.design_base_classes` | Design shared base classes and data structures |
| `/rpgkit.design_interfaces` | Design function/class interfaces with type hints and docstrings |
| `/rpgkit.plan_tasks` | Plan dependency-ordered implementation task batches |

> `/rpgkit.plan` is the simplest way to drive Phase 2 end-to-end. Use
> the individual commands above only when you want to debug or
> re-run a specific stage.

### Phase 3: Code Generation and Surgical Edits

| Command | Description |
Expand All @@ -49,6 +59,51 @@ Both directions produce the same RPG structure at `.rpgkit/data/rpg.json`, enabl

## Phase 1: Feature Specification

### `/rpgkit.feature_construct`

Run the full Phase 1 pipeline (`feature_spec` → `feature_build` → `feature_refactor`) in one step. This is the recommended entry point for creating the feature tree that feeds `/rpgkit.plan`.

**Input modes:**

- **Direct input:** provide requirements after the command.
- **Auto-detect:** omit input to use existing `docs/*.md` files automatically.
- **Inline prompt:** if neither direct input nor usable docs exist, the command asks for requirements and then continues in the same flow.

**Output:** every artifact produced by the three individual Phase 1 commands — `.rpgkit/data/feature_spec/`, `feature_spec.json`, `feature_build.json`, and `feature_tree.json`.

**Process:**

1. **Probe progress** — runs `rpgkit script feature_construct.py --check-only --json` to see which Phase 1 stages already have valid artifacts.
2. **Generate requirements artifacts when needed** — follows the `/rpgkit.feature_spec` workflow for direct text or `docs/*.md` sources.
3. **Run/resume** — executes `rpgkit script feature_construct.py`, skipping completed stages and cascading downstream rebuilds when an upstream stage reruns.
4. **Optional expansion** — after completion, the user can expand features through the existing `feature_build --mode suggest-directions` and `--mode step2 --direction <indices>` flow; refactor is rerun afterward so `feature_tree.json` stays aligned.

**CLI flags forwarded after `$ARGUMENTS`:**

- `--check-only` — show Phase 1 progress without modifying artifacts or running stages.
- `--json` — with `--check-only`, emit the progress report as JSON.
- `--force` — rebuild all Phase 1 stages.
- `--dry-run` — print the commands that would run without modifying artifacts.
- `--verbose` — forward native verbose logging flags.
- `--no-trajectory` — disable trajectory recording where supported.
- `--max-iter-refactor N` — forward to `feature_refactor.py` as `--max-iterations N`.
- `--review-threshold N` — forward to `feature_build.py --mode step1`.
- `--review-max-iterations N` — forward to `feature_build.py --mode step1`.

Use `--` to separate options from requirement text:

```text
/rpgkit.feature_construct --check-only
/rpgkit.feature_construct --check-only --json
/rpgkit.feature_construct --review-threshold 99 -- Build a CLI tool for managing Docker containers
/rpgkit.feature_construct Build a CLI tool for managing Docker containers
/rpgkit.feature_construct # Auto-detect docs/ files
```

**Next step:** `/rpgkit.plan` is the default handoff after Phase 1. If the final tree needs small adjustments, run `/rpgkit.feature_edit <instructions>`. The granular Phase 1 commands remain available for debug and surgical reruns; `/rpgkit.build_skeleton` is a Phase 2 granular fallback, not the default next step.

---

### `/rpgkit.feature_spec`

Create structured feature specifications from user input or documentation files.
Expand Down Expand Up @@ -159,6 +214,69 @@ Edit feature tree nodes before repository planning begins.

## Phase 2: RPG Construction and Planning

### `/rpgkit.plan`

Run the full Phase-2 pipeline (`build_skeleton` → `build_data_flow` →
`design_base_classes` → `design_interfaces` → `plan_tasks`) in one
step. This is the recommended entry point for Phase 2.

**Input:** `~/.rpgkit/workspaces/<workspace-id>/data/feature_tree.json` (produced by
`/rpgkit.feature_construct` or `/rpgkit.feature_refactor`)

**Output:** every artifact produced by the five individual commands —
`skeleton.json`, `data_flow.json`, `base_classes.json`,
`interfaces.json`, `tasks.json`, plus `rpg.json` and the
`data_flow_viz.html` visualization.

**Process:**

1. **Probe progress** — runs `rpgkit script plan.py --check-only --json`
to see which stages already have valid artifacts.
2. **Decide** — based on the probe result, the command prompts you
**once** with one of three options:
- All five stages already done → `Overwrite` or `Exit`.
- Partial progress (some stages done) → `Continue`, `Restart`, or `Exit`.
- Fresh workspace → no prompt; runs the full pipeline.
3. **Run** — executes the chosen mode through `rpgkit script plan.py`.
Each stage's stdout is streamed live and also written to a per-stage
log under `~/.rpgkit/workspaces/<workspace-id>/logs/`.
4. **Verify** — after every stage's build script, the corresponding
`check_*.py` script re-runs to validate the produced artifact. If
verification fails the pipeline stops and prints recovery hints.

**Resume semantics:** the command treats `type == "update"` from each
`check_*.py` as the source of truth for "this stage is done". If you
press Ctrl-C halfway through, running `/rpgkit.plan` again automatically
resumes from the first not-done stage. When any earlier stage is
re-run, every downstream stage is rebuilt too so artifacts never drift
apart.

**CLI flags forwarded after `$ARGUMENTS`:**

- `--force` — discard existing artifacts and rebuild every stage.
- `--max-iter-skeleton N`, `--max-iter-data-flow N`,
`--max-iter-base-classes N`, `--max-iter-interfaces N` —
override iteration counts for the corresponding stage.
- `--verbose` — forward `--verbose` to every sub-script.
- `--no-trajectory` — forward `--no-trajectory` where supported.

**Examples:**

```text
/rpgkit.plan
/rpgkit.plan --verbose
/rpgkit.plan --force # rebuild everything
/rpgkit.plan --max-iter-skeleton 15
```

To inspect progress without running anything:

```bash
rpgkit script plan.py --check-only
```

---

### `/rpgkit.build_skeleton`

Build the repository file skeleton from the component architecture. This is where the forward pipeline first creates the RPG.
Expand Down Expand Up @@ -462,10 +580,10 @@ All intermediate data is stored in `.rpgkit/data/`:

| File | Produced by | Description |
| ---- | ----------- | ----------- |
| `feature_spec/` | `feature_spec` | Evidence and feature specification documents |
| `feature_spec.json` | `feature_spec` | Structured feature specification |
| `feature_build.json` | `feature_build` | Expanded feature tree |
| `feature_tree.json` | `feature_refactor` / `feature_edit` | Component architecture |
| `feature_spec/` | `feature_construct` / `feature_spec` | Evidence and feature specification documents |
| `feature_spec.json` | `feature_construct` / `feature_spec` | Structured feature specification |
| `feature_build.json` | `feature_construct` / `feature_build` | Expanded feature tree |
| `feature_tree.json` | `feature_construct` / `feature_refactor` / `feature_edit` | Component architecture |
| `skeleton.json` | `build_skeleton` | File skeleton |
| `skeleton_summary.txt` | `build_skeleton` | Human-readable skeleton summary |
| `rpg.json` | `build_skeleton` / `encode`, then updated by later commands | Repository Planning Graph |
Expand Down
18 changes: 9 additions & 9 deletions RPG-Kit/scripts/check_base_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ def inspect_state(base_classes_path: Path) -> Dict[str, Any]:
"""Inspect current state and determine action needed.

Returns dict with:
- state: "error" | "init" | "update"
- type: "error" | "init" | "update"
- message: description
- details: additional info
"""
# Check if base_classes.json exists
if not base_classes_path.exists():
return {
"state": "init",
"type": "init",
"message": "base_classes.json not found - need to run design_base_classes",
"details": {}
}
Expand All @@ -126,15 +126,15 @@ def inspect_state(base_classes_path: Path) -> Dict[str, Any]:
data = json.load(f)
except json.JSONDecodeError as e:
return {
"state": "error",
"type": "error",
"message": f"Invalid JSON in base_classes.json: {e}",
"details": {}
}

# Check for error field
if "error" in data:
return {
"state": "error",
"type": "error",
"message": f"Base classes has error: {data['error']}",
"details": {}
}
Expand All @@ -143,7 +143,7 @@ def inspect_state(base_classes_path: Path) -> Dict[str, Any]:
is_valid, errors = validate_base_classes_structure(data)
if not is_valid:
return {
"state": "error",
"type": "error",
"message": "Base classes structure or syntax is invalid",
"details": {"errors": errors}
}
Expand All @@ -161,7 +161,7 @@ def inspect_state(base_classes_path: Path) -> Dict[str, Any]:
ds_file_paths = [ds.get("file_path", "") for ds in data_structures if ds.get("file_path")]

return {
"state": "update",
"type": "update",
"message": "Base classes are valid",
"details": {
"file_count": len(base_classes),
Expand All @@ -178,7 +178,7 @@ def inspect_state(base_classes_path: Path) -> Dict[str, Any]:

def print_state(result: Dict[str, Any]) -> None:
"""Print state information."""
state = result["state"]
state = result["type"]
message = result["message"]
details = result.get("details", {})

Expand Down Expand Up @@ -259,7 +259,7 @@ def main():
result = inspect_state(args.input)

# In verbose mode, include raw base_classes data
if args.verbose and result.get("state") == "update":
if args.verbose and result.get("type") == "update":
base_classes_data = load_json(args.input)
if base_classes_data:
result["base_classes"] = base_classes_data.get("base_classes", [])
Expand All @@ -273,7 +273,7 @@ def main():
print_state(result)

# Return exit code based on state
if result["state"] == "error":
if result["type"] == "error":
return 1
return 0

Expand Down
Loading