trades-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTrades Operations Skill
行业运营Skill
What This Skill Does
此Skill的功能
This skill defines how to build a trades operations tool — the estimate-to-payment workflow that construction trades and field service businesses run daily.
It is NOT a generic project management tool (Jira/Asana). It is NOT a CPQ tool (no product configuration). It is a workflow tracker specifically shaped for businesses that:
- Create estimates based on measured scope items (square footage, linear feet, units)
- Schedule and assign field work to crews or subtrades
- Track progress by scope item and location
- Pay subtrades based on completed measured work
- Invoice customers and collect payment
Common verticals: drywall, roofing, HVAC, plumbing, electrical, painting, flooring, concrete, landscaping, general contracting.
The builder reads this skill, reads the DOMAIN.md for the specific trade and terminology, and generates a working prototype that uses the customer's actual scope items, pricing, and workflow stages.
本Skill定义了如何构建行业运营工具——建筑行业和现场服务企业日常使用的“估算到付款”工作流。
它不是通用项目管理工具(Jira/Asana),也不是CPQ工具(无产品配置功能)。它是专为以下类型企业打造的工作流跟踪工具:
- 根据测量范围项(建筑面积、线性英尺、单位数量)创建估算
- 为团队或分包商安排并分配现场工作
- 按范围项和位置跟踪进度
- 根据已完成的测量工作向分包商付款
- 向客户开具发票并收款
适用垂直领域: 干墙施工、屋顶工程、暖通空调、管道工程、电气工程、涂装、地板铺设、混凝土工程、景观美化、总承包。
构建器会读取此Skill,以及针对特定行业和术语的DOMAIN.md,生成可运行的原型,该原型会使用客户实际的范围项、定价和工作流阶段。
When to Use This Skill
何时使用此Skill
Use this skill when the transcript or DOMAIN.md contains these signals:
| Signal | Examples |
|---|---|
| Scope items with measurements | square footage, linear feet, board feet, units per area |
| Field scheduling | crew assignment, job calendar, field work planning |
| Subtrade payments | paying subs, trade payments, per-sqft pay rates |
| Estimate-to-invoice workflow | estimate → schedule → work → invoice cycle |
| Trade-specific scopes | insulation, drywall, taping, roofing, framing, plumbing rough-in |
| Location-based specs | different specs per floor, per room, per zone |
| Dual invoicing | trade invoices (outgoing to subs) AND customer invoices (incoming from clients) |
Do NOT use this skill for:
- Product configuration with dependencies → use cpq-builder
- Inventory and stock management → use erp-builder (future)
- Generic CRM or contact management → use crm-builder (future)
当转录内容或DOMAIN.md包含以下信号时,使用此Skill:
| 触发信号 | 示例 |
|---|---|
| 带测量值的范围项 | 建筑面积、线性英尺、板英尺、单位面积数量 |
| 现场调度 | 团队分配、工作日历、现场工作规划 |
| 分包商付款 | 支付分包商款项、行业付款、每平方英尺费率 |
| 估算到发票工作流 | 估算 → 调度 → 施工 → 发票周期 |
| 特定行业范围 | 保温层、干墙、贴胶带、屋顶、框架、管道粗装 |
| 基于位置的规范 | 不同楼层、房间、区域的不同规范 |
| 双重发票 | 行业发票(向分包商开具)和客户发票(向客户收取) |
请勿将此Skill用于:
- 带依赖关系的产品配置 → 使用cpq-builder
- 库存和库存管理 → 使用erp-builder(未来版本)
- 通用CRM或联系人管理 → 使用crm-builder(未来版本)
Section Definitions
板块定义
The trades-builder tool has FIVE sections. These are fixed — they come from this skill, not from the business process described in the transcript.
行业运营构建器工具包含五个板块。这些板块是固定的——来自本Skill,而非转录内容中描述的业务流程。
Section 1: Estimate
板块1:估算
What it does: Capture the project details and build the scope-based estimate.
Project details (editable inline):
- Project name — inline editable text (click to edit, save on blur)
- Customer name — inline editable text
- Address — inline editable text
- Estimate number — auto-generated, read-only
- Lead source — dropdown if DOMAIN.md defines sources, otherwise free text
Select - Estimator notes — , always editable
Textarea
Scope items table (the core of this section):
This table is the most important element in the app. Each row represents a scope of work with measured quantities.
| Column | Type | Editable | Notes |
|---|---|---|---|
| Scope | | Yes | Options from DOMAIN.md: insulation, drywall, taping, sanding, cleaning, priming, etc. |
| Location | Text input | Yes | e.g., "Main floor living room," "Basement suite" |
| Spec/Type | Text input or | Yes | e.g., "Type X," "Moisture resistant," "R-20 batt," "Level 4 finish" |
| Sq ft | Number input | Yes | Square footage for this scope at this location |
| Rate | Number input | Yes | Dollar rate per sqft (CAD) |
| Line total | Calculated | No | Sqft × Rate, auto-calculated |
| Actions | Delete button | — | Trash icon to remove the row |
- "Add row" button below the table to add more scope items
- Multiple rows per scope type — e.g., two drywall rows for different locations with different types
- Auto-calculated footer: Subtotal, Tax (GST 5%), Total — updates on every cell change
- All cells are directly editable — click a cell, type, blur to save. See frontend-design skill for inline editing pattern.
Data from DOMAIN.md to use:
- Entity Registry → Job Specification sub-items become the Scope dropdown options
- Business Rules → unit of measure (sqft, lft), tax type and rate, payment terms
- Terminology Glossary → exact scope names (not generic labels)
功能: 捕获项目详情并构建基于范围的估算。
项目详情(可在线编辑):
- 项目名称 — 可在线编辑文本(点击编辑,失焦时保存)
- 客户名称 — 可在线编辑文本
- 地址 — 可在线编辑文本
- 估算编号 — 自动生成,只读
- 线索来源 — 若DOMAIN.md定义了来源则为下拉框,否则为自由文本
Select - 估算师备注 — ,始终可编辑
Textarea
范围项表格(本板块核心):
此表格是应用中最重要的元素。每一行代表一项带有测量数量的工作范围。
| 列 | 类型 | 是否可编辑 | 说明 |
|---|---|---|---|
| 范围 | | 是 | 选项来自DOMAIN.md:保温层、干墙、贴胶带、打磨、清洁、涂底漆等 |
| 位置 | 文本输入框 | 是 | 例如:“主楼层客厅”、“地下室套房” |
| 规格/类型 | 文本输入框或 | 是 | 例如:“X型”、“防潮型”、“R-20棉絮”、“4级饰面” |
| 建筑面积 | 数字输入框 | 是 | 该范围在对应位置的建筑面积 |
| 费率 | 数字输入框 | 是 | 每平方英尺的美元费率(加元) |
| 行总计 | 计算值 | 否 | 建筑面积 × 费率,自动计算 |
| 操作 | 删除按钮 | — | 垃圾桶图标用于删除行 |
- 表格下方的“添加行”按钮用于添加更多范围项
- 同一范围类型可有多行 — 例如,不同位置、不同类型的两行干墙项
- 自动计算页脚: 小计、税费(GST 5%)、总计 — 随每个单元格变化而更新
- 所有单元格均可直接编辑 — 点击单元格、输入内容、失焦保存。查看frontend-design skill了解在线编辑模式。
需使用的DOMAIN.md数据:
- 实体注册表 → 工作规范子项成为范围下拉框选项
- 业务规则 → 计量单位(平方英尺、线性英尺)、税种和税率、付款条款
- 术语表 → 精确的范围名称(非通用标签)
Section 2: Schedule
板块2:调度
What it does: Plan field work assignments and sequence.
Fields (editable):
- Assigned roles/people — dropdowns from DOMAIN.md Stakeholder Map, NOT free text
Select - Scope sequence — reorderable list showing which scope items happen in what order
- Start date — date picker, editable
- Target completion date — date picker, editable
- Field crew notes — , editable
Textarea
If DOMAIN.md mentions scheduling tools (e.g., "Bold for scheduling"), reference them in the section description: "Use Bold to line up the field crew."
功能: 规划现场工作分配和顺序。
字段(可编辑):
- 分配的角色/人员 — 来自DOMAIN.md利益相关者地图的下拉框,而非自由文本
Select - 范围顺序 — 可重新排序的列表,显示各项范围的执行顺序
- 开始日期 — 日期选择器,可编辑
- 目标完成日期 — 日期选择器,可编辑
- 现场团队备注 — ,可编辑
Textarea
若DOMAIN.md提及调度工具(例如:“使用Bold进行调度”),请在板块描述中引用:“使用Bold安排现场团队。”
Section 3: In Progress
板块3:进行中
What it does: Track work completion per scope item and location.
Display:
- Table populated from Estimate's scope items — same rows, now being tracked for completion
| Column | Type | Editable | Notes |
|---|---|---|---|
| Scope | Text | No | From Estimate |
| Location | Text | No | From Estimate |
| Sq ft | Number | No | From Estimate |
| Status | | Yes | Not Started / In Progress / Completed |
- Status changes save immediately to localStorage
- "Mark all completed" button for bulk update
- Progress indicator: "3 of 5 scope items completed"
功能: 按范围项和位置跟踪工作完成情况。
显示:
- 表格从估算板块的范围项填充而来 — 行内容相同,现在用于跟踪完成情况
| 列 | 类型 | 是否可编辑 | 说明 |
|---|---|---|---|
| 范围 | 文本 | 否 | 来自估算板块 |
| 位置 | 文本 | 否 | 来自估算板块 |
| 建筑面积 | 数字 | 否 | 来自估算板块 |
| 状态 | | 是 | 未开始 / 进行中 / 已完成 |
- 状态更改会立即保存到localStorage
- 用于批量更新的“标记全部完成”按钮
- 进度指示器:“5项范围项中已完成3项”
Section 4: Close Out
板块4:收尾
What it does: Handle the dual payment flow — pay subtrades and invoice the customer.
Display — two cards side by side:
Trade Invoice card:
- Subtrade payment amount — auto-calculated from completed scope items (sqft × rate)
- Status: dropdown — Ready to pay / Paid
Select - Payment date — date picker, editable when status is Paid
- Reference to Bold if mentioned in DOMAIN.md
Customer Invoice card:
-
Invoice amount — subtotal + tax from Estimate
-
Status:dropdown — Ready to send / Sent / Paid
Select -
Invoice date — date picker, editable
-
Reference to Arvest if mentioned in DOMAIN.md
-
"Close out job" action button that marks the project as Completed
-
Both invoice statuses must be saved to localStorage
If DOMAIN.md mentions invoicing tools, reference them in the card headers: "Trade invoice (Bold)" and "Customer invoice (Arvest)."
功能: 处理双重付款流程 — 向分包商付款并向客户开具发票。
显示 — 两张并排卡片:
行业发票卡片:
- 分包商付款金额 — 根据已完成范围项自动计算(建筑面积 × 费率)
- 状态:下拉框 — 待付款 / 已付款
Select - 付款日期 — 日期选择器,状态为已付款时可编辑
- 若DOMAIN.md提及则引用Bold
客户发票卡片:
-
发票金额 — 估算板块的小计 + 税费
-
状态:下拉框 — 待发送 / 已发送 / 已付款
Select -
发票日期 — 日期选择器,可编辑
-
若DOMAIN.md提及则引用Arvest
-
将项目标记为已完成的“收尾工作”操作按钮
-
两张发票的状态均需保存到localStorage
若DOMAIN.md提及发票工具,请在卡片标题中引用:“行业发票(Bold)”和“客户发票(Arvest)”。
Section 5: Job Summary
板块5:工作摘要
What it does: Read-only summary of the completed project — the final output view.
Layout (top to bottom):
- Company header — brand logo from domain.md Brand Logos section (use the logo URL or path provided) + company name + placeholder address ("123 Main St, City, Province, Postal Code — update in settings")
- Project metadata — project name, customer, address, estimate number, dates, assigned to. Two-column grid of label/value pairs.
- Scope summary table — all scope items with scope type, location, spec/type, sqft, rate, line total. Clean with right-aligned numeric columns.
Table - Totals block — subtotal, tax (GST 5%), total. Total is large and bold.
- Payment status — trade invoice status badge + customer invoice status badge, side by side.
- Terms — payment terms (Net 30), currency (CAD).
This view is entirely read-only. No edit controls, no inputs, no dropdowns. Users click back to Estimate or Schedule in the stepper to make changes. The Job Summary is the output, not the workspace.
功能: 已完成项目的只读摘要 — 最终输出视图。
布局(从上到下):
- 公司页眉 — 来自domain.md品牌标志板块的品牌logo(使用提供的logo URL或路径)+ 公司名称 + 占位地址(“123 Main St, City, Province, Postal Code — 在设置中更新”)
- 项目元数据 — 项目名称、客户、地址、估算编号、日期、负责人。标签/值对的两列网格布局。
- 范围摘要表格 — 所有范围项,包含范围类型、位置、规格/类型、建筑面积、费率、行总计。整洁的,数值列右对齐。
Table - 总计区块 — 小计、税费(GST 5%)、总计。总计字体大且加粗。
- 付款状态 — 行业发票状态徽章 + 客户发票状态徽章,并排显示。
- 条款 — 付款条款(Net 30)、货币(加元)。
此视图完全只读。无编辑控件、输入框或下拉框。用户点击步骤条中的“估算”或“调度”返回修改。工作摘要是输出,而非工作区。
Layout Pattern
布局模式
The trades-builder tool uses a three-panel layout with FIVE sections (not four). The builder MUST follow this layout.
行业运营构建器工具采用三面板布局,包含五个板块(而非四个)。构建器必须遵循此布局。
Left sidebar (always visible, collapsible)
左侧侧边栏(始终可见,可折叠)
This content goes INTO the template's existing sidebar slot — it REPLACES the template's default navigation. Do not create a second sidebar next to the template's default one. One left sidebar total.
Preserve the template's collapsible sidebar behavior. If the template has a sidebar toggle, keep it working. Inject skill content into the existing collapsible component — do not rebuild from scratch.
If you cannot put the stepper in the template's sidebar without modifying the layout file, modify the layout file. The skill layout overrides template preservation. Do not create a second sidebar column just to avoid touching .
MainLayout.tsxSidebar heading: Use a contextual label like "Workflow" or "Project workflow" — not the company name.
| Component | Content |
|---|---|
| Stepper | A VERTICAL list of ALL FIVE sections: (1) Estimate, (2) Schedule, (3) In Progress, (4) Close Out, (5) Job Summary. Each step shows: step number, label, subtitle from section description, and completion state. Vertical stepper in the sidebar — NOT horizontal tabs. Modify the layout file if needed — skill layout overrides template preservation. |
| Saved projects | List of projects stored in localStorage. Each shows name + customer + status badge (Estimated / Scheduled / In Progress / Completed). Pin this section to the bottom of the sidebar so it's always visible without scrolling. Double-click a project name to rename inline. |
CRITICAL: Stepper labels come from THIS SKILL, not from DOMAIN.md. The DOMAIN.md state model may list — those are the project's STATUS values for badges. The stepper LABELS are the skill's section names: Estimate, Schedule, In Progress, Close Out, Job Summary. These are different things. The stepper has 5 steps. The domain has 4 statuses. Do not use the domain status list as stepper labels — you'll get 4 steps instead of 5 and lose Close Out and Job Summary.
estimated, scheduled, in progress, completed此内容需放入模板现有的侧边栏插槽中 — 替换模板的默认导航。请勿在模板默认侧边栏旁创建第二个侧边栏。仅保留一个左侧侧边栏。
保留模板的可折叠侧边栏行为。若模板有侧边栏切换按钮,需保持其可用。将Skill内容注入现有的可折叠组件中 — 请勿从头重建。
若无法在不修改布局文件的情况下将步骤条放入模板侧边栏,请修改布局文件。Skill布局优先级高于模板保留规则。请勿为避免修改而创建第二个侧边栏列。
MainLayout.tsx侧边栏标题: 使用上下文标签,如“工作流”或“项目工作流” — 而非公司名称。
| 组件 | 内容 |
|---|---|
| 步骤条 | 所有五个板块的垂直列表:(1) 估算,(2) 调度,(3) 进行中,(4) 收尾,(5) 工作摘要。每个步骤显示:步骤编号、标签、板块描述的副标题,以及完成状态。侧边栏中的垂直步骤条 — 而非水平标签页。必要时修改布局文件 — Skill布局优先级高于模板保留规则。 |
| 已保存项目 | 存储在localStorage中的项目列表。每个项目显示名称 + 客户 + 状态徽章(已估算 / 已调度 / 进行中 / 已完成)。将此板块固定在侧边栏底部,无需滚动即可始终可见。双击项目名称可在线重命名。 |
重要提示:步骤条标签来自本Skill,而非DOMAIN.md。DOMAIN.md状态模型可能列出 — 这些是项目的状态值,用于徽章显示。步骤条标签是Skill的板块名称:估算、调度、进行中、收尾、工作摘要。二者不同。步骤条有5个步骤,领域有4种状态。请勿将领域状态列表用作步骤条标签 — 否则会得到4个步骤,丢失“收尾”和“工作摘要”板块。
estimated, scheduled, in progress, completedMain content (center — changes per section)
主内容区(中间 — 随板块变化)
Only the active section renders. Do NOT stack all sections on one scrolling page. Do NOT combine multiple sections into one panel (e.g., "Schedule / In Progress / Close Out" as one section is WRONG — each is its own panel). Do NOT use horizontal tabs. Each stepper step shows its corresponding panel at FULL WIDTH of the main content area. All other panels are hidden.
Implementation: use a state variable (0–4). Render only the panel that matches .
currentStepcurrentSteptsx
// ALL FIVE panels, conditional rendering
{currentStep === 0 && <EstimatePanel />}
{currentStep === 1 && <SchedulePanel />}
{currentStep === 2 && <InProgressPanel />}
{currentStep === 3 && <CloseOutPanel />}
{currentStep === 4 && <JobSummaryPanel />}| Section | What renders |
|---|---|
| Estimate | Project details form + scope items table with add/remove rows, quantities, rates, auto-calculated totals. "Save estimate" and "Continue to Schedule" buttons. |
| Schedule | Role/crew assignment dropdowns (from DOMAIN.md), scope sequence, date fields, field notes. "Continue to In Progress" button. |
| In Progress | Location-based scope tracking table with status per row. "Mark completed" button. |
| Close Out | Trade invoice card + customer invoice card, side by side. "Close out job" button. |
| Job Summary | Read-only formatted project summary with company header, scope table, totals, payment status. |
仅渲染当前激活的板块。请勿将所有板块堆叠在一个滚动页面上。请勿将多个板块合并到一个面板中(例如:将“调度 / 进行中 / 收尾”合并为一个板块是错误的 — 每个板块都是独立面板)。请勿使用水平标签页。每个步骤条步骤对应的面板占满主内容区的全部宽度。其他所有面板均隐藏。
实现方式:使用状态变量(0–4)。仅渲染与匹配的面板。
currentStepcurrentSteptsx
// ALL FIVE panels, conditional rendering
{currentStep === 0 && <EstimatePanel />}
{currentStep === 1 && <SchedulePanel />}
{currentStep === 2 && <InProgressPanel />}
{currentStep === 3 && <CloseOutPanel />}
{currentStep === 4 && <JobSummaryPanel />}| 板块 | 渲染内容 |
|---|---|
| 估算 | 项目详情表单 + 范围项表格,包含添加/删除行、数量、费率、自动计算总计。“保存估算”和“继续到调度”按钮。 |
| 调度 | 角色/团队分配下拉框(来自DOMAIN.md)、范围顺序、日期字段、现场备注。“继续到进行中”按钮。 |
| 进行中 | 基于位置的范围跟踪表格,每行包含状态。“标记完成”按钮。 |
| 收尾 | 行业发票卡片 + 客户发票卡片,并排显示。“收尾工作”按钮。 |
| 工作摘要 | 只读格式化项目摘要,包含公司页眉、范围表格、总计、付款状态。 |
Right sidebar (always visible)
右侧侧边栏(始终可见)
| Component | Content |
|---|---|
| Project summary | Live-updating card: current stage, estimate number, payment terms, subtotal, tax, total. Updates when scope items change. |
| Workflow notes | Business rules from DOMAIN.md displayed as contextual guidance. Reference BR-IDs. |
| Actions | Back, Continue, and Delete project buttons. Primary action uses brand accent color. |
| 组件 | 内容 |
|---|---|
| 项目摘要 | 实时更新卡片:当前阶段、估算编号、付款条款、小计、税费、总计。范围项变化时自动更新。 |
| 工作流备注 | DOMAIN.md中的业务规则,作为上下文指导显示。引用BR-ID。 |
| 操作 | 返回、继续、删除项目按钮。主操作使用品牌强调色。 |
RBAC behavior
RBAC行为
- Seed localStorage with roles from DOMAIN.md User Roles or Stakeholder Map.
- Role switcher is a single dropdown in the header bar — not separate buttons. Shows active role name and badge.
DropdownMenu - Approval gating: If DOMAIN.md says only certain roles can close out or approve, disable those buttons for other roles.
- Role-specific views: If roles handle specific stages (e.g., estimator handles Estimate, project manager handles Schedule), show relevant context when that role is active.
- 从DOMAIN.md用户角色或利益相关者地图中获取角色,初始化到localStorage。
- 角色切换器是页眉中的单个下拉框 — 而非单独按钮。显示当前激活的角色名称和徽章。
DropdownMenu - 审批限制: 若DOMAIN.md规定仅特定角色可收尾或审批,则对其他角色禁用相应按钮。
- 角色专属视图: 若角色负责特定阶段(例如:估算师处理估算板块,项目经理处理调度板块),则激活该角色时显示相关上下文。
Price visibility
价格可见性
- Show prices on the Estimate panel — unit rates, line totals, subtotal, tax, total.
- Show running totals in the right sidebar Project Summary.
- Use the currency, tax type, and tax rate from DOMAIN.md.
- Format prices with the currency code (e.g., "$3,900.40 CAD" or "$3,900.40" with "CAD" shown in the summary).
- 在估算板块显示价格 — 单位费率、行总计、小计、税费、总计。
- 在右侧侧边栏的项目摘要中显示实时总计。
- 使用DOMAIN.md中的货币、税种和税率。
- 价格格式需包含货币代码(例如:“$3,900.40 CAD”或“$3,900.40”,摘要中显示“CAD”)。
shadcn/ui component mapping
shadcn/ui组件映射
| Trades-ops Element | shadcn Component | Usage Notes |
|---|---|---|
| Project details form | | Project name, customer, address. Stack label above input. |
| Scope items table | | Add/remove rows. Right-align numeric columns. |
| Scope item status | | Not Started = outline, In Progress = blue, Completed = green. |
| Project status badges | | Estimated = amber, Scheduled = blue, In Progress = blue, Completed = green. |
| Role badges | | Staff = outline, Approver = default. |
| Assignment dropdowns | | Populate from DOMAIN.md stakeholder names. NOT free text inputs. |
| Invoice status cards | | Trade invoice + customer invoice side by side. |
| Action buttons | | Primary: brand accent, "Continue." Secondary: outline, "Back." Destructive: "Delete project." |
| Stepper navigation | Custom vertical list | Step number in circle, label, subtitle, completion checkmark. Use |
| Role switcher | | Single dropdown trigger in header. |
| Project summary sidebar | | Labels muted, values bold. Total row large and prominent. |
| Workflow notes | | Reference material with BR-IDs. |
| Date fields | | Start date, target completion. |
| Notes/textarea | | Estimator notes, field crew notes. |
| Confirmation dialogs | | Delete project, close out job. |
| Toast notifications | | After save, mark complete, close out. |
| 行业运营元素 | shadcn组件 | 使用说明 |
|---|---|---|
| 项目详情表单 | | 项目名称、客户、地址。标签堆叠在输入框上方。 |
| 范围项表格 | | 添加/删除行。数值列右对齐。 |
| 范围项状态 | | 未开始 = 轮廓样式,进行中 = 蓝色,已完成 = 绿色。 |
| 项目状态徽章 | | 已估算 = 琥珀色,已调度 = 蓝色,进行中 = 蓝色,已完成 = 绿色。 |
| 角色徽章 | | 员工 = 轮廓样式,审批人 = 默认样式。 |
| 分配下拉框 | | 从DOMAIN.md利益相关者名称中填充。非自由文本输入框。 |
| 发票状态卡片 | | 行业发票 + 客户发票并排显示。 |
| 操作按钮 | | 主按钮:品牌强调色,“继续”。次要按钮:轮廓样式,“返回”。破坏性按钮:“删除项目”。 |
| 步骤条导航 | 自定义垂直列表 | 圆形步骤编号、标签、副标题、完成勾选标记。使用 |
| 角色切换器 | | 页眉中的单个下拉触发器。 |
| 项目摘要侧边栏 | 包含堆叠标签/值行的 | 标签为灰色,值为加粗。总计行字体大且突出。 |
| 工作流备注 | 带有 | 带有BR-ID的参考资料。 |
| 日期字段 | | 开始日期、目标完成日期。 |
| 备注/文本域 | | 估算师备注、现场团队备注。 |
| 确认对话框 | | 删除项目、收尾工作。 |
| 提示通知 | | 保存、标记完成、收尾后显示。 |
Deterministic Mapping Rules
确定性映射规则
Entity → Scope Item Mapping
实体 → 范围项映射
When the Knowledge Agent extracts entities from the transcript, map them to the trades-builder structure:
| DOMAIN.md entity | Maps to | In section |
|---|---|---|
| Project / Job | Project record (top-level) | All sections |
| Estimate | Estimate data (prices, terms) | Estimate panel |
| Job Specification / Scope | Scope items table rows | Estimate + In Progress |
| Invoice | Customer invoice card | Close Out |
| Trade Invoice | Trade invoice card | Close Out |
| Subtrade Payment | Payment status on trade invoice | Close Out |
| Field Schedule | Schedule data | Schedule panel |
当知识代理从转录内容中提取实体时,将其映射到行业运营构建器结构:
| DOMAIN.md实体 | 映射到 | 所在板块 |
|---|---|---|
| 项目/工作 | 项目记录(顶层) | 所有板块 |
| 估算 | 估算数据(价格、条款) | 估算面板 |
| 工作规范/范围 | 范围项表格行 | 估算 + 进行中 |
| 发票 | 客户发票卡片 | 收尾 |
| 行业发票 | 行业发票卡片 | 收尾 |
| 分包商付款 | 行业发票的付款状态 | 收尾 |
| 现场调度 | 调度数据 | 调度面板 |
Business Rule → Validation Mapping
业务规则 → 验证映射
| DOMAIN.md rule pattern | Implementation |
|---|---|
| "tracked by square footage" | Scope items table uses sqft as quantity column |
| "paid per square footage" | Trade invoice amount = sum of (sqft × rate) for completed scope items |
| "different [type] per location" | Scope items table includes Location column, multiple rows per scope type |
| "stages: estimated, scheduled, in progress, completed" | Stepper stages match exactly |
| "manually entered" | Project creation form, no import flow |
| "GST/HST at X%" | Tax line in estimate and invoice, tax type as label |
| "Net 30/45" | Payment terms shown in summary and invoice |
| "only [role] can [action]" | RBAC gate on the relevant button |
| DOMAIN.md规则模式 | 实现方式 |
|---|---|
| “按建筑面积跟踪” | 范围项表格使用建筑面积作为数量列 |
| “按建筑面积付款” | 行业发票金额 = 已完成范围项的(建筑面积 × 费率)之和 |
| “不同位置对应不同[类型]” | 范围项表格包含位置列,同一范围类型可有多行 |
| “阶段:已估算、已调度、进行中、已完成” | 步骤条阶段完全匹配 |
| “手动输入” | 项目创建表单,无导入流程 |
| “GST/HST税率为X%” | 估算和发票中的税项行,税种作为标签 |
| “Net 30/45” | 摘要和发票中显示付款条款 |
| “仅[角色]可执行[操作]” | 对相关按钮设置RBAC限制 |
Integration → Reference Mapping
集成 → 引用映射
If DOMAIN.md lists integration points (e.g., Bold, Arvest, QuickBooks), reference them in section descriptions and workflow notes — but do NOT build integration UI. The prototype is localStorage-only. Integration comes in the full build.
若DOMAIN.md列出集成点(例如:Bold、Arvest、QuickBooks),请在板块描述和工作流备注中引用 — 但请勿构建集成UI。原型仅使用localStorage。集成功能将在完整版本中实现。
Reference Files
参考文件
This skill expects these files to exist:
| File | Purpose |
|---|---|
| Business terminology, entities, rules, roles, brand data |
| Universal layout principles, brand theming, visual quality rules |
The builder should read BOTH before writing any code.
本Skill依赖以下文件:
| 文件 | 用途 |
|---|---|
| 业务术语、实体、规则、角色、品牌数据 |
| 通用布局原则、品牌主题、视觉质量规则 |
构建器在编写任何代码前,应先读取这两个文件。