impl
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese実装ワークフロー (Implementation Workflow)
Implementation Workflow
/specA skill that proceeds with implementation in order based on the TODO list created in .
/spec前提条件
Prerequisites
- によりSpec.mdが作成済み
/spec - TodoWriteでタスクが登録済み
- Spec.md has been created via
/spec - Tasks have been registered in TodoWrite
Step 0: 初期設定(初回のみ)
Step 0: Initial Setup (First-time only)
実装を開始する前に、AskUserQuestion でreviewとcheckの方法を確認する。
Before starting implementation, confirm the review and check methods using AskUserQuestion.
質問1: Review方法
Question 1: Review Method
header: "Review"
question: "コードレビューはどのように行いますか?"
options:
- label: "セルフレビュー(デフォルト)"
description: "DRY、複雑性、仕様準拠、セキュリティの観点でチェック"
- label: "/review スキルを使用"
description: "プロジェクトのreviewスキルを呼び出す"
- label: "スキップ"
description: "レビューせずに進める"header: "Review"
question: "How will code reviews be conducted?"
options:
- label: "Self-review (Default)"
description: "Check from the perspectives of DRY, complexity, specification compliance, and security"
- label: "/review スキルを使用"
description: "Invoke the project's review skill"
- label: "Skip"
description: "Proceed without review"質問2: Check方法
Question 2: Check Method
header: "Check"
question: "コミット前のチェックコマンドを教えてください"
options:
- label: "自動検出"
description: "package.json, Makefile等から検出"
- label: "npm run lint && npm run test"
description: "標準的なnpmスクリプト"
- label: "make check"
description: "Makefileのcheckターゲット"ユーザーが「Other」を選んだ場合は、具体的なコマンドを入力してもらう。
header: "Check"
question: "Please provide the pre-commit check command"
options:
- label: "Auto-detection"
description: "Detect from package.json, Makefile, etc."
- label: "npm run lint && npm run test"
description: "Standard npm scripts"
- label: "make check"
description: "check target in Makefile"If the user selects "Other", ask them to enter the specific command.
ワークフロー
Workflow
各TODOに対して以下のサイクルを実行:
implement → review → check → commit → nextExecute the following cycle for each TODO:
implement → review → check → commit → next1. Implement(実装)
1. Implement
- TodoWriteの次のpendingタスクをin_progressに変更
- Spec.mdの該当Acceptance Criteriaを参照
- 必要なコードを実装
- Change the next pending task in TodoWrite to in_progress
- Refer to the corresponding Acceptance Criteria in Spec.md
- Implement the required code
2. Review(レビュー)
2. Review
Step 0で選択された方法に従う:
Follow the method selected in Step 0:
セルフレビュー(デフォルト)
Self-review (Default)
| 観点 | チェック内容 |
|---|---|
| DRY | コードを無駄にコピペしていないか |
| 複雑性 | やりたいことに対して複雑すぎる手段ではないか |
| 仕様準拠 | Spec.mdの要件を満たしているか |
| Adhoc回避 | 場当たり的な対応になっていないか |
| セキュリティ | OWASP Top 10等のアンチパターンを踏んでいないか |
| Aspect | Check Items |
|---|---|
| DRY | Is there any unnecessary code duplication? |
| Complexity | Is the approach overly complex for the intended purpose? |
| Specification Compliance | Does it meet the requirements in Spec.md? |
| Avoid Ad-hoc Solutions | Is it not an ad-hoc fix? |
| Security | Does it avoid anti-patterns such as those in OWASP Top 10? |
/review スキル使用
Use /review Skill
/reviewInvoke the skill.
/review3. Check(検証)
3. Check
Step 0で指定されたコマンドを実行。
判断基準:
- エラー → 修正して再実行
- 以下は許容(ただしcommitメッセージに明記):
- ハリボテ実装による一時的な失敗
- TDDのRed状態(テスト先行で実装がまだ)
- 後続タスクで解決予定のエラー
Execute the command specified in Step 0.
Judgment Criteria:
- Error → Fix and re-run
- The following are allowed (but must be clearly stated in the commit message):
- Temporary failures due to mock implementation
- TDD Red state (tests written first, implementation not yet complete)
- Errors scheduled to be resolved in subsequent tasks
4. Commit(コミット)
4. Commit
/commitCheckでエラーを許容した場合のコミットメッセージ例:
feat(auth): ログイン画面の雛形を追加
WIP: テストは後続タスクで実装予定のため一部失敗Invoke the skill to commit.
/commitExample commit message when errors are allowed in Check:
feat(auth): Add login screen prototype
WIP: Some tests fail as implementation is scheduled for subsequent tasks5. Next(次へ)
5. Next
- 完了したタスクをcompletedに更新
- 次のpendingタスクへ進む
- 全タスク完了まで繰り返す
- Update the completed task to completed status
- Proceed to the next pending task
- Repeat until all tasks are completed
実行例
Execution Example
/impl/impl中断・再開
Pause/Resume
- 途中で中断してもTodoWriteの状態は保持される
- 再度 を呼び出すと、in_progressまたは次のpendingから再開
/impl - 再開時はStep 0の設定を再度確認する
- The state in TodoWrite is preserved even if interrupted midway
- When is invoked again, resume from the in_progress task or the next pending task
/impl - Reconfirm the Step 0 settings when resuming
Check コマンドの自動検出(参考)
Auto-detection of Check Commands (Reference)
「自動検出」を選んだ場合の検出元:
| ファイル | 検出するコマンド |
|---|---|
| scripts内のlint, typecheck, build, test |
| lint, check, build, test ターゲット |
| ruff, mypy, pytest等 |
| cargo check, cargo test, cargo clippy |
Detection sources when "Auto-detection" is selected:
| File | Commands to Detect |
|---|---|
| lint, typecheck, build, test in scripts |
| lint, check, build, test targets |
| ruff, mypy, pytest, etc. |
| cargo check, cargo test, cargo clippy |