Skip to content

TriadDev πŸ“ƒ β€” Golden Triangle: planning-with-files + task-workflow + tdd-sdd-development. Greenfield & brownfield.

Notifications You must be signed in to change notification settings

Charpup/triadev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TriadDev 🜁

The Golden Triangle of OpenClaw Development

Version OpenClaw Skill Python License: MIT evals

TriadDev (三元开发) unifies the three essential OpenClaw skills β€” planning-with-files + task-workflow + tdd-sdd-development v2.0 β€” into a single orchestrated workflow for both new and existing projects.


AI Agent Quick Reference

# Skill identity (SKILL.md frontmatter)
name: triadev
version: "2.1.0"
triggers:
  - "triadev"
  - "Golden Triangle"
  - "plan workflow"
  - "task management"
  - "brownfield"
  - "delta spec"
  - "init project with planning and TDD"

# Runtime requirements
requires:
  bins: [python3, triadev]
  env: []
  os: [linux, macos]

# Install
run: bash ~/.openclaw/skills/triadev/install.sh

When to invoke:

  • Starting a new project that needs planning + task scheduling + TDD (greenfield)
  • Modernizing / adding features to an existing codebase (brownfield)
  • Any project requiring structured planning, dependency management, and test coverage

When NOT to invoke:

  • Simple single-file edits or quick bug fixes
  • Projects that need only one of the three component skills

The Golden Triangle v2.0

                    πŸ“‹ PLANNING
               (planning-with-files)
                task_plan.md
                findings.md
                progress.md
                      ↓
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         ↓                         ↓
   πŸ“Š WORKFLOW              πŸ§ͺ TDD/SDD v2.0
  (task-workflow)       (tdd-sdd-development)
  Dependency DAG         SPEC.yaml + delta specs
  Complexity Score       RED β†’ GREEN β†’ REFACTOR
  Batch Schedule         80% coverage enforced
         β”‚                         β”‚
         └──────── Brownfield β”€β”€β”€β”€β”€β”€β”˜
                    Support

What's New in v2.0

Brownfield Support

Initialize from existing codebases:

triadev init-brownfield ./existing-project --name "Legacy Migration"
triadev detect-specs    # auto-generate base SPEC.yaml from code
triadev delta --add "OAuth support" --modify "session handling"
triadev implement
triadev archive "oauth-migration"

Delta Spec Integration

Track changes to existing systems with OpenSpec-inspired delta specs:

triadev delta --add "new feature" --modify "existing behavior" --remove "deprecated API"

Artifact Flow Mode

Full design pipeline for complex features:

triadev init "Payment System" --mode artifact
triadev propose --intent "Add Stripe integration" --scope "in: payments, out: taxes"
triadev spec --from-proposal
triadev design --approach "Webhook-based async"
triadev tasks
triadev implement --all
triadev archive

Archive & Spec Evolution

triadev archive "feature-name"
# β†’ merges delta specs into main SPEC.yaml
# β†’ moves artifacts to changes/archive/YYYY-MM-DD-feature-name/

Workflow Modes

Mode A: Greenfield (new projects)

triadev init "User Service API" --template api
cd user-service-api
triadev plan --objectives "Design schema,Implement CRUD,Add auth,Write tests"
triadev analyze           # build DAG, assign complexity, create batch schedule
triadev implement --all   # TDD cycle for each task
triadev archive           # complete project

Mode B: Brownfield (existing projects)

triadev init-brownfield ./legacy-app --name "Auth Modernization"
triadev detect-specs      # scan existing code β†’ generate base SPEC.yaml
triadev delta --add "JWT support" --modify "session storage" --remove "legacy tokens"
triadev analyze
triadev implement --all
triadev archive "auth-modernization"

Mode C: Artifact Flow (complex features)

triadev init "Payment Gateway" --mode artifact
triadev propose --intent "Add Stripe integration"
triadev spec
triadev design --approach "Webhook-based async processing"
triadev tasks
triadev implement --all
triadev archive

Commands Reference

Initialization

