Skip to content

Commit 9a92cae

Browse files
committed
docs: route live create-thread evidence
1 parent 72f6a41 commit 9a92cae

5 files changed

Lines changed: 34 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable public changes to Team First Development are documented here.
44

55
## Unreleased
66

7+
- Add live `create_thread` model-allowlist evidence to TEAM scanning: pass observed exact IDs with repeated `--create-thread-model` flags, omit that input rather than reuse cached identifiers when metadata is unavailable, and prefer `create_thread_eligible_models` before the legacy `eligible_models` `spawn_agent` fallback.
8+
79
## 2.1.0 - 2026-07-25
810

911
- Assess every non-hidden live account model with sourced pros/cons and role-fit-first scoring, while keeping the optional Spark preference bonus bounded below role fit and execution hard gates.

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Use tfd:using-tfd to complete this development task.
103103

104104
在 TEAM 阶段,TFD 扫描当前活跃 Codex 账户可用的全部可见与隐藏模型,并对每个非隐藏账户模型评估有来源证据的优点和缺点。评分以角色适配为先;可选的 Spark 偏好加分有界,最多五分,不能覆盖更强的角色适配或执行硬门槛。推荐会独立记录模型支持的推理强度和面向具体角色的理由,不与执行路径混为一谈。
105105

106-
执行时,TFD 只在当前实时能力证据验证通过后,才首选 `create_thread` 作为执行后端;否则其状态保持 `UNVERIFIED`,不会把不可用后端声称为可执行。TFD 保留 `spawn_agent` 作为回退,并严格限制在实时精确 ID 交集 `eligible_models` 内。若该交集为空,扫描仍会通过并保留完整推荐目录,同时由 `execution_readiness` 报告 `BLOCKER/no_verified_execution_backend`;需要实际执行时,TEAM 必须以此阻塞。推荐不代表可执行,也不保证配额、可用性、账户身份或跨会话恢复。这一过程不会配置模型或暴露凭据,session-only 模式不会把证据写入 `.tfd`
106+
执行时,TEAM 会从实时工具元数据同时读取当前 `create_thread` 与 `spawn_agent` 的模型 allowlist,并把每个观察到的精确 ID 分别以一次 `--create-thread-model` 或 `--runtime-allowed-model` 参数传给扫描器。若 `create_thread` 元数据不可用,TEAM 会省略 `--create-thread-model`,不得传入缓存的标识符,并将该后端保持为 `UNVERIFIED`。TFD 首选 `create_thread` 作为执行后端,但仅在所选模型位于 `create_thread_eligible_models` 时执行;否则保留 `spawn_agent` 作为回退,并严格限制在实时精确 ID 交集 legacy `eligible_models` 内。TFD 不会把不可用后端声称为可执行。若两个 eligible 集合均不能提供执行对,扫描仍会通过并保留完整推荐目录,同时由 `execution_readiness` 报告 `BLOCKER/no_verified_execution_backend`;需要实际执行时,TEAM 必须以此阻塞。推荐不代表可执行,也不保证配额、可用性、账户身份或跨会话恢复。这一过程不会配置模型或暴露凭据,session-only 模式不会把证据写入 `.tfd`。
107107

108108
TFD 会先确认事实和授权范围,搜索角色能力,提出团队名单与章程,并等待批准;只有当用户已经提供完整、指名且有边界的委派时才会跳过等待。批准后,仅加载已选中的角色。
109109

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The plugin has a four-Skill architecture. `tfd:using-tfd` owns the complete work
103103

104104
At the TEAM stage, TFD scans all visible and hidden models available to the active Codex account and assesses every non-hidden account model with evidence-bound pros and cons. Role-fit-first scoring remains primary; an optional Spark preference bonus is bounded to five points and cannot override role fit or an execution hard gate. The recommendation records a supported reasoning effort and role-specific rationale independently from the execution route.
105105

106-
For execution, TFD prefers `create_thread` as the execution backend only when current live capability evidence verifies it. Otherwise it remains `UNVERIFIED`, and TFD does not claim an unavailable backend is executable. TFD retains `spawn_agent` as a fallback restricted to the live exact-ID `eligible_models` intersection. If that intersection is empty, the scan still passes and retains the complete recommendation catalog, while `execution_readiness` reports `BLOCKER/no_verified_execution_backend`; when execution is required, TEAM must stop with that blocker. A recommendation does not imply execution, quota, availability, account identity, or cross-session recovery. This process neither configures models nor exposes credentials, and session-only mode does not persist the evidence in `.tfd`.
106+
For execution, TEAM reads the current `create_thread` and `spawn_agent` model allowlists from live tool metadata, then passes each observed exact identifier once to the scanner with its respective `--create-thread-model` or `--runtime-allowed-model` flag. If `create_thread` metadata is unavailable, TEAM omits `--create-thread-model`, must not pass cached identifiers, and leaves that backend `UNVERIFIED`. TFD prefers `create_thread` as the execution backend only when a selected model is in `create_thread_eligible_models`; otherwise it retains `spawn_agent` as a fallback restricted to the live exact-ID legacy `eligible_models` intersection. TFD does not claim an unavailable backend is executable. If neither eligible set provides an execution pair, the scan still passes and retains the complete recommendation catalog, while `execution_readiness` reports `BLOCKER/no_verified_execution_backend`; when execution is required, TEAM must stop with that blocker. Because recommendation does not imply execution, it does not guarantee quota, availability, account identity, or cross-session recovery. This process neither configures models nor exposes credentials, and session-only mode does not persist the evidence in `.tfd`.
107107

108108
TFD first establishes facts and authority, searches role capabilities, proposes a roster and charter, and waits for approval unless the user supplied complete named and bounded delegation. Only selected roles are loaded after approval.
109109

