feat: enforce mandatory rationale and role in explore/diagnosis schema output

- Remove oneOf string option from relevant_files/affected_files, require structured objects
- Add required fields: rationale (minLength 10), role/change_type enum
- Add optional fields: discovery_source, key_symbols
- Update all caller commands with new format instructions and success criteria
- Fix consumer code: Map-based dedup, getPath() helper, path extraction
- Fix frontend: f.rationale || f.reason backward-compatible fallback
This commit is contained in:
catlog22
2026-02-13 10:42:37 +08:00
parent 78f1d81516
commit e485f1d69b
16 changed files with 679 additions and 373 deletions

View File

@@ -954,7 +954,7 @@ function renderMultiCliContextContent(context, session) {
<li class="file-item">
<span class="file-icon">📄</span>
<code>${escapeHtml(typeof f === 'string' ? f : f.path || f.file || '')}</code>
${f.reason ? `<span class="file-reason">${escapeHtml(f.reason)}</span>` : ''}
${(f.rationale || f.reason) ? `<span class="file-reason">${escapeHtml(f.rationale || f.reason)}</span>` : ''}
</li>
`).join('')}
</ul>