roadmap-kit 1.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/INSTALL.md +358 -0
- package/LICENSE +21 -0
- package/README.md +503 -0
- package/cli.js +548 -0
- package/dashboard/dist/assets/index-BzYzLB7u.css +1 -0
- package/dashboard/dist/assets/index-DIonhzlK.js +506 -0
- package/dashboard/dist/index.html +18 -0
- package/dashboard/dist/roadmap.json +268 -0
- package/dashboard/index.html +17 -0
- package/dashboard/package-lock.json +4172 -0
- package/dashboard/package.json +37 -0
- package/dashboard/postcss.config.js +6 -0
- package/dashboard/public/roadmap.json +268 -0
- package/dashboard/server.js +1366 -0
- package/dashboard/src/App.jsx +6979 -0
- package/dashboard/src/components/CircularProgress.jsx +55 -0
- package/dashboard/src/components/ProgressBar.jsx +33 -0
- package/dashboard/src/components/ProjectSettings.jsx +420 -0
- package/dashboard/src/components/SharedResources.jsx +239 -0
- package/dashboard/src/components/TaskList.jsx +273 -0
- package/dashboard/src/components/TechnicalDebt.jsx +170 -0
- package/dashboard/src/components/ui/accordion.jsx +46 -0
- package/dashboard/src/components/ui/badge.jsx +38 -0
- package/dashboard/src/components/ui/card.jsx +60 -0
- package/dashboard/src/components/ui/progress.jsx +22 -0
- package/dashboard/src/components/ui/tabs.jsx +47 -0
- package/dashboard/src/index.css +440 -0
- package/dashboard/src/lib/utils.js +6 -0
- package/dashboard/src/main.jsx +10 -0
- package/dashboard/tailwind.config.js +142 -0
- package/dashboard/vite.config.js +18 -0
- package/docker/Dockerfile +35 -0
- package/docker/docker-compose.yml +30 -0
- package/docker/entrypoint.sh +31 -0
- package/package.json +68 -0
- package/scanner.js +351 -0
- package/setup.sh +354 -0
- package/templates/clinerules.template +130 -0
- package/templates/roadmap.template.json +30 -0
package/setup.sh
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# ============================================================
|
|
4
|
+
# ROADMAP-KIT Setup Script
|
|
5
|
+
# ============================================================
|
|
6
|
+
# This script sets up roadmap-kit in your project.
|
|
7
|
+
# Run from the root of the project where roadmap-kit folder exists.
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# cd your-project
|
|
11
|
+
# ./roadmap-kit/setup.sh
|
|
12
|
+
# ============================================================
|
|
13
|
+
|
|
14
|
+
set -e
|
|
15
|
+
|
|
16
|
+
# Colors
|
|
17
|
+
RED='\033[0;31m'
|
|
18
|
+
GREEN='\033[0;32m'
|
|
19
|
+
YELLOW='\033[1;33m'
|
|
20
|
+
BLUE='\033[0;34m'
|
|
21
|
+
CYAN='\033[0;36m'
|
|
22
|
+
NC='\033[0m' # No Color
|
|
23
|
+
|
|
24
|
+
# Default port
|
|
25
|
+
DEFAULT_PORT=6969
|
|
26
|
+
|
|
27
|
+
echo ""
|
|
28
|
+
echo -e "${CYAN} ╔═══════════════════════════════════════╗${NC}"
|
|
29
|
+
echo -e "${CYAN} ║ 🗺️ ROADMAP-KIT Setup ║${NC}"
|
|
30
|
+
echo -e "${CYAN} ╚═══════════════════════════════════════╝${NC}"
|
|
31
|
+
echo ""
|
|
32
|
+
|
|
33
|
+
# ============ CHECKS ============
|
|
34
|
+
|
|
35
|
+
# Check if Node.js is installed
|
|
36
|
+
if ! command -v node &> /dev/null; then
|
|
37
|
+
echo -e "${RED}✗ Node.js is not installed${NC}"
|
|
38
|
+
echo " Please install Node.js 18+ first: https://nodejs.org"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
|
|
43
|
+
if [ "$NODE_VERSION" -lt 18 ]; then
|
|
44
|
+
echo -e "${RED}✗ Node.js version is too old (v$NODE_VERSION)${NC}"
|
|
45
|
+
echo " Please upgrade to Node.js 18 or higher"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo -e "${GREEN}✓${NC} Node.js $(node -v) detected"
|
|
50
|
+
|
|
51
|
+
# Detect if we're running from inside roadmap-kit or from project root
|
|
52
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
53
|
+
if [[ "$SCRIPT_DIR" == *"roadmap-kit"* ]]; then
|
|
54
|
+
# Running from within roadmap-kit, go to parent
|
|
55
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
56
|
+
cd "$PROJECT_ROOT"
|
|
57
|
+
else
|
|
58
|
+
PROJECT_ROOT="$(pwd)"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
echo -e "${GREEN}✓${NC} Project root: $PROJECT_ROOT"
|
|
62
|
+
|
|
63
|
+
# Check if roadmap-kit folder exists
|
|
64
|
+
if [ ! -d "roadmap-kit" ]; then
|
|
65
|
+
echo -e "${RED}✗ roadmap-kit folder not found${NC}"
|
|
66
|
+
echo " Make sure you copied the roadmap-kit folder to your project root."
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
echo -e "${GREEN}✓${NC} roadmap-kit folder found"
|
|
71
|
+
echo ""
|
|
72
|
+
|
|
73
|
+
# ============ INSTALL DEPENDENCIES ============
|
|
74
|
+
|
|
75
|
+
echo -e "${BLUE}📦 Installing dependencies...${NC}"
|
|
76
|
+
|
|
77
|
+
# Install roadmap-kit root dependencies
|
|
78
|
+
cd roadmap-kit
|
|
79
|
+
if [ ! -d "node_modules" ]; then
|
|
80
|
+
npm install --silent
|
|
81
|
+
echo -e "${GREEN}✓${NC} CLI dependencies installed"
|
|
82
|
+
else
|
|
83
|
+
echo -e "${YELLOW}⚠${NC} CLI dependencies already installed"
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Install dashboard dependencies
|
|
87
|
+
cd dashboard
|
|
88
|
+
if [ ! -d "node_modules" ]; then
|
|
89
|
+
npm install --silent
|
|
90
|
+
echo -e "${GREEN}✓${NC} Dashboard dependencies installed"
|
|
91
|
+
else
|
|
92
|
+
echo -e "${YELLOW}⚠${NC} Dashboard dependencies already installed"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
cd "$PROJECT_ROOT"
|
|
96
|
+
echo ""
|
|
97
|
+
|
|
98
|
+
# ============ CREATE ROADMAP.JSON ============
|
|
99
|
+
|
|
100
|
+
if [ ! -f "roadmap-kit/roadmap.json" ]; then
|
|
101
|
+
echo -e "${BLUE}📋 Creating roadmap.json...${NC}"
|
|
102
|
+
|
|
103
|
+
if [ -f "roadmap-kit/templates/roadmap.template.json" ]; then
|
|
104
|
+
cp roadmap-kit/templates/roadmap.template.json roadmap-kit/roadmap.json
|
|
105
|
+
echo -e "${GREEN}✓${NC} roadmap.json created"
|
|
106
|
+
else
|
|
107
|
+
# Create minimal roadmap.json
|
|
108
|
+
cat > roadmap-kit/roadmap.json << 'EOF'
|
|
109
|
+
{
|
|
110
|
+
"project_info": {
|
|
111
|
+
"name": "My Project",
|
|
112
|
+
"version": "1.0.0",
|
|
113
|
+
"description": "Project description",
|
|
114
|
+
"purpose": "Project purpose",
|
|
115
|
+
"stack": [],
|
|
116
|
+
"architecture": "",
|
|
117
|
+
"total_progress": 0,
|
|
118
|
+
"last_sync": null,
|
|
119
|
+
"conventions": {
|
|
120
|
+
"naming": {},
|
|
121
|
+
"file_structure": "",
|
|
122
|
+
"database": "",
|
|
123
|
+
"styling": "",
|
|
124
|
+
"error_handling": ""
|
|
125
|
+
},
|
|
126
|
+
"shared_resources": {
|
|
127
|
+
"ui_components": [],
|
|
128
|
+
"utilities": [],
|
|
129
|
+
"database_tables": []
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"features": []
|
|
133
|
+
}
|
|
134
|
+
EOF
|
|
135
|
+
echo -e "${GREEN}✓${NC} roadmap.json created (minimal template)"
|
|
136
|
+
fi
|
|
137
|
+
else
|
|
138
|
+
echo -e "${YELLOW}⚠${NC} roadmap.json already exists"
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# ============ ADD NPM SCRIPTS ============
|
|
142
|
+
|
|
143
|
+
if [ -f "package.json" ]; then
|
|
144
|
+
echo ""
|
|
145
|
+
echo -e "${BLUE}📝 Checking package.json scripts...${NC}"
|
|
146
|
+
|
|
147
|
+
if grep -q '"roadmap"' package.json 2>/dev/null; then
|
|
148
|
+
echo -e "${YELLOW}⚠${NC} npm scripts already configured"
|
|
149
|
+
else
|
|
150
|
+
node -e "
|
|
151
|
+
const fs = require('fs');
|
|
152
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
|
|
153
|
+
pkg.scripts = pkg.scripts || {};
|
|
154
|
+
pkg.scripts['roadmap'] = 'cd ./roadmap-kit/dashboard && npm run dev';
|
|
155
|
+
pkg.scripts['roadmap:scan'] = 'node ./roadmap-kit/scanner.js';
|
|
156
|
+
pkg.scripts['roadmap:build'] = 'cd ./roadmap-kit/dashboard && npm run build';
|
|
157
|
+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
|
|
158
|
+
" 2>/dev/null && echo -e "${GREEN}✓${NC} npm scripts added" || echo -e "${YELLOW}⚠${NC} Could not add npm scripts (add manually)"
|
|
159
|
+
fi
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
# ============ CREATE .CLINERULES ============
|
|
163
|
+
|
|
164
|
+
echo ""
|
|
165
|
+
AI_RULES_FILE=".clinerules"
|
|
166
|
+
if [ -f ".cursorrules" ]; then
|
|
167
|
+
AI_RULES_FILE=".cursorrules"
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
if [ ! -f "$AI_RULES_FILE" ]; then
|
|
171
|
+
if [ -f "roadmap-kit/templates/clinerules.template" ]; then
|
|
172
|
+
echo -e "${BLUE}📜 Creating $AI_RULES_FILE...${NC}"
|
|
173
|
+
cp roadmap-kit/templates/clinerules.template "$AI_RULES_FILE"
|
|
174
|
+
echo -e "${GREEN}✓${NC} $AI_RULES_FILE created"
|
|
175
|
+
fi
|
|
176
|
+
else
|
|
177
|
+
echo -e "${YELLOW}⚠${NC} $AI_RULES_FILE already exists"
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
# ============ CREATE ADMIN USER ============
|
|
181
|
+
|
|
182
|
+
echo ""
|
|
183
|
+
echo -e "${CYAN}🔐 Admin Account Setup${NC}"
|
|
184
|
+
echo ""
|
|
185
|
+
|
|
186
|
+
if [ -f "roadmap-kit/auth.json" ]; then
|
|
187
|
+
echo -e "${YELLOW}⚠${NC} auth.json already exists"
|
|
188
|
+
read -p " Overwrite with new credentials? (y/N) " -n 1 -r
|
|
189
|
+
echo ""
|
|
190
|
+
CREATE_AUTH=$REPLY
|
|
191
|
+
else
|
|
192
|
+
CREATE_AUTH="y"
|
|
193
|
+
fi
|
|
194
|
+
|
|
195
|
+
if [[ $CREATE_AUTH =~ ^[Yy]$ ]]; then
|
|
196
|
+
# Ask for admin email
|
|
197
|
+
read -p " Admin email: " ADMIN_EMAIL
|
|
198
|
+
if [ -z "$ADMIN_EMAIL" ]; then
|
|
199
|
+
ADMIN_EMAIL="admin@localhost"
|
|
200
|
+
fi
|
|
201
|
+
|
|
202
|
+
# Ask for admin password (hidden input)
|
|
203
|
+
echo -n " Admin password: "
|
|
204
|
+
read -s ADMIN_PASSWORD
|
|
205
|
+
echo ""
|
|
206
|
+
|
|
207
|
+
if [ -z "$ADMIN_PASSWORD" ]; then
|
|
208
|
+
ADMIN_PASSWORD="Admin123!"
|
|
209
|
+
echo -e " ${YELLOW}⚠${NC} Using default password: Admin123!"
|
|
210
|
+
fi
|
|
211
|
+
|
|
212
|
+
# Ask for admin name
|
|
213
|
+
read -p " Admin name [Admin]: " ADMIN_NAME
|
|
214
|
+
if [ -z "$ADMIN_NAME" ]; then
|
|
215
|
+
ADMIN_NAME="Admin"
|
|
216
|
+
fi
|
|
217
|
+
|
|
218
|
+
# Generate auth.json with hashed password using Node.js
|
|
219
|
+
echo -e "${BLUE}🔑 Creating auth.json...${NC}"
|
|
220
|
+
|
|
221
|
+
node -e "
|
|
222
|
+
const crypto = require('crypto');
|
|
223
|
+
const fs = require('fs');
|
|
224
|
+
|
|
225
|
+
function hashPassword(password) {
|
|
226
|
+
return new Promise((resolve, reject) => {
|
|
227
|
+
const salt = crypto.randomBytes(16).toString('hex');
|
|
228
|
+
crypto.scrypt(password, salt, 64, (err, derivedKey) => {
|
|
229
|
+
if (err) reject(err);
|
|
230
|
+
resolve(salt + ':' + derivedKey.toString('hex'));
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
async function createAuth() {
|
|
236
|
+
const hashedPassword = await hashPassword('${ADMIN_PASSWORD}');
|
|
237
|
+
const config = {
|
|
238
|
+
settings: {
|
|
239
|
+
requireAuth: true,
|
|
240
|
+
sessionDuration: 86400000,
|
|
241
|
+
allowRegistration: false
|
|
242
|
+
},
|
|
243
|
+
users: [{
|
|
244
|
+
id: 'user-' + Date.now(),
|
|
245
|
+
name: '${ADMIN_NAME}',
|
|
246
|
+
email: '${ADMIN_EMAIL}',
|
|
247
|
+
password: hashedPassword,
|
|
248
|
+
role: 'admin',
|
|
249
|
+
createdAt: new Date().toISOString(),
|
|
250
|
+
lastLogin: null
|
|
251
|
+
}]
|
|
252
|
+
};
|
|
253
|
+
fs.writeFileSync('roadmap-kit/auth.json', JSON.stringify(config, null, 2), 'utf-8');
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
createAuth().catch(console.error);
|
|
257
|
+
" 2>/dev/null && echo -e "${GREEN}✓${NC} auth.json created with your credentials" || echo -e "${RED}✗${NC} Failed to create auth.json"
|
|
258
|
+
fi
|
|
259
|
+
|
|
260
|
+
# ============ NGINX CONFIGURATION (OPTIONAL) ============
|
|
261
|
+
|
|
262
|
+
echo ""
|
|
263
|
+
echo -e "${CYAN}🌐 Server Configuration${NC}"
|
|
264
|
+
echo ""
|
|
265
|
+
read -p " Configure for production server with Nginx? (y/N) " -n 1 -r
|
|
266
|
+
echo ""
|
|
267
|
+
|
|
268
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
269
|
+
echo ""
|
|
270
|
+
|
|
271
|
+
# Ask for domain
|
|
272
|
+
read -p " Domain (e.g., midominio.com): " DOMAIN
|
|
273
|
+
if [ -z "$DOMAIN" ]; then
|
|
274
|
+
DOMAIN="localhost"
|
|
275
|
+
fi
|
|
276
|
+
|
|
277
|
+
# Ask for port
|
|
278
|
+
read -p " Dashboard port [${DEFAULT_PORT}]: " CUSTOM_PORT
|
|
279
|
+
if [ -z "$CUSTOM_PORT" ]; then
|
|
280
|
+
CUSTOM_PORT=$DEFAULT_PORT
|
|
281
|
+
fi
|
|
282
|
+
|
|
283
|
+
# Ask for SSL
|
|
284
|
+
read -p " Enable SSL/HTTPS? (y/N) " -n 1 -r SSL_REPLY
|
|
285
|
+
echo ""
|
|
286
|
+
|
|
287
|
+
SSL_FLAG=""
|
|
288
|
+
if [[ $SSL_REPLY =~ ^[Yy]$ ]]; then
|
|
289
|
+
SSL_FLAG="--ssl"
|
|
290
|
+
|
|
291
|
+
# Check for Let's Encrypt cert
|
|
292
|
+
CERT_PATH="/etc/letsencrypt/live/${DOMAIN}"
|
|
293
|
+
if [ -f "${CERT_PATH}/fullchain.pem" ]; then
|
|
294
|
+
echo -e " ${GREEN}✓${NC} SSL certificate found at ${CERT_PATH}"
|
|
295
|
+
else
|
|
296
|
+
echo -e " ${YELLOW}⚠${NC} SSL certificate not found"
|
|
297
|
+
echo -e " ${YELLOW} Generate with: sudo certbot certonly --nginx -d ${DOMAIN}${NC}"
|
|
298
|
+
fi
|
|
299
|
+
fi
|
|
300
|
+
|
|
301
|
+
# Ask for main app port (optional)
|
|
302
|
+
read -p " Main app port (leave empty to skip): " APP_PORT
|
|
303
|
+
APP_PORT_FLAG=""
|
|
304
|
+
if [ -n "$APP_PORT" ]; then
|
|
305
|
+
APP_PORT_FLAG="--app-port ${APP_PORT}"
|
|
306
|
+
fi
|
|
307
|
+
|
|
308
|
+
# Generate nginx config
|
|
309
|
+
echo ""
|
|
310
|
+
echo -e "${BLUE}📄 Generating Nginx configuration...${NC}"
|
|
311
|
+
|
|
312
|
+
cd "$PROJECT_ROOT"
|
|
313
|
+
node roadmap-kit/cli.js nginx --domain "$DOMAIN" --port "$CUSTOM_PORT" $SSL_FLAG $APP_PORT_FLAG
|
|
314
|
+
|
|
315
|
+
echo ""
|
|
316
|
+
fi
|
|
317
|
+
|
|
318
|
+
# ============ SUCCESS MESSAGE ============
|
|
319
|
+
|
|
320
|
+
echo ""
|
|
321
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════════════${NC}"
|
|
322
|
+
echo -e "${GREEN} ✅ ROADMAP-KIT installed successfully!${NC}"
|
|
323
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════════════${NC}"
|
|
324
|
+
echo ""
|
|
325
|
+
echo -e "${CYAN}🚀 Quick Start (Local):${NC}"
|
|
326
|
+
echo ""
|
|
327
|
+
echo -e " ${BLUE}1.${NC} Open dashboard:"
|
|
328
|
+
echo -e " ${YELLOW}cd roadmap-kit/dashboard && npm run dev${NC}"
|
|
329
|
+
echo -e " or: ${YELLOW}npm run roadmap${NC} (if package.json exists)"
|
|
330
|
+
echo ""
|
|
331
|
+
echo -e " ${BLUE}2.${NC} Open in browser:"
|
|
332
|
+
echo -e " ${YELLOW}http://localhost:${DEFAULT_PORT}${NC}"
|
|
333
|
+
echo ""
|
|
334
|
+
echo -e " ${BLUE}3.${NC} Login with your configured credentials"
|
|
335
|
+
if [ -n "$ADMIN_EMAIL" ]; then
|
|
336
|
+
echo -e " Email: ${YELLOW}${ADMIN_EMAIL}${NC}"
|
|
337
|
+
fi
|
|
338
|
+
echo ""
|
|
339
|
+
echo -e "${CYAN}📋 Files created:${NC}"
|
|
340
|
+
echo -e " • roadmap-kit/roadmap.json - Project state"
|
|
341
|
+
echo -e " • $AI_RULES_FILE - AI coding rules"
|
|
342
|
+
if [ -f "nginx-roadmap.conf" ]; then
|
|
343
|
+
echo -e " • nginx-roadmap.conf - Nginx configuration"
|
|
344
|
+
fi
|
|
345
|
+
echo ""
|
|
346
|
+
echo -e "${CYAN}🔧 CLI Commands:${NC}"
|
|
347
|
+
echo -e " • ${YELLOW}node roadmap-kit/cli.js dashboard${NC} - Open dashboard"
|
|
348
|
+
echo -e " • ${YELLOW}node roadmap-kit/cli.js scan${NC} - Sync with Git"
|
|
349
|
+
echo -e " • ${YELLOW}node roadmap-kit/cli.js nginx${NC} - Generate Nginx config"
|
|
350
|
+
echo -e " • ${YELLOW}node roadmap-kit/cli.js docker${NC} - Generate Docker config"
|
|
351
|
+
echo ""
|
|
352
|
+
echo -e "${CYAN}🐳 Docker:${NC}"
|
|
353
|
+
echo -e " ${YELLOW}cd roadmap-kit/docker && docker-compose up${NC}"
|
|
354
|
+
echo ""
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# AI Development Rules
|
|
2
|
+
|
|
3
|
+
## 📖 FIRST STEP - READ THE ROADMAP
|
|
4
|
+
|
|
5
|
+
**BEFORE writing any code, you MUST read:**
|
|
6
|
+
```
|
|
7
|
+
roadmap-kit/roadmap.json
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
This file contains:
|
|
11
|
+
- Project context, stack, and architecture
|
|
12
|
+
- Shared resources (components, utilities, DB tables) - **DO NOT DUPLICATE**
|
|
13
|
+
- Coding conventions specific to this project
|
|
14
|
+
- Current features and tasks with detailed descriptions
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 📝 Code Conventions
|
|
19
|
+
|
|
20
|
+
### Naming
|
|
21
|
+
- **Variables & Functions**: `camelCase`
|
|
22
|
+
- **Components/Classes**: `PascalCase`
|
|
23
|
+
- **Constants**: `UPPER_SNAKE_CASE`
|
|
24
|
+
- **Files**: `kebab-case` for utils, `PascalCase` for components
|
|
25
|
+
- **CSS/Tailwind classes**: `kebab-case`
|
|
26
|
+
|
|
27
|
+
### Best Practices
|
|
28
|
+
- Keep functions small and focused (single responsibility)
|
|
29
|
+
- Use descriptive names over comments
|
|
30
|
+
- DRY - Don't Repeat Yourself (check shared_resources first)
|
|
31
|
+
- Prefer composition over inheritance
|
|
32
|
+
- Handle errors explicitly, never swallow them
|
|
33
|
+
- Validate inputs at system boundaries
|
|
34
|
+
|
|
35
|
+
### Code Quality
|
|
36
|
+
- No magic numbers - use named constants
|
|
37
|
+
- Avoid deep nesting (max 3 levels)
|
|
38
|
+
- Early returns over nested conditionals
|
|
39
|
+
- Explicit is better than implicit
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## ♻️ SHARED RESOURCES - MANDATORY
|
|
44
|
+
|
|
45
|
+
**Check `roadmap.json > project_info > shared_resources` BEFORE creating:**
|
|
46
|
+
|
|
47
|
+
1. **UI Components** - Reuse existing buttons, inputs, modals, etc.
|
|
48
|
+
2. **Utilities** - Use existing helpers, formatters, validators
|
|
49
|
+
3. **Database Tables** - Don't create duplicate tables
|
|
50
|
+
|
|
51
|
+
**RULE:** If it exists in shared_resources, you MUST use it.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🔖 Commit Format
|
|
56
|
+
|
|
57
|
+
Use this format for automatic roadmap updates:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
[task:TASK-ID] [status:STATUS] Description
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Examples:**
|
|
64
|
+
```bash
|
|
65
|
+
git commit -m "[task:auth-login] [status:completed] Implement JWT authentication"
|
|
66
|
+
git commit -m "[task:user-api] [status:in_progress] Add user CRUD endpoints"
|
|
67
|
+
git commit -m "[task:payment] [status:completed] [debt:Missing validation|high] Add payment processing"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Available tags:**
|
|
71
|
+
- `[task:id]` - Task ID from roadmap.json
|
|
72
|
+
- `[status:pending|in_progress|completed]` - Task status
|
|
73
|
+
- `[debt:description|severity|effort]` - Technical debt (severity: low/medium/high)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## ⚠️ Technical Debt Capture
|
|
78
|
+
|
|
79
|
+
**You MUST register technical debt when:**
|
|
80
|
+
- Skipping validation or error handling
|
|
81
|
+
- Using workarounds or hacks
|
|
82
|
+
- Leaving TODO comments
|
|
83
|
+
- Not writing tests
|
|
84
|
+
- Hardcoding values
|
|
85
|
+
- Any "temporary" solutions
|
|
86
|
+
|
|
87
|
+
**Severity Guide:**
|
|
88
|
+
| Severity | When | Action Required |
|
|
89
|
+
|----------|------|-----------------|
|
|
90
|
+
| high | Security, data integrity | Fix ASAP |
|
|
91
|
+
| medium | Functionality degraded | Fix soon |
|
|
92
|
+
| low | Improvements, optimizations | When time allows |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 📋 After Completing a Task
|
|
97
|
+
|
|
98
|
+
Update `roadmap.json` with:
|
|
99
|
+
|
|
100
|
+
1. **status**: "completed" or "in_progress"
|
|
101
|
+
2. **ai_notes**: Your implementation decisions and reasoning
|
|
102
|
+
3. **affected_files**: All files created or modified
|
|
103
|
+
4. **reused_resources**: Components/utilities you reused
|
|
104
|
+
5. **technical_debt**: Any debt you introduced
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## ✅ Pre-Commit Checklist
|
|
109
|
+
|
|
110
|
+
- [ ] Read the task description from roadmap.json?
|
|
111
|
+
- [ ] Checked shared_resources for existing code?
|
|
112
|
+
- [ ] Followed project conventions?
|
|
113
|
+
- [ ] Updated roadmap.json with results?
|
|
114
|
+
- [ ] Registered technical debt if any?
|
|
115
|
+
- [ ] Used correct commit format?
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 🚫 DO NOT
|
|
120
|
+
|
|
121
|
+
- Create duplicate components/utilities
|
|
122
|
+
- Ignore project conventions
|
|
123
|
+
- Commit without task tags
|
|
124
|
+
- Leave undocumented technical debt
|
|
125
|
+
- Refactor unrelated code
|
|
126
|
+
- Skip reading the roadmap
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
**🗺️ ROADMAP-KIT** - AI needs context too.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project_info": {
|
|
3
|
+
"name": "[PROJECT_NAME]",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "[PROJECT_DESCRIPTION]",
|
|
6
|
+
"purpose": "[PROJECT_PURPOSE]",
|
|
7
|
+
"stack": [],
|
|
8
|
+
"architecture": "[ARCHITECTURE_DESCRIPTION]",
|
|
9
|
+
"total_progress": 0,
|
|
10
|
+
"last_sync": null,
|
|
11
|
+
"conventions": {
|
|
12
|
+
"naming": {
|
|
13
|
+
"variables": "camelCase",
|
|
14
|
+
"components": "PascalCase",
|
|
15
|
+
"files": "kebab-case for utilities, PascalCase.tsx for components",
|
|
16
|
+
"constants": "UPPER_SNAKE_CASE"
|
|
17
|
+
},
|
|
18
|
+
"file_structure": "[FILE_STRUCTURE_DESCRIPTION]",
|
|
19
|
+
"database": "[DATABASE_CONVENTIONS]",
|
|
20
|
+
"styling": "[STYLING_CONVENTIONS]",
|
|
21
|
+
"error_handling": "[ERROR_HANDLING_CONVENTIONS]"
|
|
22
|
+
},
|
|
23
|
+
"shared_resources": {
|
|
24
|
+
"ui_components": [],
|
|
25
|
+
"utilities": [],
|
|
26
|
+
"database_tables": []
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"features": []
|
|
30
|
+
}
|