Make the do-harness.toml sensor map executable: add ./scripts/harness.sh <sensor>

未关闭
#1,217 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, git
领域
tooling

调研方向

Start by reading do-harness.toml and agents-docs/HARNESS.md, then inspect the existing BATS tests under tests/ for harness conventions. Implement the entry point at scripts/harness.sh, using git diff --name-only to resolve changed paths to the canonical sensor command and supporting --all; update agents-docs/HARNESS.md and AGENTS.md if needed. Done means representative paths resolve to the expected sensors, command output and exit status are preserved, and the expanded BATS suite passes.

由索引模型根据 Issue 内容生成。

描述

chore priority: low skills

Summary

do-harness.toml is a well-designed sensor map (path → canonical verification command), but agents-docs/HARNESS.md:35 states it is "a convention, not a tool: no script, hook, or CI job parses it". In practice an agent must re-derive which sensor matches its changed paths and copy the right command by hand — the exact mechanical step that drifts or gets skipped under pressure.

Evidence

  • do-harness.toml — 5 sensors (feedback, verification, offline, schema/data, release).
  • agents-docs/HARNESS.md — documents the "convention, not a tool" decision and says the BATS suite keeps the map honest; but the selection step (which sensor for my diff?) is still manual and error-prone.

Impact

  • Workflow: turns a 3-step manual lookup into ./scripts/harness.sh feedback; agents run the canonical command more often and run the wrong heavy suite less often.
  • Consistency: one executor enforces set -euo pipefail, output truncation, and exit-code propagation uniformly; the BATS suite can then test the runner instead of just the map.
  • Aligned with harness philosophy: this is not speculative config — it automates an existing documented decision procedure.

Proposed approach

  1. Add scripts/harness.sh <sensor> that reads do-harness.toml (a tiny TOML read or a generated mirror in scripts/lib/, mirroring agent_surface_generated.py), matches changed paths via git diff --name-only, and prints/runs the matching sensor command.
  2. Default git diff against the merge-base; accept --all for full verification.
  3. Extend the existing BATS suite (tests/) to cover sensor resolution for representative paths.
  4. Update agents-docs/HARNESS.md and the AGENTS.md pointer if the entry command changes.

References

主要语言
TypeScript
星标
3
派生
2
平均合并
11 小时 49 分钟
30 天内合并 PR
102

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

d-oit/do-knowledge-studio 的其他 Issue

查看 d-oit/do-knowledge-studio 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。