بنقرة واحدة
devops-workflow
Issue-driven DevOps workflow with pre-flight checks, workspace isolation, and PR lifecycle
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Issue-driven DevOps workflow with pre-flight checks, workspace isolation, and PR lifecycle
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Cloud Build CI/CD patterns with Terraform-via-Cloud-Build workflows
Podman container operations best practices and patterns
Google Cloud Platform operations patterns and best practices
Best practices for creating and reviewing pull requests
Create consistent releases and changelogs using semantic versioning and conventional commits
Makefile and modular scripts conventions for DevOps projects
| name | devops-workflow |
| description | Issue-driven DevOps workflow with pre-flight checks, workspace isolation, and PR lifecycle |
Use this skill when starting any DevOps task, when unsure about the workflow order, or when onboarding someone to the issue-driven development process.
Every task follows this sequence before work begins:
1. Issue Check -> Verify GitHub issue exists and is open
2. Clean Tree -> No uncommitted changes in main working directory
3. Workspace Setup -> Clone repo to isolated /tmp/agent-<name>/ directory
4. Branch Create -> Dedicated branch created in the workspace
5. Plan Check -> Implementation plan posted on the issue
CRITICAL: After pre-flight, verify you are NOT on the default branch. The agent must never commit directly to main/master. If somehow on the default branch, STOP and re-run preflight.
All checks must PASS before any work begins. If any check fails, stop and resolve the issue before proceeding.
The pre-flight protocol creates a fully isolated git clone in /tmp/agent-*.
This ensures:
rm -rf /tmp/agent-*After preflight passes, ALL operations must target the workspace path:
workspace parameter to all git toolsworkdir for bash commandsFormat: <type>/<issue-number>-<slug>
| Type | When to use |
|---|---|
feature | New functionality |
fix | Bug fixes |
chore | Maintenance, dependency updates, config changes |
docs | Documentation changes |
refactor | Code restructuring without behavior change |
test | Adding or updating tests |
Examples:
feature/42-add-dark-modefix/17-login-timeoutchore/5-update-terraform-providerdocs/23-update-deployment-guideRules:
main)Issue Created
│
v
Pre-flight Checks (issue, clean tree, workspace + branch, plan)
│
v
Work Execution (in isolated workspace — containers, infra, troubleshooting)
│
v
Test Validation (mandatory — PASS / FAIL / WARN — run in workspace)
│
v
Stage & Commit (via @git-ops with workspace path, conventional commit format)
│
v
Create PR (via @git-ops with workspace path, with "Closes #N" in body)
│ - Always set delete_branch: true
v
Self-Review PR (via @git-ops — diff analysis against review checklist)
│
├── Clean ──────────────────────────┐
│ v
├── Issues Found ──> Fix ──> Re-review (max 2 iterations)
│ │
│ ├── Clean ─┤
│ │ v
│ └── Still issues ──> Leave PR open with comment
│ │
v v
Merge PR (squash, delete branch) Destroy Workspace & Report
│
v
Destroy Workspace & Report
Test validation is a mandatory step between work execution and commit.
It runs automatically via the validate_tests tool (with the workspace path)
and MUST NOT be silently skipped.
The tool searches for test infrastructure in this order:
make local-test — Makefile target (preferred, uses scripts/local.sh test)make test — Fallback Makefile targetnpm test,
go test ./..., python3 -m pytest, cargo test)| Result | Meaning | Action |
|---|---|---|
| PASS | Tests ran and passed | Proceed to commit |
| FAIL | Tests ran and failed | Show output. User must explicitly confirm to skip. |
| WARN | No test infrastructure found | User must explicitly confirm to proceed. Suggest tracking issue. |
After creating the PR, the agent MUST self-review before merging. This is
delegated to @git-ops and is never skipped.
@git-ops to get the full PR diff@git-ops analyzes the diff against the review checklist@git-ops@git-ops on the updated PR@git-ops
using squash merge with delete_branch: trueThe self-review checks for:
Use conventional commits: type(scope): description
feat(container): add multi-stage build for API servicefix(terraform): correct GKE node pool machine typechore(gcloud): update project IAM bindingsdocs(readme): add deployment prerequisitesAfter a PR is merged (either via the self-review-merge loop or manually), clean up to prevent branch accumulation:
agent_workspace_destroy (if not already destroyed).
The workspace is kept alive during the review loop for remediation fixes,
and destroyed only after the PR is merged or the loop completes.git branch -d <branch> (in the main repo)git fetch --pruneUse the /cleanup command to list and prune stale merged branches.