token-estimator-mvp
Estimate AI planning ranges from a work description or explicitly authorized safe project context. Provides coarse class ranges or conditional planning bases without requiring token guesses.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 289
- Forks
- 101
01 前言 Front Matter
- name
- token-estimator-mvp
- license
- MIT
- description
- Estimate AI planning ranges from a work description or explicitly authorized safe project context. Provides coarse class ranges or conditional planning bases without requiring token guesses.
02 资源文件 46
- 参考文档examples/ambiguous-prediction.json305 B
- 参考文档examples/coarse-prediction.json140 B
- 参考文档examples/computational-context.json508 B
- 参考文档examples/context.json416 B
- 参考文档examples/context/computational.md1.9 KB
- 参考文档examples/context/operation.md1.4 KB
- 参考文档examples/context/README.md632 B
- 脚本examples/context/scientific-pipeline.sh35 B
- 参考文档examples/description.json427 B
- 参考文档examples/disjoint-tasks.json770 B
- 参考文档examples/integration.json286 B
- 参考文档examples/missing-context.json288 B
- 参考文档examples/operation-bounded-monitoring.json354 B
- 参考文档examples/operation-context.json442 B
- 参考文档examples/operation-failed-setup.json356 B
- 参考文档examples/operation-ongoing.json272 B
- 参考文档examples/operation-review.json639 B
- 参考文档examples/operation-shared-checks.json255 B
- 参考文档examples/operation-unresolved.json257 B
- 参考文档examples/operation.json307 B
- 参考文档examples/partial.json522 B
- 参考文档examples/prototype.json244 B
- 参考文档examples/README.md761 B
- 参考文档examples/real-data.json274 B
- 参考文档examples/simulation.json262 B
- 参考文档examples/unsupported.json299 B
- 参考文档package.json386 B
- 参考文档README.md755 B
- 参考文档references/context-policy.md3.9 KB
- 参考文档references/input-guide.md2.9 KB
- 参考文档references/operational-evidence.md1.0 KB
- 参考文档resources/calibration.json7.6 KB
- 参考文档resources/contract.schema.json13.0 KB
- 参考文档resources/work-profiles.json27.4 KB
- 脚本scripts/estimate.js1.0 KB
- 脚本scripts/model.js37.1 KB
- 参考文档tests/accepted-hashes.json863 B
- 脚本tests/behavior.test.js2.5 KB
- 脚本tests/model.test.js3.4 KB
- 脚本tests/operations.test.js2.8 KB
- 脚本tests/packaging.test.js2.3 KB
- 脚本tests/phases.test.js3.2 KB
- 脚本tests/portable-guard.cjs2.3 KB
- 脚本tests/privacy-guard.cjs2.1 KB
- 脚本tests/runtime-read-guard.cjs543 B
- 脚本tests/skill-guidance.test.js987 B
03 SKILL.md 正文
Token estimator MVP
Use this skill for first-pass AI planning guidance. It is not a scientific execution service.
Use only the bundled CLI or API with calibration and profiles. Never invent formulas or ask users for token budgets.
Procedure
-
Identify the deliverable from the request. Context is optional.
-
Map to the input guide and contract, version 1.2.0.
-
Leave unknown facts unknown. Provide conditional bases when supported.
-
For "run an existing workflow," use
existing-workflow-operation. -
Count shared setup/checks once. Separate independent review as its own task.
-
Run the estimator with sanitized JSON:
node scripts/estimate.js --input examples/coarse-prediction.json -
Report status, mapping, assumptions, uncertainty and exclusions.
Package notes
Copy this entire directory to skills/token-estimator-mvp/ in the target
repository. Keep files relative and project-local. No installs, credentials,
network access, or external authoring workspace are required.
See examples for supported scenarios.
Run tests:
node --test tests/model.test.js tests/phases.test.js tests/operations.test.js tests/behavior.test.js tests/packaging.test.js tests/skill-guidance.test.js
This package ships provisional community reference ranges. They are planning heuristics requiring broader community validation and are not statistical bounds or evidence of customer outcomes.
04 同仓库更多 Skills
quickstart-runner
Follow a supplied full QuickStart Scenario guide and its exact input files from a fresh Discovery project. Use for run this QuickStart, BioPharma, SiPhy, CMS or Bookshelf setup. Check readiness, obtain separate setup and execution approvals, and validate actual outputs. Do not replace the guide with a generated profile or infer permission from examples.
build-research-paper
Cross-domain / Scientific writing and publication — Build beautifully-formatted, arxiv-ready research paper PDFs from a mix of hand-authored LaTeX and/or markdown + PNG figures, using `tectonic` (default) or `pandoc` (escape hatch). Captures the reusable pattern that research projects keep re-discovering: `report/main.tex` + `references.bib` + `generate_figures.py` + iterative feedback/response scaffolding, all buildable with a single command. WHEN: write a research paper, arxiv submission, prepub, generate PDF from markdown, LaTeX paper, build main.tex, journal manuscript, referee revision, response to referee, resubmission package, publication-quality figures, matplotlib publication style, tectonic build, pandoc build, generate arxiv-ready PDF, bibliography from BibTeX.
Discovery 示例智能体导入
add-example-agents
从公共的 microsoft/discovery GitHub 仓库将智能体添加到此工作区,方式可以是:(a) 本地方式,用于 Copilot 应用,为每个智能体生成一个 `.agent.md` 伴随文件(以便每个智能体都可通过 `runSubagent` 调用);(b) 通过 `UpsertAgent` 将上游最新来源的智能体添加到 Microsoft Discovery 项目(存在时绑定已有的工具 ARM 资源,缺失时先在 Azure 中构建、推送并注册这些资源);或 (c) 将已添加到本地 Copilot 应用的智能体(来源于其 `.github/agents/<name>.agent.md` 伴随文件;带工具的智能体还带有 `discovery_catalog/<name>/` 文件夹以及本地构建的工具容器,而无工具的智能体仅有伴随文件)提升到指定的 Microsoft Discovery 项目 + Azure,且不再从上游重新获取或刷新。用户每次运行只能从这三个目标中精确选择一个。适用场景:'添加 discovery 智能体''下载 discovery 智能体''安装所有 Microsoft discovery 智能体''从 microsoft/discovery 添加智能体''从 microsoft/discovery 创建 copilot 智能体''将 discovery 智能体部署到 Foundry''将 discovery 智能体部署到 Azure''将本地智能体提升到 Microsoft Discovery''将本地智能体及其容器推送到 Discovery 项目''将本地应用智能体复制到 Azure'。始终将上游仓库 `agents/<name>/` 下每个选中的子文件夹刷新到 `discovery_catalog/<name>/`,使本地目录保持最新(出现新智能体、显现已移除的智能体、应用更新后的内容)。判断智能体是否"已在本地添加"使用 `.github/agents/<name>.agent.md`(Copilot 伴随文件),而非 `discovery_catalog/` 文件夹。对于本地部署,每个生成的 `.agent.md` 都带有延迟的 Docker 引导前言,使智能体仅在首次使用且工具镜像不存在时才构建该镜像。对于 Discovery + Azure 部署,会针对工作区的资源组(RG)通过 `GetDiscoveryTool` 对每个声明的工具进行预检,并**在工具已存在时完全跳过 Docker 构建 / ACR 推送 / AcrPull RBAC**(这在 `mdqacr` 等注册表上的共享目录镜像中很常见);仅构建并注册实际缺失的工具。始终通过 `UpsertAgent` 在选定的 Discovery 项目中创建智能体,并轮询 `GetAgent` 直到 `provisioningState=Succeeded`(MCP 的 `GetAgentOperation` 工具在实践中会返回不透明错误;切勿依赖它)。所有 MCP 调用都通过嵌入在本 SKILL.md 中、并在步骤 4d 期间具体化为 `.vscode/` 的 PowerShell 脚本进行——该技能不依赖同级的辅助文件,也不依赖 VS Code MCP 运行时在会话中途浮现 `mcp_microsoft-dis_*` 工具。通过 `agents action=create` 进行的本地 Discovery 运行时注册是可选的,默认跳过。不要用于:运行已部署的智能体(使用 runSubagent),或编辑单个智能体的提示词(直接编辑 `agent.yaml`)。
Podman Containerfile 迁移
migrate-podman-containerfile
将 Podman Containerfile 迁移为 Discovery 目录要求的规范 Dockerfile。当 PR 未通过 POL-022 检查、某个工具包含 Containerfile 或 Dockerfile.in,或贡献者要求将 Podman 构建文件转换为 Docker 构建文件时使用。仅在迁移在机械上安全时直接创建 Dockerfile,并拒绝处理存在歧义的预处理或多文件构建。
Discovery 入门工具包部署
discovery-services-starter-kit-deployer
端到端部署 Discovery 目录中的入门工具包(starter-kit):验证 kit.json 中的 agentRefs、构建并部署每个引用的智能体工具、逐一部署每个引用的智能体,并汇总已部署的智能体/工具以及可直接提供给客户的示例提示词。当用户要求部署 Discovery 入门工具包,或部署 starter-kits/*/kit.json 中列出的所有智能体时使用此技能。
Discovery 智能体端到端部署
discovery-services-agent-deployer
通过一个命令端到端部署 Discovery 目录中的智能体:发现智能体、在存在工具时构建并绑定该工具、对没有工具的智能体跳过工具相关阶段、部署智能体,并可选择运行验证。当用户要求部署 Discovery 智能体、发布或重建智能体工具镜像、从仓库中的 Dockerfile/tool.yaml 注册 Discovery 工具、恢复失败的部署,或为该目录中的某个智能体生成预演(dry-run)部署计划时使用此技能。