Update Linear Post-Job by auldsyababua/instructor-workflow
npx skills add https://github.com/auldsyababua/instructor-workflow --skill 'Update Linear Post-Job'在以下情况使用此技能:
触发条件:
TDD 工作流上下文:
目的:在 Linear 中将已完成的任务(子任务)标记为“已完成”
前提条件:
执行:
// 将子任务更新为“已完成”
await mcp__linear-server__update_issue({
id: "LAW-5", // 从交接中获取的子任务 ID
state: "Done"
})
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
然后添加完成评论:
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: `✅ **任务完成**
**PR**: #14 (https://github.com/org/repo/pull/14)
**QA 状态**: ✅ 所有测试通过
**更改的文件**: 8 个文件,+420/-15 行
准备合并。`
})
评论模板字段:
错误处理:
如果更新失败,改为添加评论并继续:
try {
await mcp__linear-server__update_issue({ id: "LAW-5", state: "Done" })
} catch (error) {
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: `⚠️ **追踪代理**:无法将任务状态更新为“已完成”。
错误:${error.message}
规划代理已确认任务完成。需要手动更新状态。`
})
// 继续步骤 2 - 不要因为子任务更新失败而阻塞
}
目的:确定工作块中的所有子任务是否都已完成
执行:
// 1. 获取父任务详情
const parentIssue = await mcp__linear-server__get_issue({
id: "LAW-4" // 从交接中获取的父工作块 ID
})
// 2. 获取父任务的所有子任务
const childIssues = await mcp__linear-server__list_issues({
team: "Linear-First-Agentic-Workflow", // 来自 .project-context.md
parentId: "LAW-4" // 父工作块 ID
})
// 3. 检查是否所有子任务都已完成
const allChildrenDone = childIssues.nodes.every(
issue => issue.state.name === "Done"
)
决策点:
allChildrenDone === true:进行到步骤 3(更新父任务)allChildrenDone === false:跳转到步骤 4(向规划代理报告)需要检查的内容:
state.name === "Done"目的:当所有子任务都完成时,将父工作块标记为“已完成”
仅在步骤 2 确定所有子任务都已完成时执行:
// 将父工作块更新为“已完成”
await mcp__linear-server__update_issue({
id: "LAW-4",
state: "Done"
})
// 向父任务添加完成评论
await mcp__linear-server__create_comment({
issueId: "LAW-4",
body: `✅ **工作块完成**
所有子任务已完成:
- LAW-5:研究代理升级 ✅
- LAW-6:规划代理重构 ✅
- LAW-7:追踪代理更新 ✅
[... 列出所有已完成的子任务 ...]
所有 PR 已合并。工作块准备关闭。`
})
父任务评论模板:
错误处理:
如果父任务更新失败,向规划代理报告但不要阻塞:
try {
await mcp__linear-server__update_issue({ id: "LAW-4", state: "Done" })
} catch (error) {
// 向规划代理报告错误
// 继续 - 即使父任务更新失败,任务仍然完成
}
目的:通知规划代理完成情况和任何问题
将完成报告写入交接位置(由规划代理指定):
如果所有更新都成功:
**追踪代理完成报告**
✅ **所有 Linear 更新完成**
**子任务**:LAW-5 已更新为“已完成”
**父工作块**:LAW-4 [已更新为“已完成” | 仍有 N 个未完成的子任务]
**摘要**:
- PR #14 已成功合并
- Linear 任务已更新
- 工作块 [已完成 | 进行中]
[如果父任务完成] 根据第 7 阶段协议,主仪表板更新已委托给 Traycer。
准备接收下一个任务。
如果发生错误:
**追踪代理完成报告**
⚠️ **Linear 更新完成但存在错误**
**子任务**:LAW-5 - [成功更新 | 更新失败,需要手动干预]
**父工作块**:LAW-4 - [已检查,M 个子任务中有 N 个完成 | 检查失败]
**错误**:
- [列出遇到的任何错误]
**需要采取的行动**:
- [列出解决错误所需的手动步骤]
尽管 Linear 更新存在错误,但任务完成已确认。
重要:不要更新主仪表板 - 根据第 7 阶段协议,这由 Traycer 委托处理
场景:LAW-5(研究代理升级)完成,父任务是 LAW-4
// 步骤 1:更新子任务
await mcp__linear-server__update_issue({
id: "LAW-5",
state: "Done"
})
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: "✅ 任务完成。PR #14 已合并。"
})
// 步骤 2:检查父任务完成情况
const parentIssue = await mcp__linear-server__get_issue({ id: "LAW-4" })
const childIssues = await mcp__linear-server__list_issues({
team: "Linear-First-Agentic-Workflow",
parentId: "LAW-4"
})
const allDone = childIssues.nodes.every(i => i.state.name === "Done")
// 步骤 3:如果所有子任务都完成,则更新父任务
if (allDone) {
// 所有 9 个子任务完成
await mcp__linear-server__update_issue({
id: "LAW-4",
state: "Done"
})
await mcp__linear-server__create_comment({
issueId: "LAW-4",
body: "✅ 所有 9 个子任务完成。工作块完成。"
})
}
// 步骤 4:向规划代理报告
// 将完成报告写入交接位置
// 不要更新主仪表板(由 Traycer 委托处理)
注意:此技能在分支创建和 PR 合并之后执行
7 阶段 TDD 工作流:
分支命名约定(供参考):
模式:feat/<父任务-id>-<子任务-id>-<简短描述>
示例:
# 工作块:LAW-4,子任务:LAW-5
feat/law-4-law-5-research-agent-upgrade
# 工作块:LAW-350,子任务:LAW-351
feat/law-350-law-351-webhook-server-setup
mcp__linear-server__update_issue、mcp__linear-server__get_issue、mcp__linear-server__list_issues、mcp__linear-server__create_comment.project-context.md(包含用于 Linear 查询的团队名称)docs/agents/tracking/tracking-agent.mddocs/agents/planning/planning-agent.mdtdd-workflow-protocol.md - 完整的 7 阶段 TDD 工作流master-dashboard-creation-protocol.md - 仪表板更新协议(由 Traycer 委托处理)linear-update-protocol.md - 通用 Linear API 使用| 条件 | 操作 |
|---|---|
| 子任务更新成功 | 继续检查父任务 |
| 子任务更新失败 | 添加错误评论,继续检查父任务 |
| 所有子任务已完成 | 将父任务更新为“已完成”,添加完成评论 |
| 部分子任务未完成 | 跳过父任务更新,向规划代理报告状态 |
| 父任务更新失败 | 报告错误,继续(不要因为父任务失败而阻塞) |
| 所有更新完成 | 向规划代理报告成功 |
❌ 不要:直接更新主仪表板
❌ 不要:如果父任务更新失败则阻塞
❌ 不要:不查询就假设所有子任务都已完成
❌ 不要:将子任务状态更新为“已关闭”或“已取消”
每周安装次数
0
仓库
GitHub 星标数
4
首次出现
1970年1月1日
安全审计
Use this skill when:
Triggers :
TDD Workflow Context :
Purpose : Mark the completed job (child issue) as Done in Linear
Prerequisites :
Execute :
// Update child issue to Done
await mcp__linear-server__update_issue({
id: "LAW-5", // Child issue ID from handoff
state: "Done"
})
Then add completion comment :
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: `✅ **Job Complete**
**PR**: #14 (https://github.com/org/repo/pull/14)
**QA Status**: ✅ All tests passing
**Files Changed**: 8 files, +420/-15 lines
Ready for merge.`
})
Comment Template Fields :
Error Handling :
If update fails, add comment instead and continue:
try {
await mcp__linear-server__update_issue({ id: "LAW-5", state: "Done" })
} catch (error) {
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: `⚠️ **Tracking Agent**: Could not update issue status to Done.
Error: ${error.message}
Job completion confirmed by Planning Agent. Manual status update needed.`
})
// Continue to Step 2 - don't block on child update failure
}
Purpose : Determine if all child jobs in the work block are complete
Execute :
// 1. Get parent issue details
const parentIssue = await mcp__linear-server__get_issue({
id: "LAW-4" // Parent work block ID from handoff
})
// 2. Get all child issues of parent
const childIssues = await mcp__linear-server__list_issues({
team: "Linear-First-Agentic-Workflow", // From .project-context.md
parentId: "LAW-4" // Parent work block ID
})
// 3. Check if ALL children are Done
const allChildrenDone = childIssues.nodes.every(
issue => issue.state.name === "Done"
)
Decision Point :
allChildrenDone === true: Proceed to Step 3 (update parent)allChildrenDone === false: Skip to Step 4 (report to Planning Agent)What to check :
state.name === "Done"Purpose : Mark parent work block as Done when all child jobs complete
Execute only if Step 2 determined all children are Done :
// Update parent work block to Done
await mcp__linear-server__update_issue({
id: "LAW-4",
state: "Done"
})
// Add completion comment to parent
await mcp__linear-server__create_comment({
issueId: "LAW-4",
body: `✅ **Work Block Complete**
All child jobs completed:
- LAW-5: Research Agent Upgrade ✅
- LAW-6: Planning Agent Refactor ✅
- LAW-7: Tracking Agent Updates ✅
[... list all completed children ...]
All PRs merged. Work block ready for closure.`
})
Comment Template for Parent :
Error Handling :
If parent update fails, report to Planning Agent but don't block:
try {
await mcp__linear-server__update_issue({ id: "LAW-4", state: "Done" })
} catch (error) {
// Report error to Planning Agent
// Continue - job is still complete even if parent update fails
}
Purpose : Notify Planning Agent of completion and any issues
Write completion report to handoff location (specified by Planning Agent):
If all updates successful :
**Tracking Agent Completion Report**
✅ **All Linear Updates Complete**
**Child Issue**: LAW-5 updated to Done
**Parent Work Block**: LAW-4 [updated to Done | still has N incomplete children]
**Summary**:
- PR #14 merged successfully
- Linear issues updated
- Work block [complete | in progress]
[If parent complete] Master Dashboard update delegated to Traycer per Phase 7 protocol.
Ready for next job.
If errors occurred :
**Tracking Agent Completion Report**
⚠️ **Linear Updates Completed With Errors**
**Child Issue**: LAW-5 - [updated successfully | update failed, manual intervention needed]
**Parent Work Block**: LAW-4 - [checked, N of M children complete | check failed]
**Errors**:
- [List any errors encountered]
**Action Required**:
- [List manual steps needed to resolve errors]
Job completion confirmed despite Linear update errors.
Important : Do NOT update Master Dashboard - this is delegated by Traycer per Phase 7 protocol
Scenario : LAW-5 (Research Agent Upgrade) complete, parent is LAW-4
// Step 1: Update child issue
await mcp__linear-server__update_issue({
id: "LAW-5",
state: "Done"
})
await mcp__linear-server__create_comment({
issueId: "LAW-5",
body: "✅ Job complete. PR #14 merged."
})
// Step 2: Check parent completion
const parentIssue = await mcp__linear-server__get_issue({ id: "LAW-4" })
const childIssues = await mcp__linear-server__list_issues({
team: "Linear-First-Agentic-Workflow",
parentId: "LAW-4"
})
const allDone = childIssues.nodes.every(i => i.state.name === "Done")
// Step 3: Update parent if all children complete
if (allDone) {
// All 9 child jobs complete
await mcp__linear-server__update_issue({
id: "LAW-4",
state: "Done"
})
await mcp__linear-server__create_comment({
issueId: "LAW-4",
body: "✅ All 9 child jobs complete. Work block done."
})
}
// Step 4: Report to Planning Agent
// Write completion report to handoff location
// Do NOT update Master Dashboard (delegated by Traycer)
Note : This skill executes AFTER branch creation and PR merge
7-Phase TDD Workflow :
Branch Naming Convention (for reference):
Pattern: feat/<parent-issue-id>-<child-issue-id>-<slug>
Examples:
# Work Block: LAW-4, Child Job: LAW-5
feat/law-4-law-5-research-agent-upgrade
# Work Block: LAW-350, Child Job: LAW-351
feat/law-350-law-351-webhook-server-setup
mcp__linear-server__update_issue, mcp__linear-server__get_issue, mcp__linear-server__list_issues, mcp__linear-server__create_comment.project-context.md (contains team name for Linear queries)docs/agents/tracking/tracking-agent.mddocs/agents/planning/planning-agent.mdtdd-workflow-protocol.md - Full 7-phase TDD workflowmaster-dashboard-creation-protocol.md - Dashboard update protocol (delegated by Traycer)linear-update-protocol.md - General Linear API usage| Condition | Action |
|---|---|
| Child update succeeds | Proceed to parent check |
| Child update fails | Add error comment, continue to parent check |
| All children Done | Update parent to Done, add completion comment |
| Some children incomplete | Skip parent update, report status to Planning Agent |
| Parent update fails | Report error, continue (don't block on parent failure) |
| All updates complete | Report success to Planning Agent |
❌ Don't : Update Master Dashboard directly
❌ Don't : Block if parent update fails
❌ Don't : Assume all children Done without querying
❌ Don't : Update child issue state to "Closed" or "Canceled"
Weekly Installs
0
Repository
GitHub Stars
4
First Seen
Jan 1, 1970
Security Audits
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装