← 返回
开发者工具 中文

Project Router

Terminal-first project bootstrapper and workspace context manager. Use when the user asks for /project-style workflows: detect current project, read project context/brief, run standardized targets (build/test/lint/deploy), init a .project bundle via plan/apply, manage artifacts, or expose these actions via MCP server mcp-project-router and CLI project.
终端优先的项目引导程序与工作空间上下文管理器。适用于 /project-style 工作流:检测当前项目、读取项目上下文或简介、运行标准化目标(构建/测试/检查/部署)、通过 plan/apply 初始化 .project 包、管理工件,或通过 MCP 服务器 mcp-project-router 及 CLI project 暴露这些操作。
safatinaztepe
开发者工具 clawhub v1.0.0 1 版本 99736.7 Key: 无需
★ 0
Stars
📥 2,652
下载
💾 38
安装
1
版本
#latest

概述

project-router

This skill is Safa’s canonical project management + context switching control plane.

Core idea:

  • Canonical PM is local + queryable (SQLite): projects, tasks, context packs.
  • Trello is a tracking backend/UI: cards mirror canonical tasks; lists mirror status; labels mirror priority.
  • The “killer feature” is context switching: load the right docs/code/index for a project/task quickly and deterministically.

It provides:

  • CLI: project ...
  • MCP server: mcp-project-router (tools mirror the CLI)
  • Per-project bundle stored in .project/ (brief, targets, artifact index)
  • A canonical task store (SQLite) + Trello sync adapter

Project bundle layout (v1)

The .project/ bundle is the project-local context nucleus. The canonical PM DB points at these bundles.

Inside a project root:

  • .project/project.json — structured manifest
  • .project/PROJECT.md — living brief
  • .project/targets.json — target definitions (commands)
  • .project/index/artifacts.json — artifact index
  • .project/history/plans/*.json — plans
  • .project/history/applies/*.json — apply receipts

CLI quick start

Baseline / existing commands

From anywhere inside a repo/workspace:

  • project detect
  • project context
  • project target list
  • project target run

Initialize a bundle (dry-run plan + apply):

  • project init (prints plan)
  • project apply

Artifacts:

  • project artifact add [--tags a,b,c] (plan + apply)

Canonical PM + context switching (new)

> Note: these verbs are the target UX. Implementations should remain idempotent and safe.

Project registration:

  • project pm project add --name "..." --root
  • project pm project list

Task management:

  • project pm task add "" --priority P0|P1|P2|P3 [--status inbox|next|doing|blocked|waiting|done]</code></li><li><code>project pm task list [--project <slug>] [--status ...]</code></li><li><code>project pm task set-status <taskId> <status></code></li></ul><p>Context switching:</p><ul><li><code>project pm switch <slug></code></li><li>prints pinned docs + top targets + active tasks</li><li><code>project pm focus <taskId></code></li><li>loads task-linked files/artifacts and updates the task activity log</li></ul><p>Trello sync:</p><ul><li><code>project pm trello sync [--project <slug>]</code></li><li>ensures the single "Safa — PM" Trello board exists</li><li>ensures lists exist (Inbox/Next/Doing/Blocked/Waiting/Done)</li><li>upserts cards for canonical tasks</li><li>moves cards to match status</li><li>applies priority labels (P0..P3)</li></ul><h2>MCP quick start (via mcporter)</h2><ul><li><code>mcporter list mcp-project-router --schema --timeout 120000 --json</code></li></ul><p>Examples:</p><ul><li>Detect:</li><li><code>mcporter call --server mcp-project-router --tool project_detect --args '{}'</code></li><li>Read context:</li><li><code>mcporter call --server mcp-project-router --tool project_context_read --args '{}'</code></li><li>Run target:</li><li><code>mcporter call --server mcp-project-router --tool project_target_run --args '{"target":"test"}'</code></li></ul><h2>Trello backend conventions</h2><p>Single-board setup:</p><ul><li>Board name: <code>Safa — PM</code> (or configurable)</li><li>Lists == canonical statuses:</li><li><code>Inbox</code>, <code>Next</code>, <code>Doing</code>, <code>Blocked</code>, <code>Waiting</code>, <code>Done</code></li><li>Card title: <code>[<project_slug>] <task_title></code></li><li>Card description begins with a machine block for idempotency:</li></ul><p> ```yaml</p><p> --- pm ---</p><p> task_id: <stable-id></p><p> project: <slug></p><p> status: <status></p><p> priority: P0|P1|P2|P3</p><p> ---</p><p> ```</p><ul><li>Labels (priority, color-coded):</li><li><code>P0</code> = red</li><li><code>P1</code> = orange</li><li><code>P2</code> = yellow</li><li><code>P3</code> = blue</li></ul><h2>Canonical PM storage (SQLite)</h2><p>Recommended DB location (in workspace):</p><ul><li><code>/home/safa/clawd/data/pm/pm.sqlite</code></li></ul><p>Minimum tables (v0):</p><ul><li><code>projects(slug PRIMARY KEY, name, root_path, created_at, updated_at)</code></li><li><code>tasks(task_id PRIMARY KEY, project_slug, title, status, priority, created_at, updated_at)</code></li><li><code>task_refs(task_id, kind, ref)</code> (file paths / urls / artifacts)</li><li><code>external_refs(task_id, system, external_id, meta_json)</code> (e.g., Trello card_id/list_id)</li></ul><h2>Safety</h2><ul><li>Project bundle writes remain <strong>plan/apply</strong>.</li><li>Canonical PM writes should be idempotent and auditable (timestamps + activity log).</li><li>Trello sync should be safe to re-run repeatedly (upsert by <code>task_id</code> marker; never duplicate cards).</li><li><code>project_target_run</code> executes commands defined in <code>.project/targets.json</code>.</li></ul></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.0.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-28 16:38 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=f65eb4d8b7bf420c270166b3edd7ba5c" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/392761_2976b5964ba450db6c849ae0b2450f74.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781283546%3B1812819546&q-key-time=1781283546%3B1812819546&q-header-list=host&q-url-param-list=&q-signature=185a7c00eb079f0be2c3e9316b027708ced2a243" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/github">Github</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 668</span> <span style="color:#5b6abf;">📥 324,051</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/gog">Gog</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 921</span> <span style="color:#5b6abf;">📥 185,777</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/codeconductor">CodeConductor.ai</a></h3> <div class="rec-owner">larsonreever</div> <div class="rec-desc">AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 67</span> <span style="color:#5b6abf;">📥 180,066</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>