@jamie-tam/forge 6.0.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/LICENSE +21 -0
- package/README.md +389 -0
- package/agents/architect.md +92 -0
- package/agents/builder.md +122 -0
- package/agents/code-reviewer.md +107 -0
- package/agents/concept-designer.md +207 -0
- package/agents/craft-reviewer.md +132 -0
- package/agents/critic.md +130 -0
- package/agents/doc-writer.md +85 -0
- package/agents/dreamer.md +129 -0
- package/agents/e2e-runner.md +89 -0
- package/agents/gotcha-hunter.md +127 -0
- package/agents/prototype-builder.md +193 -0
- package/agents/prototype-codifier.md +204 -0
- package/agents/prototype-reviewer.md +163 -0
- package/agents/security-reviewer.md +108 -0
- package/agents/spec-reviewer.md +94 -0
- package/agents/tracer.md +98 -0
- package/agents/wireframer.md +109 -0
- package/commands/abort.md +25 -0
- package/commands/bugfix.md +151 -0
- package/commands/evolve.md +118 -0
- package/commands/feature.md +236 -0
- package/commands/forge.md +100 -0
- package/commands/greenfield.md +185 -0
- package/commands/hotfix.md +98 -0
- package/commands/refactor.md +147 -0
- package/commands/resume.md +25 -0
- package/commands/setup.md +201 -0
- package/commands/status.md +27 -0
- package/commands/task-force.md +110 -0
- package/commands/validate.md +12 -0
- package/dist/__tests__/active-manifest.test.js +272 -0
- package/dist/__tests__/copy.test.js +96 -0
- package/dist/__tests__/gate-check.test.js +384 -0
- package/dist/__tests__/wiki.test.js +472 -0
- package/dist/__tests__/work-manifest.test.js +304 -0
- package/dist/active-manifest.js +229 -0
- package/dist/cli.js +158 -0
- package/dist/copy.js +124 -0
- package/dist/gate-check.js +326 -0
- package/dist/hooks.js +60 -0
- package/dist/init.js +140 -0
- package/dist/manifest.js +90 -0
- package/dist/merge.js +77 -0
- package/dist/paths.js +36 -0
- package/dist/uninstall.js +216 -0
- package/dist/update.js +158 -0
- package/dist/verify-manifest.js +65 -0
- package/dist/verify.js +98 -0
- package/dist/wiki-ui.js +310 -0
- package/dist/wiki.js +364 -0
- package/dist/work-manifest.js +798 -0
- package/hooks/config/gate-requirements.json +79 -0
- package/hooks/hooks.json +143 -0
- package/hooks/scripts/analyze-telemetry.sh +114 -0
- package/hooks/scripts/gate-enforcer.sh +164 -0
- package/hooks/scripts/pre-compact.sh +90 -0
- package/hooks/scripts/session-start.sh +81 -0
- package/hooks/scripts/telemetry.sh +41 -0
- package/hooks/scripts/wiki-lint.sh +87 -0
- package/hooks/templates/AGENTS.md.template +48 -0
- package/hooks/templates/CLAUDE.md.template +45 -0
- package/package.json +55 -0
- package/protocols/README.md +40 -0
- package/protocols/codex.md +151 -0
- package/protocols/graphify.md +156 -0
- package/references/common/agent-coordination.md +65 -0
- package/references/common/coding-standards.md +54 -0
- package/references/common/feature-tracking.md +21 -0
- package/references/common/io-protocol.md +36 -0
- package/references/common/phases.md +57 -0
- package/references/common/quality-gates.md +130 -0
- package/references/common/skill-authoring.md +154 -0
- package/references/common/skill-compliance.md +30 -0
- package/references/python/standards.md +44 -0
- package/references/react/standards.md +61 -0
- package/references/typescript/standards.md +42 -0
- package/rules/common/forge-system.md +59 -0
- package/rules/common/git-workflow.md +40 -0
- package/rules/common/guardrails.md +37 -0
- package/rules/common/quality-gates.md +18 -0
- package/rules/common/security.md +50 -0
- package/rules/common/skill-selection.md +78 -0
- package/rules/common/testing.md +58 -0
- package/rules/common/verification.md +39 -0
- package/skills/build-pr-workflow/SKILL.md +301 -0
- package/skills/build-pr-workflow/references/pr-template.md +62 -0
- package/skills/build-pr-workflow/references/subagent-merge.md +47 -0
- package/skills/build-pr-workflow/references/worktree-setup.md +125 -0
- package/skills/build-prototype/SKILL.md +264 -0
- package/skills/build-scaffold/SKILL.md +340 -0
- package/skills/build-tdd/SKILL.md +89 -0
- package/skills/build-wireframe/SKILL.md +110 -0
- package/skills/build-wireframe/assets/baseline-template.html +486 -0
- package/skills/build-wireframe/references/demo-walkthroughs.md +170 -0
- package/skills/build-wireframe/references/gotchas.md +188 -0
- package/skills/build-wireframe/references/legend-lines.md +141 -0
- package/skills/concept-slides/SKILL.md +192 -0
- package/skills/deliver-db-migration/SKILL.md +466 -0
- package/skills/deliver-deploy/SKILL.md +407 -0
- package/skills/deliver-onboarding/SKILL.md +198 -0
- package/skills/deliver-onboarding/references/document-templates.md +393 -0
- package/skills/deliver-onboarding/templates/getting-started.md +122 -0
- package/skills/discover-codebase-analysis/SKILL.md +448 -0
- package/skills/discover-requirements/SKILL.md +418 -0
- package/skills/discover-requirements/templates/prd.md +99 -0
- package/skills/discover-requirements/templates/technical-spec.md +123 -0
- package/skills/discover-requirements/templates/user-stories.md +76 -0
- package/skills/harden/SKILL.md +214 -0
- package/skills/iterate-prototype/SKILL.md +241 -0
- package/skills/plan-architecture/SKILL.md +457 -0
- package/skills/plan-architecture/templates/adr-template.md +52 -0
- package/skills/plan-architecture/templates/api-contract.md +99 -0
- package/skills/plan-architecture/templates/db-schema.md +81 -0
- package/skills/plan-architecture/templates/system-design.md +111 -0
- package/skills/plan-brainstorm/SKILL.md +433 -0
- package/skills/plan-design-system/SKILL.md +279 -0
- package/skills/plan-task-decompose/SKILL.md +454 -0
- package/skills/quality-code-review/SKILL.md +286 -0
- package/skills/quality-security-audit/SKILL.md +292 -0
- package/skills/quality-security-audit/references/audit-report-template.md +89 -0
- package/skills/quality-security-audit/references/owasp-checks.md +178 -0
- package/skills/quality-test-execution/SKILL.md +435 -0
- package/skills/quality-test-plan/SKILL.md +297 -0
- package/skills/quality-test-plan/references/test-type-guide.md +263 -0
- package/skills/quality-test-plan/templates/e2e-test-plan.md +72 -0
- package/skills/quality-test-plan/templates/integration-test-plan.md +74 -0
- package/skills/quality-test-plan/templates/load-test-plan.md +111 -0
- package/skills/quality-test-plan/templates/smoke-test-plan.md +68 -0
- package/skills/quality-test-plan/templates/unit-test-plan.md +56 -0
- package/skills/quality-uiux/SKILL.md +481 -0
- package/skills/support-debug/SKILL.md +464 -0
- package/skills/support-dream/SKILL.md +213 -0
- package/skills/support-gotcha/SKILL.md +249 -0
- package/skills/support-runtime-reachability/SKILL.md +190 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/app.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/app.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/components/RingingBanner.tsx +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/hooks/useTwilio.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/components/MyComp.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/App.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/components/Orphan.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/lib/Service.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/lib/Lonely.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/index.ts +1 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/internal.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.test.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-13-gated-pending-annotation/src/future.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-14-untraceable-annotation/src/decorated.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-15-untraceable-empty/src/lazy.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/lib.py +15 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/main.py +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/parent.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/routes/cases.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/lib/foo.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/other.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/cases.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/users.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/handlers/cases.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/main.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/main.ts +7 -0
- package/skills/support-runtime-reachability/scripts/check.mjs +638 -0
- package/skills/support-runtime-reachability/scripts/check.test.mjs +244 -0
- package/skills/support-skill-validator/SKILL.md +194 -0
- package/skills/support-skill-validator/references/false-positives.md +59 -0
- package/skills/support-skill-validator/references/validation-checks.md +280 -0
- package/skills/support-system-guide/SKILL.md +311 -0
- package/skills/support-task-force/SKILL.md +265 -0
- package/skills/support-task-force/references/dispatch-pattern.md +178 -0
- package/skills/support-task-force/references/synthesis-template.md +126 -0
- package/skills/support-wiki-bootstrap/SKILL.md +37 -0
- package/skills/support-wiki-lint/SKILL.md +196 -0
- package/skills/support-wiki-lint/scripts/lint.mjs +488 -0
- package/skills/support-wiki-lint/scripts/lint.test.mjs +196 -0
- package/templates/README.md +23 -0
- package/templates/aiwiki/CLAUDE.md.template +78 -0
- package/templates/aiwiki/schemas/architecture.md +118 -0
- package/templates/aiwiki/schemas/convention.md +112 -0
- package/templates/aiwiki/schemas/decision.md +144 -0
- package/templates/aiwiki/schemas/gotcha.md +118 -0
- package/templates/aiwiki/schemas/oracle.md +105 -0
- package/templates/aiwiki/schemas/session.md +125 -0
- package/templates/manifests/bugfix.yaml +41 -0
- package/templates/manifests/feature.yaml +69 -0
- package/templates/manifests/greenfield.yaml +61 -0
- package/templates/manifests/hotfix.yaml +45 -0
- package/templates/manifests/refactor.yaml +44 -0
- package/templates/manifests/v5/SCHEMA.md +327 -0
- package/templates/manifests/v5/feature.yaml +77 -0
- package/templates/manifests/v6/SCHEMA.md +199 -0
- package/templates/wiki-html/dream-detail.html +378 -0
- package/templates/wiki-html/dreams-list.html +155 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# Onboarding document templates
|
|
2
|
+
|
|
3
|
+
The six-document onboarding suite, with structure and generation process for each. Load this when you're about to write any of the six docs — the SKILL.md keeps the operational steps; this file keeps the detail.
|
|
4
|
+
|
|
5
|
+
Where SKILL.md says "follow the template in references/document-templates.md", that means: open this file, find the matching document section, follow its **Structure** and **Generation Process** blocks.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Document 1: Getting Started Guide
|
|
10
|
+
|
|
11
|
+
**Purpose:** New developer goes from zero to running tests in under 5 minutes.
|
|
12
|
+
|
|
13
|
+
**File:** `docs/getting-started.md`
|
|
14
|
+
|
|
15
|
+
**Structure:**
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# Getting Started
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
{List exact versions of required tools: Node.js 20+, Python 3.11+, Docker, etc.}
|
|
22
|
+
{Include installation links for each}
|
|
23
|
+
|
|
24
|
+
## Quick Start (5 minutes)
|
|
25
|
+
|
|
26
|
+
### 1. Clone the Repository
|
|
27
|
+
{exact clone command}
|
|
28
|
+
|
|
29
|
+
### 2. Install Dependencies
|
|
30
|
+
{exact install command(s)}
|
|
31
|
+
|
|
32
|
+
### 3. Set Up Environment
|
|
33
|
+
{copy .env.example, fill in required values}
|
|
34
|
+
{note which values need real credentials vs. can use defaults}
|
|
35
|
+
|
|
36
|
+
### 4. Start Services
|
|
37
|
+
{Docker compose up or equivalent}
|
|
38
|
+
{what services start, what ports they use}
|
|
39
|
+
|
|
40
|
+
### 5. Run Tests
|
|
41
|
+
{exact test command}
|
|
42
|
+
{what to expect: "You should see X tests passing"}
|
|
43
|
+
|
|
44
|
+
### 6. Start the Application
|
|
45
|
+
{exact start command}
|
|
46
|
+
{where to access it: "Open http://localhost:3000"}
|
|
47
|
+
|
|
48
|
+
## Troubleshooting
|
|
49
|
+
{Top 3-5 issues new developers hit and how to fix them}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Generation Process:**
|
|
53
|
+
|
|
54
|
+
1. **Detect Prerequisites**
|
|
55
|
+
- Read project config files (package.json, pyproject.toml, go.mod)
|
|
56
|
+
- Check Dockerfile for base image (reveals required runtime versions)
|
|
57
|
+
- Check docker-compose.yml for required services
|
|
58
|
+
- Check .env.example for required variables
|
|
59
|
+
|
|
60
|
+
2. **Extract Commands**
|
|
61
|
+
- Install: `npm install`, `pip install -r requirements.txt`, etc.
|
|
62
|
+
- Start: `npm run dev`, `docker compose up`, etc.
|
|
63
|
+
- Test: `npm test`, `pytest`, `go test ./...`, etc.
|
|
64
|
+
- Read package.json scripts or Makefile targets
|
|
65
|
+
|
|
66
|
+
3. **Verify by Execution**
|
|
67
|
+
- If possible, run the commands to verify they work
|
|
68
|
+
- Note any commands that require special setup
|
|
69
|
+
- Document actual output so reader knows what to expect
|
|
70
|
+
|
|
71
|
+
4. **Common Troubleshooting**
|
|
72
|
+
- Check `aiwiki/gotchas/` for setup-related gotchas
|
|
73
|
+
- Check project issues/PRs for setup problems
|
|
74
|
+
- Include: port conflicts, Docker issues, env var issues, version mismatches
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Document 2: Architecture Overview
|
|
79
|
+
|
|
80
|
+
**Purpose:** Developer understands what the project does and how it is organized.
|
|
81
|
+
|
|
82
|
+
**File:** `docs/architecture-overview.md`
|
|
83
|
+
|
|
84
|
+
**Structure:**
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# Architecture Overview
|
|
88
|
+
|
|
89
|
+
## What This Project Does
|
|
90
|
+
{One paragraph: what problem it solves, who uses it}
|
|
91
|
+
|
|
92
|
+
## System Diagram
|
|
93
|
+
{ASCII diagram showing major components and their relationships}
|
|
94
|
+
|
|
95
|
+
## Directory Structure
|
|
96
|
+
{Annotated tree showing what each major directory contains}
|
|
97
|
+
|
|
98
|
+
## Key Components
|
|
99
|
+
### {Component 1}
|
|
100
|
+
- **Purpose**: {what it does}
|
|
101
|
+
- **Location**: {directory/file}
|
|
102
|
+
- **Key files**: {most important files to understand}
|
|
103
|
+
- **Depends on**: {other components it uses}
|
|
104
|
+
|
|
105
|
+
### {Component 2}
|
|
106
|
+
...
|
|
107
|
+
|
|
108
|
+
## Data Flow
|
|
109
|
+
{How data moves through the system: request -> handler -> service -> database}
|
|
110
|
+
{Sequence diagram for the most common operation}
|
|
111
|
+
|
|
112
|
+
## Technology Stack
|
|
113
|
+
| Layer | Technology | Purpose |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| Frontend | {React, Vue, etc.} | {User interface} |
|
|
116
|
+
| Backend | {Express, FastAPI, etc.} | {API server} |
|
|
117
|
+
| Database | {Postgres, MongoDB, etc.} | {Data persistence} |
|
|
118
|
+
| Cache | {Redis, etc.} | {Session/data caching} |
|
|
119
|
+
| Queue | {RabbitMQ, etc.} | {Async job processing} |
|
|
120
|
+
|
|
121
|
+
## Key Patterns
|
|
122
|
+
{Design patterns used in this project: repository pattern, service layer, etc.}
|
|
123
|
+
{Link to relevant code examples}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Generation Process:**
|
|
127
|
+
|
|
128
|
+
1. **Map Project Structure**
|
|
129
|
+
- Read directory tree (top 3 levels)
|
|
130
|
+
- Identify entry points (main files, index files, app files)
|
|
131
|
+
- Identify configuration files
|
|
132
|
+
|
|
133
|
+
2. **Identify Components**
|
|
134
|
+
- Look for common patterns: routes/, controllers/, services/, models/
|
|
135
|
+
- Read import graphs to understand dependencies
|
|
136
|
+
- Identify the "core" vs "infrastructure" code
|
|
137
|
+
|
|
138
|
+
3. **Generate Diagrams**
|
|
139
|
+
- Use ASCII box-and-arrow diagrams (readable everywhere — terminal, editor, agent context)
|
|
140
|
+
- Component diagram for system overview
|
|
141
|
+
- Sequence diagram for most common user flow
|
|
142
|
+
|
|
143
|
+
4. **Extract Technology Stack**
|
|
144
|
+
- From package.json dependencies, pyproject.toml, go.mod
|
|
145
|
+
- From Docker configuration
|
|
146
|
+
- From infrastructure files (terraform, serverless, etc.)
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Document 3: Local Environment Setup
|
|
151
|
+
|
|
152
|
+
**Purpose:** Detailed setup instructions for the full development environment.
|
|
153
|
+
|
|
154
|
+
**File:** `docs/local-setup.md`
|
|
155
|
+
|
|
156
|
+
**Structure:**
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Local Environment Setup
|
|
160
|
+
|
|
161
|
+
## Required Tools
|
|
162
|
+
{Detailed list with version requirements and install instructions}
|
|
163
|
+
|
|
164
|
+
## Docker Setup
|
|
165
|
+
{If applicable: what containers are needed, how to start them}
|
|
166
|
+
{Port mappings, volume mounts, network configuration}
|
|
167
|
+
|
|
168
|
+
## Environment Variables
|
|
169
|
+
| Variable | Required | Default | Description |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| DATABASE_URL | Yes | - | PostgreSQL connection string |
|
|
172
|
+
| API_KEY | Yes | - | Third-party API key (get from {source}) |
|
|
173
|
+
| DEBUG | No | false | Enable debug logging |
|
|
174
|
+
|
|
175
|
+
## Database Setup
|
|
176
|
+
{How to create the database}
|
|
177
|
+
{How to run migrations}
|
|
178
|
+
{How to seed with test data}
|
|
179
|
+
{How to reset the database}
|
|
180
|
+
|
|
181
|
+
## IDE Setup (Optional)
|
|
182
|
+
{Recommended VS Code extensions or IntelliJ plugins}
|
|
183
|
+
{Debugging configuration}
|
|
184
|
+
{Recommended settings}
|
|
185
|
+
|
|
186
|
+
## Common Issues
|
|
187
|
+
{Port already in use}
|
|
188
|
+
{Docker memory limits}
|
|
189
|
+
{Database connection refused}
|
|
190
|
+
{Environment variable missing}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Generation Process:**
|
|
194
|
+
|
|
195
|
+
1. **Environment Variables**
|
|
196
|
+
- Parse .env.example for all variables
|
|
197
|
+
- Classify: required vs optional, secret vs non-secret
|
|
198
|
+
- Note where to obtain secret values (but never include actual secrets)
|
|
199
|
+
|
|
200
|
+
2. **Docker Configuration**
|
|
201
|
+
- Parse docker-compose.yml for services, ports, volumes
|
|
202
|
+
- Document any initialization scripts (database init, etc.)
|
|
203
|
+
- Note resource requirements (memory limits, disk space)
|
|
204
|
+
|
|
205
|
+
3. **Database Setup**
|
|
206
|
+
- Detect database type from config
|
|
207
|
+
- Document creation, migration, and seeding commands
|
|
208
|
+
- Include reset command (for starting fresh)
|
|
209
|
+
|
|
210
|
+
4. **IDE Configuration**
|
|
211
|
+
- Check for .vscode/ directory (settings, extensions, launch configs)
|
|
212
|
+
- Check for .idea/ directory (IntelliJ settings)
|
|
213
|
+
- Check for .editorconfig
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Document 4: Testing Guide
|
|
218
|
+
|
|
219
|
+
**Purpose:** Developer knows how to run every type of test and what each tests.
|
|
220
|
+
|
|
221
|
+
**File:** `docs/testing-guide.md`
|
|
222
|
+
|
|
223
|
+
**Structure:**
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# Testing Guide
|
|
227
|
+
|
|
228
|
+
## Test Types
|
|
229
|
+
| Type | Command | Directory | Purpose |
|
|
230
|
+
|---|---|---|---|
|
|
231
|
+
| Unit | `npm test` | `tests/unit/` | Individual function behavior |
|
|
232
|
+
| Integration | `npm run test:integration` | `tests/integration/` | Component interaction |
|
|
233
|
+
| E2E | `npm run test:e2e` | `tests/e2e/` | Full user flows |
|
|
234
|
+
| Smoke | `npm run test:smoke` | `tests/smoke/` | Critical path verification |
|
|
235
|
+
|
|
236
|
+
## Running Tests
|
|
237
|
+
|
|
238
|
+
### All Tests
|
|
239
|
+
{command to run everything}
|
|
240
|
+
|
|
241
|
+
### Specific Test File
|
|
242
|
+
{command to run a single test file}
|
|
243
|
+
|
|
244
|
+
### Specific Test Case
|
|
245
|
+
{command to run a single test by name}
|
|
246
|
+
|
|
247
|
+
### With Coverage
|
|
248
|
+
{command to generate coverage report}
|
|
249
|
+
{where to find coverage report}
|
|
250
|
+
|
|
251
|
+
## Writing Tests
|
|
252
|
+
|
|
253
|
+
### Test File Location
|
|
254
|
+
{convention: co-located with source, or in tests/ directory}
|
|
255
|
+
{naming convention: *.test.ts, *_test.py, etc.}
|
|
256
|
+
|
|
257
|
+
### Test Structure
|
|
258
|
+
{example of a well-written test from this project}
|
|
259
|
+
{conventions: describe blocks, test naming, setup/teardown}
|
|
260
|
+
|
|
261
|
+
### Mocking
|
|
262
|
+
{how mocking is done in this project}
|
|
263
|
+
{what to mock vs what to use real implementations for}
|
|
264
|
+
|
|
265
|
+
## CI Integration
|
|
266
|
+
{how tests run in CI}
|
|
267
|
+
{what happens when tests fail}
|
|
268
|
+
|
|
269
|
+
## Troubleshooting Test Failures
|
|
270
|
+
{common reasons tests fail locally but pass in CI (or vice versa)}
|
|
271
|
+
{database state issues}
|
|
272
|
+
{timing/async issues}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Generation Process:**
|
|
276
|
+
|
|
277
|
+
1. **Detect Test Infrastructure**
|
|
278
|
+
- Test runner: Jest, Vitest, pytest, go test, etc.
|
|
279
|
+
- Test directories and file patterns
|
|
280
|
+
- Configuration files (jest.config, pytest.ini, etc.)
|
|
281
|
+
|
|
282
|
+
2. **Extract Commands**
|
|
283
|
+
- From package.json scripts, Makefile targets, or framework defaults
|
|
284
|
+
- Include: run all, run one, run with coverage, run in watch mode
|
|
285
|
+
|
|
286
|
+
3. **Find Test Examples**
|
|
287
|
+
- Pick a well-written test from the project as an example
|
|
288
|
+
- Show the project's actual conventions, not generic ones
|
|
289
|
+
|
|
290
|
+
4. **Document CI Integration**
|
|
291
|
+
- Check .github/workflows/ for test-related workflows
|
|
292
|
+
- Note any CI-specific configuration or differences
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Document 5: Common Tasks Guide
|
|
297
|
+
|
|
298
|
+
**Purpose:** Developer knows how to perform routine development tasks.
|
|
299
|
+
|
|
300
|
+
**File:** `docs/common-tasks.md`
|
|
301
|
+
|
|
302
|
+
**Structure:**
|
|
303
|
+
|
|
304
|
+
```markdown
|
|
305
|
+
# Common Tasks
|
|
306
|
+
|
|
307
|
+
## Adding a New Feature
|
|
308
|
+
1. {Create branch: git checkout -b feat/my-feature}
|
|
309
|
+
2. {Run /feature command or follow manual process}
|
|
310
|
+
3. {Key files to create/modify}
|
|
311
|
+
4. {Run tests}
|
|
312
|
+
5. {Create PR}
|
|
313
|
+
|
|
314
|
+
## Fixing a Bug
|
|
315
|
+
1. {Create branch: git checkout -b fix/bug-description}
|
|
316
|
+
2. {Run /bugfix command or follow manual process}
|
|
317
|
+
3. {Write failing test first}
|
|
318
|
+
4. {Implement fix}
|
|
319
|
+
5. {Verify all tests pass}
|
|
320
|
+
6. {Create PR}
|
|
321
|
+
|
|
322
|
+
## Adding a New API Endpoint
|
|
323
|
+
1. {Where to define the route}
|
|
324
|
+
2. {Where to add the handler/controller}
|
|
325
|
+
3. {Where to add validation}
|
|
326
|
+
4. {Where to add tests}
|
|
327
|
+
5. {How to update API documentation}
|
|
328
|
+
|
|
329
|
+
## Adding a Database Migration
|
|
330
|
+
1. {Command to generate migration}
|
|
331
|
+
2. {How to write up/down}
|
|
332
|
+
3. {How to test migration}
|
|
333
|
+
4. {How to run migration}
|
|
334
|
+
|
|
335
|
+
## Deploying
|
|
336
|
+
1. {Pre-deploy checklist}
|
|
337
|
+
2. {Deploy command}
|
|
338
|
+
3. {Post-deploy verification}
|
|
339
|
+
4. {Rollback procedure}
|
|
340
|
+
|
|
341
|
+
## Updating Dependencies
|
|
342
|
+
1. {How to check for updates}
|
|
343
|
+
2. {How to update safely}
|
|
344
|
+
3. {How to verify nothing broke}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Generation Process:**
|
|
348
|
+
|
|
349
|
+
1. **Analyze Project Workflow**
|
|
350
|
+
- Check git history for common commit patterns
|
|
351
|
+
- Check PR templates for expected process
|
|
352
|
+
- Check CONTRIBUTING.md if it exists
|
|
353
|
+
|
|
354
|
+
2. **Extract from forge Commands**
|
|
355
|
+
- Map /feature, /bugfix, /refactor to developer-friendly steps
|
|
356
|
+
- Include both the forge command and the manual process
|
|
357
|
+
|
|
358
|
+
3. **Project-Specific Tasks**
|
|
359
|
+
- Identify common operations from project structure
|
|
360
|
+
- Adding routes, models, components, etc.
|
|
361
|
+
- Framework-specific tasks (Next.js pages, Django views, etc.)
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Document 6: Glossary
|
|
366
|
+
|
|
367
|
+
**Purpose:** Define project-specific terms that a newcomer would not know.
|
|
368
|
+
|
|
369
|
+
**File:** `docs/glossary.md`
|
|
370
|
+
|
|
371
|
+
**Structure:**
|
|
372
|
+
|
|
373
|
+
```markdown
|
|
374
|
+
# Glossary
|
|
375
|
+
|
|
376
|
+
| Term | Definition |
|
|
377
|
+
|---|---|
|
|
378
|
+
| {Project-specific term} | {Clear, concise definition} |
|
|
379
|
+
| {Abbreviation} | {What it stands for and what it means} |
|
|
380
|
+
| {Internal name} | {What the team calls X and what it actually is} |
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
**Generation Process:**
|
|
384
|
+
|
|
385
|
+
1. **Extract Project Terms**
|
|
386
|
+
- Scan README, code comments, and variable names for domain-specific terms
|
|
387
|
+
- Check for terms that appear frequently but would confuse an outsider
|
|
388
|
+
- Include abbreviations and acronyms used in the codebase
|
|
389
|
+
|
|
390
|
+
2. **forge Terms (if applicable)**
|
|
391
|
+
- Work manifest, quality gates, gotchas, slice graph
|
|
392
|
+
- Skill groups: discover, plan, build, quality, deliver, support
|
|
393
|
+
- Commands: /feature, /greenfield, /bugfix, etc.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
Before you begin, ensure you have the following installed:
|
|
6
|
+
|
|
7
|
+
| Tool | Version | Installation |
|
|
8
|
+
|------|---------|-------------|
|
|
9
|
+
| {runtime, e.g., Node.js} | {version, e.g., >= 20.x} | {link or command} |
|
|
10
|
+
| {package manager, e.g., npm} | {version} | {comes with Node.js} |
|
|
11
|
+
| {database, e.g., PostgreSQL} | {version, e.g., >= 15} | {link or command} |
|
|
12
|
+
| {container runtime, e.g., Docker} | {version, e.g., >= 24} | {link} |
|
|
13
|
+
| Git | >= 2.x | {link} |
|
|
14
|
+
|
|
15
|
+
## Clone and Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Clone the repository
|
|
19
|
+
git clone {repository_url}
|
|
20
|
+
cd {project_name}
|
|
21
|
+
|
|
22
|
+
# Install dependencies
|
|
23
|
+
{install command, e.g., npm install}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Environment Variables
|
|
27
|
+
|
|
28
|
+
Copy the example environment file and fill in the values:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cp .env.example .env
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
| Variable | Description | Where to Get It | Example |
|
|
35
|
+
|----------|-------------|----------------|---------|
|
|
36
|
+
| DATABASE_URL | Database connection string | Local setup below | postgresql://user:pass@localhost:5432/dbname |
|
|
37
|
+
| {VAR_NAME} | {description} | {source} | {example value} |
|
|
38
|
+
| {VAR_NAME} | {description} | {source} | {example value} |
|
|
39
|
+
|
|
40
|
+
## Database Setup
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Start the database (if using Docker)
|
|
44
|
+
docker compose up -d db
|
|
45
|
+
|
|
46
|
+
# Run migrations
|
|
47
|
+
{migration command, e.g., npx prisma migrate dev}
|
|
48
|
+
|
|
49
|
+
# Seed the database (optional, for development data)
|
|
50
|
+
{seed command, e.g., npx prisma db seed}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Running Locally
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Start the development server
|
|
57
|
+
{dev command, e.g., npm run dev}
|
|
58
|
+
|
|
59
|
+
# The application is now running at:
|
|
60
|
+
# http://localhost:{port}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Running Tests
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Run all tests
|
|
67
|
+
{test command, e.g., npm test}
|
|
68
|
+
|
|
69
|
+
# Run tests in watch mode
|
|
70
|
+
{watch command, e.g., npm run test:watch}
|
|
71
|
+
|
|
72
|
+
# Run tests with coverage
|
|
73
|
+
{coverage command, e.g., npm run test:coverage}
|
|
74
|
+
|
|
75
|
+
# Run E2E tests
|
|
76
|
+
{e2e command, e.g., npx playwright test}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Verify Everything Works
|
|
80
|
+
|
|
81
|
+
After setup, verify with this quick checklist:
|
|
82
|
+
|
|
83
|
+
- [ ] `{build command}` completes without errors
|
|
84
|
+
- [ ] `{test command}` passes all tests
|
|
85
|
+
- [ ] `{dev command}` starts the server
|
|
86
|
+
- [ ] Visiting `http://localhost:{port}` shows the application
|
|
87
|
+
- [ ] {Any other verification step specific to the project}
|
|
88
|
+
|
|
89
|
+
## Common Tasks
|
|
90
|
+
|
|
91
|
+
| Task | Command |
|
|
92
|
+
|------|---------|
|
|
93
|
+
| Start dev server | `{command}` |
|
|
94
|
+
| Run tests | `{command}` |
|
|
95
|
+
| Run linter | `{command}` |
|
|
96
|
+
| Build for production | `{command}` |
|
|
97
|
+
| Run database migrations | `{command}` |
|
|
98
|
+
| Generate API types | `{command}` |
|
|
99
|
+
|
|
100
|
+
## Troubleshooting
|
|
101
|
+
|
|
102
|
+
### {Common problem 1}
|
|
103
|
+
**Symptom**: {what you see}
|
|
104
|
+
**Cause**: {why it happens}
|
|
105
|
+
**Fix**: {how to fix it}
|
|
106
|
+
|
|
107
|
+
### {Common problem 2}
|
|
108
|
+
**Symptom**: {what you see}
|
|
109
|
+
**Cause**: {why it happens}
|
|
110
|
+
**Fix**: {how to fix it}
|
|
111
|
+
|
|
112
|
+
### Port already in use
|
|
113
|
+
**Symptom**: Error: listen EADDRINUSE :::3000
|
|
114
|
+
**Cause**: Another process is using the port
|
|
115
|
+
**Fix**: `lsof -i :{port}` to find the process, then `kill {pid}`
|
|
116
|
+
|
|
117
|
+
## Glossary
|
|
118
|
+
|
|
119
|
+
| Term | Definition |
|
|
120
|
+
|------|-----------|
|
|
121
|
+
| {project-specific term} | {what it means in this project} |
|
|
122
|
+
| {project-specific term} | {what it means in this project} |
|