mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-15 02:42:45 +08:00
Add quality standards and team command design patterns documentation
- Introduced a new quality standards document outlining assessment criteria for team command .md files, including completeness, pattern compliance, integration, and consistency dimensions. - Established quality gates and issue classification for errors, warnings, and informational notes. - Created a comprehensive team command design patterns document detailing infrastructure and collaboration patterns, including message bus integration, YAML front matter requirements, task lifecycle, five-phase execution structure, and error handling. - Included a pattern selection guide for collaboration scenarios to enhance team interaction models.
This commit is contained in:
@@ -66,13 +66,15 @@ interface Task {
|
||||
scope: string; // Required: module path or feature area
|
||||
action: Action; // Required: Create|Update|Implement|...
|
||||
description?: string;
|
||||
modification_points?: Array<{file, target, change}>;
|
||||
files?: Array<{path, target?, change?, action?, conflict_risk?}>;
|
||||
modification_points?: Array<{file, target, change}>; // Legacy, prefer files
|
||||
implementation: string[]; // Required: step-by-step guide
|
||||
test?: { unit?, integration?, commands?, coverage_target? };
|
||||
acceptance: { criteria: string[], verification: string[] }; // Required
|
||||
test?: { unit?, integration?, commands?, coverage_target?, manual_checks? };
|
||||
convergence: { criteria: string[], verification?: string | string[] }; // Required
|
||||
acceptance?: { criteria: string[], verification: string[] }; // Legacy, prefer convergence
|
||||
commit?: { type, scope, message_template, breaking? };
|
||||
depends_on?: string[];
|
||||
priority?: number; // 1-5 (default: 3)
|
||||
priority?: string | number; // "critical"|"high"|"medium"|"low" or 1-5
|
||||
}
|
||||
|
||||
type Action = 'Create' | 'Update' | 'Implement' | 'Refactor' | 'Add' | 'Delete' | 'Configure' | 'Test' | 'Fix';
|
||||
@@ -187,19 +189,16 @@ function extractFromLitePlan(folderPath) {
|
||||
scope: t.scope || '',
|
||||
action: t.action || 'Implement',
|
||||
description: t.description || t.title,
|
||||
modification_points: t.modification_points || [],
|
||||
files: t.files || (t.modification_points || []).map(mp => ({path: mp.file, target: mp.target, change: mp.change})),
|
||||
implementation: Array.isArray(t.implementation) ? t.implementation : [t.implementation || ''],
|
||||
test: t.verification ? {
|
||||
unit: t.verification.unit_tests,
|
||||
integration: t.verification.integration_tests,
|
||||
commands: t.verification.manual_checks
|
||||
} : {},
|
||||
acceptance: {
|
||||
criteria: Array.isArray(t.acceptance) ? t.acceptance : [t.acceptance || ''],
|
||||
verification: t.verification?.manual_checks || []
|
||||
},
|
||||
convergence: normalizeConvergence(t.acceptance, t.convergence),
|
||||
depends_on: t.depends_on || [],
|
||||
priority: 3
|
||||
priority: t.priority || 'medium'
|
||||
})),
|
||||
metadata: {
|
||||
source_type: 'lite-plan',
|
||||
@@ -243,13 +242,10 @@ function extractFromWorkflowSession(sessionPath) {
|
||||
scope: task.scope || inferScopeFromTask(task),
|
||||
action: capitalizeAction(task.type) || 'Implement',
|
||||
description: task.description,
|
||||
modification_points: task.implementation?.modification_points || [],
|
||||
files: task.files || (task.implementation?.modification_points || []).map(mp => ({path: mp.file, target: mp.target, change: mp.change})),
|
||||
implementation: task.implementation?.steps || [],
|
||||
test: task.implementation?.test || {},
|
||||
acceptance: {
|
||||
criteria: task.acceptance_criteria || [],
|
||||
verification: task.verification_steps || []
|
||||
},
|
||||
convergence: normalizeConvergence(task.acceptance_criteria, task.convergence),
|
||||
commit: task.commit,
|
||||
depends_on: (task.depends_on || []).map(d => d.replace(/^IMPL-0*/, 'T')),
|
||||
priority: task.priority || 3
|
||||
@@ -271,10 +267,11 @@ function extractFromWorkflowSession(sessionPath) {
|
||||
}
|
||||
|
||||
function inferScopeFromTask(task) {
|
||||
if (task.implementation?.modification_points?.length) {
|
||||
const files = task.implementation.modification_points.map(m => m.file);
|
||||
// Find common directory prefix
|
||||
const dirs = files.map(f => f.split('/').slice(0, -1).join('/'));
|
||||
// Prefer new files[] field, fall back to legacy modification_points
|
||||
const filePaths = task.files?.map(f => f.path) ||
|
||||
task.implementation?.modification_points?.map(m => m.file) || [];
|
||||
if (filePaths.length) {
|
||||
const dirs = filePaths.map(f => f.split('/').slice(0, -1).join('/'));
|
||||
return [...new Set(dirs)][0] || '';
|
||||
}
|
||||
return '';
|
||||
@@ -339,15 +336,12 @@ ${fileContent}`;
|
||||
scope: t.scope || '',
|
||||
action: validateAction(t.action) || 'Implement',
|
||||
description: t.description || t.title,
|
||||
modification_points: t.modification_points || [],
|
||||
files: t.files || (t.modification_points || []).map(mp => ({path: mp.file, target: mp.target, change: mp.change})),
|
||||
implementation: Array.isArray(t.implementation) ? t.implementation : [t.implementation || ''],
|
||||
test: t.test || {},
|
||||
acceptance: {
|
||||
criteria: Array.isArray(t.acceptance) ? t.acceptance : [t.acceptance || ''],
|
||||
verification: t.verification || []
|
||||
},
|
||||
convergence: normalizeConvergence(t.acceptance, t.convergence),
|
||||
depends_on: t.depends_on || [],
|
||||
priority: t.priority || 3
|
||||
priority: t.priority || 'medium'
|
||||
}));
|
||||
|
||||
return {
|
||||
@@ -391,12 +385,12 @@ function extractFromJsonFile(filePath) {
|
||||
scope: t.scope || '',
|
||||
action: t.action || 'Implement',
|
||||
description: t.description || t.title,
|
||||
modification_points: t.modification_points || [],
|
||||
files: t.files || (t.modification_points || []).map(mp => ({path: mp.file, target: mp.target, change: mp.change})),
|
||||
implementation: Array.isArray(t.implementation) ? t.implementation : [t.implementation || ''],
|
||||
test: t.test || t.verification || {},
|
||||
acceptance: normalizeAcceptance(t.acceptance),
|
||||
convergence: normalizeConvergence(t.acceptance, t.convergence),
|
||||
depends_on: t.depends_on || [],
|
||||
priority: t.priority || 3
|
||||
priority: t.priority || 'medium'
|
||||
}));
|
||||
|
||||
return {
|
||||
@@ -416,11 +410,13 @@ function extractFromJsonFile(filePath) {
|
||||
throw new Error('E002: JSON file does not contain valid plan structure (missing tasks array)');
|
||||
}
|
||||
|
||||
function normalizeAcceptance(acceptance) {
|
||||
if (!acceptance) return { criteria: [], verification: [] };
|
||||
if (typeof acceptance === 'object' && acceptance.criteria) return acceptance;
|
||||
if (Array.isArray(acceptance)) return { criteria: acceptance, verification: [] };
|
||||
return { criteria: [String(acceptance)], verification: [] };
|
||||
function normalizeConvergence(acceptance, convergence) {
|
||||
// Prefer new convergence field; fall back to legacy acceptance
|
||||
const source = convergence || acceptance;
|
||||
if (!source) return { criteria: [], verification: [] };
|
||||
if (typeof source === 'object' && source.criteria) return source;
|
||||
if (Array.isArray(source)) return { criteria: source, verification: [] };
|
||||
return { criteria: [String(source)], verification: [] };
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user