You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EN: Add a narrow method-lane feature so method frontmatter can declare and project allowed_skills, suggested_tools, expected_artifacts, and approval_gates.
中文:补一个窄的 method lane 功能,让 method frontmatter 支持并投影 allowed_skills、suggested_tools、expected_artifacts、approval_gates。
Why / 背景
EN: MethodProjection already has these fields, but current method compilation/projection does not populate them from method frontmatter. This leaves method assets unable to explicitly compose with skills/tools/artifact expectations even though the projection contract has room for it.
If PR Define method facts contract / 定义 method facts 契约 #120 has landed before this is implemented, also update docs/internals/architecture/coding/method-facts-contract.md only if needed for clarity. These four projection fields are MethodProjection fields, not plan_facts / step_facts.
Acceptance Criteria / 验收标准
A method descriptor with frontmatter declaring all four fields compiles to a step whose projection retains normalized tuple values.
MethodProjector.project(...) copies those values into the corresponding MethodProjection fields.
Invalid values are ignored or filtered without raising for otherwise valid methods.
Existing method projection behavior remains unchanged when fields are absent.
Tests prove the projection fields are populated and defaults remain empty tuples.
Documentation explains that these are projection hints for downstream composition, not execution guarantees.
Verification / 验证
Run from the method lane:
uv --cache-dir .uv-cache run --extra dev pytest tests/method/test_method_compiler.py tests/method/test_method_projection.py -q
uv --cache-dir .uv-cache run --extra dev pytest tests/method tests/coding/domain/test_coding_domain_app.py -q
uv --cache-dir .uv-cache run --extra dev ruff check src/loushang/method tests/method
Lane Brief / 执行说明
Lane: method
For human executors:
Follow repository/workspace AGENTS.md lane rules.
Use the method lane worktree and a task branch based on current main / origin/main.
Start with git status --short --branch.
Preserve unrelated dirty changes.
Prefer opening the PR as Draft first; convert to Ready only after targeted verification and review have no P0/P1 findings.
For the method lane agent:
You are the method lane agent.
Resolve the actual worktree from Lane: method; do not assume an absolute path.
Keep the change narrow. This is a compiler/projector contract slice, not a skill execution feature.
Report changed files, contract decisions, verification commands/results, and any residual follow-up issues.
Summary / 摘要
EN: Add a narrow method-lane feature so method frontmatter can declare and project
allowed_skills,suggested_tools,expected_artifacts, andapproval_gates.中文:补一个窄的 method lane 功能,让 method frontmatter 支持并投影
allowed_skills、suggested_tools、expected_artifacts、approval_gates。Why / 背景
EN:
MethodProjectionalready has these fields, but current method compilation/projection does not populate them from method frontmatter. This leaves method assets unable to explicitly compose with skills/tools/artifact expectations even though the projection contract has room for it.中文:
MethodProjection已经有这些字段,但当前 method 编译/投影链路还没有从 method frontmatter 填充它们。结果是 method asset 还不能显式组合 skill/tool/artifact expectation,尽管 projection contract 已经预留了字段。Scope / 范围
Implement frontmatter support for:
allowed_skillssuggested_toolsexpected_artifactsapproval_gatesExpected data flow:
Suggested frontmatter semantics:
tuple[str, ...].Non-Goals / 非目标
--method.--method.Suggested Files / 建议文件
src/loushang/method/compiler.pysrc/loushang/method/projection.pytests/method/test_method_compiler.pytests/method/test_method_projection.pydocs/internals/architecture/coding/component-interfaces/method.mddocs/internals/architecture/coding/method-facts-contract.mdonly if needed for clarity. These four projection fields areMethodProjectionfields, notplan_facts/step_facts.Acceptance Criteria / 验收标准
MethodProjector.project(...)copies those values into the correspondingMethodProjectionfields.Verification / 验证
Run from the method lane:
Lane Brief / 执行说明
Lane:
methodFor human executors:
AGENTS.mdlane rules.main/origin/main.git status --short --branch.For the method lane agent:
Lane: method; do not assume an absolute path.