@ripla/godd-mcp 0.1.2-beta-20260312091403
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 +412 -0
- package/dist/godd.cjs +465 -0
- package/dist/godd.js +34845 -0
- package/dist/index.js +224 -0
- package/notes-api/.env.example +29 -0
- package/notes-api/README.md +65 -0
- package/notes-api/alembic/README +1 -0
- package/notes-api/alembic/env.py +62 -0
- package/notes-api/alembic/script.py.mako +28 -0
- package/notes-api/alembic/versions/001_initial_notes_tables.py +71 -0
- package/notes-api/alembic.ini +149 -0
- package/notes-api/app/__init__.py +1 -0
- package/notes-api/app/config.py +90 -0
- package/notes-api/app/database.py +31 -0
- package/notes-api/app/main.py +55 -0
- package/notes-api/app/models/__init__.py +17 -0
- package/notes-api/app/models/audit.py +38 -0
- package/notes-api/app/models/base.py +38 -0
- package/notes-api/app/models/session.py +32 -0
- package/notes-api/app/models/setting.py +16 -0
- package/notes-api/app/models/user.py +38 -0
- package/notes-api/app/routers/__init__.py +1 -0
- package/notes-api/app/routers/auth.py +205 -0
- package/notes-api/app/routers/files.py +76 -0
- package/notes-api/app/routers/pr.py +92 -0
- package/notes-api/app/routers/settings.py +44 -0
- package/notes-api/app/routers/tree.py +22 -0
- package/notes-api/app/routers/users.py +145 -0
- package/notes-api/app/schemas/__init__.py +1 -0
- package/notes-api/app/schemas/auth.py +45 -0
- package/notes-api/app/schemas/user.py +41 -0
- package/notes-api/app/security.py +94 -0
- package/notes-api/app/services/__init__.py +1 -0
- package/notes-api/app/services/audit.py +25 -0
- package/notes-api/app/services/business_date.py +38 -0
- package/notes-api/app/services/github.py +140 -0
- package/notes-api/app/services/github_pr.py +120 -0
- package/notes-api/app/services/pr_chain.py +225 -0
- package/notes-api/app/startup.py +66 -0
- package/notes-api/docker/Dockerfile +14 -0
- package/notes-api/docker/Dockerfile.test +14 -0
- package/notes-api/pyproject.toml +53 -0
- package/notes-api/tests/conftest.py +21 -0
- package/notes-api/tests/test_business_date.py +32 -0
- package/notes-api/tests/test_health.py +11 -0
- package/notes-api/uv.lock +1012 -0
- package/notes-app/README.md +30 -0
- package/notes-app/docker/Dockerfile.prod +12 -0
- package/notes-app/docker/Dockerfile.test +12 -0
- package/notes-app/eslint.config.js +23 -0
- package/notes-app/index.html +12 -0
- package/notes-app/nginx.conf +23 -0
- package/notes-app/package.json +37 -0
- package/notes-app/pnpm-lock.yaml +3124 -0
- package/notes-app/src/App.tsx +13 -0
- package/notes-app/src/main.tsx +13 -0
- package/notes-app/src/pages/LoginPage.test.tsx +15 -0
- package/notes-app/src/pages/LoginPage.tsx +10 -0
- package/notes-app/src/pages/MainPage.tsx +14 -0
- package/notes-app/src/styles/globals.css +1 -0
- package/notes-app/src/vite-env.d.ts +1 -0
- package/notes-app/tsconfig.json +24 -0
- package/notes-app/tsconfig.node.json +10 -0
- package/notes-app/vite.config.js +21 -0
- package/notes-app/vite.config.ts +22 -0
- package/notes-app/vitest.config.ts +16 -0
- package/package.json +58 -0
- package/stacks/django-vue.yaml +33 -0
- package/stacks/fastapi-react.yaml +160 -0
- package/stacks/flutter-firebase.yaml +58 -0
- package/stacks/nextjs-prisma.yaml +33 -0
- package/stacks/schema.json +144 -0
- package/templates/agents/architect.hbs +183 -0
- package/templates/agents/auto-documenter.hbs +36 -0
- package/templates/agents/backend-developer.hbs +175 -0
- package/templates/agents/code-reviewer.hbs +29 -0
- package/templates/agents/database-developer.hbs +52 -0
- package/templates/agents/debug-specialist.hbs +39 -0
- package/templates/agents/environment-setup.hbs +41 -0
- package/templates/agents/frontend-developer.hbs +45 -0
- package/templates/agents/integration-qa.hbs +26 -0
- package/templates/agents/performance-qa.hbs +24 -0
- package/templates/agents/pr-writer.hbs +53 -0
- package/templates/agents/quality-lead.hbs +26 -0
- package/templates/agents/requirements-analyst.hbs +26 -0
- package/templates/agents/security-analyst.hbs +21 -0
- package/templates/agents/security-reviewer.hbs +20 -0
- package/templates/agents/ssot-updater.hbs +45 -0
- package/templates/agents/technical-writer.hbs +28 -0
- package/templates/agents/unit-test-engineer.hbs +19 -0
- package/templates/agents/user-clone.hbs +43 -0
- package/templates/github-actions/aws/deploy-notes.yml.hbs +118 -0
- package/templates/github-actions/azure/deploy-notes.yml.hbs +78 -0
- package/templates/github-actions/gcp/deploy-notes.yml.hbs +76 -0
- package/templates/github-actions/vercel-railway/deploy-notes.yml.hbs +49 -0
- package/templates/mindsets/agent-stdio.hbs +51 -0
- package/templates/mindsets/dart.hbs +39 -0
- package/templates/mindsets/ddd-clean-architecture.hbs +52 -0
- package/templates/mindsets/electron.hbs +41 -0
- package/templates/mindsets/fastapi.hbs +40 -0
- package/templates/mindsets/flutter.hbs +56 -0
- package/templates/mindsets/kotlin.hbs +46 -0
- package/templates/mindsets/postgresql.hbs +39 -0
- package/templates/mindsets/python.hbs +39 -0
- package/templates/mindsets/react.hbs +51 -0
- package/templates/mindsets/swift.hbs +46 -0
- package/templates/mindsets/terraform.hbs +53 -0
- package/templates/mindsets/typescript.hbs +34 -0
- package/templates/mindsets/vite.hbs +37 -0
- package/templates/notes-compose.yml +79 -0
- package/templates/partials/cogito-geo.hbs +84 -0
- package/templates/partials/cogito-godd.hbs +22 -0
- package/templates/partials/cogito-grammar.hbs +105 -0
- package/templates/partials/cogito-particle.hbs +76 -0
- package/templates/partials/cogito-root-ai.hbs +79 -0
- package/templates/partials/cogito-root-arch.hbs +75 -0
- package/templates/partials/cogito-root-core.hbs +75 -0
- package/templates/partials/cogito-root-daily.hbs +58 -0
- package/templates/partials/cogito-root-dev.hbs +71 -0
- package/templates/partials/cogito-root-devops.hbs +71 -0
- package/templates/partials/cogito-root-framework.hbs +80 -0
- package/templates/partials/cogito-root-lang.hbs +74 -0
- package/templates/partials/godd-core.hbs +50 -0
- package/templates/partials/project-context.hbs +52 -0
- package/templates/partials/ssot-header.hbs +40 -0
- package/templates/partials/ssot-rules.hbs +30 -0
- package/templates/prompts/adr.hbs +39 -0
- package/templates/prompts/agent-dev-workflow.hbs +34 -0
- package/templates/prompts/analyze-report.hbs +36 -0
- package/templates/prompts/auto-documentation.hbs +37 -0
- package/templates/prompts/check.hbs +52 -0
- package/templates/prompts/commit.hbs +96 -0
- package/templates/prompts/dev.hbs +127 -0
- package/templates/prompts/docs-init.hbs +95 -0
- package/templates/prompts/docs-update.hbs +51 -0
- package/templates/prompts/git-workflow.hbs +125 -0
- package/templates/prompts/impact-analysis.hbs +43 -0
- package/templates/prompts/install.hbs +40 -0
- package/templates/prompts/new-branch.hbs +61 -0
- package/templates/prompts/notes-deploy.hbs +72 -0
- package/templates/prompts/pr-analyze.hbs +44 -0
- package/templates/prompts/pr-create.hbs +125 -0
- package/templates/prompts/push-execute.hbs +83 -0
- package/templates/prompts/push.hbs +24 -0
- package/templates/prompts/release-notes.hbs +38 -0
- package/templates/prompts/requirements-to-business-flow.hbs +29 -0
- package/templates/prompts/requirements-to-tickets.hbs +26 -0
- package/templates/prompts/review.hbs +126 -0
- package/templates/prompts/setup.hbs +247 -0
- package/templates/prompts/spec.hbs +35 -0
- package/templates/prompts/specification-to-tickets.hbs +24 -0
- package/templates/prompts/submit.hbs +143 -0
- package/templates/prompts/sync.hbs +63 -0
- package/templates/prompts/test-plan.hbs +56 -0
- package/templates/terraform/aws/alb.tf.hbs +58 -0
- package/templates/terraform/aws/backend.tf.hbs +10 -0
- package/templates/terraform/aws/cloudfront.tf.hbs +96 -0
- package/templates/terraform/aws/ecr.tf.hbs +30 -0
- package/templates/terraform/aws/ecs.tf.hbs +136 -0
- package/templates/terraform/aws/iam.tf.hbs +88 -0
- package/templates/terraform/aws/local.tf.hbs +34 -0
- package/templates/terraform/aws/output.tf.hbs +49 -0
- package/templates/terraform/aws/provider.tf.hbs +26 -0
- package/templates/terraform/aws/rds.tf.hbs +38 -0
- package/templates/terraform/aws/s3.tf.hbs +34 -0
- package/templates/terraform/aws/secrets.tf.hbs +38 -0
- package/templates/terraform/aws/security_groups.tf.hbs +72 -0
- package/templates/terraform/aws/vpc.tf.hbs +63 -0
- package/templates/terraform/azure/backend.tf.hbs +8 -0
- package/templates/terraform/azure/iam.tf.hbs +36 -0
- package/templates/terraform/azure/main.tf.hbs +199 -0
- package/templates/terraform/azure/output.tf.hbs +19 -0
- package/templates/terraform/azure/provider.tf.hbs +19 -0
- package/templates/terraform/gcp/backend.tf.hbs +6 -0
- package/templates/terraform/gcp/iam.tf.hbs +47 -0
- package/templates/terraform/gcp/main.tf.hbs +171 -0
- package/templates/terraform/gcp/output.tf.hbs +15 -0
- package/templates/terraform/gcp/provider.tf.hbs +19 -0
- package/templates/terraform/vercel-railway/main.tf.hbs +64 -0
- package/templates/terraform/vercel-railway/output.tf.hbs +11 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> godd-core }}
|
|
4
|
+
|
|
5
|
+
{{> ssot-rules }}
|
|
6
|
+
|
|
7
|
+
{{> project-context }}
|
|
8
|
+
|
|
9
|
+
{{> cogito-grammar }}
|
|
10
|
+
{{> cogito-root-core }}
|
|
11
|
+
{{> cogito-particle }}
|
|
12
|
+
{{> cogito-godd }}
|
|
13
|
+
{{> cogito-root-dev }}
|
|
14
|
+
{{> cogito-root-daily }}
|
|
15
|
+
|
|
16
|
+
## Purpose
|
|
17
|
+
**Actually set up** this project's local environment by running commands and creating files. The Agent executes everything — not just a guide.
|
|
18
|
+
|
|
19
|
+
## Critical Prerequisites (MUST)
|
|
20
|
+
- When this tool is called, GoDD MCP Server is already running (= `config.yaml` and `.cursor/mcp.json` are minimally functional)
|
|
21
|
+
- However, the configuration **may be incomplete or templated**. Detect gaps and fill them
|
|
22
|
+
- **Actually execute runnable commands**. Do not just list instructions
|
|
23
|
+
- **Do not overwrite existing files**. Report differences and ask the user for confirmation
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Phase 1: GoDD MCP Config Verification & Generation
|
|
28
|
+
|
|
29
|
+
Check the following files and create/fix if missing or incomplete:
|
|
30
|
+
|
|
31
|
+
### 1-1. `godd-mcp-server/config.yaml`
|
|
32
|
+
```yaml
|
|
33
|
+
# GoDD MCP Server config
|
|
34
|
+
license_key: "<set your license key here>"
|
|
35
|
+
stack_profile: "{{profile_name}}"
|
|
36
|
+
language: "en" # ja | en
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- File does not exist → Create with the above content
|
|
40
|
+
- `license_key` is unset (empty or placeholder) → Ask the user for input
|
|
41
|
+
- `stack_profile` doesn't match current profile (`{{profile_name}}`) → Warn and confirm
|
|
42
|
+
|
|
43
|
+
### 1-2. `.cursor/mcp.json`(project root)
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"mcpServers": {
|
|
47
|
+
"godd": {
|
|
48
|
+
"command": "npx",
|
|
49
|
+
"args": ["tsx", "godd-mcp-server/src/index.ts"],
|
|
50
|
+
"env": {
|
|
51
|
+
"GODD_CONFIG": "./godd-mcp-server/config.yaml",
|
|
52
|
+
"GODD_PROJECT_ROOT": "."
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- `.cursor/` directory does not exist → Create with `mkdir .cursor`
|
|
60
|
+
- `mcp.json` does not exist → Create with the above content
|
|
61
|
+
- Already exists with `godd` key → Compare and report differences (do not overwrite)
|
|
62
|
+
- Already exists without `godd` key → Add `godd` entry (preserve existing entries)
|
|
63
|
+
|
|
64
|
+
### 1-3. GoDD MCP Server dependencies
|
|
65
|
+
```bash
|
|
66
|
+
cd godd-mcp-server && pnpm install
|
|
67
|
+
```
|
|
68
|
+
- `node_modules/` does not exist → Run `pnpm install`
|
|
69
|
+
- Exists → Skip
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Phase 2: Project Environment Setup
|
|
74
|
+
|
|
75
|
+
### 2-1. Environment Variable Files
|
|
76
|
+
{{#if project.env_templates.length}}
|
|
77
|
+
The following templates were detected. Copy to create `.env` if it doesn't exist:
|
|
78
|
+
|
|
79
|
+
{{#each project.env_templates}}
|
|
80
|
+
- `{{this}}`:
|
|
81
|
+
{{/each}}
|
|
82
|
+
|
|
83
|
+
**Specific steps:**
|
|
84
|
+
1. Copy `.env.example` → `.env` (project root)
|
|
85
|
+
2. Copy `env.electron.example` → `frontend/.env.local` (if exists)
|
|
86
|
+
3. After copying, verify defaults work (DB password etc. can use template values for local dev)
|
|
87
|
+
4. If `.env` already exists → Report diff with template and confirm missing keys with user
|
|
88
|
+
{{/if}}
|
|
89
|
+
|
|
90
|
+
### 2-2. Required Tools Verification
|
|
91
|
+
**Actually execute** the following commands to verify each tool is installed:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git --version
|
|
95
|
+
docker --version
|
|
96
|
+
docker compose version
|
|
97
|
+
{{#each project.detected_stacks}}
|
|
98
|
+
{{#if (eq this.id "react")}}node --version # v20+ 必須
|
|
99
|
+
pnpm --version{{/if}}
|
|
100
|
+
{{#if (eq this.id "fastapi")}}python --version # 3.11+ 必須
|
|
101
|
+
uv --version{{/if}}
|
|
102
|
+
{{/each}}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- If a tool is missing, **provide installation instructions** and install after user approval
|
|
106
|
+
- Also warn if versions are insufficient
|
|
107
|
+
|
|
108
|
+
### 2-3. Frontend Dependencies
|
|
109
|
+
{{#if frontend}}
|
|
110
|
+
```bash
|
|
111
|
+
pnpm -C {{frontend.root_dir}} install
|
|
112
|
+
```
|
|
113
|
+
- `{{frontend.root_dir}}/node_modules/` does not exist → Execute
|
|
114
|
+
- Exists → Skip
|
|
115
|
+
{{/if}}
|
|
116
|
+
|
|
117
|
+
### 2-4. Backend Dependencies
|
|
118
|
+
{{#if backend}}
|
|
119
|
+
```bash
|
|
120
|
+
cd {{backend.root_dir}} && uv sync
|
|
121
|
+
```
|
|
122
|
+
- `{{backend.root_dir}}/.venv/` does not exist → Execute
|
|
123
|
+
- Exists → Skip
|
|
124
|
+
{{/if}}
|
|
125
|
+
|
|
126
|
+
### 2-5. Docker Services Startup
|
|
127
|
+
{{#if project.docker_services.length}}
|
|
128
|
+
The following services are defined in `docker-compose.yml`:
|
|
129
|
+
{{#each project.docker_services}}
|
|
130
|
+
- `{{this}}`
|
|
131
|
+
{{/each}}
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
docker compose up -d
|
|
135
|
+
docker compose ps # 全サービスが healthy か確認
|
|
136
|
+
```
|
|
137
|
+
- Already running → Report `docker compose ps` result and skip
|
|
138
|
+
- Not running → Execute `docker compose up -d` and wait for healthcheck
|
|
139
|
+
- Healthcheck fails → Check `docker compose logs <service>` and report error
|
|
140
|
+
{{/if}}
|
|
141
|
+
|
|
142
|
+
### 2-6. DB Migration
|
|
143
|
+
{{#if backend}}
|
|
144
|
+
Once Postgres is healthy, check and run migrations:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
cd {{backend.root_dir}} && uv run alembic upgrade head
|
|
148
|
+
```
|
|
149
|
+
- Skip if no migration files exist
|
|
150
|
+
- Report "Already up to date" if current
|
|
151
|
+
{{/if}}
|
|
152
|
+
|
|
153
|
+
{{#if project.vendor_items.length}}
|
|
154
|
+
### 2-7. Vendor / OSS Subprojects
|
|
155
|
+
The following vendor tools are available. After initializing submodules, run each setup:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
git submodule update --init --recursive
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
{{#each project.vendor_items}}
|
|
162
|
+
- **vendor/{{this.name}}**: `cd vendor/{{this.name}} && {{this.setupHint}}`
|
|
163
|
+
{{/each}}
|
|
164
|
+
- If submodules are empty → Run `git submodule update --init --recursive`
|
|
165
|
+
- If already set up → Skip
|
|
166
|
+
{{/if}}
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Phase 3: Smoke Test
|
|
171
|
+
|
|
172
|
+
After all setup is complete, **actually execute** the following smoke tests:
|
|
173
|
+
|
|
174
|
+
### 3-1. Docker Service Connectivity
|
|
175
|
+
```bash
|
|
176
|
+
docker compose ps
|
|
177
|
+
```
|
|
178
|
+
- All services should be `healthy` or `running`
|
|
179
|
+
|
|
180
|
+
{{#if backend}}
|
|
181
|
+
### 3-2. API Connectivity
|
|
182
|
+
```bash
|
|
183
|
+
curl -s http://localhost:${API_PORT:-8000}/health || echo "API unreachable"
|
|
184
|
+
```
|
|
185
|
+
- 200 OK = success. On failure, investigate with `docker compose logs api`
|
|
186
|
+
{{/if}}
|
|
187
|
+
|
|
188
|
+
{{#if frontend}}
|
|
189
|
+
### 3-3. Frontend Build Check
|
|
190
|
+
```bash
|
|
191
|
+
{{frontend.build_command}}
|
|
192
|
+
```
|
|
193
|
+
- Build success means frontend environment is OK
|
|
194
|
+
{{/if}}
|
|
195
|
+
|
|
196
|
+
{{#if quality_gate}}
|
|
197
|
+
### 3-4. Quality Gate (Optional)
|
|
198
|
+
Optionally run the quality gate to verify overall health:
|
|
199
|
+
{{#if quality_gate.frontend}}
|
|
200
|
+
- Frontend: `{{quality_gate.frontend}}`
|
|
201
|
+
{{/if}}
|
|
202
|
+
{{#if quality_gate.backend}}
|
|
203
|
+
- Backend: `{{quality_gate.backend}}`
|
|
204
|
+
{{/if}}
|
|
205
|
+
{{/if}}
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Execution Scope by Mode
|
|
210
|
+
|
|
211
|
+
| Mode | Phase 1 (GoDD) | Phase 2 (Project) | Phase 3 (Smoke) |
|
|
212
|
+
|---|---|---|---|
|
|
213
|
+
| `full` | ✅ | ✅ | ✅ |
|
|
214
|
+
| `godd-only` | ✅ | ⏭ Skip | ⏭ Skip |
|
|
215
|
+
| `project-only` | ⏭ Skip | ✅ | ✅ |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Notes
|
|
220
|
+
- Do not edit CI/CD configurations (`.github/workflows/`)
|
|
221
|
+
- Do not commit `.env` files (`.gitignore` target)
|
|
222
|
+
- Treat `config.yaml` license key as sensitive information
|
|
223
|
+
- **Tests run inside Docker containers** — quality gate uses `docker compose run --rm --profile test <service>-test`. Host-local test execution is not supported
|
|
224
|
+
|
|
225
|
+
## Required Output on Completion (MUST)
|
|
226
|
+
|
|
227
|
+
After setup completion, **always** report the following to the user:
|
|
228
|
+
|
|
229
|
+
### 1. Setup Result Summary
|
|
230
|
+
```
|
|
231
|
+
✅ Successful:
|
|
232
|
+
- config.yaml created
|
|
233
|
+
- .cursor/mcp.json created
|
|
234
|
+
- ...
|
|
235
|
+
|
|
236
|
+
⚠️ Needs attention:
|
|
237
|
+
- License key is still placeholder
|
|
238
|
+
- ...
|
|
239
|
+
|
|
240
|
+
❌ Failed:
|
|
241
|
+
- Docker startup failed (error: ...)
|
|
242
|
+
- ...
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### 2. Next Steps
|
|
246
|
+
- If GoDD MCP is healthy → Guide with "You can start development with `godd_dev`"
|
|
247
|
+
- If there are issues → Provide specific fix steps
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> godd-core }}
|
|
4
|
+
|
|
5
|
+
{{> ssot-rules }}
|
|
6
|
+
|
|
7
|
+
{{> project-context }}
|
|
8
|
+
|
|
9
|
+
{{> cogito-grammar }}
|
|
10
|
+
{{> cogito-root-core }}
|
|
11
|
+
{{> cogito-particle }}
|
|
12
|
+
{{> cogito-godd }}
|
|
13
|
+
{{> cogito-root-dev }}
|
|
14
|
+
{{> cogito-root-daily }}
|
|
15
|
+
|
|
16
|
+
## Purpose
|
|
17
|
+
Transform requirements into implementation-ready Spec (SSOT) at appropriate granularity.
|
|
18
|
+
The Spec must be complete enough that any developer (human or Agent) can implement without guessing.
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
1. First, list **"missing information (questions)"** (up to 5-10, in priority order) using the Question Template
|
|
22
|
+
2. Next, select the required Spec types and draft based on standard templates:
|
|
23
|
+
- **API Spec**: Endpoints, request/response schemas, error codes, auth requirements
|
|
24
|
+
- **UI Spec**: Screens, components, state management, user flows, accessibility
|
|
25
|
+
- **DB Spec**: Tables, relationships, indexes, migrations, constraints
|
|
26
|
+
- **Feature Spec**: Business rules, acceptance criteria (Given-When-Then), edge cases
|
|
27
|
+
- **Usecase Spec**: Actor, preconditions, main flow, alternative flows, postconditions
|
|
28
|
+
- **Error Codes Spec**: Error taxonomy, user-facing messages, recovery actions
|
|
29
|
+
3. Always fill in **compatibility/migration/rollback** (use placeholders + mark as TBD if unknown)
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
- **Questions** (if any) — using the Question Template format
|
|
33
|
+
- **Spec document** in Markdown, with all sections filled
|
|
34
|
+
- Mark unknown items as **TBD** with a note on what information is needed
|
|
35
|
+
- Include **acceptance criteria** in Given-When-Then format for each feature/behavior
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> cogito-grammar }}
|
|
4
|
+
{{> cogito-root-core }}
|
|
5
|
+
{{> cogito-particle }}
|
|
6
|
+
{{> cogito-godd }}
|
|
7
|
+
{{> cogito-root-daily }}
|
|
8
|
+
|
|
9
|
+
{{> ssot-rules }}
|
|
10
|
+
|
|
11
|
+
{{> project-context }}
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Transform Specs (`documents/spec/`) into an implementable task list.
|
|
15
|
+
|
|
16
|
+
## Input
|
|
17
|
+
- Target Spec (API/UI/DB/Feature/Usecase/Error Codes)
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
- Task list (ordered)
|
|
21
|
+
- Impact layer ({{#if backend}}Backend: {{backend.architecture}}{{#if backend.dependency_direction}} ({{backend.dependency_direction}}){{/if}}{{/if}}{{#if frontend}}, Front: UI/hooks/services{{/if}}, Agent/Infra)
|
|
22
|
+
- Estimated files to add/change
|
|
23
|
+
- Test perspective (unit/integration/e2e)
|
|
24
|
+
- Risks (compatibility/migration/security/performance)
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> cogito-grammar }}
|
|
4
|
+
{{> cogito-root-core }}
|
|
5
|
+
{{> cogito-particle }}
|
|
6
|
+
{{> cogito-godd }}
|
|
7
|
+
{{> cogito-root-dev }}
|
|
8
|
+
|
|
9
|
+
{{> ssot-rules }}
|
|
10
|
+
|
|
11
|
+
{{> project-context }}
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Execute the **complete submission workflow**: pre-submission checks → git push → PR creation, as a single unified command. The developer only needs to invoke this tool — the Agent handles everything.
|
|
15
|
+
|
|
16
|
+
## References (detailed specs for each step)
|
|
17
|
+
- Pre-submission check + Push: `godd_push_execute` tool
|
|
18
|
+
- PR creation: `godd_pr_create` tool
|
|
19
|
+
|
|
20
|
+
## Auto-confirm Mode
|
|
21
|
+
{{#if auto_confirm}}
|
|
22
|
+
**auto_confirm is ENABLED** — All phases run without user confirmation. Check results, push, and PR creation proceed automatically. Results are reported afterward.
|
|
23
|
+
{{else}}
|
|
24
|
+
**auto_confirm is DISABLED (default)** — Each phase pauses for user confirmation when decisions are needed.
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
## Draft Mode
|
|
28
|
+
{{#if draft}}
|
|
29
|
+
**draft is ENABLED** — The PR will be created as a Draft PR.
|
|
30
|
+
{{else}}
|
|
31
|
+
**draft is DISABLED (default)** — The PR will be created as a regular (ready for review) PR.
|
|
32
|
+
{{/if}}
|
|
33
|
+
|
|
34
|
+
## Agent Steps (MUST)
|
|
35
|
+
|
|
36
|
+
### Phase 1: Pre-submission Checks
|
|
37
|
+
|
|
38
|
+
1. Run `git status` to verify:
|
|
39
|
+
- Current branch is NOT the default branch (main/master) — **abort if on default branch**
|
|
40
|
+
- There are commits to push
|
|
41
|
+
- No uncommitted changes remain (warn if any exist)
|
|
42
|
+
2. Run `git log origin/<current-branch>..HEAD --oneline` to list unpushed commits
|
|
43
|
+
- If remote branch does not exist yet, run `git log --oneline -10` instead
|
|
44
|
+
3. Execute pre-submission checks:
|
|
45
|
+
- **Quality gate**: Run project's quality gate commands
|
|
46
|
+
- **Spec reflection**: Check if `documents/spec/` needs updates
|
|
47
|
+
- **Secret check**: Scan for potential secrets in committed content
|
|
48
|
+
- **Breaking changes**: Verify migration docs if breaking changes exist
|
|
49
|
+
4. Present check results
|
|
50
|
+
|
|
51
|
+
{{#if auto_confirm}}
|
|
52
|
+
**Auto-confirm**: If all checks pass, proceed directly to Phase 2. If checks fail, attempt to fix and re-run before aborting.
|
|
53
|
+
{{else}}
|
|
54
|
+
**Pause**: Present results and wait for user confirmation before proceeding
|
|
55
|
+
{{/if}}
|
|
56
|
+
|
|
57
|
+
### Phase 2: Push to Remote
|
|
58
|
+
|
|
59
|
+
1. Determine push command:
|
|
60
|
+
- If remote tracking branch exists: `git push`
|
|
61
|
+
- If no remote tracking branch: `git push -u origin HEAD`
|
|
62
|
+
2. Execute push
|
|
63
|
+
3. Verify push result:
|
|
64
|
+
- `git status` confirms branch is up to date with remote
|
|
65
|
+
- No unpushed commits remain
|
|
66
|
+
|
|
67
|
+
{{#if auto_confirm}}
|
|
68
|
+
**Auto-confirm**: On success, proceed directly to Phase 3. On failure, report error and abort.
|
|
69
|
+
{{else}}
|
|
70
|
+
**Pause**: Report push result. On success, ask if user wants to proceed to PR creation.
|
|
71
|
+
{{/if}}
|
|
72
|
+
|
|
73
|
+
### Phase 3: PR Creation
|
|
74
|
+
|
|
75
|
+
1. Gather information:
|
|
76
|
+
- Current branch name, base branch (user-specified or `main`)
|
|
77
|
+
- `git log origin/<base>..HEAD --oneline` for commit list
|
|
78
|
+
- `git diff origin/<base>...HEAD --stat` for change summary
|
|
79
|
+
2. Generate PR content:
|
|
80
|
+
- **Title**: Use user-provided title, or derive from branch name and changes
|
|
81
|
+
- **Body**: Follow PR template (`documents/templates/pr-template.md`) — fill ALL sections
|
|
82
|
+
3. Present PR title and body for review
|
|
83
|
+
|
|
84
|
+
{{#if auto_confirm}}
|
|
85
|
+
**Auto-confirm**: Skip review and create PR immediately
|
|
86
|
+
{{else}}
|
|
87
|
+
**Pause**: Wait for user review and approval of PR content
|
|
88
|
+
{{/if}}
|
|
89
|
+
|
|
90
|
+
4. Create PR:
|
|
91
|
+
```
|
|
92
|
+
gh pr create --title "<title>" --base <base_branch> --head <current_branch> --body "<body>"{{#if draft}} --draft{{/if}}
|
|
93
|
+
```
|
|
94
|
+
5. Report PR URL and metadata
|
|
95
|
+
|
|
96
|
+
## Flow Overview
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
[Start]
|
|
100
|
+
|
|
|
101
|
+
v
|
|
102
|
+
Phase 1: Pre-submission Checks
|
|
103
|
+
| |- Check failed -> fix and re-run (or abort)
|
|
104
|
+
| '- All checks passed
|
|
105
|
+
v
|
|
106
|
+
Phase 2: Push to Remote
|
|
107
|
+
| |- Push failed -> report error and abort
|
|
108
|
+
| '- Push succeeded
|
|
109
|
+
v
|
|
110
|
+
Phase 3: PR Creation
|
|
111
|
+
| |- Generate PR content from changes
|
|
112
|
+
| |- Present for review (unless auto_confirm)
|
|
113
|
+
| '- Create PR via gh CLI
|
|
114
|
+
v
|
|
115
|
+
[Complete]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Output
|
|
119
|
+
Report results progressively for each phase:
|
|
120
|
+
|
|
121
|
+
### Phase 1 Result
|
|
122
|
+
- Check results: Each item with pass/fail status
|
|
123
|
+
- Commits to push (count and list)
|
|
124
|
+
|
|
125
|
+
### Phase 2 Result
|
|
126
|
+
- Push result: Success (remote URL + branch) or failure reason
|
|
127
|
+
- Post-push state: `git status` summary
|
|
128
|
+
|
|
129
|
+
### Phase 3 Result
|
|
130
|
+
- PR title and body (for user review)
|
|
131
|
+
- PR URL after creation
|
|
132
|
+
- PR metadata: number, state, base/head branches
|
|
133
|
+
|
|
134
|
+
### Final Summary
|
|
135
|
+
```
|
|
136
|
+
[submit complete]
|
|
137
|
+
- Checks: All passed (N items)
|
|
138
|
+
- Push: Pushed N commits to origin/<branch>
|
|
139
|
+
- PR: Created #<number> (<url>)
|
|
140
|
+
- Title: <title>
|
|
141
|
+
- Base: <base> ← Head: <head>
|
|
142
|
+
- State: Open{{#if draft}} (Draft){{/if}}
|
|
143
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> godd-core }}
|
|
4
|
+
|
|
5
|
+
{{> ssot-rules }}
|
|
6
|
+
|
|
7
|
+
{{> project-context }}
|
|
8
|
+
|
|
9
|
+
{{> cogito-grammar }}
|
|
10
|
+
{{> cogito-root-core }}
|
|
11
|
+
{{> cogito-particle }}
|
|
12
|
+
{{> cogito-godd }}
|
|
13
|
+
{{> cogito-root-dev }}
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
Sync the current working branch with the latest changes from the default branch (main). Resolve merge conflicts if they occur — the Agent handles everything up to and including conflict resolution.
|
|
17
|
+
|
|
18
|
+
## Prerequisites
|
|
19
|
+
- Default branch: `main` (`origin/main`)
|
|
20
|
+
- Sync method: **merge** (preserves history so conflict resolution context is visible during review)
|
|
21
|
+
|
|
22
|
+
## Agent Steps (MUST)
|
|
23
|
+
|
|
24
|
+
### Step 1: Pre-check
|
|
25
|
+
1. Run `git status` to check for uncommitted changes
|
|
26
|
+
- **If uncommitted changes exist**: Run `git stash --include-untracked` to stash them (restore in Step 5)
|
|
27
|
+
- **If clean**: Proceed
|
|
28
|
+
2. Record the current branch name via `git branch --show-current`
|
|
29
|
+
|
|
30
|
+
### Step 2: Fetch Remote Latest
|
|
31
|
+
1. Run `git fetch origin main`
|
|
32
|
+
2. Check diff with `git log --oneline HEAD..origin/main`
|
|
33
|
+
- **If no diff**: Report "Already up to date" and exit (restore stash if applicable)
|
|
34
|
+
|
|
35
|
+
### Step 3: Merge
|
|
36
|
+
1. Run `git merge origin/main`
|
|
37
|
+
2. Check result:
|
|
38
|
+
- **Success (Fast-forward / Auto-merge)**: Go to Step 5
|
|
39
|
+
- **Conflict**: Go to Step 4
|
|
40
|
+
|
|
41
|
+
### Step 4: Conflict Resolution (only if conflicts occur)
|
|
42
|
+
1. List conflicted files with `git diff --name-only --diff-filter=U`
|
|
43
|
+
2. Read each conflicted file and identify conflict markers (`<<<<<<<` / `=======` / `>>>>>>>`)
|
|
44
|
+
3. **Resolution policy (priority order)**:
|
|
45
|
+
1. **Keep the SSOT-compliant side**: If one side adheres to SSOT (`documents/spec/`, `.github/agents/user-clone.agent.md`, etc.) and the other diverges, **adopt the compliant side**
|
|
46
|
+
2. **Both SSOT-compliant and integrable**: If both sides comply with SSOT and can be functionally integrated, **integrate both**
|
|
47
|
+
3. **Both compliant but integration difficult / uncertain**: If safe integration is not possible, **ask the user** (never guess)
|
|
48
|
+
4. After resolving all conflicts:
|
|
49
|
+
- `git add <resolved files>` to stage
|
|
50
|
+
- `git commit` to complete the merge commit (use Git's default message)
|
|
51
|
+
5. Report resolution details (which files, what was chosen)
|
|
52
|
+
|
|
53
|
+
### Step 5: Restore Stash (only if stashed)
|
|
54
|
+
1. Run `git stash pop` to restore stashed changes
|
|
55
|
+
2. If stash pop causes conflicts:
|
|
56
|
+
- Resolve using the same policy and report
|
|
57
|
+
|
|
58
|
+
## Output
|
|
59
|
+
- **Sync result**: Success / Conflicts resolved / Already up to date
|
|
60
|
+
- **Commits synced**: Number of commits from `origin/main`
|
|
61
|
+
- **Conflict resolution details** (if applicable): File names and resolution policy applied
|
|
62
|
+
- **Stash restore result** (if applicable): Success / Conflicts
|
|
63
|
+
- **Current branch state**: `git log --oneline -5`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
{{> godd-core }}
|
|
4
|
+
|
|
5
|
+
{{> ssot-rules }}
|
|
6
|
+
|
|
7
|
+
{{> project-context }}
|
|
8
|
+
|
|
9
|
+
{{> cogito-grammar }}
|
|
10
|
+
{{> cogito-root-core }}
|
|
11
|
+
{{> cogito-particle }}
|
|
12
|
+
{{> cogito-godd }}
|
|
13
|
+
{{> cogito-root-dev }}
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
Create a test plan that keeps implementation and verification in sync.
|
|
17
|
+
Follow ATDD principles: define what "done" looks like through tests before implementation.
|
|
18
|
+
|
|
19
|
+
## Input
|
|
20
|
+
- Change details (spec / implementation diff)
|
|
21
|
+
- Likely failure points (boundary values / error cases)
|
|
22
|
+
|
|
23
|
+
## Test Plan Structure
|
|
24
|
+
|
|
25
|
+
### 1. Acceptance Criteria
|
|
26
|
+
Define in **Given-When-Then** format:
|
|
27
|
+
```
|
|
28
|
+
Given [precondition: initial system state]
|
|
29
|
+
When [action/event: user or system behavior]
|
|
30
|
+
Then [expected result: verifiable outcome]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Test Layers
|
|
34
|
+
Indicate which layers are needed with rationale:
|
|
35
|
+
|
|
36
|
+
| Layer | When to Use | Priority |
|
|
37
|
+
|-------|------------|----------|
|
|
38
|
+
| **Unit** | Domain logic, business rules, pure functions | Highest — always write these |
|
|
39
|
+
| **Integration** | API boundaries, DB queries, external service calls | Write for critical boundaries |
|
|
40
|
+
| **E2E** | Login flow, main CRUD operations, critical user journeys | Write for key user flows only |
|
|
41
|
+
|
|
42
|
+
### 3. Test Cases
|
|
43
|
+
For each acceptance criterion:
|
|
44
|
+
- **Happy path**: Normal expected behavior
|
|
45
|
+
- **Error cases**: Invalid input, unauthorized access, resource not found
|
|
46
|
+
- **Boundary values**: Empty, null, max length, zero, negative
|
|
47
|
+
- **Concurrency**: Race conditions, parallel access (if applicable)
|
|
48
|
+
|
|
49
|
+
## Output
|
|
50
|
+
Markdown filling in each section of the test plan:
|
|
51
|
+
- **Scope**: What is being tested and what is excluded
|
|
52
|
+
- **Acceptance criteria**: Given-When-Then for each behavior
|
|
53
|
+
- **Test cases**: Organized by layer (unit / integration / e2e)
|
|
54
|
+
- **Test data**: Required fixtures and setup
|
|
55
|
+
- **Environment**: Required infrastructure (DB, services, etc.)
|
|
56
|
+
- **Execution commands**: Exact commands to run each test suite
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
resource "aws_lb" "api" {
|
|
2
|
+
name = "${local.project}-alb"
|
|
3
|
+
internal = false
|
|
4
|
+
load_balancer_type = "application"
|
|
5
|
+
security_groups = [aws_security_group.alb.id]
|
|
6
|
+
subnets = [aws_subnet.public_1a.id, aws_subnet.public_1c.id]
|
|
7
|
+
tags = local.tags
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
resource "aws_lb_target_group" "api" {
|
|
11
|
+
name = "${local.project}-tg"
|
|
12
|
+
port = local.container_port
|
|
13
|
+
protocol = "HTTP"
|
|
14
|
+
vpc_id = aws_vpc.main.id
|
|
15
|
+
target_type = "ip"
|
|
16
|
+
tags = local.tags
|
|
17
|
+
|
|
18
|
+
health_check {
|
|
19
|
+
path = "/api/health"
|
|
20
|
+
interval = 30
|
|
21
|
+
timeout = 5
|
|
22
|
+
healthy_threshold = 3
|
|
23
|
+
unhealthy_threshold = 3
|
|
24
|
+
matcher = "200"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
resource "aws_lb_listener" "http" {
|
|
29
|
+
load_balancer_arn = aws_lb.api.arn
|
|
30
|
+
port = 80
|
|
31
|
+
protocol = "HTTP"
|
|
32
|
+
|
|
33
|
+
default_action {
|
|
34
|
+
type = "fixed-response"
|
|
35
|
+
fixed_response {
|
|
36
|
+
content_type = "text/plain"
|
|
37
|
+
message_body = "Forbidden"
|
|
38
|
+
status_code = "403"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
resource "aws_lb_listener_rule" "verify_origin" {
|
|
44
|
+
listener_arn = aws_lb_listener.http.arn
|
|
45
|
+
priority = 1
|
|
46
|
+
|
|
47
|
+
condition {
|
|
48
|
+
http_header {
|
|
49
|
+
http_header_name = "X-Origin-Verify"
|
|
50
|
+
values = [random_password.origin_verify.result]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
action {
|
|
55
|
+
type = "forward"
|
|
56
|
+
target_group_arn = aws_lb_target_group.api.arn
|
|
57
|
+
}
|
|
58
|
+
}
|