mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
docs(issue/new): update Phase 5 to use ccw issue create endpoint
Replace manual Bash echo with CLI endpoint documentation: - Auto-increment ID: ISS-YYYYMMDD-NNN - Proper JSONL format with trailing newline - JSON output with created issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,61 +167,49 @@ if (clarityScore < 2 && (!issueData.context || issueData.context.length < 20)) {
|
|||||||
|
|
||||||
### Phase 5: Create Issue
|
### Phase 5: Create Issue
|
||||||
|
|
||||||
```javascript
|
**Summary Display:**
|
||||||
// Show summary and create
|
- Show ID, title, source, affected files (if any)
|
||||||
console.log(`
|
|
||||||
## Creating Issue
|
|
||||||
|
|
||||||
**ID**: ${issueData.id}
|
**Confirmation** (only for vague inputs, clarityScore < 2):
|
||||||
**Title**: ${issueData.title}
|
- Use `AskUserQuestion` to confirm before creation
|
||||||
**Source**: ${issueData.source}
|
|
||||||
${issueData.affected_components?.length ? `**Files**: ${issueData.affected_components.slice(0, 3).join(', ')}` : ''}
|
|
||||||
`);
|
|
||||||
|
|
||||||
// Quick confirm only for vague inputs
|
**Issue Creation** (via CLI endpoint):
|
||||||
let proceed = true;
|
```bash
|
||||||
if (clarityScore < 2) {
|
ccw issue create --data '{"title":"...", "context":"...", "priority":3, ...}'
|
||||||
const confirm = AskUserQuestion({
|
```
|
||||||
questions: [{
|
|
||||||
question: 'Create this issue?',
|
|
||||||
header: 'Confirm',
|
|
||||||
multiSelect: false,
|
|
||||||
options: [
|
|
||||||
{ label: 'Create', description: 'Save to issues.jsonl (Recommended)' },
|
|
||||||
{ label: 'Cancel', description: 'Discard' }
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
proceed = !confirm.includes('Cancel');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (proceed) {
|
**CLI Endpoint Features:**
|
||||||
const newIssue = {
|
| Feature | Description |
|
||||||
id: issueData.id,
|
|---------|-------------|
|
||||||
title: issueData.title || 'Untitled Issue',
|
| Auto-increment ID | `ISS-YYYYMMDD-NNN` (e.g., `ISS-20251229-001`) |
|
||||||
status: 'registered',
|
| Trailing newline | Proper JSONL format, no corruption |
|
||||||
priority: flags.priority ? parseInt(flags.priority) : 3,
|
| JSON output | Returns created issue with all fields |
|
||||||
context: issueData.context,
|
|
||||||
source: issueData.source,
|
|
||||||
source_url: issueData.source_url || null,
|
|
||||||
labels: issueData.labels || [],
|
|
||||||
expected_behavior: issueData.expected_behavior || null,
|
|
||||||
actual_behavior: issueData.actual_behavior || null,
|
|
||||||
affected_components: issueData.affected_components || [],
|
|
||||||
feedback: issueData.feedback || [],
|
|
||||||
bound_solution_id: null,
|
|
||||||
created_at: new Date().toISOString(),
|
|
||||||
updated_at: new Date().toISOString()
|
|
||||||
};
|
|
||||||
|
|
||||||
Bash('mkdir -p .workflow/issues');
|
**Example:**
|
||||||
const jsonLine = JSON.stringify(newIssue).replace(/'/g, "'\\''");
|
```bash
|
||||||
Bash(`echo '${jsonLine}' >> .workflow/issues/issues.jsonl`);
|
# Create issue via CLI
|
||||||
|
ccw issue create --data '{
|
||||||
|
"title": "Login fails with special chars",
|
||||||
|
"context": "500 error when password contains quotes",
|
||||||
|
"priority": 2,
|
||||||
|
"source": "text",
|
||||||
|
"expected_behavior": "Login succeeds",
|
||||||
|
"actual_behavior": "500 Internal Server Error"
|
||||||
|
}'
|
||||||
|
|
||||||
console.log(`✓ Issue ${newIssue.id} created. Next: /issue:plan ${newIssue.id}`);
|
# Output (JSON)
|
||||||
|
{
|
||||||
|
"id": "ISS-20251229-001",
|
||||||
|
"title": "Login fails with special chars",
|
||||||
|
"status": "registered",
|
||||||
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Completion:**
|
||||||
|
- Display created issue ID
|
||||||
|
- Show next step: `/issue:plan <id>`
|
||||||
|
|
||||||
## Execution Flow
|
## Execution Flow
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user