New standard establishing documentation requirements for major projects. FFG-STD-005 defines: - When to create implementation guides (BEFORE building) - Required sections (13 mandatory, 6 optional) - Quality requirements (completeness, copy-paste ready, context-free) - File location conventions - Maintenance procedures - Enforcement rules Core principle: If Claude crashes, another AI must be able to continue using only the implementation guide. Template provided at docs/templates/implementation-guide-template.md Reference implementation: Trinity Console 2.0 guide (1,776 lines) Rationale: The 30 minutes spent writing a guide saves 3 hours of reconstruction later. Signed-off-by: Claude (Chronicler #61) <claude@firefrostgaming.com>
5.5 KiB
5.5 KiB
[Project Name] — Complete Implementation Guide
Version: 1.0
Created: [Date]
Authors: [Names and roles]
Purpose: Cold-start handoff document — any AI or developer can implement [project] from this single document.
Table of Contents
- Project Overview
- Architecture Decisions
- Complete File Structure
- Database Schema
- All Code
- Configuration Files
- Deployment Infrastructure
- Implementation Checklist
- Migration/Integration
- Emergency Contacts
- Document History
1. Project Overview
What is This Project?
[1-2 paragraphs describing the project purpose]
Users
| Name/Role | Description | Access Level |
|---|---|---|
| [User 1] | [Description] | [Access] |
| [User 2] | [Description] | [Access] |
Key Characteristics
- Stack: [Technologies used]
- Auth: [Authentication method]
- Design: [Design requirements/theme]
- Deployment: [Where it lives]
Brand/Design Requirements (if applicable)
| Element | Value | Usage |
|---|---|---|
| [Color 1] | #HEXCODE |
[Usage] |
| [Color 2] | #HEXCODE |
[Usage] |
2. Architecture Decisions
Decision 1: [Title]
Options Considered:
- [Option A] — [Pros/Cons]
- [Option B] — [Pros/Cons]
Decision: [What was chosen]
Rationale: [Why this option]
Decision 2: [Title]
[Repeat pattern]
Constraints & Requirements
- [Constraint 1]
- [Constraint 2]
Dependencies
| Dependency | Version | Purpose |
|---|---|---|
| [Package] | [Version] | [Why needed] |
3. Complete File Structure
/path/to/project/
├── folder/
│ ├── file.js # [Description]
│ └── another.js # [Description]
├── config/
│ └── settings.json # [Description]
└── README.md # [Description]
4. Database Schema
Migration Order
001_[name].sql— [Description]002_[name].sql— [Description]
migrations/001_[name].sql
-- Description of what this migration does
CREATE TABLE IF NOT EXISTS table_name (
id SERIAL PRIMARY KEY,
column_name VARCHAR(100) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Indexes
CREATE INDEX IF NOT EXISTS idx_name ON table_name(column_name);
-- Seed data (if any)
INSERT INTO table_name (column_name) VALUES
('value1'),
('value2')
ON CONFLICT DO NOTHING;
migrations/002_[name].sql
-- [Continue pattern]
5. All Code
src/index.js
// Main entry point
// [Complete code here]
src/module/file.js
// [Complete code here]
src/views/template.ejs
<!-- [Complete code here] -->
[Continue for ALL files in the structure]
6. Configuration Files
Environment Variables (.env)
# Database
DB_HOST=
DB_PORT=
DB_NAME=
DB_USER=
DB_PASSWORD=
# Authentication
AUTH_SECRET=
# External Services
SERVICE_API_KEY=
# Application
PORT=3000
NODE_ENV=production
BASE_URL=https://example.com
PM2 Configuration (ecosystem.config.js)
module.exports = {
apps: [{
name: "app-name",
script: "./src/index.js",
watch: false,
env: {
NODE_ENV: "production",
PORT: 3000
}
}]
};
Nginx Configuration
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
7. Deployment Infrastructure
Server Information
| Server | IP | Role |
|---|---|---|
| [Server 1] | [IP] | [Role] |
| [Server 2] | [IP] | [Role] |
DNS Setup
| Record | Type | Value |
|---|---|---|
| [subdomain] | A | [IP] |
Bootstrap Script
# System updates
sudo apt update && sudo apt upgrade -y
# Install dependencies
sudo apt install -y [packages]
# [Continue with all setup commands]
SSL Certificate
sudo certbot --nginx -d example.com
Firewall Rules
sudo ufw allow [port]
sudo ufw allow from [IP] to any port [port]
8. Implementation Checklist
Phase 0: Infrastructure Setup
- [Task 1]
- [Task 2]
- [Task 3]
Phase 1: Core Foundation
- [Task 4]
- [Task 5]
- [Task 6]
Phase 2: Features
- [Task 7]
- [Task 8]
Phase 3: Testing & Launch
- [Task 9]
- [Task 10]
9. Migration/Integration
Existing Systems Affected
| System | Impact | Migration Steps |
|---|---|---|
| [System 1] | [Impact] | [Steps] |
Data Migration
- [Step 1]
- [Step 2]
Rollback Procedure
- [Step 1]
- [Step 2]
10. Emergency Contacts
If the primary implementer is unavailable:
- [Backup 1] — [Why they can help, how to contact]
- [Backup 2] — [Why they can help, how to contact]
- New AI session — Start fresh with this document
11. Document History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | YYYY-MM-DD | [Name] | Initial creation |
Fire + Frost + Foundation = Where Love Builds Legacy 💙🔥❄️