devflow-agent-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +313 -0
- package/bin/devflow.js +2 -0
- package/dist/cli.js +52 -0
- package/dist/commands/add.js +137 -0
- package/dist/commands/doctor.js +246 -0
- package/dist/commands/explain.js +204 -0
- package/dist/commands/init.js +91 -0
- package/dist/constants.js +120 -0
- package/dist/install.js +176 -0
- package/dist/plugins.js +184 -0
- package/dist/types.js +2 -0
- package/package.json +51 -0
- package/templates/adapters/claude/.claude/commands/build.md +15 -0
- package/templates/adapters/claude/.claude/commands/commit.md +74 -0
- package/templates/adapters/claude/.claude/commands/plan.md +15 -0
- package/templates/adapters/claude/.claude/commands/review.md +16 -0
- package/templates/adapters/claude/.claude/commands/tests.md +14 -0
- package/templates/adapters/claude/.claude/commands/verify.md +16 -0
- package/templates/adapters/codex/README.md +14 -0
- package/templates/adapters/cursor/.cursor/commands/build.md +15 -0
- package/templates/adapters/cursor/.cursor/commands/plan.md +15 -0
- package/templates/adapters/cursor/.cursor/commands/review.md +16 -0
- package/templates/adapters/cursor/.cursor/commands/tests.md +14 -0
- package/templates/adapters/cursor/.cursor/commands/verify.md +16 -0
- package/templates/adapters/cursor/.cursor/rules/typescript.md +15 -0
- package/templates/adapters/gemini/README.md +16 -0
- package/templates/adapters/generic/README.md +14 -0
- package/templates/core/.devflow/workflows.yml +21 -0
- package/templates/core/AGENTS.md +44 -0
- package/templates/core/DEVFLOW.md +138 -0
- package/templates/prompts/build.txt +13 -0
- package/templates/prompts/plan.txt +13 -0
- package/templates/prompts/review.txt +14 -0
- package/templates/prompts/tests.txt +18 -0
- package/templates/prompts/verify.txt +15 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Devflow TypeScript Rule
|
|
2
|
+
|
|
3
|
+
Prefer:
|
|
4
|
+
|
|
5
|
+
- explicit types at boundaries
|
|
6
|
+
- small readable functions
|
|
7
|
+
- early returns over nested conditionals
|
|
8
|
+
- modifying existing code before adding abstractions
|
|
9
|
+
|
|
10
|
+
Avoid:
|
|
11
|
+
|
|
12
|
+
- `any` unless justified
|
|
13
|
+
- deeply nested control flow
|
|
14
|
+
- duplicated logic
|
|
15
|
+
- speculative abstractions
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Gemini Adapter
|
|
2
|
+
|
|
3
|
+
Devflow does not install a Gemini-specific integration config in this step.
|
|
4
|
+
|
|
5
|
+
Reason:
|
|
6
|
+
|
|
7
|
+
- the universal source of truth already lives in `AGENTS.md`, `DEVFLOW.md`, `devflow/prompts/`, and `.devflow/workflows.yml`
|
|
8
|
+
- this repository does not currently define a verified Gemini adapter contract to install automatically
|
|
9
|
+
|
|
10
|
+
Use Devflow with Gemini by:
|
|
11
|
+
|
|
12
|
+
1. Installing the core files
|
|
13
|
+
2. Reusing the prompts in `devflow/prompts/` manually
|
|
14
|
+
3. Pointing the model to `AGENTS.md`, `DEVFLOW.md`, and `.devflow/workflows.yml` when you want repo-specific workflow guidance
|
|
15
|
+
|
|
16
|
+
When a stable Gemini integration format is verified, this directory can be upgraded from documentation to installable config.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Generic Adapter
|
|
2
|
+
|
|
3
|
+
Use this adapter when your tool does not support native commands or rules.
|
|
4
|
+
|
|
5
|
+
How to use Devflow in any chat or IDE:
|
|
6
|
+
|
|
7
|
+
1. Start from `AGENTS.md` for the default engineering behavior
|
|
8
|
+
2. Use `devflow/prompts/plan.txt` before writing code
|
|
9
|
+
3. Use `devflow/prompts/build.txt` while implementing
|
|
10
|
+
4. Use `devflow/prompts/tests.txt` after implementation
|
|
11
|
+
5. Use `devflow/prompts/review.txt` for code review
|
|
12
|
+
6. Use `devflow/prompts/verify.txt` before shipping
|
|
13
|
+
|
|
14
|
+
This keeps the workflow portable without relying on tool-specific config.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
review:
|
|
2
|
+
focus:
|
|
3
|
+
- bugs
|
|
4
|
+
- regressions
|
|
5
|
+
- missing_tests
|
|
6
|
+
- security
|
|
7
|
+
output:
|
|
8
|
+
format: findings_first
|
|
9
|
+
include_file_refs: true
|
|
10
|
+
|
|
11
|
+
plan:
|
|
12
|
+
output:
|
|
13
|
+
include_files: true
|
|
14
|
+
include_risks: true
|
|
15
|
+
|
|
16
|
+
verify:
|
|
17
|
+
checks:
|
|
18
|
+
- typecheck
|
|
19
|
+
- tests
|
|
20
|
+
- build
|
|
21
|
+
- edge_cases
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Devflow — AI Development Workflow
|
|
2
|
+
|
|
3
|
+
You are a senior software engineer working on a production codebase.
|
|
4
|
+
|
|
5
|
+
Full workflow reference: see `DEVFLOW.md` in this project.
|
|
6
|
+
|
|
7
|
+
## Default workflow
|
|
8
|
+
|
|
9
|
+
Before writing code always follow this order (PLAN → BUILD → TEST → REVIEW → VERIFY):
|
|
10
|
+
|
|
11
|
+
1. Understand the problem
|
|
12
|
+
2. Identify relevant files
|
|
13
|
+
3. Propose a minimal implementation plan
|
|
14
|
+
4. Implement the simplest working solution
|
|
15
|
+
5. Verify correctness and edge cases
|
|
16
|
+
|
|
17
|
+
## Engineering principles
|
|
18
|
+
|
|
19
|
+
Prefer:
|
|
20
|
+
|
|
21
|
+
- modifying existing code instead of creating new abstractions
|
|
22
|
+
- small readable functions
|
|
23
|
+
- explicit types
|
|
24
|
+
- simple architecture
|
|
25
|
+
|
|
26
|
+
Avoid:
|
|
27
|
+
|
|
28
|
+
- unnecessary files
|
|
29
|
+
- premature optimization
|
|
30
|
+
- complex abstractions
|
|
31
|
+
- duplicated logic
|
|
32
|
+
|
|
33
|
+
## Verification checklist
|
|
34
|
+
|
|
35
|
+
Before finishing any task verify:
|
|
36
|
+
|
|
37
|
+
- the code compiles
|
|
38
|
+
- tests pass
|
|
39
|
+
- edge cases are handled
|
|
40
|
+
- the solution is as simple as possible
|
|
41
|
+
|
|
42
|
+
## When uncertain
|
|
43
|
+
|
|
44
|
+
Ask questions instead of guessing.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Devflow — Universal Workflow
|
|
2
|
+
|
|
3
|
+
This file defines the five-phase development workflow. It applies regardless of which AI model or tool you use.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The five phases
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
PLAN → BUILD → TEST → REVIEW → VERIFY
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Always follow this order. Do not skip phases when working on non-trivial tasks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## PLAN
|
|
18
|
+
|
|
19
|
+
**When:** Before writing any code.
|
|
20
|
+
|
|
21
|
+
**What the AI should produce:**
|
|
22
|
+
- A summary of what needs to be built and why
|
|
23
|
+
- The minimal set of files that will change
|
|
24
|
+
- Functions, components, or types to create or modify
|
|
25
|
+
- Tests that should exist when done
|
|
26
|
+
- Edge cases and risks to address
|
|
27
|
+
|
|
28
|
+
**Prompt (paste into any chat):**
|
|
29
|
+
|
|
30
|
+
> Create a step-by-step implementation plan for: [describe your task]
|
|
31
|
+
>
|
|
32
|
+
> Include: what to build, which files change, what tests must pass, and potential edge cases.
|
|
33
|
+
> Do not write code yet.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## BUILD
|
|
38
|
+
|
|
39
|
+
**When:** After the plan is agreed.
|
|
40
|
+
|
|
41
|
+
**What the AI should produce:**
|
|
42
|
+
- The minimal working implementation that satisfies the plan
|
|
43
|
+
- No gold-plating, no speculative abstractions
|
|
44
|
+
- Code that compiles and passes existing tests
|
|
45
|
+
|
|
46
|
+
**Principles:**
|
|
47
|
+
- Modify existing code before creating new abstractions
|
|
48
|
+
- Prefer explicit types, early returns, small functions
|
|
49
|
+
- Keep diffs focused — one concern per change
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## TEST
|
|
54
|
+
|
|
55
|
+
**When:** After the implementation is in place.
|
|
56
|
+
|
|
57
|
+
**What the AI should produce:**
|
|
58
|
+
- Test cases covering the happy path and the edge cases identified in PLAN
|
|
59
|
+
- Integration tests where they provide more value than unit tests
|
|
60
|
+
- Minimal mocks — prefer real dependencies where feasible
|
|
61
|
+
|
|
62
|
+
**Prompt (paste into any chat):**
|
|
63
|
+
|
|
64
|
+
> Generate tests for the current implementation.
|
|
65
|
+
>
|
|
66
|
+
> Cover: happy path, edge cases from the plan, and any error states.
|
|
67
|
+
> Prefer integration tests where practical. Use minimal mocks.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## REVIEW
|
|
72
|
+
|
|
73
|
+
**When:** When the implementation and tests are complete.
|
|
74
|
+
|
|
75
|
+
**What the AI should produce:**
|
|
76
|
+
- Bugs or logic errors
|
|
77
|
+
- Unhandled edge cases
|
|
78
|
+
- Security issues (injection, unvalidated input, exposed secrets)
|
|
79
|
+
- Duplicated logic that should be extracted
|
|
80
|
+
- Unnecessary complexity that should be simplified
|
|
81
|
+
- Performance issues that matter in production
|
|
82
|
+
|
|
83
|
+
**Prompt (paste into any chat):**
|
|
84
|
+
|
|
85
|
+
> Review this implementation as a senior engineer.
|
|
86
|
+
>
|
|
87
|
+
> Look for: bugs, edge cases, security issues, duplicated logic, unnecessary complexity.
|
|
88
|
+
> Be specific. Suggest fixes.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## VERIFY
|
|
93
|
+
|
|
94
|
+
**When:** Before marking the task as done.
|
|
95
|
+
|
|
96
|
+
**Checklist (run through this before finishing):**
|
|
97
|
+
|
|
98
|
+
- [ ] The code compiles / runs without errors
|
|
99
|
+
- [ ] Tests pass
|
|
100
|
+
- [ ] Edge cases from the PLAN phase are handled
|
|
101
|
+
- [ ] No duplicated logic was introduced
|
|
102
|
+
- [ ] The solution is as simple as it can be
|
|
103
|
+
- [ ] No sensitive data is exposed (secrets, tokens, PII)
|
|
104
|
+
|
|
105
|
+
**Prompt (paste into any chat):**
|
|
106
|
+
|
|
107
|
+
> Verify this implementation against the original plan.
|
|
108
|
+
>
|
|
109
|
+
> Check: compilation, tests, edge cases, simplicity, security.
|
|
110
|
+
> Flag anything that should be addressed before shipping.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Quick reference
|
|
115
|
+
|
|
116
|
+
| Phase | Trigger | Output |
|
|
117
|
+
|-------|---------|--------|
|
|
118
|
+
| PLAN | Before any code | Implementation plan + edge cases |
|
|
119
|
+
| BUILD | Plan agreed | Minimal working implementation |
|
|
120
|
+
| TEST | Implementation done | Test suite covering plan + edge cases |
|
|
121
|
+
| REVIEW | Tests passing | List of issues with suggested fixes |
|
|
122
|
+
| VERIFY | Before done | Checklist sign-off |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Adapters
|
|
127
|
+
|
|
128
|
+
Devflow keeps the workflow portable by separating the universal core from optional adapters.
|
|
129
|
+
|
|
130
|
+
Current adapter status:
|
|
131
|
+
|
|
132
|
+
| Harness | Integration |
|
|
133
|
+
|---------|-------------|
|
|
134
|
+
| Cursor | `/plan`, `/build`, `/tests`, `/review`, `/verify` slash commands |
|
|
135
|
+
| Claude Code | `/plan`, `/build`, `/tests`, `/review`, `/verify` slash commands |
|
|
136
|
+
| Codex CLI | Documentation-only adapter. See `.devflow/adapters/codex/README.md` |
|
|
137
|
+
| Gemini CLI | Documentation-only adapter. See `.devflow/adapters/gemini/README.md` |
|
|
138
|
+
| Any other | Use `.devflow/README.md` and copy prompts from `devflow/prompts/` |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Implement the agreed plan for the following task:
|
|
2
|
+
|
|
3
|
+
[Describe the task and include any accepted plan details here]
|
|
4
|
+
|
|
5
|
+
Requirements:
|
|
6
|
+
|
|
7
|
+
1. Make the smallest working change that satisfies the plan
|
|
8
|
+
2. Modify existing code before adding new abstractions
|
|
9
|
+
3. Keep functions small and explicit
|
|
10
|
+
4. Preserve existing behavior outside the requested change
|
|
11
|
+
5. Note any follow-up risks or tradeoffs if they remain
|
|
12
|
+
|
|
13
|
+
Return the implementation and briefly explain what changed.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Create a step-by-step implementation plan for the following task:
|
|
2
|
+
|
|
3
|
+
[Describe your task here]
|
|
4
|
+
|
|
5
|
+
The plan must include:
|
|
6
|
+
|
|
7
|
+
1. What needs to be built or changed
|
|
8
|
+
2. Which files will be affected
|
|
9
|
+
3. Functions, components, or types to create or modify
|
|
10
|
+
4. Tests that should pass when done
|
|
11
|
+
5. Edge cases and risks to address
|
|
12
|
+
|
|
13
|
+
Do not write any code yet. Only the plan.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Review the following implementation as a senior engineer.
|
|
2
|
+
|
|
3
|
+
[Paste the code or describe what was implemented]
|
|
4
|
+
|
|
5
|
+
Check for:
|
|
6
|
+
|
|
7
|
+
- Bugs and logic errors
|
|
8
|
+
- Unhandled edge cases
|
|
9
|
+
- Security issues
|
|
10
|
+
- Duplicated logic
|
|
11
|
+
- Unnecessary complexity
|
|
12
|
+
- Performance issues that matter in production
|
|
13
|
+
|
|
14
|
+
Be specific. For each issue found, describe the problem and suggest a fix.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Generate tests for the following implementation:
|
|
2
|
+
|
|
3
|
+
[Paste the code or describe what was implemented]
|
|
4
|
+
|
|
5
|
+
Cover:
|
|
6
|
+
|
|
7
|
+
- The happy path
|
|
8
|
+
- Edge cases identified during planning
|
|
9
|
+
- Error states and invalid input
|
|
10
|
+
- Any boundary conditions
|
|
11
|
+
|
|
12
|
+
Prefer:
|
|
13
|
+
|
|
14
|
+
- Integration tests over unit tests where they provide more confidence
|
|
15
|
+
- Realistic test data over artificial fixtures
|
|
16
|
+
- Minimal mocking where feasible
|
|
17
|
+
|
|
18
|
+
Provide the test code ready to run.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Verify this implementation against the original plan.
|
|
2
|
+
|
|
3
|
+
[Paste the code or describe what was implemented and what it was supposed to do]
|
|
4
|
+
|
|
5
|
+
Check each of the following and report the result:
|
|
6
|
+
|
|
7
|
+
1. Does the code compile or run without errors?
|
|
8
|
+
2. Do tests pass?
|
|
9
|
+
3. Are edge cases from the plan handled?
|
|
10
|
+
4. Is duplicated logic introduced?
|
|
11
|
+
5. Could the solution be simpler without losing correctness?
|
|
12
|
+
6. Is any sensitive data exposed?
|
|
13
|
+
|
|
14
|
+
For each issue found, describe it clearly and suggest how to resolve it.
|
|
15
|
+
If everything looks good, confirm it is ready to ship.
|