matter-workspace

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/matter-workspace

/matter-workspace

Practitioners work across multiple clients and matters. A matter workspace keeps one client or engagement's context separate from every other. This skill manages those workspaces.
从业者会同时处理多个客户和事务。事务工作区可将单个客户或业务项目的上下文与其他项目隔离开。本技能用于管理这些工作区。

Subcommands

子命令

  • /ai-governance-legal:matter-workspace new <slug>
    — create a new matter workspace, run a short intake, write
    matter.md
  • /ai-governance-legal:matter-workspace list
    — list matters with status and active flag
  • /ai-governance-legal:matter-workspace switch <slug>
    — set the active matter
  • /ai-governance-legal:matter-workspace close <slug>
    — archive a matter (move to
    ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/_archived/
    , never delete)
  • /ai-governance-legal:matter-workspace none
    — detach from any active matter, work at practice-level only
  • /ai-governance-legal:matter-workspace new <slug>
    — 创建新的事务工作区,运行简短的信息收集流程,写入
    matter.md
  • /ai-governance-legal:matter-workspace list
    — 列出事务及其状态和活跃标记
  • /ai-governance-legal:matter-workspace switch <slug>
    — 设置活跃事务
  • /ai-governance-legal:matter-workspace close <slug>
    — 归档事务(移动至
    ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/_archived/
    ,永不删除)
  • /ai-governance-legal:matter-workspace none
    — 脱离所有活跃事务,仅在事务所层级工作

Instructions

操作说明

  1. Read
    ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/CLAUDE.md
    — confirm the
    ## Matter workspaces
    section is populated. If
    Enabled
    is
    , tell the user: "Matter workspaces are off — you're configured as an in-house practice with one client, so the plugin works from practice-level context automatically. If you actually work across multiple clients, re-run
    /ai-governance-legal:cold-start-interview --redo
    and select a private-practice setting. Otherwise, you don't need
    /matter-workspace
    at all." Don't error — the disabled state is the expected one for in-house users.
  2. Use the workflow below.
  3. Dispatch on the first token of
    $ARGUMENTS
    :
    • new
      → run the intake interview, write
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/<slug>/matter.md
      , seed
      history.md
      and
      notes.md
      .
    • list
      → enumerate
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/*/matter.md
      , print a table, mark the active matter.
    • switch
      → update the
      Active matter:
      line in the practice-level CLAUDE.md.
    • close
      → move
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/<slug>/
      to
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/_archived/<slug>/
      , log the close date in
      history.md
      .
    • none
      → set
      Active matter:
      to
      none — practice-level context only
      .
  4. Show the user what changed and confirm before writing.
  1. 读取
    ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/CLAUDE.md
    — 确认
    ## Matter workspaces
    部分已填充。如果
    Enabled
    ,告知用户:“事务工作区已关闭——您的配置为内部事务所,仅服务一个客户,因此插件会自动基于事务所层级上下文运行。如果您实际需要处理多个客户,请重新运行
    /ai-governance-legal:cold-start-interview --redo
    并选择私人事务所设置。否则,您完全不需要
    /matter-workspace
    功能。” 不要报错——对于内部用户来说,禁用状态是预期情况。
  2. 遵循以下工作流程。
  3. 根据
    $ARGUMENTS
    的第一个参数进行分发:
    • new
      → 运行信息收集访谈,写入
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/<slug>/matter.md
      ,初始化
      history.md
      notes.md
    • list
      → 遍历
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/*/matter.md
      ,打印表格并标记活跃事务。
    • switch
      → 更新事务所层级CLAUDE.md中的
      Active matter:
      行。
    • close
      → 将
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/<slug>/
      移动至
      ~/.claude/plugins/config/claude-for-legal/ai-governance-legal/matters/_archived/<slug>/
      ,在
      history.md
      中记录关闭日期。
    • none
      → 将
      Active matter:
      设置为
      none — practice-level context only
  4. 在写入前向用户展示变更内容并确认。

Notes

注意事项

  • The skill never reads across matters unless
    Cross-matter context
    is
    on
    in the practice-level CLAUDE.md.
  • Archiving is not deletion — closed matters remain readable for retention/conflicts purposes.
  • Slugs are lowercase with hyphens. If a slug is reused across archived and active, the archived one is preserved under
    _archived/<slug>/
    .

