Skip to content

feat(prompt): include req_changed diagnostics in --prompt output#6

Closed
xen0n wants to merge 5 commits into
mainfrom
feat/prompt-req-changed
Closed

feat(prompt): include req_changed diagnostics in --prompt output#6
xen0n wants to merge 5 commits into
mainfrom
feat/prompt-req-changed

Conversation

@xen0n

@xen0n xen0n commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add req_changed groups to --prompt output
  • fix the shifted_span template to match emitted item fields
  • update the prompt output design doc and JSON schema
  • add golden coverage for the req_changed prompt group

Testing

  • cargo test
  • cargo clippy -- -D warnings

xen0n added 5 commits March 21, 2026 19:24
The TMPL_SHIFTED_SPAN template used {old_start}, {old_end}, {new_start},
{new_end} but the code produces old_span and new_span as arrays.
Fix the template to use the correct variable names.

Signed-off-by: WANG Xuerui <git@xen0n.name>
The --prompt mode now includes req_changed diagnostics, which fire when
a related requirement's text has changed. This completes the coverage of
all actionable diagnostic types in prompt mode.

- Add TMPL_REQ_CHANGED template with instructions to run liyi approve
- Handle DiagnosticKind::ReqChanged in build_prompt_output
- Add test fixture verification for req_changed prompt group

Signed-off-by: WANG Xuerui <git@xen0n.name>
Update the design document to reflect that ReqChanged diagnostics are
now included in --prompt output, bringing the total to seven
diagnostic types.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Add the req_changed diagnostic type to the prompt output schema,
including the enum value and the reqChangedItem definition for
validation.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: WANG Xuerui <git@xen0n.name>
@xen0n
xen0n force-pushed the feat/prompt-req-changed branch from 2041d71 to f9cec6c Compare March 21, 2026 11:24
@xen0n xen0n closed this Mar 26, 2026
@xen0n

xen0n commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

Failed instruction following, not even AIGC trailers. Sigh.

@xen0n
xen0n deleted the feat/prompt-req-changed branch March 26, 2026 01:26
xen0n added a commit that referenced this pull request Jun 1, 2026
Risk #6 (Agent reliability spectrum) and "The cognitive load inversion"
section both make the "unreliable agents make the linter more valuable,
not less" argument. The cognitive-load section is the canonical
treatment (it develops the --prompt inversion, the MUST/SHOULD/REFERENCE
tiers, and the value-proposition reframing in full). Keep Risk #6's
unique content -- the five-problem diagnosis of why AGENTS.md is poorly
optimized for weak models, and the action item -- and compress its
second paragraph, which re-derived the cognitive-load section's
"Implications", into a one-line statement plus cross-reference. Risk #6
already points to that section for the remedy.

Original prompt:

> please go through the liyi-design.md and identify streamlining
> chances -- the document underwent multiple rounds of reviews and
> iterative improvement from multiple models, and there may well be
> redundant reasoning and info here and there.

AI-assisted-by: Claude Opus 4.8 (GitHub Copilot)
Signed-off-by: WANG Xuerui <git@xen0n.name>
xen0n added a commit that referenced this pull request Jun 1, 2026
Risk #6 (Agent reliability spectrum) and "The cognitive load inversion"
section both make the "unreliable agents make the linter more valuable,
not less" argument. The cognitive-load section is the canonical
treatment (it develops the --prompt inversion, the MUST/SHOULD/REFERENCE
tiers, and the value-proposition reframing in full). Keep Risk #6's
unique content -- the five-problem diagnosis of why AGENTS.md is poorly
optimized for weak models, and the action item -- and compress its
second paragraph, which re-derived the cognitive-load section's
"Implications", into a one-line statement plus cross-reference. Risk #6
already points to that section for the remedy.

Original prompt:

> please go through the liyi-design.md and identify streamlining
> chances -- the document underwent multiple rounds of reviews and
> iterative improvement from multiple models, and there may well be
> redundant reasoning and info here and there.

AI-assisted-by: Claude Opus 4.8 (GitHub Copilot)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant