建立 Watchman 规划基线,并接入 Marionettist Cursor 工作流。

公司规范只约束代码内容,门禁仍按插件执行;MCP token 不入库。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
unknownandCursor committed 2026-11-17 10:11:27 +08:00
commit 8b2a809f06
73 files changed
+8661

No files matched your search

+65
View File
@@ -0,0 +1,65 @@
---
description: Repository-level constraint priority and rule metadata conventions for Marionettist agents.
alwaysApply: true
---
# Repository Rules
## Priority
1. User instructions
2. `AGENTS.md`
3. `.aiassistant/rules/*.md`
4. `docs/**/*.md`
Rules define constraints. Docs provide knowledge.
## Rule Metadata Convention
Rule files may attach lightweight metadata to a rule or rule section:
```md
- Rule: <constraint statement>
- type: observed | confirmed | target | hard
- confidence: low | medium | high
- source: <where this came from>
```
Use metadata when rule strength or evidence matters.
- `type` describes how strongly agents should apply the rule.
- `confidence` describes evidence quality, not priority.
- `source` records where the rule came from, such as code observation, config, runtime behavior, user instruction, review decision, repository policy, or target design.
### Rule Type Semantics
- `hard`: enforce by default unless a higher-priority instruction explicitly overrides it.
- `confirmed`: treat as an active repository convention or verified constraint; follow it by default, but escalate if it conflicts with newer evidence or higher-priority instructions.
- `observed`: treat as current-state evidence or working hypothesis. Do not block implementation or review solely because an observed rule exists unless a clear safety risk is present or a reviewer/user confirms it.
- `target`: treat as intended future direction. Do not describe it as current behavior and do not enforce it against current-state work unless the approved task is explicitly implementing that target.
### Upgrade Guidance
- Do not silently promote `observed` or `target` rules into `confirmed` or `hard` constraints.
- Upgrade an `observed` rule only after explicit review, stronger evidence, or direct user confirmation.
- When a rule is upgraded, update its metadata and keep the `source` specific enough that later readers can understand why the strength changed.
## General Constraints
- Do not expand task scope without explicit approval.
- Do not overwrite project-local knowledge during Marionettist sync.
- Do not treat documentation as a replacement for source inspection.
- Prefer small, reversible changes.
- Preserve existing project conventions.
## Example Rules
- Rule: Preserve repository-global safety boundaries even when local patterns differ.
- type: hard
- confidence: high
- source: repository policy
- Rule: This subsystem currently appears to depend on configuration file ordering.
- type: observed
- confidence: medium
- source: observed code and runtime behavior
+21
View File
@@ -0,0 +1,21 @@
---
description: 写代码前经 sy-standards 检索并遵循公司开发规范
alwaysApply: true
---
##### 公司级开发规范检索(sy-standards MCP)
- 场景:任何写代码的任务
- 要求:动手前按任务类型经 sy-standards 检索并遵循——
写/改 API → standards://api/api-envelope 与 standards://api/error-handling;
声明权限点 → standards://api/permission-nodes(禁止编造编码);
写前端 → standards://frontend/frontend-stack 与 standards://frontend/element-plus;
写注释/提交 → standards://engineering/code-comments、standards://workflow/git-commit;
涉密钥/迁移/导出/端口 → standards://security/red-line。
先 search_rules("关键词") 找篇目,再按 uri 读原文,引用标注 ?version,多版本取最新。
工具不可用时向用户说明缺哪篇,不要静默跳过。
##### 与 Marionettist 的关系
- 写什么听本规则:API、权限点、前端、注释、提交格式、密钥、迁移、导出、端口。
- 能不能写、写哪一片听 Marionettist:`.cursor/rules/workflow-rules.mdc` 和 `marionettist.config.yaml` 的 `gatePolicy`。
- 公司 `conduct/ai-conduct` 里「按规划自动做完、中间不反复确认」不取消分析确认,也不取消高风险切片停顿。
- 角色分工和业务进度仍以 `AGENTS.md` 的项目本地段为准。token 只放 `.cursor/mcp.json`,不入库。
+38
View File
@@ -0,0 +1,38 @@
---
description: Marionettist workflow gates, context-pack expectations, and documentation update rules.
alwaysApply: true
---
# Workflow Rules
Use rule metadata from `00-repository-rules.md` when workflow constraints are provisional, verified, future-state, or strictly enforceable.
## Marionettist Gates
- Rule: For non-trivial tasks, do not move from analysis to coding or between approved coding slices or approved parallel groups without explicit user confirmation, unless the selected gate policy explicitly allows continuation for the next already-approved `gateClass: simple` slice or low/moderate-risk `gateClass: standard` slice with `risk_score <= 3`, and no critic requirement, explicit gate reason, protected-area decision, dangerous command, or other stop condition requires a stronger pause. Review for the current approved slice or group may still start automatically after coding.
- type: hard
- confidence: high
- source: repository workflow policy
## Context Pack
- Rule: For Tier M and Tier L tasks, create or update `.task/<task-id>/context-pack.md` before coding. Read `<task-id>` from `.task/active.json`.
- type: confirmed
- confidence: high
- source: repository workflow policy
Legacy `.task/context-pack.md` may be used only as a migration fallback and must not be the default output path for new tasks.
## Documentation
- Rule: Update project knowledge only when design, architecture, functional behavior, workflow, or boundary rules change.
- type: confirmed
- confidence: high
- source: repository workflow policy
Do not update docs only because implementation files were added, renamed, or reorganized unless the design meaning changed.
## Interpretation Reminder
- Workflow rules marked `observed` describe how the project currently appears to operate; they are evidence, not default blockers.
- Workflow rules marked `target` describe desired future process and should not be reported as current mandatory behavior unless the approved work is implementing them.