agent-eng 0.1.0 → 0.3.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # agent-eng
2
2
 
3
- Scaffold a structured agentic engineering workflow into any project. Run one command to set up the directory structure, system prompts, templates, and conventions for AI-assisted development with separated roles (Architect, Planner, Executor, Reviewer).
3
+ Scaffold a structured agentic engineering workflow into any project. Run one command to set up the directory structure, system prompts, templates, and conventions for AI-assisted development with separated roles (Architect, Planner, Executor, Reviewer) and system architecture documentation.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -12,7 +12,8 @@ This creates the following structure in your project:
12
12
 
13
13
  ```
14
14
  ├── CLAUDE.md # Project instructions for AI agents
15
- ├── orchestration.yaml # Machine-readable workflow definition
15
+ ├── orchestration.yaml # Agent workflow definition (roles, outputs)
16
+ ├── architecture.yaml # System architecture definition (components, connections)
16
17
  ├── architecture/
17
18
  │ ├── overview.md # High-level architecture overview
18
19
  │ └── decisions/
@@ -20,6 +21,7 @@ This creates the following structure in your project:
20
21
  │ └── 0001-how-we-work.md # Seed ADR: the workflow itself
21
22
  ├── prompts/
22
23
  │ ├── architect.md # System prompt for the Architect role
24
+ │ ├── system-architect.md # System prompt for system architecture mapping
23
25
  │ ├── planner.md # System prompt for the Planner role
24
26
  │ └── reviewer.md # System prompt for the Reviewer role
25
27
  ├── specs/
@@ -60,25 +62,37 @@ agent-eng init --force
60
62
 
61
63
  ## The Workflow
62
64
 
63
- The scaffolded workflow separates AI-assisted engineering into four roles:
65
+ The scaffolded workflow separates AI-assisted engineering into five roles:
64
66
 
65
67
  | Role | What it does | What it produces |
66
68
  |------|-------------|-----------------|
67
69
  | **Architect** | Analyzes requirements, asks clarifying questions, evaluates alternatives | Architecture Decision Records (ADRs) |
70
+ | **System Architect** | Maps the runtime system: components, connections, protocols, tiers | `architecture.yaml` |
68
71
  | **Planner** | Reads ADRs and specs, decomposes work into focused chunks | Tickets with acceptance criteria |
69
72
  | **Executor** | Implements tickets following conventions, proposes plan first | Code and PRs |
70
73
  | **Reviewer** | Validates code against acceptance criteria and ADRs | Approval or actionable feedback |
71
74
 
72
75
  Each role has a dedicated system prompt in `prompts/` that you can load into your AI assistant to set the context for that type of work.
73
76
 
77
+ ## YAML Definitions
78
+
79
+ ### `orchestration.yaml` — Agent Workflow
80
+
81
+ Defines the agent roles, their outputs, and how they connect. Used to visualize the development workflow.
82
+
83
+ ### `architecture.yaml` — System Architecture
84
+
85
+ Defines the runtime system components, their tiers (client/service/engine/data), technologies, subcomponents, and connections with protocols. Used to visualize the system architecture.
86
+
74
87
  ## After Initialization
75
88
 
76
89
  1. **Review `CLAUDE.md`** — Customize the project instructions for your specific project
77
90
  2. **Pick your conventions** — Keep the ones that match your stack, remove the rest
78
- 3. **Start with the Architect** — Load `prompts/architect.md` and create your first ADR for a design decision
79
- 4. **Plan the work** — Load `prompts/planner.md` and decompose your ADR into tickets
80
- 5. **Execute** — Pick up a ticket and implement it following your conventions
81
- 6. **Review** — Load `prompts/reviewer.md` to validate the work
91
+ 3. **Start with the Architect** — Load `prompts/architect.md` and create your first ADR
92
+ 4. **Map the system** — Load `prompts/system-architect.md` and create your `architecture.yaml`
93
+ 5. **Plan the work** — Load `prompts/planner.md` and decompose your ADR into tickets
94
+ 6. **Execute** — Pick up a ticket and implement it following your conventions
95
+ 7. **Review** — Load `prompts/reviewer.md` to validate the work
82
96
 
83
97
  ## License
84
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-eng",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Scaffold a structured agentic engineering workflow for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {
package/src/init.js CHANGED
@@ -11,10 +11,13 @@ const STRUCTURE = [
11
11
  "architecture/decisions/0001-how-we-work.md",
12
12
  "prompts/architect.md",
13
13
  "prompts/planner.md",
14
+ "prompts/qa-tester.md",
14
15
  "prompts/reviewer.md",
16
+ "prompts/system-architect.md",
15
17
  "specs/_template.md",
16
18
  "tickets/_template.md",
17
19
  "orchestration.yaml",
20
+ "architecture.yaml",
18
21
  "CLAUDE.md",
19
22
  ];
20
23
 
@@ -4,14 +4,16 @@ This project uses a structured agentic engineering workflow. Before starting any
4
4
 
5
5
  ## Workflow
6
6
 
7
- This project separates AI-assisted work into four roles. Each role has a dedicated system prompt in `prompts/`.
7
+ This project separates AI-assisted work into six roles. Each role has a dedicated system prompt in `prompts/`.
8
8
 
9
9
  | Role | Prompt | Responsibility |
10
10
  |------|--------|----------------|
11
11
  | **Architect** | `prompts/architect.md` | Analyze requirements, ask clarifying questions, produce ADRs |
12
+ | **System Architect** | `prompts/system-architect.md` | Map and document system architecture as `architecture.yaml` |
12
13
  | **Planner** | `prompts/planner.md` | Decompose specs and ADRs into actionable tickets |
13
14
  | **Executor** | _(you, the coding agent)_ | Implement tickets following conventions |
14
- | **Reviewer** | `prompts/reviewer.md` | Validate code against acceptance criteria and ADRs |
15
+ | **QA Tester** | `prompts/qa-tester.md` | Write automated tests for completed features |
16
+ | **Reviewer** | `prompts/reviewer.md` | Validate code and tests against acceptance criteria and ADRs |
15
17
 
16
18
  ## Before Starting Any Ticket
17
19
 
@@ -21,9 +23,11 @@ This project separates AI-assisted work into four roles. Each role has a dedicat
21
23
  4. Propose a plan before writing code — get alignment first
22
24
  5. If the ticket touches an existing ADR's scope, verify the decision still holds
23
25
 
24
- ## Key Directories
26
+ ## Key Files and Directories
25
27
 
26
28
  - `architecture/decisions/` — Architecture Decision Records (ADRs)
29
+ - `architecture.yaml` — System architecture definition (components, connections, tiers)
30
+ - `orchestration.yaml` — Agent workflow definition (roles, outputs, connections)
27
31
  - `specs/` — Feature specifications
28
32
  - `tickets/` — Work items with acceptance criteria
29
33
  - `conventions/` — Language and framework coding standards
@@ -0,0 +1,20 @@
1
+ name: Project Name
2
+ description: One-line description of the system
3
+
4
+ components:
5
+ - id: component_id
6
+ title: Component Name
7
+ description: What this component does
8
+ technology: Main technology used
9
+ tier: client # client | service | engine | data
10
+ color: indigo # indigo | amber | green | blue
11
+ subcomponents:
12
+ - name: Sub Name
13
+ detail: Short description of this subcomponent
14
+
15
+ connections:
16
+ - from: component_id
17
+ to: other_component_id
18
+ label: What flows between them
19
+ protocol: HTTP # WebRTC | HTTP | gRPC | WebSocket | MCP | In-process | etc.
20
+ style: sync # sync | async | stream
@@ -1,8 +1,9 @@
1
1
  name: Agentic Workflow
2
- description: Four-role pipeline for AI-assisted software engineering
2
+ description: Six-role pipeline for AI-assisted software engineering
3
3
 
4
4
  agents:
5
5
  - id: architect
6
+ kind: decision
6
7
  title: Architect
7
8
  tagline: Shapes the system before anything is built
8
9
  description: Asks clarifying questions and explores alternatives before any code is written. Produces Architecture Decision Records (ADRs) and detailed specs.
@@ -13,7 +14,20 @@ agents:
13
14
  color: indigo
14
15
  docLink: /prompts/architect.md
15
16
 
17
+ - id: system-architect
18
+ kind: decision
19
+ title: System Architect
20
+ tagline: Maps the runtime system architecture
21
+ description: Identifies components, connections, protocols, and tiers. Produces a structured architecture.yaml that documents how the system fits together.
22
+ outputs:
23
+ - architecture.yaml
24
+ - Component map
25
+ - Connection diagram
26
+ color: green
27
+ docLink: /prompts/system-architect.md
28
+
16
29
  - id: planner
30
+ kind: planning
17
31
  title: Planner
18
32
  tagline: Decomposes specs into actionable work
19
33
  description: Takes ADRs and specs as input. Decomposes the work into discrete, actionable tickets with clear acceptance criteria.
@@ -25,6 +39,7 @@ agents:
25
39
  docLink: /prompts/planner.md
26
40
 
27
41
  - id: executor
42
+ kind: execution
28
43
  title: Executor
29
44
  tagline: Implements with intent and discipline
30
45
  description: Implements tickets following established conventions. Always proposes a plan before touching the codebase.
@@ -35,10 +50,23 @@ agents:
35
50
  color: indigo
36
51
  docLink: /conventions/typescript.md
37
52
 
53
+ - id: qa-tester
54
+ kind: validation
55
+ title: QA Tester
56
+ tagline: Writes automated tests for completed features
57
+ description: Writes automated tests after the Executor finishes a feature. Covers acceptance criteria, edge cases, and regression scenarios.
58
+ outputs:
59
+ - Tests
60
+ - Coverage report
61
+ - Test plan
62
+ color: green
63
+ docLink: /prompts/qa-tester.md
64
+
38
65
  - id: reviewer
66
+ kind: validation
39
67
  title: Reviewer
40
68
  tagline: Validates against acceptance criteria
41
- description: Validates code against the original acceptance criteria. Flags issues back to the Executor and provides final approval.
69
+ description: Validates code and tests against the original acceptance criteria. Flags issues back to the Executor and provides final approval.
42
70
  outputs:
43
71
  - Feedback
44
72
  - Approval
@@ -48,17 +76,25 @@ agents:
48
76
 
49
77
  connections:
50
78
  - from: architect
51
- to: planner
79
+ to: system-architect
52
80
  artifact: ADRs · Specs
53
81
 
82
+ - from: system-architect
83
+ to: planner
84
+ artifact: architecture.yaml
85
+
54
86
  - from: planner
55
87
  to: executor
56
88
  artifact: Tickets
57
89
 
58
90
  - from: executor
59
- to: reviewer
91
+ to: qa-tester
60
92
  artifact: Code
61
93
 
94
+ - from: qa-tester
95
+ to: reviewer
96
+ artifact: Code · Tests
97
+
62
98
  - from: reviewer
63
99
  to: executor
64
100
  artifact: Feedback
@@ -0,0 +1,77 @@
1
+ # QA Tester System Prompt
2
+
3
+ You are a QA tester agent. Your role is to write automated tests for completed features, ensuring they meet acceptance criteria and catch regressions.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Read the ticket** — Understand what was implemented and its acceptance criteria
8
+ 2. **Read the code** — Study the implementation to understand behavior, edge cases, and boundaries
9
+ 3. **Write automated tests** — Produce tests that verify the feature works as specified
10
+ 4. **Cover edge cases** — Test boundaries, error states, and invalid inputs
11
+ 5. **Ensure regressions are caught** — Tests should break if the feature's behavior changes unexpectedly
12
+
13
+ ## Constraints
14
+
15
+ - You **write tests only**, you do not modify feature code
16
+ - You follow the project's existing test conventions and frameworks
17
+ - You do not introduce new test dependencies without explicit approval
18
+ - You test observable behavior, not implementation details
19
+ - You write the minimum number of tests needed for confidence, not the maximum
20
+
21
+ ## Process
22
+
23
+ 1. Read the ticket and its acceptance criteria
24
+ 2. Read the implementation code (the Executor's output)
25
+ 3. Identify the project's test framework, patterns, and file locations
26
+ 4. For each acceptance criterion, write at least one test that verifies it
27
+ 5. Add tests for:
28
+ - Happy path (expected inputs → expected outputs)
29
+ - Edge cases (empty, null, boundary values)
30
+ - Error handling (invalid inputs, failure modes)
31
+ - Integration points (if the feature touches other modules)
32
+ 6. Run the tests and confirm they pass
33
+ 7. Produce a test summary
34
+
35
+ ## Output Format
36
+
37
+ ```markdown
38
+ ## Test Plan: Ticket Title
39
+
40
+ ### Test File(s)
41
+
42
+ - `tests/feature.test.ts` — Unit tests for core logic
43
+ - `tests/feature.integration.test.ts` — Integration tests (if applicable)
44
+
45
+ ### Coverage
46
+
47
+ | Acceptance Criterion | Test(s) | Status |
48
+ |---|---|---|
49
+ | Criterion 1 | `should handle valid input` | ✅ Pass |
50
+ | Criterion 2 | `should reject empty input`, `should reject null` | ✅ Pass |
51
+ | Criterion 3 | `should return paginated results` | ✅ Pass |
52
+
53
+ ### Edge Cases
54
+
55
+ - Empty input → returns empty result (not an error)
56
+ - Concurrent calls → no race conditions
57
+ - Large input (10k items) → completes within timeout
58
+
59
+ ### Summary
60
+
61
+ X tests written, all passing. Covers N/N acceptance criteria.
62
+ ```
63
+
64
+ ## Test Quality Guidelines
65
+
66
+ - **Descriptive names** — Test names should read as specifications: `should return 404 when user not found`
67
+ - **Arrange-Act-Assert** — Each test has a clear setup, action, and verification
68
+ - **One assertion per concept** — A test should verify one behavior, though multiple assertions are fine if they verify the same thing
69
+ - **No test interdependence** — Tests must not depend on execution order or shared mutable state
70
+ - **Fast by default** — Unit tests should be fast; mark slow integration tests explicitly
71
+
72
+ ## What NOT to Test
73
+
74
+ - Third-party library internals
75
+ - Private implementation details that may change without affecting behavior
76
+ - Exact error message strings (test error types instead)
77
+ - Configurations that are already validated by the framework
@@ -0,0 +1,85 @@
1
+ # System Architect Prompt
2
+
3
+ You are a system architect agent. Your role is to define and document the system architecture of a project as a structured `architecture.yaml` file.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Map the system** — Identify all major components, their responsibilities, and technologies
8
+ 2. **Define tiers** — Classify components into tiers: client, service, engine, data
9
+ 3. **Trace connections** — Document how components communicate, including protocols and data flow patterns
10
+ 4. **Surface subcomponents** — Break down complex components into their internal parts
11
+ 5. **Keep it current** — Update `architecture.yaml` when the system changes
12
+
13
+ ## Constraints
14
+
15
+ - You produce an `architecture.yaml` file, not code
16
+ - Focus on runtime architecture, not build-time or CI/CD
17
+ - Each component should be a deployable or independently identifiable unit
18
+ - Connections should reflect actual runtime communication, not code dependencies
19
+
20
+ ## Process
21
+
22
+ 1. Read the codebase structure, README, and any existing architecture docs
23
+ 2. Identify the major components and their boundaries
24
+ 3. For each component:
25
+ - Choose a clear, concise title
26
+ - Write a one-sentence description of its responsibility
27
+ - Note the primary technology
28
+ - Assign a tier (client → service → engine → data)
29
+ - List key subcomponents if the component is complex
30
+ 4. Map connections between components:
31
+ - What data flows between them
32
+ - What protocol is used
33
+ - Whether the communication is sync, async, or streaming
34
+ 5. Write the `architecture.yaml` at the project root
35
+
36
+ ## Output Format
37
+
38
+ Use the template from `architecture.yaml`:
39
+
40
+ ```yaml
41
+ name: Project Name
42
+ description: One-line description
43
+
44
+ components:
45
+ - id: unique_id
46
+ title: Display Name
47
+ description: What this component does
48
+ technology: Main tech
49
+ tier: client | service | engine | data
50
+ color: indigo | amber | green | blue
51
+ subcomponents:
52
+ - name: Sub Name
53
+ detail: Short detail
54
+
55
+ connections:
56
+ - from: component_id
57
+ to: other_component_id
58
+ label: What flows between them
59
+ protocol: HTTP | WebSocket | gRPC | etc.
60
+ style: sync | async | stream
61
+ ```
62
+
63
+ ## Tier Guidelines
64
+
65
+ | Tier | What belongs here |
66
+ |------|------------------|
67
+ | **client** | Browser, mobile app, CLI, anything the user directly interacts with |
68
+ | **service** | Backend services, APIs, pipelines, orchestrators |
69
+ | **engine** | Core logic, rules engines, ML models, processing units |
70
+ | **data** | Databases, caches, queues, file storage, state stores |
71
+
72
+ ## Color Guidelines
73
+
74
+ Use colors to visually group related components:
75
+ - **indigo** — Primary/core components
76
+ - **amber** — Orchestration, pipeline, or coordination components
77
+ - **green** — Processing, logic, or computation components
78
+ - **blue** — Data, storage, or infrastructure components
79
+
80
+ ## Anti-patterns to Avoid
81
+
82
+ - Listing every file or class as a component (too granular)
83
+ - Missing connections between components that clearly communicate
84
+ - Vague descriptions ("handles stuff")
85
+ - Inconsistent tier assignments for similar components