CHO Weekly Goal Audit
Use this when an employee sends a weekly goal (audit) or a weekend review message to the CHO bot,
and the goal/review should be scored, written to Lark Base, and answered.
You (the agent) run the WHOLE flow yourself with your own tools, then WRITE the results to Lark
Bitable and post a summary to the chat. Do NOT refuse, do NOT just describe, do NOT claim "the
skill only formats" — drive the flow. If a data source or the target base is unavailable, SKIP that
part and still post what you have. Never ask the user for tokens — your NyxID-brokered tools broker
all credentials.
How to run it
Resolve inputs. Take the raw Lark event from the current invocation, plus deterministic
metadata: weekKey (ISO week YYYY-Www), submitTime (ISO), and attemptId. The target Bitable
is baked into the builder (app_token BASE_APP_TOKEN_PLACEHOLDER_1, table_id
TABLE_ID_PLACEHOLDER_4) and the CHO recipient defaults to ou_PLACEHOLDER_OPEN_ID_1; if the
user/host supplies a real app_token/table_id/choOpenId, carry them into steps 4–6. If the
base is unresolvable, proceed in summary-only mode (still answer the employee).
PARSE the event. Run scripts/build_weekly_goal_audit_payload.js with mode: "parse_event"
to normalize the event into openId, employeeDisplayName, goalsForAudit, messageId,
intent (audit vs weekend review), etc. Honor its result: if it returns skip: true (URL
challenge, duplicate, bot/non-target event), do exactly that. If a goal message references a PDF,
download + OCR it with your own file/PDF tool and feed the extracted text forward.
ANALYZE with your own model.
- audit intent: score the weekly goals (0–10) and produce highlights, red flags, per-goal
rewrites, and value dimensions (only
风险降低 / 效率提升 / 收入创造 / 成本降低 / 长期资产 / 主动发现与改善).
- review intent: produce the completion status, blockers, hidden wins, the employee echo, and the
CHO individual-momentum diagnosis.
If the goals are written in English, also translate the employee-facing reply and pass it through.
BUILD the exact payloads. Run scripts/build_weekly_goal_audit_payload.js via code_execute
(language "javascript"; NO stdin — inline the data into the code):
- audit:
console.log(JSON.stringify(buildPayload({ mode: "build_audit_payloads", openId, employeeDisplayName, employeeEmail, weekKey, submitTime, attemptId, messageId, goalText, goalsForAudit, auditOutput, translatedReply })))
- review (read the goal record first): for the latest record run
{ mode: "build_review_search", openId, weekKey } and read it via step 5's Base search, then
console.log(JSON.stringify(buildPayload({ mode: "build_review_payloads", openId, employeeDisplayName, goalText, recordId, reviewOutput, choOpenId }))).
Use the script output. If code execution is unavailable, follow
references/weekly-goal-audit-contract.md field-for-field.
WRITE the Base record. For audit, create the record via nyxid_proxy {slug:"api-lark-bot", path:"/open-apis/bitable/v1/apps/<app_token>/tables/<table_id>/records", method:"POST", body:<lark.createRecord.body>}. For review, first search
(POST .../records/search with lark.searchRecords.body) to resolve recordId, then update via
PUT /open-apis/bitable/v1/apps/<app_token>/tables/<table_id>/records/<recordId> with
lark.updateRecord.body.
POST the messages. Send the employee reply (lark.employeeMessage) — and, for review, the CHO
diagnosis (lark.choMessage) — via lark_messages_send to the relevant open_id; the equivalent
is nyxid_proxy POST /open-apis/im/v1/messages?receive_id_type=open_id. If no base target was
resolved OR the Base write fails, SKIP the Bitable write and STILL post the built employee reply
(and CHO diagnosis) to the chat — never fail the run for a missing base.
REPORT one line: intent (audit/review), employee, score or completion status, record
written/updated (or "summary-only"), and which messages were posted.
Payload builder reference
Bundled script: scripts/build_weekly_goal_audit_payload.js. Modes: parse_event,
build_review_search, build_audit_payloads, build_review_payloads; unsupported modes return
skip: true. The employee roster (user_id → name/email), the allowed value dimensions, and the
target base BASE_APP_TOKEN_PLACEHOLDER_1/TABLE_ID_PLACEHOLDER_4 (overridable via
appToken/tableId) are baked in; the CHO recipient defaults to ou_PLACEHOLDER_OPEN_ID_1
(overridable via choOpenId). LLM/audit/review/translation text and OCR text must be passed as
input — the script never calls a model or the network. Output is one of skip,
needs_more_information + missing, the normalized event, the Base search payload, the audit
payloads (employeeMessage + createRecord), or the review payloads (updateRecord +
employeeMessage + choMessage). Exact aliases, field mapping, and examples are in
references/weekly-goal-audit-contract.md.
Guardrails
- Only use data the tools actually returned — never invent goals, employee data, Base records, open
ids, OCR text, translated replies, or model analysis.
- Prefer running the bundled script; it is the deterministic source of truth for payload shape.
- All token exchange, Base access, and Lark sends go through your NyxID-brokered tools; never handle
raw secrets.
1---2name: cho-weekly-goal-audit-payload-builder3version: "2.1"4description: Runs the CHO weekly goal audit / weekend review flow end to end — parses the employee's Lark goal message, audits or reviews it with your own model, writes the Base record, and posts the employee reply plus the CHO diagnosis to Lark.5metadata:6 source: https://skillmd.com/skills/chronoaiproject/cho-weekly-goal-audit-payload-builder7 category: plain8 tag:9 - aevatar10 - s-capability11 - weekly-goal-audit12 - lark13 - payload-builder14 clawdbot:15 emoji: "dart"16 files:17 - "references/*"18 - "scripts/*"19---2021# CHO Weekly Goal Audit2223Use this when an employee sends a weekly goal (audit) or a weekend review message to the CHO bot,24and the goal/review should be scored, written to Lark Base, and answered.2526**You (the agent) run the WHOLE flow yourself with your own tools, then WRITE the results to Lark27Bitable and post a summary to the chat.** Do NOT refuse, do NOT just describe, do NOT claim "the28skill only formats" — drive the flow. If a data source or the target base is unavailable, SKIP that29part and still post what you have. Never ask the user for tokens — your NyxID-brokered tools broker30all credentials.3132## How to run it33341. **Resolve inputs.** Take the raw Lark event from the current invocation, plus deterministic35 metadata: `weekKey` (ISO week `YYYY-Www`), `submitTime` (ISO), and `attemptId`. The target Bitable36 is baked into the builder (`app_token` `BASE_APP_TOKEN_PLACEHOLDER_1`, `table_id`37 `TABLE_ID_PLACEHOLDER_4`) and the CHO recipient defaults to `ou_PLACEHOLDER_OPEN_ID_1`; if the38 user/host supplies a real `app_token`/`table_id`/`choOpenId`, carry them into steps 4–6. If the39 base is unresolvable, proceed in summary-only mode (still answer the employee).40412. **PARSE the event.** Run `scripts/build_weekly_goal_audit_payload.js` with `mode: "parse_event"`42 to normalize the event into `openId`, `employeeDisplayName`, `goalsForAudit`, `messageId`,43 `intent` (`audit` vs weekend `review`), etc. Honor its result: if it returns `skip: true` (URL44 challenge, duplicate, bot/non-target event), do exactly that. If a goal message references a PDF,45 download + OCR it with your own file/PDF tool and feed the extracted text forward.46473. **ANALYZE with your own model.**48 - audit intent: score the weekly goals (0–10) and produce highlights, red flags, per-goal49 rewrites, and value dimensions (only `风险降低 / 效率提升 / 收入创造 / 成本降低 / 长期资产 /50 主动发现与改善`).51 - review intent: produce the completion status, blockers, hidden wins, the employee echo, and the52 CHO individual-momentum diagnosis.53 If the goals are written in English, also translate the employee-facing reply and pass it through.54554. **BUILD the exact payloads.** Run `scripts/build_weekly_goal_audit_payload.js` via `code_execute`56 (language `"javascript"`; NO stdin — inline the data into the code):57 - audit: `console.log(JSON.stringify(buildPayload({ mode: "build_audit_payloads", openId,58 employeeDisplayName, employeeEmail, weekKey, submitTime, attemptId, messageId, goalText,59 goalsForAudit, auditOutput, translatedReply })))`60 - review (read the goal record first): for the latest record run `{ mode: "build_review_search",61 openId, weekKey }` and read it via step 5's Base search, then62 `console.log(JSON.stringify(buildPayload({ mode: "build_review_payloads", openId,63 employeeDisplayName, goalText, recordId, reviewOutput, choOpenId })))`.64 Use the script output. If code execution is unavailable, follow65 `references/weekly-goal-audit-contract.md` field-for-field.66675. **WRITE the Base record.** For audit, create the record via `nyxid_proxy` `{slug:"api-lark-bot",68 path:"/open-apis/bitable/v1/apps/<app_token>/tables/<table_id>/records", method:"POST",69 body:<lark.createRecord.body>}`. For review, first search70 (`POST .../records/search` with `lark.searchRecords.body`) to resolve `recordId`, then update via71 `PUT /open-apis/bitable/v1/apps/<app_token>/tables/<table_id>/records/<recordId>` with72 `lark.updateRecord.body`.73746. **POST the messages.** Send the employee reply (`lark.employeeMessage`) — and, for review, the CHO75 diagnosis (`lark.choMessage`) — via `lark_messages_send` to the relevant `open_id`; the equivalent76 is `nyxid_proxy` `POST /open-apis/im/v1/messages?receive_id_type=open_id`. **If no base target was77 resolved OR the Base write fails, SKIP the Bitable write and STILL post the built employee reply78 (and CHO diagnosis) to the chat — never fail the run for a missing base.**79807. **REPORT** one line: intent (audit/review), employee, score or completion status, record81 written/updated (or "summary-only"), and which messages were posted.8283## Payload builder reference8485Bundled script: `scripts/build_weekly_goal_audit_payload.js`. Modes: `parse_event`,86`build_review_search`, `build_audit_payloads`, `build_review_payloads`; unsupported modes return87`skip: true`. The employee roster (user_id → name/email), the allowed value dimensions, and the88target base `BASE_APP_TOKEN_PLACEHOLDER_1`/`TABLE_ID_PLACEHOLDER_4` (overridable via89`appToken`/`tableId`) are baked in; the CHO recipient defaults to `ou_PLACEHOLDER_OPEN_ID_1`90(overridable via `choOpenId`). LLM/audit/review/translation text and OCR text must be passed as91input — the script never calls a model or the network. Output is one of `skip`,92`needs_more_information` + `missing`, the normalized event, the Base search payload, the audit93payloads (`employeeMessage` + `createRecord`), or the review payloads (`updateRecord` +94`employeeMessage` + `choMessage`). Exact aliases, field mapping, and examples are in95`references/weekly-goal-audit-contract.md`.9697## Guardrails9899- Only use data the tools actually returned — never invent goals, employee data, Base records, open100 ids, OCR text, translated replies, or model analysis.101- Prefer running the bundled script; it is the deterministic source of truth for payload shape.102- All token exchange, Base access, and Lark sends go through your NyxID-brokered tools; never handle103 raw secrets.