context

A Cursor rule for giving coding tasks the project context they need. It requires details such as relevant files, the software architecture, the current problem, dependencies, logs, and reproducible test steps.

In plain words
What is it for?
Preparing, checking, and updating context when working on the Takt WPF project, including file references and status changes.
Why use it?
It reduces incomplete or misleading code analysis caused by missing information about the project and its current state.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/takt365/takt.wpf/context
Clone the repo
git clone --depth 1 https://github.com/Takt365/Takt.Wpf

Made for: Cursor.

Per session 545 This file is loaded in full into every session.
When invoked 545 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00545 $0.00545
Opus 5 $0.00272 $0.00272
Sonnet 5 $0.00109 $0.00109
Haiku 4.5 $0.00055 $0.00055

Measured 3d ago against content hash 63a7c19f9c86, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/context.mdc · 75 lines

What it actually says

上下文管理规范

上下文分类

必须提供的信息

  1. 代码上下文(必须):
**相关代码**:
- @src/Takt.Fluent/Views/MainWindow.xaml
- @src/Takt.Fluent/Models/AvalonDocument.cs:114
  1. 架构上下文(必须):
**架构上下文**:
- 分层架构:Fluent -> Application -> Domain -> Infrastructure
- MVVM 模式:View -> ViewModel -> Service -> Repository
  1. 当前状态(必须):
**当前状态**:
- 已完成:图标转换逻辑已实现,IconSource 已正确设置
- 存在问题:图标在 UI 中不显示
- 已验证:日志显示 IconSource=RenderTargetBitmap, 16x16

文件引用规范

引用格式

  • 完整文件:@src/Takt.Fluent/Views/MainWindow.xaml
  • 特定行:@src/Takt.Fluent/Models/AvalonDocument.cs:114
  • 行范围:@src/Takt.Fluent/Models/AvalonDocument.cs:60-138
  • 多文件:
**相关文件**:
- @src/Takt.Fluent/Views/MainWindow.xaml(DockingManager 配置)
- @src/Takt.Fluent/Models/AvalonDocument.cs(图标转换逻辑)

上下文完整性检查

必须检查项

  • 是否提供了项目名称、技术栈、架构模式?
  • 是否提供了所有相关文件的路径(使用 @ 符号)?
  • 是否说明了模块间的依赖关系?
  • 是否说明了当前实现状态和问题?
  • 是否提供了相关的日志输出?
  • 是否提供了可重现的测试步骤?

上下文更新规范

更新时机

  1. 代码变更后(必须更新):
**上下文更新**:
- 更新原因:代码已修改,需要重新分析
- 更新内容:@src/Takt.Fluent/Models/AvalonDocument.cs:114(已修改)
  1. 问题状态变化(必须更新):
**问题状态更新**:
- 之前状态:图标不显示
- 当前状态:图标已显示,但位置不正确
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 75 lines · 545 tokens per session scan A 63a7c19f9c86

Subscribe to this mod's changes

context is a cursor rule published in the GitHub repository Takt365/Takt.Wpf (17 stars, last pushed 8mo ago), licensed MIT. It adds 545 tokens to every session, about $0.0027 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.