Command Description
triadev init "Name" --template [web|cli|api|lib] Start greenfield project
triadev init-brownfield ./dir --name "Name" Start from existing code
triadev init "Name" --mode artifact Full artifact flow mode

Planning & Analysis

Command Description
triadev plan --objectives "obj1,obj2" Create planning docs via planning-with-files
triadev detect-specs Auto-generate SPEC.yaml from existing code
triadev delta --add "X" --modify "Y" Create delta specs
triadev analyze Build DAG, score complexity, create batch schedule

Implementation

Command Description
triadev implement <task-id> TDD cycle for one task
triadev implement --all TDD cycle for all scheduled tasks
triadev run --from [plan|analyze|implement] Run full pipeline from a stage

Completion

Command Description
triadev archive "name" Merge deltas, archive artifacts, mark complete
triadev sync Merge delta specs to main SPEC.yaml (without archive)
triadev status --verbose Show project status, DAG, batch progress

Project Templates

Template Use Case Structure
web Web applications Frontend + Backend + Tests
cli CLI tools Command-line + Args + Tests
api REST/GraphQL APIs Endpoints + Schemas + Tests
lib Libraries / SDKs Core + Interfaces + Tests

Dependencies

Skill Version Purpose
planning-with-files β‰₯ 2.10.0 File-based planning (Manus pattern)
task-workflow β‰₯ 3.0.0 DAG scheduling and complexity analysis
tdd-sdd-development β‰₯ 2.0.0 TDD/SDD with delta specs

Installation

git clone --recursive https://github.com/Charpup/triadev.git ~/.openclaw/skills/triadev
cd ~/.openclaw/skills/triadev
./install.sh

triadev --version

Evals

Test cases in evals/evals.json:

ID Scenario Expected Trigger
1 Init new "payment-gateway" project with full Golden Triangle βœ… Yes
2 Brownfield init for legacy e-commerce checkout modernization βœ… Yes
3 Change a button color in a React component ❌ No

Real-World Results

Projects built with TriadDev Golden Triangle workflow:

Project Tasks Time Success
MCP Migration 6 28 min 100%
Schema Sync System 8 50 min 100%
Task-Workflow v3.1.0 6 10 min 100%
Auto-Pilot Skill Pack 5 30 min 100%

Version History

Version Changes
v2.1.0 Add metadata.openclaw compliance; add evals/evals.json (3 cases)
v2.0.0 Brownfield support, delta spec integration, artifact flow mode, archive & evolution
v1.0.0 Initial Golden Triangle: greenfield workflow, planning + workflow + TDD

Architecture

triadev/
β”œβ”€β”€ bin/triadev                   # CLI entry point
β”œβ”€β”€ lib/
β”‚   └── triadev_orchestrator.py   # Core orchestration logic
β”œβ”€β”€ templates/                    # Project templates (web, cli, api, lib)
β”œβ”€β”€ install.sh                    # Installer (adds triadev to PATH)
β”œβ”€β”€ SKILL.md                      # OpenClaw skill manifest
└── tests/

Project structure (created by init):
my-project/
β”œβ”€β”€ triadev-project.json          # Project config + mode
β”œβ”€β”€ task_plan.md                  # planning-with-files
β”œβ”€β”€ findings.md
β”œβ”€β”€ progress.md
β”œβ”€β”€ SPEC.yaml                     # Source of truth (tdd-sdd)
β”œβ”€β”€ SPEC-delta.yaml               # Active changes (brownfield mode)
β”œβ”€β”€ changes/                      # Change tracking
β”‚   β”œβ”€β”€ active/
β”‚   └── archive/
β”œβ”€β”€ src/
└── tests/

Troubleshooting

Issue Solution
Brownfield detection fails triadev detect-specs --manual
Delta spec conflicts triadev check-conflicts before archive
Artifact mode issues triadev config mode greenfield to reset

Acknowledgments

License

MIT β€” Charpup


git clone --recursive https://github.com/Charpup/triadev.git ~/.openclaw/skills/triadev
~/.openclaw/skills/triadev/install.sh
triadev init "My Project" && triadev run