Multi-client practitioners (private practice — solo, small firm, large firm) work across many matters. Context from one must not leak into another. This skill is the thin file-management layer that makes that true.
Default state is off. In-house users never see this — they run at practice-level only. Matter workspaces turn on at cold-start for private-practice users, or by editing
## Matter workspaces
in the practice-level CLAUDE.md. If
Enabled
is
, this skill does not run; the workflow above explains the disabled state and suggests
/ai-governance-legal:cold-start-interview --redo
for users who actually need matter isolation.
  • 除非事务所层级CLAUDE.md中的
    Cross-matter context
    设置为
    on
    ,否则本技能绝不会跨事务读取数据。
  • 归档不等于删除——已关闭的事务仍可读取,以满足留存或冲突检查需求。
  • Slug为小写字母加连字符格式。如果归档事务与活跃事务使用了相同的slug,归档事务会保留在
    _archived/<slug>/
    下。

多客户从业者(私人事务所—— solo、小型律所、大型律所)会处理大量事务。一个事务的上下文绝不能泄露到另一个事务中。本技能是实现这一隔离的轻量文件管理层。
默认状态为关闭。内部用户永远不会看到此功能——他们仅在事务所层级运行。事务工作区会在私人事务所用户的冷启动阶段开启,或通过编辑事务所层级CLAUDE.md中的
## Matter workspaces
部分开启。如果
Enabled
,本技能不会运行;上述工作流程会解释禁用状态,并建议实际需要事务隔离的用户使用
/ai-governance-legal:cold-start-interview --redo

Storage layout

存储结构

All matter data lives under:
~/.claude/plugins/config/claude-for-legal/ai-governance-legal/
├── CLAUDE.md                       # practice-level practice profile
└── matters/
    ├── <slug>/
    │   ├── matter.md               # client, counterparty, matter type, key facts, overrides
    │   ├── history.md              # dated log of events, decisions, drafts, reviews
    │   ├── notes.md                # free-form working notes
    │   └── outputs/                # skill outputs for this matter (optional subfolder)
    └── _archived/
        └── <slug>/                 # closed matters — readable but not active
Slugs are lowercase with hyphens. Examples:
acme-msa-2026
,
zenith-renewal
,
vendor-xyz-nda
.
所有事务数据存储在以下路径下:
~/.claude/plugins/config/claude-for-legal/ai-governance-legal/
├── CLAUDE.md                       # 事务所层级配置文件
└── matters/
    ├── <slug>/
    │   ├── matter.md               # 客户、交易对手、事务类型、关键事实、自定义配置
    │   ├── history.md              # 带日期的事件、决策、草稿、评审日志
    │   ├── notes.md                # 自由格式的工作笔记
    │   └── outputs/                # 本事务的技能输出(可选子文件夹)
    └── _archived/
        └── <slug>/                 # 已关闭事务——可读取但非活跃状态
Slug为小写字母加连字符格式。示例:
acme-msa-2026
,
zenith-renewal
,
vendor-xyz-nda

Active matter is in the practice CLAUDE.md

活跃事务记录在事务所CLAUDE.md中

The
Active matter:
line under
## Matter workspaces
in the practice-level CLAUDE.md is the single source of truth. Switching a matter edits that line. No separate state file.
事务所层级CLAUDE.md的
## Matter workspaces
下的
Active matter:
行是唯一的事实来源。切换事务会编辑该行,无需单独的状态文件。

Subcommand logic

子命令逻辑

new <slug>

