mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
refactor(issue): simplify Issue schema and remove lifecycle_requirements
Schema changes:
- Remove lifecycle_requirements (deferred to plan agent)
- Remove solution_count (computed dynamically from solutions/*.jsonl)
- Keep context as single source of truth (remove problem_statement)
- Add feedback[] for failure history + human clarifications
- Add source, source_url, labels, expected/actual_behavior
Fields removed (unused downstream):
- lifecycle_requirements.test_strategy
- lifecycle_requirements.regression_scope
- lifecycle_requirements.acceptance_type
- lifecycle_requirements.commit_strategy
- solution_count (denormalized)
Fields added:
- feedback[]: { type, stage, content, created_at }
- source, source_url, labels
- expected_behavior, actual_behavior, affected_components
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,14 +18,34 @@ process.stdout.on('error', (err: NodeJS.ErrnoException) => {
|
||||
|
||||
// ============ Interfaces ============
|
||||
|
||||
interface IssueFeedback {
|
||||
type: 'failure' | 'clarification' | 'rejection';
|
||||
stage: string; // new/plan/execute
|
||||
content: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface Issue {
|
||||
id: string;
|
||||
title: string;
|
||||
status: 'registered' | 'planning' | 'planned' | 'queued' | 'executing' | 'completed' | 'failed' | 'paused';
|
||||
priority: number;
|
||||
context: string;
|
||||
context: string; // Problem description (single source of truth)
|
||||
source?: 'github' | 'text' | 'discovery';
|
||||
source_url?: string;
|
||||
labels?: string[];
|
||||
|
||||
// Optional structured fields
|
||||
expected_behavior?: string;
|
||||
actual_behavior?: string;
|
||||
affected_components?: string[];
|
||||
|
||||
// Feedback history (failures + human clarifications)
|
||||
feedback?: IssueFeedback[];
|
||||
|
||||
// Solution binding
|
||||
bound_solution_id: string | null;
|
||||
solution_count: number;
|
||||
|
||||
// Timestamps
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
@@ -472,7 +492,6 @@ async function initAction(issueId: string | undefined, options: IssueOptions): P
|
||||
priority: options.priority ? parseInt(options.priority) : 3,
|
||||
context: options.description || '',
|
||||
bound_solution_id: null,
|
||||
solution_count: 0,
|
||||
created_at: new Date().toISOString(),
|
||||
updated_at: new Date().toISOString()
|
||||
};
|
||||
@@ -531,7 +550,8 @@ async function listAction(issueId: string | undefined, options: IssueOptions): P
|
||||
'paused': chalk.magenta
|
||||
}[issue.status] || chalk.white;
|
||||
|
||||
const bound = issue.bound_solution_id ? `[${issue.bound_solution_id}]` : `${issue.solution_count}`;
|
||||
const solutionCount = readSolutions(issue.id).length;
|
||||
const bound = issue.bound_solution_id ? `[${issue.bound_solution_id}]` : `${solutionCount}`;
|
||||
console.log(
|
||||
issue.id.padEnd(20) +
|
||||
statusColor(issue.status.padEnd(15)) +
|
||||
@@ -867,7 +887,6 @@ async function bindAction(issueId: string | undefined, solutionId: string | unde
|
||||
writeSolutions(issueId, solutions);
|
||||
updateIssue(issueId, {
|
||||
bound_solution_id: solutionId,
|
||||
solution_count: solutions.length,
|
||||
status: 'planned',
|
||||
planned_at: new Date().toISOString()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user