Skip to content

Conversation

@xxchan
Copy link
Collaborator

@xxchan xxchan commented Jan 21, 2026

Summary

  • add D2 |md block normalization for flow labels
  • allow quoted D2 labels to span multiple lines
  • convert release skill flow to D2 with readable markdown blocks

Testing

  • uv run pytest tests/test_agent_flow.py -k d2

Open with Devin

Copilot AI review requested due to automatic review settings January 21, 2026 11:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for D2 markdown blocks (|md ... |) in flow definitions, allowing more readable multi-line labels in flowcharts. The implementation preprocesses markdown blocks into multi-line quoted strings before parsing, and the parser is updated to preserve newlines within quotes.

Changes:

  • Added markdown block normalization in D2 parser with proper escaping and dedenting
  • Extended parser to preserve newlines inside quoted strings for multi-line labels
  • Converted release skill flow from Mermaid with Chinese labels to D2 with English markdown blocks

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_agent_flow.py Added comprehensive test cases for markdown block parsing, escaping, dedenting, and error handling
src/kimi_cli/skill/flow/d2.py Implemented markdown block normalization, helper functions for comment stripping, dedenting, and escaping, plus parser updates for multi-line quoted strings
.agents/skills/release/SKILL.md Converted flowchart from Mermaid format with Chinese labels to D2 format with English markdown blocks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9200121e2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xxchan xxchan requested a review from stdrc January 21, 2026 12:58
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional flags.

Open in Devin Review

@stdrc stdrc merged commit a84c8f0 into main Jan 22, 2026
9 checks passed
@stdrc stdrc deleted the feat-d2-block-string branch January 22, 2026 11:45
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.

3 participants