DEV Community

Cesc Ng
Cesc Ng

Posted on

I have created a workflow.md file to use with Antigravity as below, can anyone help me, I'm new to this field

πŸš€ CESC AI WORKFLOW v3 (PHASE + FINALIZE MODE)

AI Agent must create real folders and files for each command, with structured phases, execution traceability, and finalization support.


⚠️ CORE PRINCIPLES

  • MUST create real files in project
  • MUST create folder if not exist
  • MUST NOT only return text
  • If cannot create file β†’ return FULL file content ready to paste

πŸ“ DIRECTORY STRUCTURE

/docs
β”œβ”€β”€ requirements/
β”œβ”€β”€ brainstorm/
β”œβ”€β”€ plan/
β”œβ”€β”€ execution/
β”œβ”€β”€ review/
β”œβ”€β”€ refactor/
β”œβ”€β”€ testing/
β”œβ”€β”€ docs/
└── final/


πŸ“ FILE NAMING (MANDATORY)

Format:

YYYY-MM-DD_HHmm_[feature]_[type].md

Rules:

  • Always include timestamp
  • Feature = kebab-case (auth-system, payment-flow)
  • Auto detect from:

    • "Feature: xxx"
    • or infer from context

🧠 GLOBAL DOCUMENT HEADER (NEW)

Every file MUST include:

Status: DRAFT | IN_PROGRESS | FINAL
Version: v1
Feature: <feature-name>
Updated: YYYY-MM-DD HH:mm
Enter fullscreen mode Exit fullscreen mode

🧩 PHASE + STEP STRUCTURE (MANDATORY IN /plan)

## Phase 1: <name>

### Step 1.1: <step name>
- Description
- Output
- Dependencies

### Step 1.2: <step name>
...
Enter fullscreen mode Exit fullscreen mode

Rules:

  • Phase = milestone (setup, core, optimize…)
  • Step = atomic, implementable immediately
  • Each step MUST define:

    • Output (file/code/module)
    • Clear scope (small enough)

πŸ”’ FINALIZE MODE (NEW)

Command:

/[command] end

Example:

/plan end


FINALIZE RULES

  • MUST create new file:

YYYY-MM-DD_HHmm_[feature]_[command]-final.md

  • MUST update:
Status: FINAL
Enter fullscreen mode Exit fullscreen mode
  • MUST:

    • Remove ambiguity
    • Remove duplicated logic
    • Ensure all steps executable
  • MUST include:

## βœ… Final Checklist
- [x] All steps actionable
- [x] No missing dependency
- [x] Clear execution order
Enter fullscreen mode Exit fullscreen mode

πŸ”— TRACEABILITY (MANDATORY)

All docs must link together.

Example:

Plan:

Step 2.1 β†’ execution-step-2.md
Enter fullscreen mode Exit fullscreen mode

Execution:

Source Plan:
- Phase 2 - Step 2.1
Enter fullscreen mode Exit fullscreen mode

Testing:

Covering:
- execution-step-2.md
Enter fullscreen mode Exit fullscreen mode

🧠 COMMANDS


/brainstorm

Folder:

/docs/brainstorm/

File:

YYYY-MM-DD_HHmm_[feature]_brainstorm.md

Content:

  • Problem
  • Scope

    • In scope
    • Out of scope
  • Ambiguities

  • Unknowns (Need clarification)

  • Assumptions

  • Solutions

  • Tech stack


/plan

Folder:

/docs/plan/

File:

YYYY-MM-DD_HHmm_[feature]_plan-v{n}.md

Content:

  • Phase + Step breakdown
  • Execution Strategy

    • Parallel / Sequential
    • Estimated complexity
  • Dependencies

  • Risks

Additional:

## Phase Summary

| Phase | Goal | Risk |
Enter fullscreen mode Exit fullscreen mode

Versioning:

  • v1 β†’ v2 β†’ v3...
  • Iterate until user says: "Plan is clean"

/execute

Folder:

/docs/execution/

File:

