mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
/srid-do
This commit is contained in:
parent
fda5fc00c0
commit
dcfad18487
1 changed files with 69 additions and 0 deletions
69
AI/commands/srid-do.md
Normal file
69
AI/commands/srid-do.md
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
description: Execute a task end-to-end — implement, PR, CI loop, elegance, ship
|
||||
argument-hint: "<github-issue-url | prompt>"
|
||||
---
|
||||
|
||||
# srid-do Command
|
||||
|
||||
Take a GitHub issue, prompt, or task description and execute it top-to-bottom: implement, open a draft PR, pass CI, refine with elegance, and push.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/srid-do <github-issue-url or prompt>
|
||||
```
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. **Understand the Task**
|
||||
|
||||
- If given a GitHub issue URL, fetch it with `gh issue view` to get full context.
|
||||
- Research the codebase thoroughly before writing code. Use Explore subagents, Grep, Glob, Read.
|
||||
- **Never assume** how something works. Read the code. Check the config.
|
||||
- If the prompt involves external tools/libraries, use WebSearch/WebFetch to get current info.
|
||||
- If anything is ambiguous, **ask immediately** using `AskUserQuestion`. Don't guess.
|
||||
|
||||
### 2. **Implement**
|
||||
|
||||
- Create a new branch from the current branch (name it descriptively).
|
||||
- Implement the changes. Prefer simplicity. Keep it focused on what was asked.
|
||||
- Commit with a clear message describing what was done. Each commit must be a NEW commit (never amend).
|
||||
|
||||
### 3. **Open Draft PR**
|
||||
|
||||
- Push the branch and open a **draft** pull request using `gh pr create --draft`.
|
||||
- PR title should be concise. Body should summarize what changed and why.
|
||||
|
||||
### 4. **CI Loop**
|
||||
|
||||
- Run `just ci`.
|
||||
- If CI fails:
|
||||
1. Read the failure output carefully.
|
||||
2. Fix the issue.
|
||||
3. Create a NEW commit (never amend) with a message describing the fix.
|
||||
4. Push.
|
||||
5. Run `just ci` again.
|
||||
- Repeat until CI passes. Max 5 attempts — if still failing after 5, stop and ask the user.
|
||||
|
||||
### 5. **Elegance Pass**
|
||||
|
||||
- Run the `/elegance` command targeting the relevant technology, for **3 iterations**.
|
||||
- When `/elegance` asks about scope (via `AskUserQuestion`), answer: **changes in the current branch/PR only**.
|
||||
- After elegance completes, create a NEW commit for the elegance improvements.
|
||||
|
||||
### 6. **Final CI**
|
||||
|
||||
- Push all elegance changes.
|
||||
- Run `just ci` again.
|
||||
- If it fails, enter the CI fix loop from step 4 again.
|
||||
|
||||
### 7. **Done**
|
||||
|
||||
- Report the PR URL and a brief summary of what was done.
|
||||
|
||||
## Principles
|
||||
|
||||
- **Every commit is NEW**: Never amend. Never rebase. Never force-push.
|
||||
- **CI must pass**: Don't move to the next phase until CI is green.
|
||||
- **Simple over clever**: Do the boring obvious thing.
|
||||
- **Ask over guess**: When in doubt, ask the user.
|
||||
Loading…
Add table
Add a link
Reference in a new issue