new <slug>

  1. Confirm slug is not already present in
    matters/<slug>/
    or
    matters/_archived/<slug>/
    . If reused, ask the user to pick a different slug.
  2. Run the intake interview:
    • Client (the party we represent, or the internal business unit if in-house)
    • Counterparty (the other side — may be multiple)
    • Matter type (read the plugin's practice profile for typical categories; for ai-governance-legal: use case (internal) | vendor AI review | AIA | regulatory change | policy project | other)
    • Confidentiality level (standard | heightened | clean-team — heightened prompts extra care in cross-matter settings)
    • Key facts (2–5 sentences: what this matter is about, who the stakeholders are, what's at stake)
    • Matter-specific overrides to the practice playbook (e.g., "client requires 24-month LoL cap not 12", "counterparty is a strategic partner — relationship-preserving tone")
    • Related matters (slugs of any connected matters)
  3. Write
    matters/<slug>/matter.md
    using the template below.
  4. Seed
    matters/<slug>/history.md
    with a single "Opened" entry.
  5. Create an empty
    matters/<slug>/notes.md
    .
  6. Do not auto-switch to the new matter. Ask: "Want to switch to
    <slug>
    now? (
    /ai-governance-legal:matter-workspace switch <slug>
    )"
  1. 确认
    matters/<slug>/
    matters/_archived/<slug>/
    中不存在重复的slug。如果重复,请用户选择不同的slug。
  2. 运行信息收集访谈:
    • 客户(我方代表的主体,内部事务所则为内部业务单元)
    • 交易对手(另一方——可能有多个)
    • 事务类型(读取插件的事务所配置文件获取典型分类;对于ai-governance-legal:用例(内部)| 供应商AI审核 | AIA | 监管变更 | 政策项目 | 其他)
    • 保密级别(标准 | 高级 | 清洁团队——高级别会在跨事务场景中提示额外注意)
    • 关键事实(2-5句话:事务内容、利益相关方、风险点)
    • 事务级别的事务所工作手册自定义配置(例如:“客户要求24个月的责任上限,而非12个月”,“交易对手是战略合作伙伴——需采用维护关系的语气”)
    • 相关事务(相关事务的slug)
  3. 使用下方模板写入
    matters/<slug>/matter.md
  4. matters/<slug>/history.md
    中添加一条“已开启”的初始记录。
  5. 创建空的
    matters/<slug>/notes.md
  6. 不要自动切换到新事务。询问用户:“是否要立即切换到
    <slug>
    ?(运行
    /ai-governance-legal:matter-workspace switch <slug>
    )”

list

list

Enumerate
matters/*/matter.md
. Read each file's front-matter or first few lines to extract status. Print a table:
SlugClientMatter typeStatusOpenedActive
Mark the currently-active matter with
*
. Include
_archived/*
under a separate "Archived" heading if any exist.
遍历
matters/*/matter.md
。读取每个文件的前置内容或前几行提取状态。打印表格:
Slug客户事务类型状态开启日期活跃状态
*
标记当前活跃事务。如果存在归档事务,在单独的“已归档”标题下列出
_archived/*

switch <slug>

switch <slug>

  1. Confirm
    matters/<slug>/matter.md
    exists. If not, offer
    /ai-governance-legal:matter-workspace new <slug>
    .
  2. Edit the
    Active matter:
    line in the practice-level CLAUDE.md to
    Active matter: <slug>
    .
  3. Show the user the matter.md summary so they can confirm they're on the right matter.
  1. 确认
    matters/<slug>/matter.md
    存在。如果不存在,建议用户运行
    /ai-governance-legal:matter-workspace new <slug>
  2. 将事务所层级CLAUDE.md中的
    Active matter:
    行编辑为
    Active matter: <slug>
  3. 向用户展示matter.md的摘要,以便确认切换到了正确的事务。

close <slug>

close <slug>

  1. Confirm
    matters/<slug>/
    exists.
  2. Append a "Closed" entry to
    matters/<slug>/history.md
    with today's date.
  3. Move
    matters/<slug>/
    matters/_archived/<slug>/
    .
  4. If the closed matter was the active matter, set
    Active matter:
    to
    none — practice-level context only
    .
  1. 确认
    matters/<slug>/
    存在。
  2. matters/<slug>/history.md
    中追加一条带当日日期的“已关闭”记录。
  3. matters/<slug>/
    移动至
    matters/_archived/<slug>/
  4. 如果关闭的是当前活跃事务,将
    Active matter:
    设置为
    none — practice-level context only

none

none

Set
Active matter:
in the practice-level CLAUDE.md to
none — practice-level context only
. Confirm with the user.
将事务所层级CLAUDE.md中的
Active matter:
设置为
none — practice-level context only
,并向用户确认。

matter.md
template

matter.md
模板

markdown
[WORK-PRODUCT HEADER — per plugin config ## Outputs — differs by role; see `## Who's using this` in the practice-level CLAUDE.md]
markdown
[工作产品页眉 — 依据插件配置的## Outputs — 因角色而异;请查看事务所层级CLAUDE.md中的## Who's using this部分]

Matter: [Client] — [short description]

事务:[客户] — [简短描述]

Slug: [slug] Opened: [YYYY-MM-DD] Status: active Confidentiality: [standard / heightened / clean-team]

Slug: [slug] 开启日期: [YYYY-MM-DD] 状态: active 保密级别: [standard / heightened / clean-team]

Parties

参与方

Client: [name] Counterparty: [name(s)]
客户: [名称] 交易对手: [名称]

Matter type

事务类型

[vendor MSA | customer agreement | NDA | SaaS subscription | amendment | renewal | other — with one-line rationale]
[供应商MSA | 客户协议 | NDA | SaaS订阅 | 修订 | 续约 | 其他 — 附一行说明理由]

Key facts

关键事实

[2–5 sentences. What this matter is about. Who the stakeholders are. What's at stake. What makes it different from the default playbook.]
[2-5句话。事务内容、利益相关方、风险点、与默认工作手册的差异点。]

Matter-specific overrides

事务级自定义配置

Any deviation from the practice-level playbook that applies to this matter and only this matter.
  • [e.g., "LoL cap: client requires 24 months, not house standard 12."]
  • [e.g., "Tone: relationship-preserving — counterparty is a strategic partner."]
  • [e.g., "Governing law: must be English law, not Delaware."]
任何仅适用于本事务、与事务所层级工作手册不同的设置。
  • [例如:“责任上限:客户要求24个月,而非事务所标准的12个月。”]
  • [例如:“语气:维护关系——交易对手是战略合作伙伴。”]
  • [例如:“管辖法律:必须是英国法,而非特拉华州法。”]

Related matters

相关事务

  • [slug — one line why related]
  • [slug — 一行说明关联原因]

Notes on confidentiality

保密说明

[If heightened or clean-team, describe why. Who may see matter files. Whether cross-matter context is permissible even if globally on.]
undefined
[如果是高级别或清洁团队,说明原因。哪些人可以查看事务文件。即使全局跨事务上下文开启,是否允许跨事务访问。]
undefined

history.md
seed

history.md
初始模板

markdown
undefined
markdown
undefined

History: [Client] — [short description]

历史记录:[客户] — [简短描述]

Append-only event log. Most recent at top.

仅追加的事件日志。最新记录在顶部。

[YYYY-MM-DD] — Matter opened

[YYYY-MM-DD] — 事务开启

Intake completed. Slug:
[slug]
. Status: active. [Any initial context worth preserving beyond matter.md — e.g., "Opened in response to inbound MSA draft from [counterparty]."]
undefined
完成信息收集。Slug:
[slug]
。状态: active。 [任何需要保留在matter.md之外的初始上下文——例如:“响应交易对手发来的MSA草稿而开启。”]
undefined

Cross-matter context

跨事务上下文

The practice-level CLAUDE.md has a
Cross-matter context:
flag. When it's
off
(the default), a skill working in matter A never reads files in
matters/B/
for any other
B
. Period. This is the confidentiality guarantee the setting exists to provide.
When it's
on
, a skill may read files across matter folders only when the user explicitly asks it to (e.g., "compare our position on liability caps across the last five vendor matters"). Even when
on
, the default is to load only the active matter unless the user asks for a cross-matter view.
事务所层级CLAUDE.md中有一个
Cross-matter context:
标记。当设置为
off
(默认)时,处理事务A的技能绝不会读取
matters/B/
下的任何文件,无论B是哪个事务。这是该设置存在的核心保密保障。
当设置为
on
时,只有在用户明确要求的情况下(例如:“对比过去五个供应商事务中我们在责任上限上的立场”),技能才可以跨事务文件夹读取文件。即使设置为
on
,默认也仅加载活跃事务,除非用户要求跨事务视图。

What this skill does not do

本技能不负责的事项

  • Run a conflicts check. Conflicts are the practitioner's/firm's job; the intake captures what the user declares.
  • Enforce retention. Closing archives a matter; it does not delete. Retention policy is out of scope.
  • Auto-route outputs. The substantive skill decides where to write; this skill tells it which folder is active, not what to put in it.
  • Decide whether cross-matter is appropriate. It reads the flag and obeys.
  • 冲突检查。冲突检查是从业者/律所的职责;信息收集流程仅记录用户声明的内容。
  • 留存执行。关闭事务仅进行归档,不删除。留存政策不在本技能范围内。
  • 输出自动路由。核心技能决定写入位置;本技能仅告知其当前活跃的文件夹,而非写入内容。
  • 判断跨事务访问是否合适。本技能仅读取标记并执行。