maestro-bundle 1.9.0 → 2.0.1
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 +90 -90
- package/package.json +2 -2
- package/src/cli.mjs +72 -81
- package/templates/bundle-ai-agents/.spec/constitution.md +24 -24
- package/templates/bundle-ai-agents/AGENTS.md +71 -71
- package/templates/bundle-ai-agents/PRD_TEMPLATE.md +63 -63
- package/templates/bundle-ai-agents-deep/.spec/constitution.md +17 -17
- package/templates/bundle-ai-agents-deep/AGENTS.md +58 -58
- package/templates/bundle-ai-agents-deep/PRD_TEMPLATE.md +63 -63
- package/templates/bundle-ai-agents-deep/skills/deep-agent-memory/SKILL.md +158 -158
- package/templates/bundle-base/AGENTS.md +99 -99
- package/templates/bundle-data-pipeline/.spec/constitution.md +23 -23
- package/templates/bundle-data-pipeline/AGENTS.md +68 -68
- package/templates/bundle-data-pipeline/PRD_TEMPLATE.md +63 -63
- package/templates/bundle-frontend-spa/.spec/constitution.md +21 -21
- package/templates/bundle-frontend-spa/AGENTS.md +58 -58
- package/templates/bundle-frontend-spa/PRD_TEMPLATE.md +63 -63
- package/templates/bundle-jhipster-microservices/.spec/constitution.md +31 -31
- package/templates/bundle-jhipster-microservices/AGENTS.md +70 -70
- package/templates/bundle-jhipster-microservices/PRD_TEMPLATE.md +63 -63
- package/templates/bundle-jhipster-monorepo/.spec/constitution.md +22 -22
- package/templates/bundle-jhipster-monorepo/AGENTS.md +64 -64
- package/templates/bundle-jhipster-monorepo/PRD_TEMPLATE.md +63 -63
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
# Product Requirements Document (PRD)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> This document defines the product requirements. It should be filled out by the requirements analyst and/or the developer before starting development. The AI agent uses this document as context to understand WHAT to build.
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. Executive Summary
|
|
6
6
|
|
|
7
|
-
<!--
|
|
7
|
+
<!-- Describe in 2-3 sentences what the product is and what problem it solves -->
|
|
8
8
|
|
|
9
|
-
## 2.
|
|
9
|
+
## 2. Target Users
|
|
10
10
|
|
|
11
|
-
<!--
|
|
11
|
+
<!-- Who will use the system? Describe the personas -->
|
|
12
12
|
|
|
13
|
-
### Persona 1: [
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
13
|
+
### Persona 1: [Name]
|
|
14
|
+
- **Profile:**
|
|
15
|
+
- **Goals:**
|
|
16
|
+
- **Pain points:**
|
|
17
17
|
|
|
18
|
-
## 3.
|
|
18
|
+
## 3. MVP Scope
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### Included in MVP
|
|
21
21
|
- [ ] Feature 1
|
|
22
22
|
- [ ] Feature 2
|
|
23
23
|
- [ ] Feature 3
|
|
24
24
|
|
|
25
|
-
###
|
|
26
|
-
- [ ]
|
|
27
|
-
- [ ]
|
|
25
|
+
### Out of MVP (future)
|
|
26
|
+
- [ ] Future feature 1
|
|
27
|
+
- [ ] Future feature 2
|
|
28
28
|
|
|
29
29
|
## 4. User Stories
|
|
30
30
|
|
|
31
|
-
### US01: [
|
|
32
|
-
**
|
|
31
|
+
### US01: [Title]
|
|
32
|
+
**As** [persona], **I want** [action], **so that** [benefit].
|
|
33
33
|
|
|
34
|
-
**
|
|
35
|
-
- [ ]
|
|
36
|
-
- [ ]
|
|
34
|
+
**Acceptance criteria:**
|
|
35
|
+
- [ ] AC1:
|
|
36
|
+
- [ ] AC2:
|
|
37
37
|
|
|
38
|
-
### US02: [
|
|
39
|
-
**
|
|
38
|
+
### US02: [Title]
|
|
39
|
+
**As** [persona], **I want** [action], **so that** [benefit].
|
|
40
40
|
|
|
41
|
-
**
|
|
42
|
-
- [ ]
|
|
43
|
-
- [ ]
|
|
41
|
+
**Acceptance criteria:**
|
|
42
|
+
- [ ] AC1:
|
|
43
|
+
- [ ] AC2:
|
|
44
44
|
|
|
45
|
-
## 5.
|
|
45
|
+
## 5. High-Level Architecture
|
|
46
46
|
|
|
47
|
-
<!--
|
|
47
|
+
<!-- Mermaid or ASCII diagram showing the main components -->
|
|
48
48
|
|
|
49
49
|
```mermaid
|
|
50
50
|
graph LR
|
|
@@ -52,7 +52,7 @@ graph LR
|
|
|
52
52
|
B --> C[Database]
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
###
|
|
55
|
+
### Directory Structure
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
project/
|
|
@@ -61,29 +61,29 @@ project/
|
|
|
61
61
|
└── ...
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
## 6. Features
|
|
64
|
+
## 6. Detailed Features
|
|
65
65
|
|
|
66
|
-
### Feature 1: [
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
66
|
+
### Feature 1: [Name]
|
|
67
|
+
- **Description:**
|
|
68
|
+
- **Business rules:**
|
|
69
69
|
-
|
|
70
70
|
- **Inputs:**
|
|
71
71
|
- **Outputs:**
|
|
72
72
|
- **Edge cases:**
|
|
73
73
|
-
|
|
74
74
|
|
|
75
|
-
### Feature 2: [
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
75
|
+
### Feature 2: [Name]
|
|
76
|
+
- **Description:**
|
|
77
|
+
- **Business rules:**
|
|
78
78
|
-
|
|
79
79
|
|
|
80
|
-
## 7. Stack
|
|
80
|
+
## 7. Technology Stack
|
|
81
81
|
|
|
82
|
-
|
|
|
82
|
+
| Component | Technology | Justification |
|
|
83
83
|
|---|---|---|
|
|
84
84
|
| Backend | | |
|
|
85
85
|
| Frontend | | |
|
|
86
|
-
|
|
|
86
|
+
| Database | | |
|
|
87
87
|
| Cache | | |
|
|
88
88
|
| Deploy | | |
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ project/
|
|
|
92
92
|
### Endpoints
|
|
93
93
|
|
|
94
94
|
#### `GET /api/v1/resource`
|
|
95
|
-
- **
|
|
95
|
+
- **Description:**
|
|
96
96
|
- **Response:** `200 OK`
|
|
97
97
|
```json
|
|
98
98
|
{
|
|
@@ -104,7 +104,7 @@ project/
|
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
#### `POST /api/v1/resource`
|
|
107
|
-
- **
|
|
107
|
+
- **Description:**
|
|
108
108
|
- **Body:**
|
|
109
109
|
```json
|
|
110
110
|
{
|
|
@@ -113,7 +113,7 @@ project/
|
|
|
113
113
|
```
|
|
114
114
|
- **Response:** `201 Created`
|
|
115
115
|
|
|
116
|
-
## 9.
|
|
116
|
+
## 9. Data Model
|
|
117
117
|
|
|
118
118
|
```sql
|
|
119
119
|
CREATE TABLE example (
|
|
@@ -123,39 +123,39 @@ CREATE TABLE example (
|
|
|
123
123
|
);
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
## 10.
|
|
126
|
+
## 10. Non-Functional Requirements
|
|
127
127
|
|
|
128
|
-
|
|
|
128
|
+
| Requirement | Target | Priority |
|
|
129
129
|
|---|---|---|
|
|
130
|
-
| Performance | Response time < 500ms |
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
130
|
+
| Performance | Response time < 500ms | High |
|
|
131
|
+
| Availability | 99.9% uptime | Medium |
|
|
132
|
+
| Security | OWASP Top 10 | High |
|
|
133
|
+
| Scalability | Up to X simultaneous users | Medium |
|
|
134
134
|
|
|
135
|
-
## 11.
|
|
135
|
+
## 11. Implementation Phases
|
|
136
136
|
|
|
137
|
-
###
|
|
138
|
-
- [ ]
|
|
139
|
-
- [ ]
|
|
140
|
-
- [ ]
|
|
137
|
+
### Phase 1: Foundation
|
|
138
|
+
- [ ] Project setup
|
|
139
|
+
- [ ] Data model
|
|
140
|
+
- [ ] Basic endpoints
|
|
141
141
|
|
|
142
|
-
###
|
|
143
|
-
- [ ] Feature 1
|
|
144
|
-
- [ ] Feature 2
|
|
142
|
+
### Phase 2: Core Features
|
|
143
|
+
- [ ] Feature 1 complete
|
|
144
|
+
- [ ] Feature 2 complete
|
|
145
145
|
|
|
146
|
-
###
|
|
147
|
-
- [ ]
|
|
146
|
+
### Phase 3: Polish
|
|
147
|
+
- [ ] E2E tests
|
|
148
148
|
- [ ] Performance
|
|
149
|
-
- [ ]
|
|
149
|
+
- [ ] Documentation
|
|
150
150
|
|
|
151
|
-
## 12.
|
|
151
|
+
## 12. Risks and Mitigations
|
|
152
152
|
|
|
153
|
-
|
|
|
153
|
+
| Risk | Impact | Probability | Mitigation |
|
|
154
154
|
|---|---|---|---|
|
|
155
155
|
| | | | |
|
|
156
156
|
|
|
157
|
-
## 13.
|
|
157
|
+
## 13. Success Criteria
|
|
158
158
|
|
|
159
|
-
- [ ]
|
|
160
|
-
- [ ]
|
|
161
|
-
- [ ]
|
|
159
|
+
- [ ] Criterion 1
|
|
160
|
+
- [ ] Criterion 2
|
|
161
|
+
- [ ] Criterion 3
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# Constitution —
|
|
1
|
+
# Constitution — JHipster Monorepo Project
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Principles
|
|
4
4
|
|
|
5
|
-
1. **Spec
|
|
6
|
-
2. **JDL
|
|
7
|
-
3. **
|
|
8
|
-
4. **
|
|
9
|
-
5. **DTO
|
|
5
|
+
1. **Spec first, code later** — Every demand goes through the SDD flow before implementation
|
|
6
|
+
2. **JDL as source of truth** — Entity model defined in JDL, code generated by JHipster
|
|
7
|
+
3. **Enrich, don't replace** — Entities generated by JHipster are enriched with DDD, not rewritten from scratch
|
|
8
|
+
4. **Versioned migrations** — Every schema change via Liquibase changeset, never manual
|
|
9
|
+
5. **DTO at the boundary** — Never expose JPA entities in the REST API
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Development Standards
|
|
12
12
|
|
|
13
13
|
### Java / Spring Boot
|
|
14
|
-
- Java 21+, Records
|
|
15
|
-
- Constructor injection (
|
|
16
|
-
- @Transactional
|
|
17
|
-
-
|
|
18
|
-
- MapStruct
|
|
14
|
+
- Java 21+, Records for DTOs
|
|
15
|
+
- Constructor injection (never @Autowired on fields)
|
|
16
|
+
- @Transactional only on Services
|
|
17
|
+
- Entities with rich behavior (not anemic)
|
|
18
|
+
- MapStruct for Entity <-> DTO conversion
|
|
19
19
|
|
|
20
20
|
### Angular
|
|
21
21
|
- Standalone components (Angular 17+)
|
|
22
|
-
- Lazy loading
|
|
23
|
-
- Reactive Forms
|
|
24
|
-
- Services
|
|
22
|
+
- Lazy loading per route
|
|
23
|
+
- Reactive Forms with validation
|
|
24
|
+
- Services for HTTP calls
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Quality Standards
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
- JUnit 5 + Mockito
|
|
30
|
-
- Jest + Cypress
|
|
31
|
-
- Code review
|
|
32
|
-
- Commits
|
|
28
|
+
- Minimum coverage: 80%
|
|
29
|
+
- JUnit 5 + Mockito for backend
|
|
30
|
+
- Jest + Cypress for frontend
|
|
31
|
+
- Code review mandatory
|
|
32
|
+
- Commits follow Conventional Commits
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Project: JHipster Monorepo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
You are building a monolithic application with JHipster. Backend in Java/Spring Boot, frontend in Angular, PostgreSQL database, all in a single repository.
|
|
4
4
|
|
|
5
5
|
## Specification-Driven Development (SDD)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
**
|
|
9
|
-
|
|
7
|
+
The fundamental SDD rule is defined in the bundle-base (base AGENTS.md) and is non-negotiable:
|
|
8
|
+
**No spec, no code. No exception.** The agent must refuse to implement any demand that
|
|
9
|
+
has not gone through the `/speckit.specify` → `/speckit.plan` → `/speckit.tasks` → `/speckit.implement` flow.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
If the user asks to code something without a spec, STOP and initiate the SDD flow first.
|
|
12
|
+
Check `.specify/specs/` to verify if a spec already exists for the demand.
|
|
13
13
|
|
|
14
14
|
## Product Requirements Document
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The `PRD.md` file at the project root contains the product requirements defined by the analyst/dev. Consult it to understand WHAT to build, the user stories, acceptance criteria, data model, and API specification. This AGENTS.md defines HOW the agent should work; the PRD defines WHAT should be built.
|
|
17
17
|
|
|
18
|
-
- `PRD.md` —
|
|
18
|
+
- `PRD.md` — Product requirements, user stories, API spec, data model
|
|
19
19
|
|
|
20
20
|
## References
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Reference documents that the agent should consult when necessary:
|
|
23
23
|
|
|
24
|
-
- `references/jhipster-jdl-guide.md` —
|
|
25
|
-
- `references/spring-boot-patterns.md` —
|
|
26
|
-
- `references/angular-patterns.md` —
|
|
27
|
-
- `references/liquibase-guide.md` —
|
|
24
|
+
- `references/jhipster-jdl-guide.md` — Complete JDL guide
|
|
25
|
+
- `references/spring-boot-patterns.md` — Spring Boot patterns
|
|
26
|
+
- `references/angular-patterns.md` — Angular patterns in JHipster
|
|
27
|
+
- `references/liquibase-guide.md` — Liquibase migrations guide
|
|
28
28
|
|
|
29
|
-
## Stack
|
|
29
|
+
## Project Stack
|
|
30
30
|
|
|
31
|
-
- **Backend:** Java 21 + Spring Boot 3.x (
|
|
32
|
-
- **Frontend:** Angular 17+
|
|
33
|
-
- **
|
|
34
|
-
- **Cache:** Ehcache
|
|
35
|
-
- **Migrations:** Liquibase (
|
|
36
|
-
- **Auth:** JWT (
|
|
37
|
-
- **
|
|
38
|
-
- **Build:** Maven
|
|
39
|
-
- **API docs:** Swagger/OpenAPI (auto-
|
|
31
|
+
- **Backend:** Java 21 + Spring Boot 3.x (generated by JHipster)
|
|
32
|
+
- **Frontend:** Angular 17+ with TypeScript
|
|
33
|
+
- **Database:** PostgreSQL
|
|
34
|
+
- **Cache:** Ehcache or Redis
|
|
35
|
+
- **Migrations:** Liquibase (JHipster default)
|
|
36
|
+
- **Auth:** JWT (JHipster default) or OAuth2/Keycloak
|
|
37
|
+
- **Tests:** JUnit 5 + Mockito (back), Jest + Cypress (front)
|
|
38
|
+
- **Build:** Maven or Gradle
|
|
39
|
+
- **API docs:** Swagger/OpenAPI (auto-generated)
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## JHipster Monorepo Structure
|
|
42
42
|
|
|
43
43
|
```
|
|
44
44
|
project/
|
|
45
45
|
├── src/
|
|
46
46
|
│ ├── main/
|
|
47
|
-
│ │ ├── java/com/
|
|
48
|
-
│ │ │ ├── domain/ #
|
|
47
|
+
│ │ ├── java/com/company/project/
|
|
48
|
+
│ │ │ ├── domain/ # JPA Entities (enrich with DDD)
|
|
49
49
|
│ │ │ │ ├── Demand.java
|
|
50
50
|
│ │ │ │ ├── Task.java
|
|
51
51
|
│ │ │ │ └── enumeration/
|
|
@@ -81,27 +81,27 @@ project/
|
|
|
81
81
|
└── package.json # Frontend deps
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## Code Standards
|
|
85
85
|
|
|
86
86
|
### Java
|
|
87
|
-
-
|
|
88
|
-
- Records
|
|
89
|
-
- Optional
|
|
90
|
-
- Streams API
|
|
87
|
+
- Maximum 500 lines per class
|
|
88
|
+
- Records for immutable DTOs (Java 21)
|
|
89
|
+
- Optional instead of null returns
|
|
90
|
+
- Streams API for collections (not imperative loops)
|
|
91
91
|
- Google Java Style Guide
|
|
92
|
-
- Lombok
|
|
93
|
-
-
|
|
92
|
+
- Lombok only for: `@Slf4j`, `@RequiredArgsConstructor`. Avoid `@Data`.
|
|
93
|
+
- Never `@Autowired` on fields -- use constructor injection
|
|
94
94
|
|
|
95
95
|
### Angular
|
|
96
|
-
- Strict mode
|
|
96
|
+
- Strict mode enabled
|
|
97
97
|
- Standalone components (Angular 17+)
|
|
98
|
-
- Signals
|
|
99
|
-
- Lazy loading
|
|
100
|
-
- Reactive Forms
|
|
98
|
+
- Signals for reactive state when possible
|
|
99
|
+
- Lazy loading per route/feature
|
|
100
|
+
- Reactive Forms with validation
|
|
101
101
|
|
|
102
|
-
## JDL
|
|
102
|
+
## JDL -- Entity Model
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Use JDL to define entities and generate code:
|
|
105
105
|
|
|
106
106
|
```jdl
|
|
107
107
|
entity Demand {
|
|
@@ -141,19 +141,19 @@ dto * with mapstruct
|
|
|
141
141
|
service * with serviceImpl
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
##
|
|
144
|
+
## Enriching JHipster with DDD
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
JHipster generates anemic entities by default. Enrich them with behavior:
|
|
147
147
|
|
|
148
148
|
```java
|
|
149
|
-
//
|
|
149
|
+
// DON'T -- anemic entity (JHipster default)
|
|
150
150
|
public class Demand {
|
|
151
151
|
private String description;
|
|
152
152
|
private DemandStatus status;
|
|
153
|
-
//
|
|
153
|
+
// only getters/setters
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
//
|
|
156
|
+
// DO -- rich entity
|
|
157
157
|
public class Demand {
|
|
158
158
|
private String description;
|
|
159
159
|
private DemandStatus status;
|
|
@@ -181,9 +181,9 @@ public class Demand {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
## Liquibase
|
|
184
|
+
## Liquibase -- Migrations
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Always generate changesets for schema changes:
|
|
187
187
|
|
|
188
188
|
```xml
|
|
189
189
|
<changeSet id="20260327-1" author="dev">
|
|
@@ -204,27 +204,27 @@ Sempre gerar changeset para mudanças de schema:
|
|
|
204
204
|
</changeSet>
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
##
|
|
207
|
+
## Tests
|
|
208
208
|
|
|
209
|
-
- **JUnit 5:**
|
|
210
|
-
- **MockMvc:**
|
|
211
|
-
- **Testcontainers:**
|
|
212
|
-
- **Jest:**
|
|
209
|
+
- **JUnit 5:** Test services and enriched entities
|
|
210
|
+
- **MockMvc:** Test controllers (status codes, validation)
|
|
211
|
+
- **Testcontainers:** Integration with real PostgreSQL
|
|
212
|
+
- **Jest:** Angular components
|
|
213
213
|
- **Cypress:** E2E flows
|
|
214
|
-
-
|
|
214
|
+
- Minimum coverage: 80%
|
|
215
215
|
|
|
216
216
|
## Git
|
|
217
217
|
|
|
218
|
-
- Commits: `feat(demand):
|
|
219
|
-
- Branches: `feature/<entity>-<
|
|
220
|
-
-
|
|
221
|
-
-
|
|
218
|
+
- Commits: `feat(demand): add automatic decomposition`
|
|
219
|
+
- Branches: `feature/<entity>-<description>`
|
|
220
|
+
- Never alter JHipster-generated files unnecessarily
|
|
221
|
+
- Regenerate with `jhipster import-jdl` when changing the model
|
|
222
222
|
|
|
223
|
-
##
|
|
223
|
+
## What NOT to do
|
|
224
224
|
|
|
225
|
-
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
225
|
+
- Do not manually edit files that JHipster regenerates (generated liquibase, webpack config)
|
|
226
|
+
- Do not put business rules in the REST controller
|
|
227
|
+
- Do not use `@Transactional` everywhere -- only where necessary
|
|
228
|
+
- Do not create generic "God class" services
|
|
229
|
+
- Do not ignore DTOs -- never expose JPA entities in the API
|
|
230
|
+
- Do not use Lombok `@Data` (generates dangerous equals/hashCode with JPA)
|