aios-core 2.2.2 → 2.3.1
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/.aios-core/.session/current-session.json +14 -14
- package/.aios-core/cli/commands/migrate/validate.js +1 -1
- package/.aios-core/core/docs/session-update-pattern.md +17 -10
- package/.aios-core/core/elicitation/elicitation-engine.js +11 -6
- package/.aios-core/core/elicitation/session-manager.js +2 -1
- package/.aios-core/core/registry/registry-schema.json +166 -166
- package/.aios-core/core/registry/service-registry.json +6585 -6585
- package/.aios-core/core-config.yaml +12 -1
- package/.aios-core/data/agent-config-requirements.yaml +5 -5
- package/.aios-core/development/agents/devops.md +12 -0
- package/.aios-core/development/scripts/squad/README.md +112 -0
- package/.aios-core/development/scripts/squad/index.js +41 -0
- package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
- package/.aios-core/development/scripts/squad/squad-validator.js +685 -0
- package/.aios-core/development/tasks/add-mcp.md +11 -5
- package/.aios-core/development/tasks/search-mcp.md +309 -0
- package/.aios-core/development/tasks/setup-mcp-docker.md +11 -8
- package/.aios-core/development/tasks/squad-creator-validate.md +151 -0
- package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +3 -3
- package/.aios-core/index.d.ts +7 -7
- package/.aios-core/index.js +1 -1
- package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
- package/.aios-core/infrastructure/scripts/component-generator.js +1 -1
- package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
- package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
- package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
- package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
- package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
- package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
- package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
- package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
- package/.aios-core/infrastructure/tests/utilities-audit-results.json +500 -500
- package/.aios-core/infrastructure/tools/README.md +1 -1
- package/.aios-core/install-manifest.yaml +4 -1
- package/.aios-core/manifests/schema/manifest-schema.json +190 -190
- package/.aios-core/manifests/workers.csv +203 -203
- package/.aios-core/package.json +102 -102
- package/.aios-core/product/templates/activation-instructions-template.md +7 -7
- package/.aios-core/product/templates/adr.hbs +125 -125
- package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
- package/.aios-core/product/templates/dbdr.hbs +241 -241
- package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
- package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
- package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
- package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
- package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
- package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
- package/.aios-core/product/templates/epic.hbs +212 -212
- package/.aios-core/product/templates/eslintrc-security.json +32 -32
- package/.aios-core/product/templates/github-actions-cd.yml +212 -212
- package/.aios-core/product/templates/github-actions-ci.yml +172 -172
- package/.aios-core/product/templates/pmdr.hbs +186 -186
- package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
- package/.aios-core/product/templates/prd.hbs +201 -201
- package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
- package/.aios-core/product/templates/story.hbs +263 -263
- package/.aios-core/product/templates/task.hbs +170 -170
- package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
- package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
- package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
- package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
- package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
- package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
- package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
- package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
- package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
- package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
- package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
- package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
- package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
- package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
- package/.aios-core/product/templates/tmpl-view.sql +177 -177
- package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
- package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
- package/.aios-core/schemas/squad-schema.json +185 -0
- package/.aios-core/scripts/README.md +90 -322
- package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
- package/.claude/rules/mcp-usage.md +116 -100
- package/LICENSE +48 -48
- package/README.md +3 -4
- package/bin/aios.js +2 -1
- package/package.json +1 -3
- package/packages/installer/package.json +39 -39
- package/templates/squad/LICENSE +21 -21
- package/templates/squad/README.md +37 -37
- package/templates/squad/agents/example-agent.yaml +36 -36
- package/templates/squad/package.json +19 -19
- package/templates/squad/squad.yaml +25 -25
- package/templates/squad/tasks/example-task.yaml +46 -46
- package/templates/squad/templates/example-template.md +24 -24
- package/templates/squad/tests/example-agent.test.js +53 -53
- package/templates/squad/workflows/example-workflow.yaml +54 -54
- package/tools/diagnose-npx-issue.ps1 +96 -96
- package/tools/quick-diagnose.cmd +85 -85
- package/tools/quick-diagnose.ps1 +117 -117
- package/.aios-core/core/data/agent-config-requirements.yaml +0 -368
- package/.aios-core/core/data/aios-kb.md +0 -924
- package/.aios-core/core/data/workflow-patterns.yaml +0 -267
- package/.aios-core/product/templates/1mcp-config.yaml +0 -225
- package/.aios-core/scripts/context-detector.js +0 -226
- package/.aios-core/scripts/elicitation-engine.js +0 -385
- package/.aios-core/scripts/elicitation-session-manager.js +0 -300
- package/.claude/CLAUDE.md +0 -221
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Elicitation Session Manager
|
|
3
|
-
* Handles saving and loading elicitation sessions
|
|
4
|
-
* @module elicitation-session-manager
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const fs = require('fs-extra');
|
|
8
|
-
const path = require('path');
|
|
9
|
-
const crypto = require('crypto');
|
|
10
|
-
|
|
11
|
-
class ElicitationSessionManager {
|
|
12
|
-
constructor(sessionDir = '.aios-sessions') {
|
|
13
|
-
this.sessionDir = path.resolve(process.cwd(), sessionDir);
|
|
14
|
-
this.activeSession = null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Initialize session storage
|
|
19
|
-
*/
|
|
20
|
-
async init() {
|
|
21
|
-
await fs.ensureDir(this.sessionDir);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Create a new session
|
|
26
|
-
* @param {string} type - Component type (agent, task, workflow)
|
|
27
|
-
* @param {Object} metadata - Additional session metadata
|
|
28
|
-
* @returns {Promise<string>} Session ID
|
|
29
|
-
*/
|
|
30
|
-
async createSession(type, metadata = {}) {
|
|
31
|
-
const sessionId = this.generateSessionId();
|
|
32
|
-
const session = {
|
|
33
|
-
id: sessionId,
|
|
34
|
-
type,
|
|
35
|
-
version: '1.0',
|
|
36
|
-
created: new Date().toISOString(),
|
|
37
|
-
updated: new Date().toISOString(),
|
|
38
|
-
status: 'active',
|
|
39
|
-
currentStep: 0,
|
|
40
|
-
totalSteps: 0,
|
|
41
|
-
answers: {},
|
|
42
|
-
metadata: {
|
|
43
|
-
...metadata,
|
|
44
|
-
user: process.env.USER || 'unknown',
|
|
45
|
-
hostname: require('os').hostname(),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
this.activeSession = session;
|
|
50
|
-
await this.saveSession(session);
|
|
51
|
-
|
|
52
|
-
return sessionId;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Save current session state
|
|
57
|
-
* @param {Object} session - Session data to save
|
|
58
|
-
*/
|
|
59
|
-
async saveSession(session = null) {
|
|
60
|
-
const sessionToSave = session || this.activeSession;
|
|
61
|
-
if (!sessionToSave) {
|
|
62
|
-
throw new Error('No active session to save');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
sessionToSave.updated = new Date().toISOString();
|
|
66
|
-
|
|
67
|
-
const sessionPath = this.getSessionPath(sessionToSave.id);
|
|
68
|
-
await fs.writeJson(sessionPath, sessionToSave, { spaces: 2 });
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Load an existing session
|
|
73
|
-
* @param {string} sessionId - Session ID to load
|
|
74
|
-
* @returns {Promise<Object>} Session data
|
|
75
|
-
*/
|
|
76
|
-
async loadSession(sessionId) {
|
|
77
|
-
const sessionPath = this.getSessionPath(sessionId);
|
|
78
|
-
|
|
79
|
-
if (!await fs.pathExists(sessionPath)) {
|
|
80
|
-
throw new Error(`Session ${sessionId} not found`);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const session = await fs.readJson(sessionPath);
|
|
84
|
-
this.activeSession = session;
|
|
85
|
-
|
|
86
|
-
return session;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Update session answers
|
|
91
|
-
* @param {Object} answers - New answers to merge
|
|
92
|
-
* @param {number} stepIndex - Current step index
|
|
93
|
-
*/
|
|
94
|
-
async updateAnswers(answers, stepIndex = null) {
|
|
95
|
-
if (!this.activeSession) {
|
|
96
|
-
throw new Error('No active session');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Merge answers
|
|
100
|
-
Object.assign(this.activeSession.answers, answers);
|
|
101
|
-
|
|
102
|
-
// Update step index if provided
|
|
103
|
-
if (stepIndex !== null) {
|
|
104
|
-
this.activeSession.currentStep = stepIndex;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
await this.saveSession();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* List all sessions
|
|
112
|
-
* @param {Object} filters - Filter options
|
|
113
|
-
* @returns {Promise<Array>} List of sessions
|
|
114
|
-
*/
|
|
115
|
-
async listSessions(filters = {}) {
|
|
116
|
-
const files = await fs.readdir(this.sessionDir);
|
|
117
|
-
const sessions = [];
|
|
118
|
-
|
|
119
|
-
for (const file of files) {
|
|
120
|
-
if (file.endsWith('.json')) {
|
|
121
|
-
try {
|
|
122
|
-
const sessionPath = path.join(this.sessionDir, file);
|
|
123
|
-
const session = await fs.readJson(sessionPath);
|
|
124
|
-
|
|
125
|
-
// Apply filters
|
|
126
|
-
if (filters.type && session.type !== filters.type) continue;
|
|
127
|
-
if (filters.status && session.status !== filters.status) continue;
|
|
128
|
-
if (filters.after && new Date(session.created) < new Date(filters.after)) continue;
|
|
129
|
-
|
|
130
|
-
sessions.push({
|
|
131
|
-
id: session.id,
|
|
132
|
-
type: session.type,
|
|
133
|
-
created: session.created,
|
|
134
|
-
updated: session.updated,
|
|
135
|
-
status: session.status,
|
|
136
|
-
progress: session.totalSteps > 0 ?
|
|
137
|
-
Math.round((session.currentStep / session.totalSteps) * 100) : 0,
|
|
138
|
-
});
|
|
139
|
-
} catch (error) {
|
|
140
|
-
// Skip invalid session files
|
|
141
|
-
console.warn(`Invalid session file: ${file}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Sort by updated date (newest first)
|
|
147
|
-
sessions.sort((a, b) => new Date(b.updated) - new Date(a.updated));
|
|
148
|
-
|
|
149
|
-
return sessions;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Resume a session
|
|
154
|
-
* @param {string} sessionId - Session ID to resume
|
|
155
|
-
* @returns {Promise<Object>} Session data with resume info
|
|
156
|
-
*/
|
|
157
|
-
async resumeSession(sessionId) {
|
|
158
|
-
const session = await this.loadSession(sessionId);
|
|
159
|
-
|
|
160
|
-
// Calculate resume information
|
|
161
|
-
const resumeInfo = {
|
|
162
|
-
...session,
|
|
163
|
-
resumeFrom: session.currentStep,
|
|
164
|
-
completedSteps: Object.keys(session.answers).length,
|
|
165
|
-
remainingSteps: session.totalSteps - session.currentStep,
|
|
166
|
-
percentComplete: session.totalSteps > 0 ?
|
|
167
|
-
Math.round((session.currentStep / session.totalSteps) * 100) : 0,
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
return resumeInfo;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Complete a session
|
|
175
|
-
* @param {string} result - Completion result (success, cancelled, error)
|
|
176
|
-
*/
|
|
177
|
-
async completeSession(result = 'success') {
|
|
178
|
-
if (!this.activeSession) {
|
|
179
|
-
throw new Error('No active session');
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
this.activeSession.status = 'completed';
|
|
183
|
-
this.activeSession.completedAt = new Date().toISOString();
|
|
184
|
-
this.activeSession.result = result;
|
|
185
|
-
|
|
186
|
-
await this.saveSession();
|
|
187
|
-
|
|
188
|
-
// Move to completed directory if success
|
|
189
|
-
if (result === 'success') {
|
|
190
|
-
const completedDir = path.join(this.sessionDir, 'completed');
|
|
191
|
-
await fs.ensureDir(completedDir);
|
|
192
|
-
|
|
193
|
-
const oldPath = this.getSessionPath(this.activeSession.id);
|
|
194
|
-
const newPath = path.join(completedDir, path.basename(oldPath));
|
|
195
|
-
|
|
196
|
-
await fs.move(oldPath, newPath, { overwrite: true });
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
this.activeSession = null;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Delete a session
|
|
204
|
-
* @param {string} sessionId - Session ID to delete
|
|
205
|
-
*/
|
|
206
|
-
async deleteSession(sessionId) {
|
|
207
|
-
const sessionPath = this.getSessionPath(sessionId);
|
|
208
|
-
const completedPath = path.join(this.sessionDir, 'completed', `${sessionId}.json`);
|
|
209
|
-
|
|
210
|
-
// Check both active and completed directories
|
|
211
|
-
if (await fs.pathExists(sessionPath)) {
|
|
212
|
-
await fs.remove(sessionPath);
|
|
213
|
-
} else if (await fs.pathExists(completedPath)) {
|
|
214
|
-
await fs.remove(completedPath);
|
|
215
|
-
} else {
|
|
216
|
-
throw new Error(`Session ${sessionId} not found`);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Clear active session if it matches
|
|
220
|
-
if (this.activeSession && this.activeSession.id === sessionId) {
|
|
221
|
-
this.activeSession = null;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Export session data
|
|
227
|
-
* @param {string} sessionId - Session ID to export
|
|
228
|
-
* @param {string} format - Export format (json, yaml)
|
|
229
|
-
* @returns {Promise<string>} Exported data
|
|
230
|
-
*/
|
|
231
|
-
async exportSession(sessionId, format = 'json') {
|
|
232
|
-
const session = await this.loadSession(sessionId);
|
|
233
|
-
|
|
234
|
-
switch (format) {
|
|
235
|
-
case 'json':
|
|
236
|
-
return JSON.stringify(session, null, 2);
|
|
237
|
-
|
|
238
|
-
case 'yaml':
|
|
239
|
-
const yaml = require('js-yaml');
|
|
240
|
-
return yaml.dump(session);
|
|
241
|
-
|
|
242
|
-
default:
|
|
243
|
-
throw new Error(`Unsupported export format: ${format}`);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Clean up old sessions
|
|
249
|
-
* @param {number} daysOld - Delete sessions older than this many days
|
|
250
|
-
*/
|
|
251
|
-
async cleanupOldSessions(daysOld = 30) {
|
|
252
|
-
const sessions = await this.listSessions();
|
|
253
|
-
const cutoffDate = new Date();
|
|
254
|
-
cutoffDate.setDate(cutoffDate.getDate() - daysOld);
|
|
255
|
-
|
|
256
|
-
let deletedCount = 0;
|
|
257
|
-
|
|
258
|
-
for (const session of sessions) {
|
|
259
|
-
if (new Date(session.updated) < cutoffDate && session.status !== 'active') {
|
|
260
|
-
await this.deleteSession(session.id);
|
|
261
|
-
deletedCount++;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return deletedCount;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Generate a unique session ID
|
|
270
|
-
* @private
|
|
271
|
-
*/
|
|
272
|
-
generateSessionId() {
|
|
273
|
-
return crypto.randomBytes(8).toString('hex');
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Get session file path
|
|
278
|
-
* @private
|
|
279
|
-
*/
|
|
280
|
-
getSessionPath(sessionId) {
|
|
281
|
-
return path.join(this.sessionDir, `${sessionId}.json`);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Get active session
|
|
286
|
-
* @returns {Object|null} Active session or null
|
|
287
|
-
*/
|
|
288
|
-
getActiveSession() {
|
|
289
|
-
return this.activeSession;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Clear active session
|
|
294
|
-
*/
|
|
295
|
-
clearActiveSession() {
|
|
296
|
-
this.activeSession = null;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
module.exports = ElicitationSessionManager;
|
package/.claude/CLAUDE.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
# AIOS-FULLSTACK Development Rules for Claude Code
|
|
2
|
-
|
|
3
|
-
You are working with AIOS-FULLSTACK, an AI-Orchestrated System for Full Stack Development.
|
|
4
|
-
|
|
5
|
-
## Core Framework Understanding
|
|
6
|
-
|
|
7
|
-
AIOS-FULLSTACK is a meta-framework that orchestrates AI agents to handle complex development workflows. Always recognize and work within this architecture.
|
|
8
|
-
|
|
9
|
-
## Agent System
|
|
10
|
-
|
|
11
|
-
### Agent Activation
|
|
12
|
-
- Agents are activated with @agent-name syntax: @dev, @qa, @architect, @pm, @po, @sm, @analyst
|
|
13
|
-
- The master agent is activated with @aios-master
|
|
14
|
-
- Agent commands use the * prefix: *help, *create-story, *task, *exit
|
|
15
|
-
|
|
16
|
-
### Agent Context
|
|
17
|
-
When an agent is active:
|
|
18
|
-
- Follow that agent's specific persona and expertise
|
|
19
|
-
- Use the agent's designated workflow patterns
|
|
20
|
-
- Maintain the agent's perspective throughout the interaction
|
|
21
|
-
|
|
22
|
-
## Development Methodology
|
|
23
|
-
|
|
24
|
-
### Story-Driven Development
|
|
25
|
-
1. **Work from stories** - All development starts with a story in `docs/stories/`
|
|
26
|
-
2. **Update progress** - Mark checkboxes as tasks complete: [ ] → [x]
|
|
27
|
-
3. **Track changes** - Maintain the File List section in the story
|
|
28
|
-
4. **Follow criteria** - Implement exactly what the acceptance criteria specify
|
|
29
|
-
|
|
30
|
-
### Code Standards
|
|
31
|
-
- Write clean, self-documenting code
|
|
32
|
-
- Follow existing patterns in the codebase
|
|
33
|
-
- Include comprehensive error handling
|
|
34
|
-
- Add unit tests for all new functionality
|
|
35
|
-
- Use TypeScript/JavaScript best practices
|
|
36
|
-
|
|
37
|
-
### Testing Requirements
|
|
38
|
-
- Run all tests before marking tasks complete
|
|
39
|
-
- Ensure linting passes: `npm run lint`
|
|
40
|
-
- Verify type checking: `npm run typecheck`
|
|
41
|
-
- Add tests for new features
|
|
42
|
-
- Test edge cases and error scenarios
|
|
43
|
-
|
|
44
|
-
## AIOS Framework Structure
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
aios-core/
|
|
48
|
-
├── agents/ # Agent persona definitions (YAML/Markdown)
|
|
49
|
-
├── tasks/ # Executable task workflows
|
|
50
|
-
├── workflows/ # Multi-step workflow definitions
|
|
51
|
-
├── templates/ # Document and code templates
|
|
52
|
-
├── checklists/ # Validation and review checklists
|
|
53
|
-
└── rules/ # Framework rules and patterns
|
|
54
|
-
|
|
55
|
-
docs/
|
|
56
|
-
├── stories/ # Development stories (numbered)
|
|
57
|
-
├── prd/ # Product requirement documents
|
|
58
|
-
├── architecture/ # System architecture documentation
|
|
59
|
-
└── guides/ # User and developer guides
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Workflow Execution
|
|
63
|
-
|
|
64
|
-
### Task Execution Pattern
|
|
65
|
-
1. Read the complete task/workflow definition
|
|
66
|
-
2. Understand all elicitation points
|
|
67
|
-
3. Execute steps sequentially
|
|
68
|
-
4. Handle errors gracefully
|
|
69
|
-
5. Provide clear feedback
|
|
70
|
-
|
|
71
|
-
### Interactive Workflows
|
|
72
|
-
- Workflows with `elicit: true` require user input
|
|
73
|
-
- Present options clearly
|
|
74
|
-
- Validate user responses
|
|
75
|
-
- Provide helpful defaults
|
|
76
|
-
|
|
77
|
-
## Best Practices
|
|
78
|
-
|
|
79
|
-
### When implementing features:
|
|
80
|
-
- Check existing patterns first
|
|
81
|
-
- Reuse components and utilities
|
|
82
|
-
- Follow naming conventions
|
|
83
|
-
- Keep functions focused and testable
|
|
84
|
-
- Document complex logic
|
|
85
|
-
|
|
86
|
-
### When working with agents:
|
|
87
|
-
- Respect agent boundaries
|
|
88
|
-
- Use appropriate agent for each task
|
|
89
|
-
- Follow agent communication patterns
|
|
90
|
-
- Maintain agent context
|
|
91
|
-
|
|
92
|
-
### When handling errors:
|
|
93
|
-
```javascript
|
|
94
|
-
try {
|
|
95
|
-
// Operation
|
|
96
|
-
} catch (error) {
|
|
97
|
-
console.error(`Error in ${operation}:`, error);
|
|
98
|
-
// Provide helpful error message
|
|
99
|
-
throw new Error(`Failed to ${operation}: ${error.message}`);
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Git & GitHub Integration
|
|
104
|
-
|
|
105
|
-
### Commit Conventions
|
|
106
|
-
- Use conventional commits: `feat:`, `fix:`, `docs:`, `chore:`, etc.
|
|
107
|
-
- Reference story ID: `feat: implement IDE detection [Story 2.1]`
|
|
108
|
-
- Keep commits atomic and focused
|
|
109
|
-
|
|
110
|
-
### GitHub CLI Usage
|
|
111
|
-
- Ensure authenticated: `gh auth status`
|
|
112
|
-
- Use for PR creation: `gh pr create`
|
|
113
|
-
- Check org access: `gh api user/memberships`
|
|
114
|
-
|
|
115
|
-
## AIOS-Specific Patterns
|
|
116
|
-
|
|
117
|
-
### Working with Templates
|
|
118
|
-
```javascript
|
|
119
|
-
const template = await loadTemplate('template-name');
|
|
120
|
-
const rendered = await renderTemplate(template, context);
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Agent Command Handling
|
|
124
|
-
```javascript
|
|
125
|
-
if (command.startsWith('*')) {
|
|
126
|
-
const agentCommand = command.substring(1);
|
|
127
|
-
await executeAgentCommand(agentCommand, args);
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Story Updates
|
|
132
|
-
```javascript
|
|
133
|
-
// Update story progress
|
|
134
|
-
const story = await loadStory(storyId);
|
|
135
|
-
story.updateTask(taskId, { status: 'completed' });
|
|
136
|
-
await story.save();
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Environment Setup
|
|
140
|
-
|
|
141
|
-
### Required Tools
|
|
142
|
-
- Node.js 18+
|
|
143
|
-
- GitHub CLI
|
|
144
|
-
- Git
|
|
145
|
-
- Your preferred package manager (npm/yarn/pnpm)
|
|
146
|
-
|
|
147
|
-
### Configuration Files
|
|
148
|
-
- `.aios/config.yaml` - Framework configuration
|
|
149
|
-
- `.env` - Environment variables
|
|
150
|
-
- `aios.config.js` - Project-specific settings
|
|
151
|
-
|
|
152
|
-
## Common Commands
|
|
153
|
-
|
|
154
|
-
### AIOS Master Commands
|
|
155
|
-
- `*help` - Show available commands
|
|
156
|
-
- `*create-story` - Create new story
|
|
157
|
-
- `*task {name}` - Execute specific task
|
|
158
|
-
- `*workflow {name}` - Run workflow
|
|
159
|
-
|
|
160
|
-
### Development Commands
|
|
161
|
-
- `npm run dev` - Start development
|
|
162
|
-
- `npm test` - Run tests
|
|
163
|
-
- `npm run lint` - Check code style
|
|
164
|
-
- `npm run build` - Build project
|
|
165
|
-
|
|
166
|
-
## Debugging
|
|
167
|
-
|
|
168
|
-
### Enable Debug Mode
|
|
169
|
-
```bash
|
|
170
|
-
export AIOS_DEBUG=true
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### View Agent Logs
|
|
174
|
-
```bash
|
|
175
|
-
tail -f .aios/logs/agent.log
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Trace Workflow Execution
|
|
179
|
-
```bash
|
|
180
|
-
npm run trace -- workflow-name
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Claude Code Specific Configuration
|
|
184
|
-
|
|
185
|
-
### Performance Optimization
|
|
186
|
-
- Prefer batched tool calls when possible for better performance
|
|
187
|
-
- Use parallel execution for independent operations
|
|
188
|
-
- Cache frequently accessed data in memory during sessions
|
|
189
|
-
|
|
190
|
-
### Tool Usage Guidelines
|
|
191
|
-
- Always use the Grep tool for searching, never `grep` or `rg` in bash
|
|
192
|
-
- Use the Task tool for complex multi-step operations
|
|
193
|
-
- Batch file reads/writes when processing multiple files
|
|
194
|
-
- Prefer editing existing files over creating new ones
|
|
195
|
-
|
|
196
|
-
### Session Management
|
|
197
|
-
- Track story progress throughout the session
|
|
198
|
-
- Update checkboxes immediately after completing tasks
|
|
199
|
-
- Maintain context of the current story being worked on
|
|
200
|
-
- Save important state before long-running operations
|
|
201
|
-
|
|
202
|
-
### Error Recovery
|
|
203
|
-
- Always provide recovery suggestions for failures
|
|
204
|
-
- Include error context in messages to user
|
|
205
|
-
- Suggest rollback procedures when appropriate
|
|
206
|
-
- Document any manual fixes required
|
|
207
|
-
|
|
208
|
-
### Testing Strategy
|
|
209
|
-
- Run tests incrementally during development
|
|
210
|
-
- Always verify lint and typecheck before marking complete
|
|
211
|
-
- Test edge cases for each new feature
|
|
212
|
-
- Document test scenarios in story files
|
|
213
|
-
|
|
214
|
-
### Documentation
|
|
215
|
-
- Update relevant docs when changing functionality
|
|
216
|
-
- Include code examples in documentation
|
|
217
|
-
- Keep README synchronized with actual behavior
|
|
218
|
-
- Document breaking changes prominently
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
*AIOS-FULLSTACK Claude Code Configuration v2.0*
|