Use Skill instead of Bash response prompt#2
Merged
Merged
Conversation
archive 命令:
- 移除 fs::rename specs/phases 目录的操作
- 新增 archive_dirs() 工具函数,将 specs/ 与 phases/ 打包为单一
archive-YYYYMMDD-N.tar.gz
- 新增 7 个 gzip_dir 单测(TDD)覆盖创建/内容/前缀/合并/空目录/缺失源等
- 依赖加 tar=0.4, flate2=1.0
重命名 phrases → phases(破坏性变更):
- state/roadmap.rs: Phrase→Phase 结构体、phrases 字段、测试字面量 Phrase0/1
- state/mod.rs: 同步导出(再精简为 RoadmapState/RoadmapStore)
- commands/{verify,report,internal,prepare,setup,mod,exec}.rs 全部同步
- prompts/mod.rs: phase_name 字段、with_phase_name 方法、{Phase Name} 占位符
- prepare.rs 修历史错: 写 phrases/ → phases/(与磁盘一致)
清理:
- 删除未用常量 WORKFLOW_INIT/READY/ARCHIVED、PHASE_VERIFYING
- 删除 DOCUMENT_STAGE、backup_dir/backup_file、with_root、render 死代码
- exec.rs 清理未用 import
- setup.rs:91 desc→_desc 误修回滚(实际被 format! 使用)
文档同步:
- README.md、docs/new_spec_v2.md、docs/plans/*、.omc/plans/* 全文 phrases/Phrase → phases/Phase
- .omc/plans/2026-04-20-prepare-crates-io.md 中的 ADR 决策被反转
(原"不重命名 phrases 字段"决策已不成立)
验证: cargo build 0 error / cargo test 30 passed / rg "phras" src/ 0 匹配
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OMC 运行时状态(agent-replay、checkpoints、sessions、cooldowns)不应入仓。 `.omc/state/` 包含 `.omc/state/checkpoints/`,已一并覆盖。 历史已跟踪的 OMC state 文件保留在索引中(未自动 git rm --cached), 如需彻底解跟踪,执行: git rm --cached -r .omc/state/ .omc/sessions/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove 26 OMC plugin runtime files (sessions, agent-replay logs, checkpoints, project memory) from git index. The patterns are now covered by .gitignore (.omc/state/ and .omc/sessions/), so these files will be regenerated locally on next session start and won't be re-added accidentally. Files untracked (kept on disk): - .omc/project-memory.json - 11 .omc/sessions/*.json - 10 .omc/state/agent-replay-*.jsonl - 3 .omc/state/checkpoints/checkpoint-*.json - .omc/state/idle-notif-cooldown.json - .omc/state/last-tool-error.json - .omc/state/subagent-tracking.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
补充 OMC 项目记忆文件到 .gitignore。它属于 OMC 插件运行时 产物,会在本地重新生成,不适合纳入版本控制。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
build warning 10 → 0,clippy warning 16 → 0,30 tests passed。 - 删除 src/state/constants.rs(6 个未用 STATE_* 常量) - 删除 setup.rs 中 backup_dir/backup_file 两个 stub - prompts/mod.rs 三个 builder 加 #[allow(dead_code)] - setup.rs:91 desc → _desc - sync.rs:29-30 嵌套 if let → filter_map(Result::ok) - roadmap.rs:74,80 去掉左操作数多余 & - roadmap.rs:95 "init".to_string() → "init" - roadmap.rs:140 移除 .enumerate() - roadmap.rs:191 FileLock::lock 加 .truncate(true) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
init/prepare/exec/verify/confirm 五个 prompt 串原本是 "完成后提醒调用 /ddd-X" 的请求式语气,改为"立即调用 ddd-tool X" 的命令式语气,让 agent 无需用户确认即推进到下一阶段。 确认 → exec → verify → confirm 形成自动化闭环。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
与 ba2d4ea 同步:audit 完成后不再询问用户,直接调用 ddd-tool accept。 补全 6 个 prompt 的自动化闭环。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OpenCode 的 skill 机制与 Claude Code 的 commands 不同,需要 将每个 ddd 子命令以 skill 形式额外写入 .opencode/skills/。 skill 文件包含 name/description frontmatter,内部调用 ddd-tool 二进制。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…with unique content
…it methods
- Add name: &str parameter to DddCommand::command_prompt() and skill_prompt()
- Replace all hardcoded subcommand names in format strings with {name}
- Update 12 implementations + 1 test mock + 2 call sites in setup.rs
- Total: 14 files, pure refactoring (61 insertions, 61 deletions)
Closes: add-name-param plan (8/8 tasks + 2/2 final verification)
…mports Remove 20 unused functions (run + do_run per command) from 10 command files. Clean up now-unused Cmd struct imports and std::fs import in prepare.rs. Also fix unused bin warning in init.rs (bin → _bin). Total: 10 files, -436 lines, +17 lines (net -419 lines)
- Fix double ddd- prefix in filenames (ddd-ddd-init.md → ddd-init.md) - setup_opencode: use command_prompt() instead of hardcoded !`backtick` template - setup_claude: add .claude/skills/ generation loop (pure Markdown) Verified: cargo build + cargo test pass, both opencode and claude setup generate correct files with Skill loading mode content.
- docs/invoke.md: OpenCode Skill/Command invocation research - AGENTS.md: project coding conventions - .sisyphus/plans/: Prometheus planning artifacts - .codegraph/.gitignore
Major changes:
- All command_prompt/skill_prompt migrated to Skill loading mode (no Bash CLI)
- All skill_prompt now embed PROMPT constants directly
- name() returns ddd- prefixed names for all commands
- execute() simplified/disabled for init,prepare,audit
- PROMPT constants: removed @{file} refs, CLI chains, path fixes
Infrastructure:
- setup.rs: fix double ddd- prefix, use command_prompt() for files,
add .claude/skills/ generation loop
- mod.rs: fix dispatch lookup with ddd- prefix
- exec.rs: fix borrow checker (phase_name clone)
- trait_def.rs: add name param to command_prompt/skill_prompt
- registry.rs: add #[allow(dead_code)] for future API
Cleanup:
- Remove 20 dead run()/do_run() functions (-419 lines)
- Remove 6 unused imports (render, std::fs)
- Fix 15 unused variable warnings (_bin, _ctx, _args)
- Add #[allow(dead_code)] for reserved API surface
- Zero compiler warnings, 76 tests pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
如果用了rtk.ai的插件裁剪了bash的返回, 原有方式很可能扯到蛋, 所以改用了 Skill 来驱动, 同时 Skill 才能自动加载调用另外的Skill.