plugins/tfd/scripts/test_team_skill_contract.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,18 @@ def test_team_requires_fresh_live_model_evidence_before_roster_proposal(
8080
self,
8181
) -> None:
8282
self.assertIn(
83-
"Coordinator must read the current spawn_agent model allowlist from live tool metadata",
84-
self.content,
83+
"current create_thread model allowlist from live tool metadata",
84+
self.normalized,
85+
)
86+
self.assertIn(
87+
"current spawn_agent model allowlist from live tool metadata",
88+
self.normalized,
8589
)
8690
self.assertIn("<plugin-root>/scripts/model_catalog.py", self.content)
91+
self.assertIn("--create-thread-model", self.content)
92+
self.assertIn("--runtime-allowed-model", self.content)
93+
self.assertIn("omit `--create-thread-model`", self.content)
94+
self.assertIn("must not pass cached identifiers", self.normalized)
8795
self.assertIn(
8896
"cached output and repository documentation are insufficient",
8997
self.normalized,
@@ -112,6 +120,14 @@ def test_every_member_separates_recommendation_from_execution_fields(
112120
"spawn_agent execution_model must be present in eligible_models",
113121
self.normalized,
114122
)
123+
self.assertIn(
124+
"create_thread execution_model must be present in create_thread_eligible_models",
125+
self.normalized,
126+
)
127+
self.assertIn(
128+
"prefer create_thread_eligible_models before the legacy eligible_models fallback",
129+
self.normalized,
130+
)
115131

116132
def test_every_visible_model_gets_evidence_bound_pros_and_cons(self) -> None:
117133
evidence = self._live_evidence_section()

plugins/tfd/skills/team/SKILL.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,17 @@ Choose no fixed roster size. Include a role only when it adds a required special
5252

5353
## Verify live model evidence
5454

55-
Before proposing a roster, the Coordinator must read the current spawn_agent model allowlist from live tool metadata and pass every exact model name to `<plugin-root>/scripts/model_catalog.py` as a repeated `--runtime-allowed-model` argument. The script must run against the current Codex session. Cached output and repository documentation are insufficient; static model lists and model-name inference are also insufficient.
55+
Before proposing a roster, the Coordinator must read the current create_thread model allowlist from live tool metadata and the current spawn_agent model allowlist from live tool metadata. Pass every exact current-session identifier to `<plugin-root>/scripts/model_catalog.py` once for its backend. For spawn_agent, pass every exact model name to `<plugin-root>/scripts/model_catalog.py` as a repeated `--runtime-allowed-model` argument. Use this pattern:
56+
57+
```bash
58+
python3 <plugin-root>/scripts/model_catalog.py \
59+
--create-thread-model CREATE_THREAD_MODEL_ID_1 \
60+
--create-thread-model CREATE_THREAD_MODEL_ID_2 \
61+
--runtime-allowed-model SPAWN_AGENT_MODEL_ID_1 \
62+
--runtime-allowed-model SPAWN_AGENT_MODEL_ID_2
63+
```
64+
65+
The script must run against the current Codex session. If the current `create_thread` metadata is unavailable or provides no model allowlist, omit `--create-thread-model`, record that backend as `UNVERIFIED`, and must not pass cached identifiers. Cached output and repository documentation are insufficient; static model lists and model-name inference are also insufficient.
5666

5767
Require scanner stdout to be one PASS JSON document with non-empty recommendation_catalog. A PASS scan may include an empty `eligible_models` list and `execution_readiness: BLOCKER/no_verified_execution_backend`; retain and assess the recommendation catalog instead of converting that condition into a scan failure. Any non-zero exit, BLOCKER, incomplete recommendation evidence, or unsupported reasoning-effort metadata stops roster approval. Here, `BLOCKER` in the scanner-failure sentence means a top-level scanner outcome; the nested execution-readiness blocker is handled only when execution is required. Do not substitute a hard-coded model.
5868

@@ -94,7 +104,7 @@ execution_status: PASS|BLOCKER|UNVERIFIED
94104

95105
The recommended_model must come from recommendation_catalog, and reasoning_effort must be supported by that recommended model's live metadata. selection_reason must connect the member's role, task complexity, and verification burden to the selected model and effort. A non-null `fallback_model` must also come from `recommendation_catalog`.
96106

97-
Recommendation and execution are separate decisions. create_thread is the preferred execution backend, but absent live tool or schema evidence leaves it `UNVERIFIED`; the Coordinator must not claim it is callable or that it supports any model. spawn_agent is the fallback backend. spawn_agent fallback can use only a model in legacy eligible_models, and a spawn_agent execution_model must be present in eligible_models.
107+
Recommendation and execution are separate decisions. create_thread is the preferred execution backend, but absent live tool or schema evidence leaves it `UNVERIFIED`; the Coordinator must not claim it is callable or that it supports any model. A create_thread execution_model must be present in create_thread_eligible_models. Prefer create_thread_eligible_models before the legacy eligible_models fallback. spawn_agent is the fallback backend. spawn_agent fallback can use only a model in legacy eligible_models, and a spawn_agent execution_model must be present in eligible_models.
98108

99109
Keep the preferred recommendation when falling back. If `execution_model` differs from `recommended_model`, record the backend limitation and the role-fit trade-off in selection_reason; do not silently rewrite the recommendation. Honor scanner `execution_readiness`: return `BLOCKER/no_verified_execution_backend` when execution is required but no verified backend/model pair exists. Use `UNVERIFIED` when execution is not yet required and the preferred route lacks live capability evidence.
100110

0 commit comments

Comments
 (0)