跳转至

AI Development Workflow

中文版

This workflow covers code, tests, CI, and documentation tasks. It does not authorize remote writes; commits, pushes, and PR creation require an explicit user request.

Read the AI Collaboration Policy first and use the Evidence Report template to record actual evidence at the end.

1. Understand the task and boundary

  • Read AGENTS.md, CLAUDE.md, PROJECT_INSTRUCTIONS.md, and the relevant domain documents first.
  • Root rule files are tool adapters; the repository AI Collaboration Policy defines AI collaboration boundaries.
  • When .codegraph/ exists, use CodeGraph first to locate symbols, call paths, and ownership boundaries.
  • Identify whether the task affects importers, IR, exporters, services, view models, QML, tools, CI, or documentation.
  • Do not treat a plan, a class name, or a UI entry as proof that a capability is complete.

2. Check the worktree and branch

git status --short --branch
git diff --stat
git branch --show-current

Preserve existing user changes. Do not use destructive reset or checkout commands to overwrite them. One reasonably complete issue or development theme maps to one topic branch; the branch may contain multiple related commits. Do not create a branch for every small edit, subtask, or individual commit. Create the topic branch from the version branch that owns the work, and open the Pull Request back to that same version branch instead of committing directly to it. No mandatory branch-name format was found in the repository; naming examples are only suggestions.

3. Implement within the architecture

  • Read the actual files before editing; do not infer interfaces or settings from filenames.
  • Preserve the existing layers: QML → ViewModel → Service → Core/IR/Exporter.
  • Source-format import follows “raw file → format-specific parser/model → IR”; target-format export follows “IR → target exporter/writer → target file”. Data that cannot be expressed must be retained, degraded with a diagnostic, or explicitly rejected.
  • Route all HTTP through NetworkClient; use mocks in tests.
  • Add Simplified Chinese Doxygen comments to public C++ interfaces and follow the existing comment-rate policy.
  • Keep Chinese and English documentation synchronized; use Mermaid for architecture and process diagrams.

4. Verify by risk

Use the AI testing guide and the machine-readable verification policy. Run format checks, focused tests, and documentation checks relevant to the change. Changes to C++, CMake, test infrastructure, or CI require a build and the applicable full tests.

5. Review the change

git diff --check
git diff --stat
git status --short --branch

Check for unrelated files, system Qt, system Python, real-network tests, accidental application-identity changes, and undocumented degradation. Report commercial EDA, real desktop, and cross-platform CI validation only when actually executed. Record the baseline ref/commit, actual commands with exit status, and a reason for every check not run.

6. Commit and PR

  • Commit, push, and create PRs only after an explicit user request.
  • Use Chinese Conventional Commits with a - bullet for each body item.
  • Before creating a PR, confirm source branch, target branch, active GitHub account, commit scope, and verification results.
  • Remote governance, branch protection, and organization settings are not implied authorization in a normal code task.