YYYY-MM-DD_HHmm_[feature]_execution-step-{n}.md

Rules:

  • Only implement selected step

Support:
/execute step=1,2

Content:

  • Source Plan:

    • Phase X - Step Y
  • Code

  • Short explanation


/review

Folder:

/docs/review/

File:

YYYY-MM-DD_HHmm_[feature]_review.md

Content:

  • Critical issues
  • Major issues
  • Minor issues
  • Suggestions

Additional:

## Coverage Check
- Missing cases?
- Missing edge cases?
Enter fullscreen mode Exit fullscreen mode

Verdict:

  • LGTM
  • NEED FIX

/refactor

Folder:

/docs/refactor/

File:

YYYY-MM-DD_HHmm_[feature]_refactor.md

Content:

  • Improved code
  • Changes made
  • Reasoning

Additional:

## Impact Analysis
- Performance
- Readability
- Maintainability
Enter fullscreen mode Exit fullscreen mode

πŸ§ͺ TESTING


/testcase

Folder:

/docs/testing/

File:

YYYY-MM-DD_HHmm_[feature]_testcases.md

Content:

  • Test scenarios
  • Input / Expected Output
  • Edge cases
  • Priority

Additional:

## Test Pyramid
- Unit
- Integration
- E2E
Enter fullscreen mode Exit fullscreen mode

/test

Folder:

/docs/testing/

File:

YYYY-MM-DD_HHmm_[feature]_test-results.md

Content:

  • Unit tests (Jest / PyTest…)
  • Passed / Failed
  • Error logs
  • Coverage estimate

/report

Folder:

/docs/final/

File:

YYYY-MM-DD_HHmm_[feature]_final-report.md

Content:

  • Requirement summary
  • Implementation mapping
  • Code quality
  • Test results
  • Risks
  • Deployment readiness

Additional:

## Traceability

| Requirement | Plan Step | Code | Test |
Enter fullscreen mode Exit fullscreen mode

πŸ“š DOCUMENTATION


/docs init

Folder:

/docs/docs/

MUST create:

  • project-overview.md
  • tech-stack.md
  • architecture.md
  • coding-conventions.md
  • api-contract.md

/docs update

  • MUST update documentation based on latest implementation

/docs explain

File:

/docs/docs/YYYY-MM-DD_HHmm_{module}_explain.md


πŸ”„ WORKFLOWS


Small Task

/brainstorm
β†’ /plan
β†’ /execute
β†’ /review


Medium Task

/brainstorm
β†’ /plan
β†’ /execute
β†’ /review
β†’ /refactor


Large Feature

/brainstorm
β†’ /plan (iterate until clean)
β†’ /docs init
β†’ /execute (step-by-step)
β†’ /review
β†’ /refactor
β†’ /testcase
β†’ /test
β†’ /docs update
β†’ /report


⚑ FLAGS

/execute step=1,2
/testcase level=unit
/testcase level=e2e
/review strict=true
/test strict=true


🧬 VERSIONING RULES

Command Version Rule
/plan v1 β†’ v2 β†’ v3
/review overwrite
/refactor overwrite
/final new file

πŸ†• OPTIONAL COMMANDS (ADVANCED)


/sync

  • Validate consistency across:

    • plan
    • execution
    • test
  • Detect:

    • Missing step
    • Missing test
    • Dead logic

/status

Generate system state:

Feature: <feature-name>

Plan: vX (DRAFT/FINAL)
Execution: Step X done
Testing: XX%
Risk: Low/Medium/High
Enter fullscreen mode Exit fullscreen mode

/retro

Post-mortem:

## What went well
## What went wrong
## Lessons learned
Enter fullscreen mode Exit fullscreen mode

🎯 FINAL GOAL

Transform AI into:

  • Architect
  • Developer
  • Reviewer
  • QA Engineer
  • Tech Lead
  • Documentation Writer

πŸ’‘ HARD RULE

Every step MUST produce:

  • Code OR
  • File OR
  • Measurable output

Top comments (0)