Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

## 0.7.16 - 2026-09-13

对使用者的影响:新增开发线增量审查靶区提取与本地门禁核验(`dyro review verify` 与 `dyro review pack`),大幅降低多仓协同中代码审查与 LLM 交互的 Token 消耗与注意力稀释。

- 新增 `dyro review verify --line <LINE>`:一键自动化运行指定开发线各挂载仓的本地静态门禁,0 Token 拦截编译错误、类型错误与语法测试报错。
- 新增 `dyro review pack --line <LINE> [--scope contracts|all|summary] [--out <PATH>]`:自动提取跨仓增量 Diff,自动识别高危 Schema/DTO/API 契约文件并建立索引;支持 `--scope contracts`(仅提取核心契约Diff,默认)、`--scope all`(全量Diff带防膨胀截断)与 `--scope summary`(仅改动索引总览),将输入 Token 压缩 90% 以上。

## 0.7.15 - 2026-09-12

对使用者的影响:`dyro dispatch` 的异步运行不再因为并发读取运行状态而
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dyro"
version = "0.7.15"
version = "0.7.16"
description = "DyroEngineeringFlow: local-first automation and delivery control for multi-repository teams"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
2 changes: 1 addition & 1 deletion src/dyro/bridge/skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ release, publish, console, install, or any confirmation/approval field.
```json
{
"protocol": {"major": 1, "minor": 0},
"client": {"name": "dyro-agent-bridge-skill", "version": "0.7.15"},
"client": {"name": "dyro-agent-bridge-skill", "version": "0.7.16"},
"operation": "bridge.capabilities.compact",
"input": {}
}
Expand Down
64 changes: 64 additions & 0 deletions src/dyro/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3232,6 +3232,50 @@ def cmd_changeset_verify(args: argparse.Namespace) -> None:
raise DyroError(f"Change Set {args.id} 未通过核验")


def cmd_review_verify(args: argparse.Namespace) -> None:
from .review_pack import run_line_verify
from .workspace import get_line

config = _config(args)
line = get_line(config, args.line)
results = run_line_verify(config, line, dry_run=args.dry_run)
if not results:
print(f"开发线 {line.id} 无已配置门禁指令。")
return
failures = [r for r in results if not r.passed]
for r in results:
status_str = "PASS" if r.passed else "FAIL"
print(f"[{status_str}] {r.repo_id}: {' '.join(r.argv)} ({r.elapsed_seconds:.2f}s)")
if not r.passed and r.stdout:
print(" --- 失败日志摘录 ---\n " + "\n ".join(r.stdout.splitlines()[-15:]))
if failures:
raise DyroError(f"开发线 {line.id} 本地静态门禁未通过({len(failures)}/{len(results)} 失败)")
print(f"\n全部门禁通过(共 {len(results)} 项)。")


def cmd_review_pack(args: argparse.Namespace) -> None:
from .review_pack import build_review_pack
from pathlib import Path

config = _config(args)
content = build_review_pack(
config,
args.line,
base=args.base,
scope=args.scope,
run_verify=not args.no_verify,
max_lines_per_file=args.max_lines,
dry_run=args.dry_run,
)
if args.out:
out_path = Path(args.out)
out_path.parent.mkdir(parents=True, exist_ok=True)
out_path.write_text(content, encoding="utf-8")
print(f"已生成审查靶区包:{out_path}")
else:
print(content)


def cmd_task_create(args: argparse.Namespace) -> None:
config = _config(args)
validate_id(args.id, "任务 ID")
Expand Down Expand Up @@ -5353,6 +5397,26 @@ def build_parser() -> argparse.ArgumentParser:
)
changeset_verify.set_defaults(func=cmd_changeset_verify)

review = sub.add_parser("review", help="开发线增量审查靶区提取与门禁核验")
review_sub = review.add_subparsers(dest="review_command", required=True)
review_verify = review_sub.add_parser("verify", help="运行开发线各仓本地 verify 静态门禁")
review_verify.add_argument("--line", required=True, help="开发线 ID")
review_verify.set_defaults(func=cmd_review_verify)

review_pack = review_sub.add_parser("pack", help="提取开发线跨仓精简 Diff 与审查上下文")
review_pack.add_argument("--line", required=True, help="开发线 ID")
review_pack.add_argument("--base", help="对比基线;默认开发线 base")
review_pack.add_argument(
"--scope",
choices=("contracts", "all", "summary"),
default="contracts",
help="审查靶区范围:contracts (仅核心契约/协议Diff,默认), all (全量文件Diff), summary (仅改动索引不含Diff)",
)
review_pack.add_argument("--no-verify", action="store_true", help="跳过本地 verify 门禁检查")
review_pack.add_argument("--max-lines", type=int, default=250, help="单文件 Diff 最大保留行数(防 Token 膨胀)")
review_pack.add_argument("--out", help="输出 Markdown 审查包文件路径;默认标准输出")
review_pack.set_defaults(func=cmd_review_pack)

objective = sub.add_parser(
"objective", help="持久化并观察一个跨任务 Objective;此阶段不执行 Task"
)
Expand Down
Loading
Loading