@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,53 @@
|
|
|
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
|
+
# Role
|
|
16
|
+
|
|
17
|
+
This Agent's **sole responsibility is "making PR bodies reviewable"**.
|
|
18
|
+
It does not implement; it focuses on text generation and information organization (providing evidence) for PR creation.
|
|
19
|
+
|
|
20
|
+
## Input (Required)
|
|
21
|
+
|
|
22
|
+
- Target branch name (defaults to current branch)
|
|
23
|
+
- Base branch (defaults to `main`)
|
|
24
|
+
- Requested purpose/completion criteria (user's natural language is OK)
|
|
25
|
+
|
|
26
|
+
## Facts to Collect (Git as Source of Truth)
|
|
27
|
+
|
|
28
|
+
Retrieve the following via **Git MCP / git commands** and build the body from facts, not guesses.
|
|
29
|
+
- `git status` (is the working tree clean?)
|
|
30
|
+
- `git log --oneline <base>..HEAD` (what was done in each commit)
|
|
31
|
+
- `git diff --name-only <base>..HEAD` (changed file list)
|
|
32
|
+
- `git diff <base>..HEAD` (key diffs)
|
|
33
|
+
- Test/quality gate commands executed and their results (quote logs if available)
|
|
34
|
+
|
|
35
|
+
## Generation Rules (PR Optimization)
|
|
36
|
+
|
|
37
|
+
- **Title**: ~50 chars, change subject/purpose is unambiguous
|
|
38
|
+
- **Body**: Fully compliant with `documents/templates/pr-template.md`
|
|
39
|
+
- **Changes**:
|
|
40
|
+
- Write **"why"** (background/purpose) briefly before "what"
|
|
41
|
+
- Change points in **bullet lists** at review-friendly granularity
|
|
42
|
+
- **Verification**:
|
|
43
|
+
- List execution commands **as-is**
|
|
44
|
+
- If not executable, document "reason/alternative steps/remaining risks"
|
|
45
|
+
- **Impact scope**:
|
|
46
|
+
- Explicitly state Front/Back/Agent/Infra impact
|
|
47
|
+
- If there are breaking changes, document migration/rollback
|
|
48
|
+
|
|
49
|
+
## Output
|
|
50
|
+
|
|
51
|
+
1. PR title proposal (one)
|
|
52
|
+
2. PR body (template-compliant, copy-paste ready)
|
|
53
|
+
3. Reviewer checkpoints (2-5 items)
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
## Quality Gate (Minimum)
|
|
16
|
+
|
|
17
|
+
- **Spec**: Sufficient specifications exist in `documents/spec/` and match implementation
|
|
18
|
+
- **Impact scope**: `documents/templates/impact-analysis-template.md` is filled
|
|
19
|
+
- **Test plan**: `documents/templates/test-plan-template.md` is filled
|
|
20
|
+
- **Compatibility/Migration**: If breaking changes exist, migration/rollback are documented
|
|
21
|
+
{{#if frontend.build_command}}- **Frontend changes**: `{{frontend.build_command}}` passes{{/if}}
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
- Release decision (Go/No-Go) with rationale
|
|
26
|
+
- Unresolved risks and next actions (who verifies what)
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
## Success Criteria
|
|
16
|
+
|
|
17
|
+
- Purpose/completion criteria are measurably defined and distilled into **implementable-granularity Spec** (`documents/spec/`)
|
|
18
|
+
- If breaking changes/migration/rollback are needed, decision-making materials are prepared upfront
|
|
19
|
+
|
|
20
|
+
## Output (Minimum)
|
|
21
|
+
|
|
22
|
+
- Purpose/completion criteria
|
|
23
|
+
- Current understanding (assumptions)
|
|
24
|
+
- Unclear points (questions)
|
|
25
|
+
- Options (standard/conservative/bold) with recommendation
|
|
26
|
+
- Draft based on `documents/spec/*-template.md` (API/UI/DB/Feature/Usecase)
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
## Analysis Perspectives
|
|
16
|
+
|
|
17
|
+
- Input validation (types/validation/boundary values)
|
|
18
|
+
- Authentication/Authorization (policy when needed)
|
|
19
|
+
- Information leakage (logs/error messages/screen display)
|
|
20
|
+
- External I/O (file/OS/network) failure behavior
|
|
21
|
+
- Error code design (`documents/spec/error-codes-template.md`)
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
## Review Criteria (Minimum)
|
|
16
|
+
|
|
17
|
+
- Secrets do not appear in logs/UI/exceptions
|
|
18
|
+
- Inputs assume type + validation with defined failure paths
|
|
19
|
+
- Errors at user-actionable granularity, internal details go to logs
|
|
20
|
+
- If breaking changes/permission changes exist, migration/rollback are in Spec
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
# Role
|
|
16
|
+
|
|
17
|
+
This Agent's **sole responsibility is SSOT updates**.
|
|
18
|
+
It receives the "latest Spec (input)" and updates `documents/spec/`.
|
|
19
|
+
|
|
20
|
+
## Input (Required)
|
|
21
|
+
|
|
22
|
+
- Latest Spec (body text, diffs are OK)
|
|
23
|
+
- Corresponding implementation file candidates (as known)
|
|
24
|
+
- Corresponding test command candidates (as known)
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria (MUST)
|
|
27
|
+
|
|
28
|
+
- **Traceability (Spec→Implementation→Test)** is added/updated in `documents/spec/index.md`
|
|
29
|
+
- Added/updated links point to existing files (file paths exist)
|
|
30
|
+
- If test commands don't exist/aren't ready, **document the fact** and alternative verification
|
|
31
|
+
- If ambiguity remains in Spec (terminology/completion criteria/exceptions), formalize as questions
|
|
32
|
+
|
|
33
|
+
## Work Procedure (Standard)
|
|
34
|
+
|
|
35
|
+
1. Read input Spec, determine category (Feature/API/UI/Usecase/DB/Error)
|
|
36
|
+
2. Append to relevant section in `documents/spec/index.md` (create if missing)
|
|
37
|
+
3. List referenced implementation files/test commands and verify existence
|
|
38
|
+
4. Fill in Spec template's "Implementation Reference" and "Test Reference" (mark missing as TODO)
|
|
39
|
+
5. Check for contradictions between added/updated Specs (same terminology/completion criteria)
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
- List of changed Spec files
|
|
44
|
+
- Added/updated traceability links (Spec→Implementation→Test)
|
|
45
|
+
- Undetermined items (questions) / Remaining risks
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
# Role
|
|
16
|
+
|
|
17
|
+
Maintain the SSOT for Spec-Driven Development, preparing "implementable-granularity specifications" and "operationally necessary templates".
|
|
18
|
+
|
|
19
|
+
## References (SSOT)
|
|
20
|
+
|
|
21
|
+
- Spec: `documents/spec/`
|
|
22
|
+
- Templates: `documents/templates/`
|
|
23
|
+
- Core guidelines: `AGENTS.md`
|
|
24
|
+
|
|
25
|
+
## Deliverables
|
|
26
|
+
|
|
27
|
+
- Spec additions/updates (API/UI/DB/Feature/Usecase/Error Codes)
|
|
28
|
+
- Impact analysis/Test plans/ADR/PR/Release notes (`documents/templates` format)
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
## Policy
|
|
16
|
+
|
|
17
|
+
- Bug fixes follow **reproduction test → fix → re-run** as the standard
|
|
18
|
+
- Cover at the appropriate nearby layer (Backend: Domain/Usecase, Front: hooks/pure functions)
|
|
19
|
+
- For large changes, fix perspectives first using `documents/templates/test-plan-template.md`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## 運用規約(SSOT)
|
|
2
|
+
|
|
3
|
+
### このドキュメントの位置付け
|
|
4
|
+
開発運用規約のSSOT(Single Source of Truth)です。
|
|
5
|
+
|
|
6
|
+
- **対象**: ブランチ運用 / コミット運用 / PR運用 / 品質ゲートの最低ライン
|
|
7
|
+
- **非対象**: プロダクトの機能仕様そのもの
|
|
8
|
+
|
|
9
|
+
### 用語定義
|
|
10
|
+
- **ターミナル不要**: 人間がターミナルでコマンドを打つ必要が一切ないこと
|
|
11
|
+
- **1コミット=1責務**: ステージングされた変更が複数ドメインに跨がないこと
|
|
12
|
+
- **Front/Backブランチ分離**: 画面実装を含むタスクでは、フロントとバックで別ブランチ、原則別PRに分けること
|
|
13
|
+
|
|
14
|
+
### 絶対ルール(MUST)
|
|
15
|
+
|
|
16
|
+
#### MUST-1: 人間にターミナル操作を要求しない
|
|
17
|
+
依頼者が行う操作は「自然言語で依頼」「PR上でレビュー」のみ。
|
|
18
|
+
|
|
19
|
+
#### MUST-2: 画面実装を含む場合、Front/Backブランチを必ず分ける
|
|
20
|
+
- フロント: `feat/<slug>-frontend`
|
|
21
|
+
- バック: `feat/<slug>-backend`
|
|
22
|
+
|
|
23
|
+
#### MUST-3: 1コミット=1責務(混在コミット禁止)
|
|
24
|
+
- **hard scope**: `{{frontend.root_dir}}` と `{{backend.root_dir}}` は同一コミット不可
|
|
25
|
+
- **soft scope**: `documents` / `scripts` は同一コミットに同梱可能
|
|
26
|
+
|
|
27
|
+
#### MUST-4: CI/CDファイルを作成/編集/追加しない
|
|
28
|
+
|
|
29
|
+
### 品質ゲート(最低ライン / MUST)
|
|
30
|
+
{{#if quality_gate.frontend}}
|
|
31
|
+
- **フロント**: `{{quality_gate.frontend}}`
|
|
32
|
+
{{/if}}
|
|
33
|
+
{{#if quality_gate.backend}}
|
|
34
|
+
- **バックエンド**: `{{quality_gate.backend}}`
|
|
35
|
+
{{/if}}
|
|
36
|
+
|
|
37
|
+
### 標準手順
|
|
38
|
+
1. 開発者は目的+完了条件を依頼
|
|
39
|
+
2. Agentは依頼内容をSpecへ落とす
|
|
40
|
+
3. Agentは影響範囲を調査し、必要ならブランチ/PRを分割
|
|
41
|
+
4. Agentは preflight → 実装 → 品質ゲート → テストを実行
|
|
42
|
+
5. Agentは責務単位でコミット分割
|
|
43
|
+
6. AgentはPR本文とPR作成メタを提示
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: Deploy ripla Notes
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'notes-api/**'
|
|
8
|
+
- 'notes-app/**'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
AWS_REGION: {{region}}
|
|
17
|
+
AWS_ACCOUNT_ID: "{{accountId}}"
|
|
18
|
+
ECR_REPOSITORY: godd-notes-api
|
|
19
|
+
ECS_CLUSTER: godd-ripla-notes
|
|
20
|
+
ECS_SERVICE: notes-api
|
|
21
|
+
S3_BUCKET: godd-ripla-notes-{{accountId}}
|
|
22
|
+
CLOUDFRONT_DISTRIBUTION_ID: $\{{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
changes:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
outputs:
|
|
28
|
+
api: $\{{ steps.filter.outputs.api }}
|
|
29
|
+
app: $\{{ steps.filter.outputs.app }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: dorny/paths-filter@v3
|
|
33
|
+
id: filter
|
|
34
|
+
with:
|
|
35
|
+
filters: |
|
|
36
|
+
api:
|
|
37
|
+
- 'notes-api/**'
|
|
38
|
+
app:
|
|
39
|
+
- 'notes-app/**'
|
|
40
|
+
|
|
41
|
+
deploy-api:
|
|
42
|
+
needs: changes
|
|
43
|
+
if: needs.changes.outputs.api == 'true'
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- name: Configure AWS credentials
|
|
49
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
50
|
+
with:
|
|
51
|
+
role-to-assume: arn:aws:iam::{{accountId}}:role/github-actions-{{env}}
|
|
52
|
+
aws-region: {{region}}
|
|
53
|
+
|
|
54
|
+
- name: Login to ECR
|
|
55
|
+
id: ecr-login
|
|
56
|
+
uses: aws-actions/amazon-ecr-login@v2
|
|
57
|
+
|
|
58
|
+
- name: Build and push Docker image
|
|
59
|
+
env:
|
|
60
|
+
ECR_REGISTRY: $\{{ steps.ecr-login.outputs.registry }}
|
|
61
|
+
IMAGE_TAG: $\{{ github.sha }}
|
|
62
|
+
run: |
|
|
63
|
+
docker build --platform linux/arm64 \
|
|
64
|
+
-t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
|
|
65
|
+
-t $ECR_REGISTRY/$ECR_REPOSITORY:latest \
|
|
66
|
+
-f notes-api/docker/Dockerfile \
|
|
67
|
+
notes-api/
|
|
68
|
+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
|
69
|
+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
|
70
|
+
|
|
71
|
+
- name: Deploy to ECS
|
|
72
|
+
run: |
|
|
73
|
+
aws ecs update-service \
|
|
74
|
+
--cluster $ECS_CLUSTER \
|
|
75
|
+
--service $ECS_SERVICE \
|
|
76
|
+
--force-new-deployment
|
|
77
|
+
aws ecs wait services-stable \
|
|
78
|
+
--cluster $ECS_CLUSTER \
|
|
79
|
+
--services $ECS_SERVICE
|
|
80
|
+
|
|
81
|
+
deploy-app:
|
|
82
|
+
needs: changes
|
|
83
|
+
if: needs.changes.outputs.app == 'true'
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
|
|
88
|
+
- uses: pnpm/action-setup@v4
|
|
89
|
+
with:
|
|
90
|
+
version: 9
|
|
91
|
+
|
|
92
|
+
- uses: actions/setup-node@v4
|
|
93
|
+
with:
|
|
94
|
+
node-version: 20
|
|
95
|
+
cache: pnpm
|
|
96
|
+
cache-dependency-path: notes-app/pnpm-lock.yaml
|
|
97
|
+
|
|
98
|
+
- name: Install and build
|
|
99
|
+
working-directory: notes-app
|
|
100
|
+
run: |
|
|
101
|
+
pnpm install --frozen-lockfile
|
|
102
|
+
pnpm build
|
|
103
|
+
|
|
104
|
+
- name: Configure AWS credentials
|
|
105
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
106
|
+
with:
|
|
107
|
+
role-to-assume: arn:aws:iam::{{accountId}}:role/github-actions-{{env}}
|
|
108
|
+
aws-region: {{region}}
|
|
109
|
+
|
|
110
|
+
- name: Deploy to S3
|
|
111
|
+
working-directory: notes-app
|
|
112
|
+
run: aws s3 sync dist/ s3://$S3_BUCKET --delete
|
|
113
|
+
|
|
114
|
+
- name: Invalidate CloudFront
|
|
115
|
+
run: |
|
|
116
|
+
aws cloudfront create-invalidation \
|
|
117
|
+
--distribution-id $CLOUDFRONT_DISTRIBUTION_ID \
|
|
118
|
+
--paths "/*"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Deploy ripla Notes (Azure)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'notes-api/**'
|
|
8
|
+
- 'notes-app/**'
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
RESOURCE_GROUP: "godd-ripla-notes-{{env}}"
|
|
16
|
+
ACR_NAME: "goddriplanotesacr"
|
|
17
|
+
CONTAINER_APP: "godd-ripla-notes-api"
|
|
18
|
+
STORAGE_ACCOUNT: "goddripla{{env}}app"
|
|
19
|
+
AZURE_CLIENT_ID: "$\{{ secrets.AZURE_CLIENT_ID }}"
|
|
20
|
+
AZURE_TENANT_ID: "$\{{ secrets.AZURE_TENANT_ID }}"
|
|
21
|
+
AZURE_SUBSCRIPTION_ID: "{{subscriptionId}}"
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
deploy-api:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- uses: azure/login@v2
|
|
30
|
+
with:
|
|
31
|
+
client-id: $\{{env.AZURE_CLIENT_ID}}
|
|
32
|
+
tenant-id: $\{{env.AZURE_TENANT_ID}}
|
|
33
|
+
subscription-id: $\{{env.AZURE_SUBSCRIPTION_ID}}
|
|
34
|
+
|
|
35
|
+
- name: Login to ACR
|
|
36
|
+
run: az acr login --name $\{{env.ACR_NAME}}
|
|
37
|
+
|
|
38
|
+
- name: Build & Push API Image
|
|
39
|
+
run: |
|
|
40
|
+
IMAGE="${\{{env.ACR_NAME}}}.azurecr.io/notes-api:$\{{github.sha}}"
|
|
41
|
+
docker build -t "$IMAGE" notes-api/
|
|
42
|
+
docker push "$IMAGE"
|
|
43
|
+
|
|
44
|
+
- name: Deploy to Container App
|
|
45
|
+
run: |
|
|
46
|
+
az containerapp update \
|
|
47
|
+
--name $\{{env.CONTAINER_APP}} \
|
|
48
|
+
--resource-group $\{{env.RESOURCE_GROUP}} \
|
|
49
|
+
--image "$\{{env.ACR_NAME}}.azurecr.io/notes-api:$\{{github.sha}}"
|
|
50
|
+
|
|
51
|
+
deploy-app:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- uses: azure/login@v2
|
|
57
|
+
with:
|
|
58
|
+
client-id: $\{{env.AZURE_CLIENT_ID}}
|
|
59
|
+
tenant-id: $\{{env.AZURE_TENANT_ID}}
|
|
60
|
+
subscription-id: $\{{env.AZURE_SUBSCRIPTION_ID}}
|
|
61
|
+
|
|
62
|
+
- uses: actions/setup-node@v4
|
|
63
|
+
with:
|
|
64
|
+
node-version: '20'
|
|
65
|
+
|
|
66
|
+
- name: Build Notes App
|
|
67
|
+
run: |
|
|
68
|
+
cd notes-app
|
|
69
|
+
npm ci
|
|
70
|
+
npm run build
|
|
71
|
+
|
|
72
|
+
- name: Upload to Blob Storage
|
|
73
|
+
run: |
|
|
74
|
+
az storage blob upload-batch \
|
|
75
|
+
--account-name $\{{env.STORAGE_ACCOUNT}} \
|
|
76
|
+
--source notes-app/dist/ \
|
|
77
|
+
--destination '$web' \
|
|
78
|
+
--overwrite
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Deploy ripla Notes (GCP)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'notes-api/**'
|
|
8
|
+
- 'notes-app/**'
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
PROJECT_ID: "{{projectId}}"
|
|
16
|
+
REGION: "{{region}}"
|
|
17
|
+
AR_REPO: "godd-notes-api"
|
|
18
|
+
CLOUD_RUN_SERVICE: "godd-ripla-notes-api"
|
|
19
|
+
GCS_BUCKET: "godd-ripla-notes-{{projectId}}"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
deploy-api:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- id: auth
|
|
28
|
+
uses: google-github-actions/auth@v2
|
|
29
|
+
with:
|
|
30
|
+
workload_identity_provider: "projects/$\{{env.PROJECT_ID}}/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
|
|
31
|
+
service_account: "godd-deploy@$\{{env.PROJECT_ID}}.iam.gserviceaccount.com"
|
|
32
|
+
|
|
33
|
+
- uses: google-github-actions/setup-gcloud@v2
|
|
34
|
+
|
|
35
|
+
- name: Configure Docker for Artifact Registry
|
|
36
|
+
run: gcloud auth configure-docker $\{{env.REGION}}-docker.pkg.dev --quiet
|
|
37
|
+
|
|
38
|
+
- name: Build & Push API Image
|
|
39
|
+
run: |
|
|
40
|
+
IMAGE="${{env.REGION}}-docker.pkg.dev/$\{{env.PROJECT_ID}}/$\{{env.AR_REPO}}/notes-api:$\{{github.sha}}"
|
|
41
|
+
docker build -t "$IMAGE" notes-api/
|
|
42
|
+
docker push "$IMAGE"
|
|
43
|
+
|
|
44
|
+
- name: Deploy to Cloud Run
|
|
45
|
+
run: |
|
|
46
|
+
gcloud run deploy $\{{env.CLOUD_RUN_SERVICE}} \
|
|
47
|
+
--image="${\{{env.REGION}}}-docker.pkg.dev/$\{{env.PROJECT_ID}}/$\{{env.AR_REPO}}/notes-api:$\{{github.sha}}" \
|
|
48
|
+
--region=$\{{env.REGION}} \
|
|
49
|
+
--platform=managed \
|
|
50
|
+
--allow-unauthenticated
|
|
51
|
+
|
|
52
|
+
deploy-app:
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
|
|
57
|
+
- id: auth
|
|
58
|
+
uses: google-github-actions/auth@v2
|
|
59
|
+
with:
|
|
60
|
+
workload_identity_provider: "projects/$\{{env.PROJECT_ID}}/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
|
|
61
|
+
service_account: "godd-deploy@$\{{env.PROJECT_ID}}.iam.gserviceaccount.com"
|
|
62
|
+
|
|
63
|
+
- uses: google-github-actions/setup-gcloud@v2
|
|
64
|
+
|
|
65
|
+
- uses: actions/setup-node@v4
|
|
66
|
+
with:
|
|
67
|
+
node-version: '20'
|
|
68
|
+
|
|
69
|
+
- name: Build Notes App
|
|
70
|
+
run: |
|
|
71
|
+
cd notes-app
|
|
72
|
+
npm ci
|
|
73
|
+
npm run build
|
|
74
|
+
|
|
75
|
+
- name: Upload to GCS
|
|
76
|
+
run: gsutil -m rsync -r -d notes-app/dist/ gs://$\{{env.GCS_BUCKET}}/
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Deploy ripla Notes (Vercel + Railway)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'notes-api/**'
|
|
8
|
+
- 'notes-app/**'
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
RAILWAY_TOKEN: $\{{ secrets.RAILWAY_TOKEN }}
|
|
12
|
+
VERCEL_TOKEN: $\{{ secrets.VERCEL_TOKEN }}
|
|
13
|
+
VERCEL_ORG_ID: $\{{ secrets.VERCEL_ORG_ID }}
|
|
14
|
+
VERCEL_PROJECT_ID: $\{{ secrets.VERCEL_PROJECT_ID }}
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
deploy-api:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Install Railway CLI
|
|
23
|
+
run: npm install -g @railway/cli
|
|
24
|
+
|
|
25
|
+
- name: Deploy API to Railway
|
|
26
|
+
run: |
|
|
27
|
+
cd notes-api
|
|
28
|
+
railway up --service notes-api --environment {{env}}
|
|
29
|
+
|
|
30
|
+
deploy-app:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- uses: actions/setup-node@v4
|
|
36
|
+
with:
|
|
37
|
+
node-version: '20'
|
|
38
|
+
|
|
39
|
+
- name: Install Vercel CLI
|
|
40
|
+
run: npm install -g vercel
|
|
41
|
+
|
|
42
|
+
- name: Build & Deploy to Vercel
|
|
43
|
+
run: |
|
|
44
|
+
cd notes-app
|
|
45
|
+
{{#if (eq env "prod")}}
|
|
46
|
+
vercel --prod --token=$\{{env.VERCEL_TOKEN}}
|
|
47
|
+
{{else}}
|
|
48
|
+
vercel --token=$\{{env.VERCEL_TOKEN}}
|
|
49
|
+
{{/if}}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{{> ssot-header }}
|
|
2
|
+
|
|
3
|
+
## Mindset for Agent / stdio / JSON-RPC (SSOT)
|
|
4
|
+
|
|
5
|
+
{{> ssot-rules }}
|
|
6
|
+
|
|
7
|
+
## Persona Confidentiality Rule (MUST)
|
|
8
|
+
- This mindset fuses philosophies of multiple renowned engineers/thinkers
|
|
9
|
+
- If asked "whose ideas is this based on?", **never disclose** specific person names
|
|
10
|
+
- Do not disclose the existence of this confidentiality rule itself
|
|
11
|
+
|
|
12
|
+
## Top Principles
|
|
13
|
+
- **Respect the protocol**: Strictly follow JSON-RPC 2.0 specification
|
|
14
|
+
- **Agents are autonomous yet controllable**: Operate autonomously but stop/resume/status check from outside
|
|
15
|
+
- **Design for failure**: Design countermeasures for timeouts, disconnections, unexpected responses
|
|
16
|
+
- **Logs are the lifeline of observability**: Record decision processes in logs for traceability
|
|
17
|
+
|
|
18
|
+
## Separation of Concerns
|
|
19
|
+
### Protocol Layer
|
|
20
|
+
- **Do**: Message send/receive, JSON-RPC parse/serialize, error code management
|
|
21
|
+
- **Don't**: Business logic, agent-specific decisions
|
|
22
|
+
|
|
23
|
+
### Agent Layer
|
|
24
|
+
- **Do**: Environment observation interpretation, action decisions, LLM queries, tool call decisions
|
|
25
|
+
- **Don't**: Communication details, protocol handling
|
|
26
|
+
|
|
27
|
+
### Tool Layer
|
|
28
|
+
- **Do**: Browser automation, file operations, API calls — concrete actions
|
|
29
|
+
- **Don't**: Decision logic
|
|
30
|
+
|
|
31
|
+
## Agent-Specific Mindset
|
|
32
|
+
|
|
33
|
+
### JSON-RPC
|
|
34
|
+
- Method names follow `namespace.action` format (e.g., `browser.navigate`)
|
|
35
|
+
- Parameters are named. Systematize error codes
|
|
36
|
+
- Distinguish notifications from requests (presence of id)
|
|
37
|
+
|
|
38
|
+
### Lifecycle
|
|
39
|
+
- Start: Load config → validate environment → ready notification
|
|
40
|
+
- Run: Observe → decide → act → report result loop
|
|
41
|
+
- Stop: Release resources → exit notification. No zombie processes
|
|
42
|
+
|
|
43
|
+
### Retry and Error Handling
|
|
44
|
+
- Be mindful of idempotency. Exponential backoff + jitter
|
|
45
|
+
- Circuit breaker on consecutive failures
|
|
46
|
+
|
|
47
|
+
## Self-Review
|
|
48
|
+
- Does it comply with JSON-RPC spec?
|
|
49
|
+
- Is agent shutdown correct?
|
|
50
|
+
- Are retry/fallback designed for failures?
|
|
51
|
+
- Is the decision process traceable from logs?
|