@entelligentsia/forgecli 0.1.0 → 0.2.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/CHANGELOG.md +52 -0
- package/README.md +50 -38
- package/dist/extensions/forgecli/forge-commands.d.ts +21 -0
- package/dist/extensions/forgecli/forge-commands.js +141 -0
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-init.d.ts +26 -0
- package/dist/extensions/forgecli/forge-init.js +916 -0
- package/dist/extensions/forgecli/forge-init.js.map +1 -0
- package/dist/extensions/forgecli/health-check.d.ts +18 -0
- package/dist/extensions/forgecli/health-check.js +154 -0
- package/dist/extensions/forgecli/health-check.js.map +1 -0
- package/dist/extensions/forgecli/index.js +22 -9
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/init-context.d.ts +99 -0
- package/dist/extensions/forgecli/init-context.js +163 -0
- package/dist/extensions/forgecli/init-context.js.map +1 -0
- package/dist/extensions/forgecli/init-progress.d.ts +39 -0
- package/dist/extensions/forgecli/init-progress.js +117 -0
- package/dist/extensions/forgecli/init-progress.js.map +1 -0
- package/dist/extensions/forgecli/refresh-kb-links.d.ts +18 -0
- package/dist/extensions/forgecli/refresh-kb-links.js +228 -0
- package/dist/extensions/forgecli/refresh-kb-links.js.map +1 -0
- package/dist/forge-payload/.base-pack/commands/approve.md +22 -0
- package/dist/forge-payload/.base-pack/commands/collate.md +22 -0
- package/dist/forge-payload/.base-pack/commands/commit.md +22 -0
- package/dist/forge-payload/.base-pack/commands/enhance.md +37 -0
- package/dist/forge-payload/.base-pack/commands/fix-bug.md +22 -0
- package/dist/forge-payload/.base-pack/commands/implement.md +22 -0
- package/dist/forge-payload/.base-pack/commands/plan.md +22 -0
- package/dist/forge-payload/.base-pack/commands/quiz-agent.md +22 -0
- package/dist/forge-payload/.base-pack/commands/retrospective.md +22 -0
- package/dist/forge-payload/.base-pack/commands/review-code.md +22 -0
- package/dist/forge-payload/.base-pack/commands/review-plan.md +22 -0
- package/dist/forge-payload/.base-pack/commands/run-sprint.md +22 -0
- package/dist/forge-payload/.base-pack/commands/run-task.md +22 -0
- package/dist/forge-payload/.base-pack/commands/sprint-intake.md +22 -0
- package/dist/forge-payload/.base-pack/commands/sprint-plan.md +22 -0
- package/dist/forge-payload/.base-pack/commands/validate.md +22 -0
- package/dist/forge-payload/.claude-plugin/plugin.json +15 -0
- package/dist/forge-payload/.init/discovery/discover-database.md +32 -0
- package/dist/forge-payload/.init/discovery/discover-processes.md +31 -0
- package/dist/forge-payload/.init/discovery/discover-routing.md +31 -0
- package/dist/forge-payload/.init/discovery/discover-stack.md +33 -0
- package/dist/forge-payload/.init/discovery/discover-testing.md +34 -0
- package/dist/forge-payload/.init/generation/generate-kb-doc.md +60 -0
- package/dist/forge-payload/.schemas/bug.schema.json +53 -0
- package/dist/forge-payload/.schemas/collation-state.schema.json +16 -0
- package/dist/forge-payload/.schemas/event-sidecar.schema.json +22 -0
- package/dist/forge-payload/.schemas/event.schema.json +32 -0
- package/dist/forge-payload/.schemas/feature.schema.json +22 -0
- package/dist/forge-payload/.schemas/progress-entry.schema.json +16 -0
- package/dist/forge-payload/.schemas/project-context.schema.json +167 -0
- package/dist/forge-payload/.schemas/project-overlay.schema.json +25 -0
- package/dist/forge-payload/.schemas/sprint.schema.json +27 -0
- package/dist/forge-payload/.schemas/structure-versions.schema.json +57 -0
- package/dist/forge-payload/.schemas/task.schema.json +58 -0
- package/dist/forge-payload/.tools/banners.cjs +435 -0
- package/dist/forge-payload/.tools/build-context-pack.cjs +290 -0
- package/dist/forge-payload/.tools/build-init-context.cjs +322 -0
- package/dist/forge-payload/.tools/build-overlay.cjs +326 -0
- package/dist/forge-payload/.tools/build-persona-pack.cjs +226 -0
- package/dist/forge-payload/.tools/collate.cjs +1041 -0
- package/dist/forge-payload/.tools/generation-manifest.cjs +311 -0
- package/dist/forge-payload/.tools/lib/forge-root.cjs +59 -0
- package/dist/forge-payload/.tools/lib/paths.cjs +29 -0
- package/dist/forge-payload/.tools/lib/pricing.cjs +165 -0
- package/dist/forge-payload/.tools/lib/project-root.cjs +32 -0
- package/dist/forge-payload/.tools/lib/result.js +40 -0
- package/dist/forge-payload/.tools/lib/validate.js +131 -0
- package/dist/forge-payload/.tools/manage-config.cjs +340 -0
- package/dist/forge-payload/.tools/manage-versions.cjs +365 -0
- package/dist/forge-payload/.tools/seed-store.cjs +237 -0
- package/dist/forge-payload/.tools/store-cli.cjs +1123 -0
- package/dist/forge-payload/.tools/store.cjs +315 -0
- package/dist/forge-payload/.tools/substitute-placeholders.cjs +625 -0
- package/dist/forge-payload/.tools/validate-store.cjs +522 -0
- package/package.json +1 -1
- /package/dist/forge-payload/{personas → .base-pack/personas}/architect.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/bug-fixer.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/collator.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/engineer.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/librarian.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/orchestrator.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/product-manager.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/qa-engineer.md +0 -0
- /package/dist/forge-payload/{personas → .base-pack/personas}/supervisor.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/architect-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/bug-fixer-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/collator-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/engineer-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/generic-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/librarian-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/qa-engineer-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/store-custodian-skills.md +0 -0
- /package/dist/forge-payload/{skills → .base-pack/skills}/supervisor-skills.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/CODE_REVIEW_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/COST_REPORT_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/PLAN_REVIEW_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/PLAN_SUMMARY_TEMPLATE.json +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/PLAN_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/PROGRESS_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/RETROSPECTIVE_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/SPRINT_MANIFEST_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/SPRINT_REQUIREMENTS_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{templates → .base-pack/templates}/TASK_PROMPT_TEMPLATE.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/_fragments/context-injection.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/_fragments/event-emission-schema.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/_fragments/finalize.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/_fragments/progress-reporting.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/architect_approve.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/architect_review_sprint_completion.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/architect_sprint_intake.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/architect_sprint_plan.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/collator_agent.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/commit_task.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/fix_bug.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/implement_plan.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/migrate_structural.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/orchestrate_task.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/plan_task.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/quiz_agent.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/review_code.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/review_plan.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/run_sprint.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/sprint_retrospective.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/update_implementation.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/update_plan.md +0 -0
- /package/dist/forge-payload/{workflows → .base-pack/workflows}/validate_task.md +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-task
|
|
3
|
+
description: Orchestrate the full plan→implement→review→approve pipeline for a task
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /{{PREFIX}}:run-task
|
|
7
|
+
|
|
8
|
+
Read the run-task workflow and follow it.
|
|
9
|
+
|
|
10
|
+
## Locate the Forge plugin
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Execute
|
|
17
|
+
|
|
18
|
+
Read `.forge/workflows/orchestrate_task.md` and follow it.
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sprint-intake
|
|
3
|
+
description: Elicit and structure requirements for a new sprint
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /{{PREFIX}}:sprint-intake
|
|
7
|
+
|
|
8
|
+
Read the sprint-intake workflow and follow it.
|
|
9
|
+
|
|
10
|
+
## Locate the Forge plugin
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Execute
|
|
17
|
+
|
|
18
|
+
Read `.forge/workflows/architect_sprint_intake.md` and follow it.
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sprint-plan
|
|
3
|
+
description: Decompose sprint requirements into tasks with dependencies
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /{{PREFIX}}:sprint-plan
|
|
7
|
+
|
|
8
|
+
Read the sprint-plan workflow and follow it.
|
|
9
|
+
|
|
10
|
+
## Locate the Forge plugin
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Execute
|
|
17
|
+
|
|
18
|
+
Read `.forge/workflows/architect_sprint_plan.md` and follow it.
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate
|
|
3
|
+
description: Validate that a task implementation satisfies acceptance criteria
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /{{PREFIX}}:validate
|
|
7
|
+
|
|
8
|
+
Read the validate workflow and follow it.
|
|
9
|
+
|
|
10
|
+
## Locate the Forge plugin
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Execute
|
|
17
|
+
|
|
18
|
+
Read `.forge/workflows/validate_task.md` and follow it.
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "forge",
|
|
3
|
+
"version": "0.40.3",
|
|
4
|
+
"description": "Self-enhancing AI software development lifecycle — generates project-specific SDLC instances from meta-definitions",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Entelligentsia",
|
|
8
|
+
"email": "hello@entelligentsia.in",
|
|
9
|
+
"url": "https://github.com/Entelligentsia"
|
|
10
|
+
},
|
|
11
|
+
"repository": "https://github.com/Entelligentsia/forge",
|
|
12
|
+
"updateUrl": "https://raw.githubusercontent.com/Entelligentsia/forge/release/forge/.claude-plugin/plugin.json",
|
|
13
|
+
"migrationsUrl": "https://raw.githubusercontent.com/Entelligentsia/forge/release/forge/migrations.json",
|
|
14
|
+
"keywords": ["sdlc", "ai-agents", "code-review", "sprint-planning", "meta-generator"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Discovery: Database
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's data model: entities, relationships, field types,
|
|
6
|
+
and migration patterns.
|
|
7
|
+
|
|
8
|
+
## Scan Targets
|
|
9
|
+
|
|
10
|
+
| Pattern | What It Reveals |
|
|
11
|
+
|---------|----------------|
|
|
12
|
+
| Django: `models.py` files | ORM models, fields, relationships |
|
|
13
|
+
| Rails: `app/models/*.rb` | ActiveRecord models |
|
|
14
|
+
| Prisma: `schema.prisma` | Prisma schema |
|
|
15
|
+
| TypeORM: `*.entity.ts` | TypeORM entities |
|
|
16
|
+
| Sequelize: `models/*.js` | Sequelize models |
|
|
17
|
+
| Go: `*_model.go` | Go struct definitions |
|
|
18
|
+
| SQL: `migrations/` / `schema.sql` | Raw schema |
|
|
19
|
+
| MongoDB: Mongoose schemas | Document models |
|
|
20
|
+
|
|
21
|
+
## Tools
|
|
22
|
+
|
|
23
|
+
Use Grep to find model/entity definitions, Read to parse them.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
Structured report:
|
|
28
|
+
- Entity inventory (name, field count, key relationships)
|
|
29
|
+
- Database type (PostgreSQL, MySQL, MongoDB, SQLite, etc.)
|
|
30
|
+
- ORM/query layer in use
|
|
31
|
+
- Migration framework and directory
|
|
32
|
+
- Seed data presence
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Discovery: Processes
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's service topology, build tools, and deployment configuration.
|
|
6
|
+
|
|
7
|
+
## Scan Targets
|
|
8
|
+
|
|
9
|
+
| File | What It Reveals |
|
|
10
|
+
|------|----------------|
|
|
11
|
+
| `docker-compose.yml` | Service topology, dependencies, ports |
|
|
12
|
+
| `Procfile` | Process types (web, worker, etc.) |
|
|
13
|
+
| `ecosystem.config.js` | PM2 process management |
|
|
14
|
+
| `systemd/*.service` | System service definitions |
|
|
15
|
+
| `.github/workflows/*.yml` | CI/CD pipeline |
|
|
16
|
+
| `.gitlab-ci.yml` | CI/CD pipeline |
|
|
17
|
+
| `Jenkinsfile` | CI/CD pipeline |
|
|
18
|
+
| `vercel.json` / `netlify.toml` | Deployment platform |
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
Use Glob to find these files, Read to parse them.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
Structured report:
|
|
27
|
+
- Services and their roles (web, worker, database, cache, etc.)
|
|
28
|
+
- Build command(s)
|
|
29
|
+
- Deploy command(s) or platform
|
|
30
|
+
- CI/CD pipeline structure
|
|
31
|
+
- Environment variables referenced (names only, not values)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Discovery: Routing
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's API surface, authentication strategy, and middleware.
|
|
6
|
+
|
|
7
|
+
## Scan Targets
|
|
8
|
+
|
|
9
|
+
| Pattern | What It Reveals |
|
|
10
|
+
|---------|----------------|
|
|
11
|
+
| Django: `urls.py`, `views.py` | URL patterns, view functions/classes |
|
|
12
|
+
| Express: `router.get/post/...` | Route definitions |
|
|
13
|
+
| Rails: `routes.rb` | Route definitions |
|
|
14
|
+
| FastAPI: `@app.get/post` | Endpoint decorators |
|
|
15
|
+
| Go: `http.HandleFunc` / mux | Route handlers |
|
|
16
|
+
| Auth decorators/middleware | `@login_required`, `authenticate`, `IsAuthenticated` |
|
|
17
|
+
| API docs: `openapi.yaml` / `swagger.json` | API specification |
|
|
18
|
+
|
|
19
|
+
## Tools
|
|
20
|
+
|
|
21
|
+
Use Grep to find route definitions and auth patterns, Read to parse them.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
Structured report:
|
|
26
|
+
- Route count (approximate)
|
|
27
|
+
- Auth strategy (decorator-based, middleware, JWT, session, etc.)
|
|
28
|
+
- Public vs protected route ratio
|
|
29
|
+
- URL namespace structure
|
|
30
|
+
- API versioning (if any)
|
|
31
|
+
- Middleware chain
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Discovery: Stack
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's programming languages, frameworks, versions, and runtime.
|
|
6
|
+
|
|
7
|
+
## Scan Targets
|
|
8
|
+
|
|
9
|
+
| File | What It Reveals |
|
|
10
|
+
|------|----------------|
|
|
11
|
+
| `package.json` | Node.js, npm dependencies, scripts |
|
|
12
|
+
| `requirements.txt` / `Pipfile` / `pyproject.toml` | Python, pip dependencies |
|
|
13
|
+
| `go.mod` | Go, module dependencies |
|
|
14
|
+
| `Cargo.toml` | Rust, crate dependencies |
|
|
15
|
+
| `Gemfile` | Ruby, gem dependencies |
|
|
16
|
+
| `Dockerfile` | Runtime, base image, build steps |
|
|
17
|
+
| `Makefile` | Build commands, task aliases |
|
|
18
|
+
| `*.sln` / `*.csproj` | .NET, C# |
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
Use Glob to find these files, Read to parse them.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
Structured report:
|
|
27
|
+
- Primary language(s)
|
|
28
|
+
- Framework(s) with versions
|
|
29
|
+
- Frontend framework (if any)
|
|
30
|
+
- Database (if detectable from dependencies)
|
|
31
|
+
- Task queue (if any)
|
|
32
|
+
- Containerisation (if any)
|
|
33
|
+
- Runtime version constraints
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Discovery: Testing
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's test framework, test commands, build commands,
|
|
6
|
+
and lint configuration.
|
|
7
|
+
|
|
8
|
+
## Scan Targets
|
|
9
|
+
|
|
10
|
+
| Pattern | What It Reveals |
|
|
11
|
+
|---------|----------------|
|
|
12
|
+
| `test/` / `tests/` / `__tests__/` / `*_test.go` | Test directory structure |
|
|
13
|
+
| `jest.config.*` / `vitest.config.*` | JS test framework config |
|
|
14
|
+
| `pytest.ini` / `setup.cfg` / `pyproject.toml [tool.pytest]` | Python test config |
|
|
15
|
+
| `package.json scripts.test` | Test command |
|
|
16
|
+
| `.eslintrc*` / `ruff.toml` / `.golangci.yml` | Lint configuration |
|
|
17
|
+
| `.github/workflows/*.yml` | CI test/build/lint commands |
|
|
18
|
+
| `coverage/` / `.coveragerc` / `lcov.info` | Coverage configuration |
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
Use Glob to find config files, Read to parse them. Use Bash to verify
|
|
23
|
+
commands work (e.g., `npm test --help` or `pytest --co -q | head`).
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
Structured report:
|
|
28
|
+
- Test framework(s) and version
|
|
29
|
+
- Test command (exact command to run tests)
|
|
30
|
+
- Build command (exact command to build)
|
|
31
|
+
- Lint command (exact command to lint)
|
|
32
|
+
- Syntax check command per language
|
|
33
|
+
- Coverage tooling (if any)
|
|
34
|
+
- Approximate test count
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Knowledge Base Doc Generation — Per-Subagent Instructions
|
|
2
|
+
|
|
3
|
+
You are generating **ONE** knowledge base document. You have been given:
|
|
4
|
+
|
|
5
|
+
1. A **discovery context** — the raw findings from Phase 1 discovery scans,
|
|
6
|
+
passed inline in your prompt
|
|
7
|
+
2. A **doc spec** — which file to write and what it should contain
|
|
8
|
+
3. A **project brief** (`.forge/init-context.md`) — for names and paths
|
|
9
|
+
|
|
10
|
+
Your job is to produce exactly one file and return a one-line status.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
1. **Write EXACTLY ONE file** at the path specified in your doc spec.
|
|
17
|
+
|
|
18
|
+
2. **Confidence header** — every generated doc must open with:
|
|
19
|
+
```
|
|
20
|
+
<!-- AUTO-GENERATED by /forge:init — confidence: N% -->
|
|
21
|
+
```
|
|
22
|
+
Set N% based on how much evidence the discovery context provided:
|
|
23
|
+
- 90–100%: directly observed in code/config
|
|
24
|
+
- 70–89%: inferred from conventions or partial evidence
|
|
25
|
+
- below 70%: limited evidence, many `[?]` markers expected
|
|
26
|
+
|
|
27
|
+
3. **Uncertainty markers** — any fact not directly observed in the discovery
|
|
28
|
+
context must be marked with `[?]`. Do not invent values.
|
|
29
|
+
|
|
30
|
+
4. **Entity names** — use entity names exactly as they appear in the brief's
|
|
31
|
+
`## Domain Entities` section. Do not rename or abbreviate.
|
|
32
|
+
|
|
33
|
+
5. **Scope discipline** — generate only what the doc spec prescribes.
|
|
34
|
+
Do not add sections not listed in the spec. Do not cross-reference
|
|
35
|
+
other KB docs that do not yet exist.
|
|
36
|
+
|
|
37
|
+
6. **`architecture/INDEX.md` and `business-domain/INDEX.md`** — if your
|
|
38
|
+
assigned doc is an INDEX file, link only to docs that exist on disk at
|
|
39
|
+
the time you write. Do not anticipate files that may not have been written.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Self-check (mandatory last step)
|
|
44
|
+
|
|
45
|
+
After writing the file, verify before returning:
|
|
46
|
+
|
|
47
|
+
1. Read back the written file
|
|
48
|
+
2. Confirm the confidence header is present on the first line
|
|
49
|
+
3. Confirm no `{placeholder}` tokens remain
|
|
50
|
+
4. Record in the manifest:
|
|
51
|
+
```sh
|
|
52
|
+
node "$FORGE_ROOT/tools/generation-manifest.cjs" record "{output_path}"
|
|
53
|
+
```
|
|
54
|
+
(If generation-manifest.cjs is not yet installed, skip silently.)
|
|
55
|
+
|
|
56
|
+
5. Return **exactly one line**:
|
|
57
|
+
- `done: <first 80 chars of the written file>` — on success
|
|
58
|
+
- `FAILED: <reason>` — if any step above failed or the file could not be written
|
|
59
|
+
|
|
60
|
+
Do not output anything else after the status line.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/bug.schema.json",
|
|
4
|
+
"title": "Bug",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["bugId", "title", "severity", "status", "path", "reportedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"bugId": { "type": "string" },
|
|
9
|
+
"title": { "type": "string" },
|
|
10
|
+
"description": { "type": "string" },
|
|
11
|
+
"severity": { "type": "string", "enum": ["critical", "major", "minor"] },
|
|
12
|
+
"status": { "type": "string", "enum": ["reported", "triaged", "in-progress", "fixed", "verified"] },
|
|
13
|
+
"path": { "type": "string" },
|
|
14
|
+
"rootCauseCategory": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["validation", "auth", "business-rule", "data-integrity", "race-condition", "integration", "configuration", "regression"]
|
|
17
|
+
},
|
|
18
|
+
"similarBugs": { "type": "array", "items": { "type": "string" } },
|
|
19
|
+
"checklistItemAdded": { "type": "boolean" },
|
|
20
|
+
"businessRuleUpdated": { "type": "boolean" },
|
|
21
|
+
"githubIssue": { "type": "string", "format": "uri" },
|
|
22
|
+
"reportedAt": { "type": "string", "format": "date-time" },
|
|
23
|
+
"resolvedAt": { "type": "string", "format": "date-time" },
|
|
24
|
+
"summaries": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"description": "Terse structured summaries of phase artifacts. Optional; full artifacts on disk remain authoritative.",
|
|
27
|
+
"properties": {
|
|
28
|
+
"plan": { "$ref": "#/$defs/phaseSummary" },
|
|
29
|
+
"review_plan": { "$ref": "#/$defs/phaseSummary" },
|
|
30
|
+
"implementation": { "$ref": "#/$defs/phaseSummary" },
|
|
31
|
+
"code_review": { "$ref": "#/$defs/phaseSummary" },
|
|
32
|
+
"validation": { "$ref": "#/$defs/phaseSummary" }
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"$defs": {
|
|
39
|
+
"phaseSummary": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["objective", "written_at"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"objective": { "type": "string", "maxLength": 280 },
|
|
44
|
+
"key_changes": { "type": "array", "items": { "type": "string", "maxLength": 200 }, "maxItems": 12 },
|
|
45
|
+
"findings": { "type": "array", "items": { "type": "string", "maxLength": 200 }, "maxItems": 12 },
|
|
46
|
+
"verdict": { "type": "string", "enum": ["approved", "revision", "n/a"] },
|
|
47
|
+
"written_at": { "type": "string", "format": "date-time" },
|
|
48
|
+
"artifact_ref":{ "type": "string", "description": "Relative path to the full artifact" }
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/collation-state.schema.json",
|
|
4
|
+
"title": "Collation State",
|
|
5
|
+
"description": "Last-collation watermark written to .forge/store/COLLATION_STATE.json",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["collatedAt", "featureCount", "sprintCount", "taskCount", "bugCount"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"collatedAt": { "type": "string", "format": "date-time" },
|
|
11
|
+
"featureCount": { "type": "integer", "minimum": 0 },
|
|
12
|
+
"sprintCount": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"taskCount": { "type": "integer", "minimum": 0 },
|
|
14
|
+
"bugCount": { "type": "integer", "minimum": 0 }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/event-sidecar.schema.json",
|
|
4
|
+
"title": "Event Sidecar",
|
|
5
|
+
"description": "Subset of event schema — token/cost/duration fields written by agents before canonical merge. All fields other than eventId are optional; presence enforcement happens on the canonical event, not the sidecar.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["eventId"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"inputTokens": { "type": "integer", "minimum": 0 },
|
|
12
|
+
"outputTokens": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"cacheReadTokens": { "type": "integer", "minimum": 0 },
|
|
14
|
+
"cacheWriteTokens": { "type": "integer", "minimum": 0 },
|
|
15
|
+
"estimatedCostUSD": { "type": "number", "minimum": 0 },
|
|
16
|
+
"model": { "type": "string", "maxLength": 120 },
|
|
17
|
+
"durationMinutes": { "type": "number", "minimum": 0 },
|
|
18
|
+
"startTimestamp": { "type": "string", "format": "date-time" },
|
|
19
|
+
"endTimestamp": { "type": "string", "format": "date-time" },
|
|
20
|
+
"tokenSource": { "type": "string", "enum": ["reported", "estimated"] }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/event.schema.json",
|
|
4
|
+
"title": "Event",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"eventId", "taskId", "sprintId", "role", "action",
|
|
8
|
+
"phase", "iteration", "startTimestamp", "endTimestamp", "durationMinutes", "model"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"eventId": { "type": "string" },
|
|
12
|
+
"taskId": { "type": "string" },
|
|
13
|
+
"sprintId": { "type": "string" },
|
|
14
|
+
"role": { "type": "string" },
|
|
15
|
+
"action": { "type": "string" },
|
|
16
|
+
"phase": { "type": "string" },
|
|
17
|
+
"iteration": { "type": "integer", "minimum": 1 },
|
|
18
|
+
"startTimestamp": { "type": "string", "format": "date-time" },
|
|
19
|
+
"endTimestamp": { "type": "string", "format": "date-time" },
|
|
20
|
+
"durationMinutes": { "type": "number", "minimum": 0 },
|
|
21
|
+
"model": { "type": "string" },
|
|
22
|
+
"verdict": { "type": "string" },
|
|
23
|
+
"notes": { "type": "string" },
|
|
24
|
+
"inputTokens": { "type": "integer", "minimum": 0 },
|
|
25
|
+
"outputTokens": { "type": "integer", "minimum": 0 },
|
|
26
|
+
"cacheReadTokens": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"cacheWriteTokens": { "type": "integer", "minimum": 0 },
|
|
28
|
+
"estimatedCostUSD": { "type": "number", "minimum": 0 },
|
|
29
|
+
"tokenSource": { "type": "string", "enum": ["reported", "estimated"] }
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/feature.schema.json",
|
|
4
|
+
"title": "Feature",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "title", "status", "created_at"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"title": { "type": "string" },
|
|
10
|
+
"description": { "type": "string" },
|
|
11
|
+
"status": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["draft", "active", "shipped", "retired"]
|
|
14
|
+
},
|
|
15
|
+
"requirements": { "type": "array", "items": { "type": "string" } },
|
|
16
|
+
"sprints": { "type": "array", "items": { "type": "string" } },
|
|
17
|
+
"tasks": { "type": "array", "items": { "type": "string" } },
|
|
18
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
19
|
+
"updated_at": { "type": "string", "format": "date-time" }
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "forge/progress-entry.schema.json",
|
|
4
|
+
"title": "Progress Entry",
|
|
5
|
+
"description": "One line of progress.log, parsed from pipe-delimited fields: timestamp|agentName|bannerKey|status|detail",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["timestamp", "agentName", "bannerKey", "status"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
11
|
+
"agentName": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$" },
|
|
12
|
+
"bannerKey": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_.:-]{0,127}$" },
|
|
13
|
+
"status": { "type": "string", "enum": ["start", "progress", "done", "error"] },
|
|
14
|
+
"detail": { "type": "string", "maxLength": 500 }
|
|
15
|
+
}
|
|
16
|
+
}
|