pdd-skills 3.0.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 +1478 -0
- package/bin/pdd.js +354 -0
- package/config/bpmn-rules.yaml +166 -0
- package/config/checkstyle.xml +105 -0
- package/config/eslint.config.js +48 -0
- package/config/pmd.xml +91 -0
- package/config/prd-rules.yaml +113 -0
- package/config/ruff.toml +45 -0
- package/config/sqlfluff.cfg +82 -0
- package/hooks/hook-executor.js +332 -0
- package/index.js +43 -0
- package/lib/api-routes.js +750 -0
- package/lib/api-server.js +408 -0
- package/lib/cache/cache-config.js +209 -0
- package/lib/cache/system-cache.js +852 -0
- package/lib/config-manager.js +373 -0
- package/lib/generate.js +528 -0
- package/lib/grpc/grpc-routes.js +1134 -0
- package/lib/grpc/grpc-server.js +912 -0
- package/lib/grpc/proto-definitions.js +1033 -0
- package/lib/init.js +172 -0
- package/lib/iteration/auto-fixer.js +1025 -0
- package/lib/iteration/auto-reviewer.js +923 -0
- package/lib/iteration/controller.js +577 -0
- package/lib/list.js +130 -0
- package/lib/mcp-server.js +548 -0
- package/lib/openclaw/api-integration.js +535 -0
- package/lib/openclaw/cli-integration.js +567 -0
- package/lib/openclaw/data-sync.js +845 -0
- package/lib/openclaw/openclaw-adapter.js +783 -0
- package/lib/plugin/example-plugins/code-stats/index.js +332 -0
- package/lib/plugin/example-plugins/code-stats/plugin.json +1 -0
- package/lib/plugin/example-plugins/custom-linter/index.js +472 -0
- package/lib/plugin/example-plugins/custom-linter/plugin.json +1 -0
- package/lib/plugin/example-plugins/hello-world/index.js +86 -0
- package/lib/plugin/example-plugins/hello-world/plugin.json +1 -0
- package/lib/plugin/plugin-manager.js +655 -0
- package/lib/plugin/plugin-sdk.js +565 -0
- package/lib/plugin/sandbox.js +627 -0
- package/lib/quality/rules/maintainability.js +418 -0
- package/lib/quality/rules/performance.js +498 -0
- package/lib/quality/rules/readability.js +441 -0
- package/lib/quality/rules/robustness.js +504 -0
- package/lib/quality/rules/security.js +444 -0
- package/lib/quality/scorer.js +576 -0
- package/lib/report.js +669 -0
- package/lib/sdk-base.js +301 -0
- package/lib/sdk-js.js +446 -0
- package/lib/sdk-python/README.md +546 -0
- package/lib/sdk-python/examples/basic_usage.py +450 -0
- package/lib/sdk-python/pdd_sdk/__init__.py +180 -0
- package/lib/sdk-python/pdd_sdk/client.py +1170 -0
- package/lib/sdk-python/pdd_sdk/events.py +423 -0
- package/lib/sdk-python/pdd_sdk/exceptions.py +158 -0
- package/lib/sdk-python/pdd_sdk/models.py +518 -0
- package/lib/sdk-python/pdd_sdk/utils.py +759 -0
- package/lib/token/budget-alert.js +367 -0
- package/lib/token/budget-manager.js +485 -0
- package/lib/update.js +54 -0
- package/lib/utils/logger.js +88 -0
- package/lib/verify.js +741 -0
- package/lib/version.js +52 -0
- package/lib/vm/README.md +102 -0
- package/lib/vm/dashboard/api-routes.js +669 -0
- package/lib/vm/dashboard/server.js +391 -0
- package/lib/vm/dashboard/sse.js +358 -0
- package/lib/vm/dashboard/static/css/dashboard.css +1378 -0
- package/lib/vm/dashboard/static/index.html +118 -0
- package/lib/vm/dashboard/static/js/app.js +949 -0
- package/lib/vm/dashboard/static/js/charts.js +913 -0
- package/lib/vm/dashboard/static/js/kanban-view.js +1053 -0
- package/lib/vm/dashboard/static/js/pipeline-view.js +463 -0
- package/lib/vm/dashboard/static/js/quality-view.js +598 -0
- package/lib/vm/dashboard/static/js/system-view.js +1021 -0
- package/lib/vm/data-provider.js +1191 -0
- package/lib/vm/event-bus.js +402 -0
- package/lib/vm/hooks/extract-hook.js +307 -0
- package/lib/vm/hooks/generate-hook.js +374 -0
- package/lib/vm/hooks/hook-interface.js +458 -0
- package/lib/vm/hooks/report-hook.js +331 -0
- package/lib/vm/hooks/verify-hook.js +454 -0
- package/lib/vm/models.js +1003 -0
- package/lib/vm/reconciler.js +855 -0
- package/lib/vm/scanner.js +988 -0
- package/lib/vm/state-schema.js +955 -0
- package/lib/vm/state-store.js +733 -0
- package/lib/vm/tui/components/card.js +339 -0
- package/lib/vm/tui/components/progress-bar.js +368 -0
- package/lib/vm/tui/components/sparkline.js +327 -0
- package/lib/vm/tui/components/status-light.js +294 -0
- package/lib/vm/tui/components/table.js +370 -0
- package/lib/vm/tui/input.js +335 -0
- package/lib/vm/tui/renderer.js +548 -0
- package/lib/vm/tui/screens/kanban-screen.js +397 -0
- package/lib/vm/tui/screens/overview-screen.js +357 -0
- package/lib/vm/tui/screens/quality-screen.js +336 -0
- package/lib/vm/tui/screens/system-screen.js +379 -0
- package/lib/vm/tui/tui.js +805 -0
- package/package.json +1 -0
- package/scripts/cso-analyzer.js +198 -0
- package/scripts/eval-runner.js +359 -0
- package/scripts/i18n-checker.js +109 -0
- package/scripts/linter/activiti-linter.js +272 -0
- package/scripts/linter/prd-linter.js +162 -0
- package/scripts/linter/report-generator.js +207 -0
- package/scripts/linter/run-linters.js +285 -0
- package/scripts/linter/sql-linter.js +166 -0
- package/scripts/token-analyzer.js +162 -0
- package/scripts/vm-test.js +180 -0
- package/skills/core/official-doc-writer/LICENSE +21 -0
- package/skills/core/official-doc-writer/README.md +232 -0
- package/skills/core/official-doc-writer/SKILL.md +475 -0
- package/skills/core/official-doc-writer/_meta.json +1 -0
- package/skills/core/official-doc-writer/document_generator.py +580 -0
- package/skills/core/official-doc-writer/evals/default-evals.json +1 -0
- package/skills/core/official-doc-writer/examples.md +150 -0
- package/skills/core/official-doc-writer/fonts/FONTS_LIST.md +45 -0
- package/skills/core/official-doc-writer/fonts/README.md +141 -0
- package/skills/core/official-doc-writer/fonts/SIMFANG.TTF +0 -0
- package/skills/core/official-doc-writer/fonts/SIMHEI.TTF +0 -0
- package/skills/core/official-doc-writer/fonts/SIMKAI.TTF +0 -0
- package/skills/core/official-doc-writer/fonts/SIMSUN.TTC +0 -0
- package/skills/core/official-doc-writer/fonts//346/226/271/346/255/243/345/260/217/346/240/207/345/256/213GBK.TTF +0 -0
- package/skills/core/official-doc-writer/references/GBT_9704-2012_/345/205/232/346/224/277/346/234/272/345/205/263/345/205/254/346/226/207/346/240/274/345/274/217.md +422 -0
- package/skills/core/official-doc-writer/scripts/__pycache__/generate_official_doc.cpython-313.pyc +0 -0
- package/skills/core/official-doc-writer/scripts/dialog_manager.py +564 -0
- package/skills/core/official-doc-writer/scripts/generate_official_doc.py +252 -0
- package/skills/core/official-doc-writer/scripts/install_fonts.py +390 -0
- package/skills/core/official-doc-writer/scripts/smart_prompts.py +363 -0
- package/skills/core/pdd-ba/SKILL.md +305 -0
- package/skills/core/pdd-ba/_meta.json +1 -0
- package/skills/core/pdd-ba/evals/default-evals.json +1 -0
- package/skills/core/pdd-code-reviewer/SKILL.md +378 -0
- package/skills/core/pdd-code-reviewer/_meta.json +1 -0
- package/skills/core/pdd-code-reviewer/evals/default-evals.json +1 -0
- package/skills/core/pdd-doc-change/SKILL.md +350 -0
- package/skills/core/pdd-doc-change/_meta.json +1 -0
- package/skills/core/pdd-doc-change/evals/default-evals.json +1 -0
- package/skills/core/pdd-doc-gardener/SKILL.md +248 -0
- package/skills/core/pdd-doc-gardener/_meta.json +1 -0
- package/skills/core/pdd-doc-gardener/evals/default-evals.json +1 -0
- package/skills/core/pdd-entropy-reduction/SKILL.md +360 -0
- package/skills/core/pdd-entropy-reduction/_meta.json +1 -0
- package/skills/core/pdd-entropy-reduction/evals/default-evals.json +1 -0
- package/skills/core/pdd-entropy-reduction/references/entropy-report-template.md +287 -0
- package/skills/core/pdd-entropy-reduction/references/golden-principles.md +573 -0
- package/skills/core/pdd-entropy-reduction/scripts/entropy_scan.py +712 -0
- package/skills/core/pdd-extract-features/SKILL.md +320 -0
- package/skills/core/pdd-extract-features/_meta.json +1 -0
- package/skills/core/pdd-extract-features/evals/default-evals.json +1 -0
- package/skills/core/pdd-generate-spec/SKILL.md +418 -0
- package/skills/core/pdd-generate-spec/_meta.json +1 -0
- package/skills/core/pdd-generate-spec/evals/default-evals.json +1 -0
- package/skills/core/pdd-implement-feature/SKILL.md +332 -0
- package/skills/core/pdd-implement-feature/_meta.json +1 -0
- package/skills/core/pdd-implement-feature/evals/default-evals.json +1 -0
- package/skills/core/pdd-main/SKILL.md +540 -0
- package/skills/core/pdd-main/_meta.json +1 -0
- package/skills/core/pdd-main/evals/default-evals.json +1 -0
- package/skills/core/pdd-main/evals/evals.json +215 -0
- package/skills/core/pdd-verify-feature/SKILL.md +474 -0
- package/skills/core/pdd-verify-feature/_meta.json +1 -0
- package/skills/core/pdd-verify-feature/evals/default-evals.json +1 -0
- package/skills/core/pdd-vm/evals/default-evals.json +1 -0
- package/skills/core/traffic-accident-assessor/LICENSE +29 -0
- package/skills/core/traffic-accident-assessor/SKILL.md +439 -0
- package/skills/core/traffic-accident-assessor/evals/evals.json +1 -0
- package/skills/core/traffic-accident-assessor/references/accident-types.md +369 -0
- package/skills/core/traffic-accident-assessor/references/liability-rules.md +287 -0
- package/skills/core/traffic-accident-assessor/references/traffic-laws.md +226 -0
- package/skills/core/traffic-accident-assessor/references//351/253/230/345/260/224/345/244/253/350/257/264/346/230/216/344/271/246.pdf +32576 -106
- package/skills/core/traffic-accident-assessor/scripts/generate_official_statement.py +588 -0
- package/skills/core/traffic-accident-assessor/scripts/generate_report.py +495 -0
- package/skills/core/traffic-accident-assessor/scripts/generate_statement.py +528 -0
- package/skills/core/traffic-accident-assessor.zip +0 -0
- package/skills/entropy/expert-arch-enforcer/SKILL.md +292 -0
- package/skills/entropy/expert-arch-enforcer/_meta.json +1 -0
- package/skills/entropy/expert-arch-enforcer/evals/default-evals.json +1 -0
- package/skills/entropy/expert-auto-refactor/SKILL.md +327 -0
- package/skills/entropy/expert-auto-refactor/_meta.json +1 -0
- package/skills/entropy/expert-auto-refactor/evals/default-evals.json +1 -0
- package/skills/entropy/expert-code-quality/SKILL.md +468 -0
- package/skills/entropy/expert-code-quality/_meta.json +1 -0
- package/skills/entropy/expert-code-quality/evals/default-evals.json +1 -0
- package/skills/entropy/expert-code-quality/evals/evals.json +109 -0
- package/skills/entropy/expert-code-quality/references/code-smells.md +605 -0
- package/skills/entropy/expert-code-quality/references/design-patterns.md +1111 -0
- package/skills/entropy/expert-code-quality/references/refactoring-catalog.md +1281 -0
- package/skills/entropy/expert-code-quality/references/solid-principles.md +524 -0
- package/skills/entropy/expert-entropy-auditor/SKILL.md +276 -0
- package/skills/entropy/expert-entropy-auditor/_meta.json +1 -0
- package/skills/entropy/expert-entropy-auditor/evals/default-evals.json +1 -0
- package/skills/expert/expert-activiti/SKILL.md +497 -0
- package/skills/expert/expert-activiti/_meta.json +1 -0
- package/skills/expert/expert-mysql/SKILL.md +832 -0
- package/skills/expert/expert-mysql/_meta.json +1 -0
- package/skills/expert/expert-performance/SKILL.md +379 -0
- package/skills/expert/expert-performance/_meta.json +1 -0
- package/skills/expert/expert-performance/evals/default-evals.json +1 -0
- package/skills/expert/expert-ruoyi/SKILL.md +472 -0
- package/skills/expert/expert-ruoyi/_meta.json +1 -0
- package/skills/expert/expert-security/SKILL.md +1341 -0
- package/skills/expert/expert-security/_meta.json +1 -0
- package/skills/expert/expert-security/evals/default-evals.json +1 -0
- package/skills/expert/software-architect/SKILL.md +350 -0
- package/skills/expert/software-architect/_meta.json +1 -0
- package/skills/expert/software-engineer/SKILL.md +437 -0
- package/skills/expert/software-engineer/_meta.json +1 -0
- package/skills/expert/software-engineer/architecture.md +130 -0
- package/skills/expert/software-engineer/patterns.md +151 -0
- package/skills/expert/software-engineer/testing.md +135 -0
- package/skills/expert/system-architect/SKILL.md +628 -0
- package/skills/expert/system-architect/_meta.json +1 -0
- package/skills/expert/system-architect/assets/templates/ARCHITECTURE.md +25 -0
- package/skills/expert/system-architect/assets/templates/README.md +44 -0
- package/skills/expert/system-architect/references/js-ts-standards.md +18 -0
- package/skills/expert/system-architect/references/python-standards.md +19 -0
- package/skills/expert/system-architect/references/scaffolding.md +61 -0
- package/skills/expert/system-architect/references/security-checklist.md +21 -0
- package/skills/openspec/openspec-apply-change/SKILL.md +156 -0
- package/skills/openspec/openspec-apply-change/_meta.json +1 -0
- package/skills/openspec/openspec-archive-change/SKILL.md +114 -0
- package/skills/openspec/openspec-archive-change/_meta.json +1 -0
- package/skills/openspec/openspec-bulk-archive-change/SKILL.md +246 -0
- package/skills/openspec/openspec-bulk-archive-change/_meta.json +1 -0
- package/skills/openspec/openspec-continue-change/SKILL.md +118 -0
- package/skills/openspec/openspec-continue-change/_meta.json +1 -0
- package/skills/openspec/openspec-explore/SKILL.md +288 -0
- package/skills/openspec/openspec-explore/_meta.json +1 -0
- package/skills/openspec/openspec-ff-change/SKILL.md +101 -0
- package/skills/openspec/openspec-ff-change/_meta.json +1 -0
- package/skills/openspec/openspec-new-change/SKILL.md +74 -0
- package/skills/openspec/openspec-new-change/_meta.json +1 -0
- package/skills/openspec/openspec-onboard/SKILL.md +554 -0
- package/skills/openspec/openspec-onboard/_meta.json +1 -0
- package/skills/openspec/openspec-sync-specs/SKILL.md +138 -0
- package/skills/openspec/openspec-sync-specs/_meta.json +1 -0
- package/skills/openspec/openspec-verify-change/SKILL.md +168 -0
- package/skills/openspec/openspec-verify-change/_meta.json +1 -0
- package/skills/pr/pdd-multi-review/SKILL.md +534 -0
- package/skills/pr/pdd-multi-review/_meta.json +1 -0
- package/skills/pr/pdd-pr-batch/SKILL.md +303 -0
- package/skills/pr/pdd-pr-batch/_meta.json +1 -0
- package/skills/pr/pdd-pr-create/SKILL.md +344 -0
- package/skills/pr/pdd-pr-create/_meta.json +1 -0
- package/skills/pr/pdd-pr-merge/SKILL.md +286 -0
- package/skills/pr/pdd-pr-merge/_meta.json +1 -0
- package/skills/pr/pdd-pr-review/SKILL.md +217 -0
- package/skills/pr/pdd-pr-review/_meta.json +1 -0
- package/skills/pr/pdd-task-manager/SKILL.md +636 -0
- package/skills/pr/pdd-task-manager/_meta.json +1 -0
- package/skills/pr/pdd-template-engine/SKILL.md +306 -0
- package/skills/pr/pdd-template-engine/_meta.json +1 -0
- package/templates/behavior-shaping/iron-law-template.md +87 -0
- package/templates/behavior-shaping/rationalization-template.md +62 -0
- package/templates/behavior-shaping/red-flags-template.md +70 -0
- package/templates/bilingual-template.md +139 -0
- package/templates/config/default.yaml +47 -0
- package/templates/project/default/README.md +31 -0
- package/templates/project/frontend/README.md +46 -0
- package/templates/project/java/README.md +48 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Python Development Standards
|
|
2
|
+
|
|
3
|
+
## Code Style (PEP 8)
|
|
4
|
+
- Use **snake_case** for variables, functions, and methods.
|
|
5
|
+
- Use **PascalCase** for classes.
|
|
6
|
+
- Use **UPPER_CASE** for constants.
|
|
7
|
+
- Indent using **4 spaces**.
|
|
8
|
+
- Maximum line length: **88 characters** (Black standard) or 79 (PEP 8 strict).
|
|
9
|
+
|
|
10
|
+
## Structure
|
|
11
|
+
- Use `src/` for source code.
|
|
12
|
+
- Use `tests/` for unit tests (pytest recommended).
|
|
13
|
+
- Include `pyproject.toml` for modern packaging.
|
|
14
|
+
- Use `if __name__ == "__main__":` for scripts.
|
|
15
|
+
|
|
16
|
+
## Tools
|
|
17
|
+
- **Formatter**: `black` or `ruff`.
|
|
18
|
+
- **Linter**: `pylint` or `ruff`.
|
|
19
|
+
- **Type Checking**: `mypy` (strict mode).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Project Scaffolding
|
|
2
|
+
|
|
3
|
+
Standard directory layouts for new projects. Prefer minimalism; add only what the project needs.
|
|
4
|
+
|
|
5
|
+
## Python (package or app)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
project/
|
|
9
|
+
├── src/
|
|
10
|
+
│ └── <package_name>/
|
|
11
|
+
│ ├── __init__.py
|
|
12
|
+
│ └── ...
|
|
13
|
+
├── tests/
|
|
14
|
+
│ ├── __init__.py
|
|
15
|
+
│ └── test_*.py
|
|
16
|
+
├── docs/
|
|
17
|
+
├── pyproject.toml
|
|
18
|
+
├── README.md
|
|
19
|
+
├── .editorconfig
|
|
20
|
+
├── .gitignore
|
|
21
|
+
└── .env.example
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- Use `src/` layout so the package is not imported from the repo root; install with `pip install -e .`.
|
|
25
|
+
- Alternative: flat `app/` or `<package_name>/` at root for small scripts or single-module apps.
|
|
26
|
+
- Config: `pyproject.toml` for tooling (Black, Ruff, mypy, pytest). Optional `.pylintrc` if using Pylint.
|
|
27
|
+
|
|
28
|
+
## JavaScript / TypeScript (Node or SPA)
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
project/
|
|
32
|
+
├── src/
|
|
33
|
+
│ ├── index.ts (or main entry)
|
|
34
|
+
│ └── ...
|
|
35
|
+
├── public/ (if SPA)
|
|
36
|
+
├── tests/ (or __tests__/, spec/)
|
|
37
|
+
├── package.json
|
|
38
|
+
├── tsconfig.json
|
|
39
|
+
├── .eslintrc.json
|
|
40
|
+
├── .editorconfig
|
|
41
|
+
├── README.md
|
|
42
|
+
├── .gitignore
|
|
43
|
+
└── .env.example
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- Use `src/` for application code; config at repo root.
|
|
47
|
+
- Tests: `tests/` or colocated `__tests__/` / `*.spec.ts` depending on framework.
|
|
48
|
+
- Add `vite.config.ts`, `next.config.js`, etc. at root as needed.
|
|
49
|
+
|
|
50
|
+
## Full-stack (monorepo or separate repos)
|
|
51
|
+
|
|
52
|
+
- **Option A**: Two repos (frontend, backend); each follows the layout above.
|
|
53
|
+
- **Option B**: Monorepo with `apps/frontend/`, `apps/backend/`, shared code in `packages/` (e.g. pnpm workspaces, Turborepo, Nx).
|
|
54
|
+
- Prefer separate repos unless you need shared types or coordinated releases.
|
|
55
|
+
|
|
56
|
+
## Config files to add from templates
|
|
57
|
+
|
|
58
|
+
- `.editorconfig` – shared indent, charset, line endings.
|
|
59
|
+
- `.pylintrc` or Ruff in `pyproject.toml` – Python lint.
|
|
60
|
+
- `.eslintrc.json` + Prettier – JS/TS lint and format.
|
|
61
|
+
- `ARCHITECTURE.md` – overview, components, data flow, deployment, decisions.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security Checklist (OWASP-Based)
|
|
2
|
+
|
|
3
|
+
## General
|
|
4
|
+
- [ ] No secrets in code or git (use `.env`).
|
|
5
|
+
- [ ] Dependencies are audited (`npm audit`, `pip-audit`).
|
|
6
|
+
- [ ] Use HTTPS everywhere (no mixed content).
|
|
7
|
+
|
|
8
|
+
## Python (Flask/FastAPI)
|
|
9
|
+
- [ ] Security headers set (e.g. FastAPI/Starlette middleware, or Flask-Talisman); secure cookie settings.
|
|
10
|
+
- [ ] SQL injection prevention (ORM or parametrized queries only).
|
|
11
|
+
- [ ] Rate limiting enabled (e.g. `Flask-Limiter`, `slowapi`).
|
|
12
|
+
|
|
13
|
+
## Node.js (Express)
|
|
14
|
+
- [ ] Use `helmet` middleware.
|
|
15
|
+
- [ ] Input validation (Joi/Zod) on all endpoints.
|
|
16
|
+
- [ ] Sanitize HTML inputs (XSS prevention).
|
|
17
|
+
|
|
18
|
+
## Docker
|
|
19
|
+
- [ ] Run as non-root user.
|
|
20
|
+
- [ ] Pin base image versions (e.g. `python:3.11-slim`, not `latest`).
|
|
21
|
+
- [ ] Minimal base images (Alpine/Distroless).
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-apply-change
|
|
3
|
+
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.2.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Implement tasks from an OpenSpec change.
|
|
13
|
+
|
|
14
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
+
|
|
16
|
+
**Steps**
|
|
17
|
+
|
|
18
|
+
1. **Select the change**
|
|
19
|
+
|
|
20
|
+
If a name is provided, use it. Otherwise:
|
|
21
|
+
- Infer from conversation context if the user mentioned a change
|
|
22
|
+
- Auto-select if only one active change exists
|
|
23
|
+
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
24
|
+
|
|
25
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
|
|
26
|
+
|
|
27
|
+
2. **Check status to understand the schema**
|
|
28
|
+
```bash
|
|
29
|
+
openspec status --change "<name>" --json
|
|
30
|
+
```
|
|
31
|
+
Parse the JSON to understand:
|
|
32
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
33
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
34
|
+
|
|
35
|
+
3. **Get apply instructions**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
openspec instructions apply --change "<name>" --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This returns:
|
|
42
|
+
- Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
43
|
+
- Progress (total, complete, remaining)
|
|
44
|
+
- Task list with status
|
|
45
|
+
- Dynamic instruction based on current state
|
|
46
|
+
|
|
47
|
+
**Handle states:**
|
|
48
|
+
- If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
|
|
49
|
+
- If `state: "all_done"`: congratulate, suggest archive
|
|
50
|
+
- Otherwise: proceed to implementation
|
|
51
|
+
|
|
52
|
+
4. **Read context files**
|
|
53
|
+
|
|
54
|
+
Read the files listed in `contextFiles` from the apply instructions output.
|
|
55
|
+
The files depend on the schema being used:
|
|
56
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
57
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
58
|
+
|
|
59
|
+
5. **Show current progress**
|
|
60
|
+
|
|
61
|
+
Display:
|
|
62
|
+
- Schema being used
|
|
63
|
+
- Progress: "N/M tasks complete"
|
|
64
|
+
- Remaining tasks overview
|
|
65
|
+
- Dynamic instruction from CLI
|
|
66
|
+
|
|
67
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
68
|
+
|
|
69
|
+
For each pending task:
|
|
70
|
+
- Show which task is being worked on
|
|
71
|
+
- Make the code changes required
|
|
72
|
+
- Keep changes minimal and focused
|
|
73
|
+
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
74
|
+
- Continue to next task
|
|
75
|
+
|
|
76
|
+
**Pause if:**
|
|
77
|
+
- Task is unclear → ask for clarification
|
|
78
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
79
|
+
- Error or blocker encountered → report and wait for guidance
|
|
80
|
+
- User interrupts
|
|
81
|
+
|
|
82
|
+
7. **On completion or pause, show status**
|
|
83
|
+
|
|
84
|
+
Display:
|
|
85
|
+
- Tasks completed this session
|
|
86
|
+
- Overall progress: "N/M tasks complete"
|
|
87
|
+
- If all done: suggest archive
|
|
88
|
+
- If paused: explain why and wait for guidance
|
|
89
|
+
|
|
90
|
+
**Output During Implementation**
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
94
|
+
|
|
95
|
+
Working on task 3/7: <task description>
|
|
96
|
+
[...implementation happening...]
|
|
97
|
+
✓ Task complete
|
|
98
|
+
|
|
99
|
+
Working on task 4/7: <task description>
|
|
100
|
+
[...implementation happening...]
|
|
101
|
+
✓ Task complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Output On Completion**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
## Implementation Complete
|
|
108
|
+
|
|
109
|
+
**Change:** <change-name>
|
|
110
|
+
**Schema:** <schema-name>
|
|
111
|
+
**Progress:** 7/7 tasks complete ✓
|
|
112
|
+
|
|
113
|
+
### Completed This Session
|
|
114
|
+
- [x] Task 1
|
|
115
|
+
- [x] Task 2
|
|
116
|
+
...
|
|
117
|
+
|
|
118
|
+
All tasks complete! Ready to archive this change.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Output On Pause (Issue Encountered)**
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
## Implementation Paused
|
|
125
|
+
|
|
126
|
+
**Change:** <change-name>
|
|
127
|
+
**Schema:** <schema-name>
|
|
128
|
+
**Progress:** 4/7 tasks complete
|
|
129
|
+
|
|
130
|
+
### Issue Encountered
|
|
131
|
+
<description of the issue>
|
|
132
|
+
|
|
133
|
+
**Options:**
|
|
134
|
+
1. <option 1>
|
|
135
|
+
2. <option 2>
|
|
136
|
+
3. Other approach
|
|
137
|
+
|
|
138
|
+
What would you like to do?
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Guardrails**
|
|
142
|
+
- Keep going through tasks until done or blocked
|
|
143
|
+
- Always read context files before starting (from the apply instructions output)
|
|
144
|
+
- If task is ambiguous, pause and ask before implementing
|
|
145
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
146
|
+
- Keep code changes minimal and scoped to each task
|
|
147
|
+
- Update task checkbox immediately after completing each task
|
|
148
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
149
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
150
|
+
|
|
151
|
+
**Fluid Workflow Integration**
|
|
152
|
+
|
|
153
|
+
This skill supports the "actions on a change" model:
|
|
154
|
+
|
|
155
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
156
|
+
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "openspec-apply-change", "version": "1.0.0", "category": "openspec", "description": "Implement tasks from an OpenSpec change. Call when starting implementation, continuing work, or working through tasks.", "triggers": ["应用变更", "apply change", "实现任务"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-archive-change
|
|
3
|
+
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.2.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Archive a completed change in the experimental workflow.
|
|
13
|
+
|
|
14
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
+
|
|
16
|
+
**Steps**
|
|
17
|
+
|
|
18
|
+
1. **If no change name provided, prompt for selection**
|
|
19
|
+
|
|
20
|
+
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
21
|
+
|
|
22
|
+
Show only active changes (not already archived).
|
|
23
|
+
Include the schema used for each change if available.
|
|
24
|
+
|
|
25
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
26
|
+
|
|
27
|
+
2. **Check artifact completion status**
|
|
28
|
+
|
|
29
|
+
Run `openspec status --change "<name>" --json` to check artifact completion.
|
|
30
|
+
|
|
31
|
+
Parse the JSON to understand:
|
|
32
|
+
- `schemaName`: The workflow being used
|
|
33
|
+
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
34
|
+
|
|
35
|
+
**If any artifacts are not `done`:**
|
|
36
|
+
- Display warning listing incomplete artifacts
|
|
37
|
+
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
38
|
+
- Proceed if user confirms
|
|
39
|
+
|
|
40
|
+
3. **Check task completion status**
|
|
41
|
+
|
|
42
|
+
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
43
|
+
|
|
44
|
+
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
45
|
+
|
|
46
|
+
**If incomplete tasks found:**
|
|
47
|
+
- Display warning showing count of incomplete tasks
|
|
48
|
+
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
49
|
+
- Proceed if user confirms
|
|
50
|
+
|
|
51
|
+
**If no tasks file exists:** Proceed without task-related warning.
|
|
52
|
+
|
|
53
|
+
4. **Assess delta spec sync state**
|
|
54
|
+
|
|
55
|
+
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
|
56
|
+
|
|
57
|
+
**If delta specs exist:**
|
|
58
|
+
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
|
59
|
+
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
60
|
+
- Show a combined summary before prompting
|
|
61
|
+
|
|
62
|
+
**Prompt options:**
|
|
63
|
+
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
64
|
+
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
65
|
+
|
|
66
|
+
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
|
|
67
|
+
|
|
68
|
+
5. **Perform the archive**
|
|
69
|
+
|
|
70
|
+
Create the archive directory if it doesn't exist:
|
|
71
|
+
```bash
|
|
72
|
+
mkdir -p openspec/changes/archive
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
76
|
+
|
|
77
|
+
**Check if target already exists:**
|
|
78
|
+
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
79
|
+
- If no: Move the change directory to archive
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
6. **Display summary**
|
|
86
|
+
|
|
87
|
+
Show archive completion summary including:
|
|
88
|
+
- Change name
|
|
89
|
+
- Schema that was used
|
|
90
|
+
- Archive location
|
|
91
|
+
- Whether specs were synced (if applicable)
|
|
92
|
+
- Note about any warnings (incomplete artifacts/tasks)
|
|
93
|
+
|
|
94
|
+
**Output On Success**
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
## Archive Complete
|
|
98
|
+
|
|
99
|
+
**Change:** <change-name>
|
|
100
|
+
**Schema:** <schema-name>
|
|
101
|
+
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
102
|
+
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
|
103
|
+
|
|
104
|
+
All artifacts complete. All tasks complete.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Guardrails**
|
|
108
|
+
- Always prompt for change selection if not provided
|
|
109
|
+
- Use artifact graph (openspec status --json) for completion checking
|
|
110
|
+
- Don't block archive on warnings - just inform and confirm
|
|
111
|
+
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
|
|
112
|
+
- Show clear summary of what happened
|
|
113
|
+
- If sync is requested, use openspec-sync-specs approach (agent-driven)
|
|
114
|
+
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "openspec-archive-change", "version": "1.0.0", "category": "openspec", "description": "Archive a completed OpenSpec change. Use when finalizing changes after implementation is complete.", "triggers": ["归档变更", "archive change", "完成归档"]}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-bulk-archive-change
|
|
3
|
+
description: Archive multiple completed changes at once. Use when archiving several parallel changes.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.2.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Archive multiple completed changes in a single operation.
|
|
13
|
+
|
|
14
|
+
This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
|
|
15
|
+
|
|
16
|
+
**Input**: None required (prompts for selection)
|
|
17
|
+
|
|
18
|
+
**Steps**
|
|
19
|
+
|
|
20
|
+
1. **Get active changes**
|
|
21
|
+
|
|
22
|
+
Run `openspec list --json` to get all active changes.
|
|
23
|
+
|
|
24
|
+
If no active changes exist, inform user and stop.
|
|
25
|
+
|
|
26
|
+
2. **Prompt for change selection**
|
|
27
|
+
|
|
28
|
+
Use **AskUserQuestion tool** with multi-select to let user choose changes:
|
|
29
|
+
- Show each change with its schema
|
|
30
|
+
- Include an option for "All changes"
|
|
31
|
+
- Allow any number of selections (1+ works, 2+ is the typical use case)
|
|
32
|
+
|
|
33
|
+
**IMPORTANT**: Do NOT auto-select. Always let the user choose.
|
|
34
|
+
|
|
35
|
+
3. **Batch validation - gather status for all selected changes**
|
|
36
|
+
|
|
37
|
+
For each selected change, collect:
|
|
38
|
+
|
|
39
|
+
a. **Artifact status** - Run `openspec status --change "<name>" --json`
|
|
40
|
+
- Parse `schemaName` and `artifacts` list
|
|
41
|
+
- Note which artifacts are `done` vs other states
|
|
42
|
+
|
|
43
|
+
b. **Task completion** - Read `openspec/changes/<name>/tasks.md`
|
|
44
|
+
- Count `- [ ]` (incomplete) vs `- [x]` (complete)
|
|
45
|
+
- If no tasks file exists, note as "No tasks"
|
|
46
|
+
|
|
47
|
+
c. **Delta specs** - Check `openspec/changes/<name>/specs/` directory
|
|
48
|
+
- List which capability specs exist
|
|
49
|
+
- For each, extract requirement names (lines matching `### Requirement: <name>`)
|
|
50
|
+
|
|
51
|
+
4. **Detect spec conflicts**
|
|
52
|
+
|
|
53
|
+
Build a map of `capability -> [changes that touch it]`:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
auth -> [change-a, change-b] <- CONFLICT (2+ changes)
|
|
57
|
+
api -> [change-c] <- OK (only 1 change)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A conflict exists when 2+ selected changes have delta specs for the same capability.
|
|
61
|
+
|
|
62
|
+
5. **Resolve conflicts agentically**
|
|
63
|
+
|
|
64
|
+
**For each conflict**, investigate the codebase:
|
|
65
|
+
|
|
66
|
+
a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
|
|
67
|
+
|
|
68
|
+
b. **Search the codebase** for implementation evidence:
|
|
69
|
+
- Look for code implementing requirements from each delta spec
|
|
70
|
+
- Check for related files, functions, or tests
|
|
71
|
+
|
|
72
|
+
c. **Determine resolution**:
|
|
73
|
+
- If only one change is actually implemented -> sync that one's specs
|
|
74
|
+
- If both implemented -> apply in chronological order (older first, newer overwrites)
|
|
75
|
+
- If neither implemented -> skip spec sync, warn user
|
|
76
|
+
|
|
77
|
+
d. **Record resolution** for each conflict:
|
|
78
|
+
- Which change's specs to apply
|
|
79
|
+
- In what order (if both)
|
|
80
|
+
- Rationale (what was found in codebase)
|
|
81
|
+
|
|
82
|
+
6. **Show consolidated status table**
|
|
83
|
+
|
|
84
|
+
Display a table summarizing all changes:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
| Change | Artifacts | Tasks | Specs | Conflicts | Status |
|
|
88
|
+
|---------------------|-----------|-------|---------|-----------|--------|
|
|
89
|
+
| schema-management | Done | 5/5 | 2 delta | None | Ready |
|
|
90
|
+
| project-config | Done | 3/3 | 1 delta | None | Ready |
|
|
91
|
+
| add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
|
|
92
|
+
| add-verify-skill | 1 left | 2/5 | None | None | Warn |
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For conflicts, show the resolution:
|
|
96
|
+
```
|
|
97
|
+
* Conflict resolution:
|
|
98
|
+
- auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For incomplete changes, show warnings:
|
|
102
|
+
```
|
|
103
|
+
Warnings:
|
|
104
|
+
- add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
7. **Confirm batch operation**
|
|
108
|
+
|
|
109
|
+
Use **AskUserQuestion tool** with a single confirmation:
|
|
110
|
+
|
|
111
|
+
- "Archive N changes?" with options based on status
|
|
112
|
+
- Options might include:
|
|
113
|
+
- "Archive all N changes"
|
|
114
|
+
- "Archive only N ready changes (skip incomplete)"
|
|
115
|
+
- "Cancel"
|
|
116
|
+
|
|
117
|
+
If there are incomplete changes, make clear they'll be archived with warnings.
|
|
118
|
+
|
|
119
|
+
8. **Execute archive for each confirmed change**
|
|
120
|
+
|
|
121
|
+
Process changes in the determined order (respecting conflict resolution):
|
|
122
|
+
|
|
123
|
+
a. **Sync specs** if delta specs exist:
|
|
124
|
+
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
|
|
125
|
+
- For conflicts, apply in resolved order
|
|
126
|
+
- Track if sync was done
|
|
127
|
+
|
|
128
|
+
b. **Perform the archive**:
|
|
129
|
+
```bash
|
|
130
|
+
mkdir -p openspec/changes/archive
|
|
131
|
+
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
c. **Track outcome** for each change:
|
|
135
|
+
- Success: archived successfully
|
|
136
|
+
- Failed: error during archive (record error)
|
|
137
|
+
- Skipped: user chose not to archive (if applicable)
|
|
138
|
+
|
|
139
|
+
9. **Display summary**
|
|
140
|
+
|
|
141
|
+
Show final results:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
## Bulk Archive Complete
|
|
145
|
+
|
|
146
|
+
Archived 3 changes:
|
|
147
|
+
- schema-management-cli -> archive/2026-01-19-schema-management-cli/
|
|
148
|
+
- project-config -> archive/2026-01-19-project-config/
|
|
149
|
+
- add-oauth -> archive/2026-01-19-add-oauth/
|
|
150
|
+
|
|
151
|
+
Skipped 1 change:
|
|
152
|
+
- add-verify-skill (user chose not to archive incomplete)
|
|
153
|
+
|
|
154
|
+
Spec sync summary:
|
|
155
|
+
- 4 delta specs synced to main specs
|
|
156
|
+
- 1 conflict resolved (auth: applied both in chronological order)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If any failures:
|
|
160
|
+
```
|
|
161
|
+
Failed 1 change:
|
|
162
|
+
- some-change: Archive directory already exists
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Conflict Resolution Examples**
|
|
166
|
+
|
|
167
|
+
Example 1: Only one implemented
|
|
168
|
+
```
|
|
169
|
+
Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
|
|
170
|
+
|
|
171
|
+
Checking add-oauth:
|
|
172
|
+
- Delta adds "OAuth Provider Integration" requirement
|
|
173
|
+
- Searching codebase... found src/auth/oauth.ts implementing OAuth flow
|
|
174
|
+
|
|
175
|
+
Checking add-jwt:
|
|
176
|
+
- Delta adds "JWT Token Handling" requirement
|
|
177
|
+
- Searching codebase... no JWT implementation found
|
|
178
|
+
|
|
179
|
+
Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Example 2: Both implemented
|
|
183
|
+
```
|
|
184
|
+
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
|
|
185
|
+
|
|
186
|
+
Checking add-rest-api (created 2026-01-10):
|
|
187
|
+
- Delta adds "REST Endpoints" requirement
|
|
188
|
+
- Searching codebase... found src/api/rest.ts
|
|
189
|
+
|
|
190
|
+
Checking add-graphql (created 2026-01-15):
|
|
191
|
+
- Delta adds "GraphQL Schema" requirement
|
|
192
|
+
- Searching codebase... found src/api/graphql.ts
|
|
193
|
+
|
|
194
|
+
Resolution: Both implemented. Will apply add-rest-api specs first,
|
|
195
|
+
then add-graphql specs (chronological order, newer takes precedence).
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Output On Success**
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
## Bulk Archive Complete
|
|
202
|
+
|
|
203
|
+
Archived N changes:
|
|
204
|
+
- <change-1> -> archive/YYYY-MM-DD-<change-1>/
|
|
205
|
+
- <change-2> -> archive/YYYY-MM-DD-<change-2>/
|
|
206
|
+
|
|
207
|
+
Spec sync summary:
|
|
208
|
+
- N delta specs synced to main specs
|
|
209
|
+
- No conflicts (or: M conflicts resolved)
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Output On Partial Success**
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
## Bulk Archive Complete (partial)
|
|
216
|
+
|
|
217
|
+
Archived N changes:
|
|
218
|
+
- <change-1> -> archive/YYYY-MM-DD-<change-1>/
|
|
219
|
+
|
|
220
|
+
Skipped M changes:
|
|
221
|
+
- <change-2> (user chose not to archive incomplete)
|
|
222
|
+
|
|
223
|
+
Failed K changes:
|
|
224
|
+
- <change-3>: Archive directory already exists
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Output When No Changes**
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
## No Changes to Archive
|
|
231
|
+
|
|
232
|
+
No active changes found. Create a new change to get started.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Guardrails**
|
|
236
|
+
- Allow any number of changes (1+ is fine, 2+ is the typical use case)
|
|
237
|
+
- Always prompt for selection, never auto-select
|
|
238
|
+
- Detect spec conflicts early and resolve by checking codebase
|
|
239
|
+
- When both changes are implemented, apply specs in chronological order
|
|
240
|
+
- Skip spec sync only when implementation is missing (warn user)
|
|
241
|
+
- Show clear per-change status before confirming
|
|
242
|
+
- Use single confirmation for entire batch
|
|
243
|
+
- Track and report all outcomes (success/skip/fail)
|
|
244
|
+
- Preserve .openspec.yaml when moving to archive
|
|
245
|
+
- Archive directory target uses current date: YYYY-MM-DD-<name>
|
|
246
|
+
- If archive target exists, fail that change but continue with others
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "openspec-bulk-archive-change", "version": "1.0.0", "category": "openspec", "description": "Archive multiple completed OpenSpec changes at once. Call when archiving several parallel changes.", "triggers": ["批量归档", "bulk archive", "批量完成"]}
|