Boss Reports To Me (老板向我汇报)
What This Skill Does
Traverses your organizational hierarchy to collect your direct and indirect leaders (your direct supervisor + any higher levels you choose to cover) this week's Feishu assets that you have permission to view (meeting minutes, messages, documents, sorted by information density), summarizes them per person into a weekly report, and pushes it to you. Scheduled to run every Friday by default.
Important Boundary: Only uses content the current user already has permission to see (--as user does this naturally); only produces a "weekly dynamic summary",
does not build leader profiles, does not evaluate performance/capability, is not used for monitoring. Collected original content is not persisted to disk and not stored in memory.
Prerequisites
- Company Feishu account (
--as user). Before running, confirmlark-cli auth status --json --verifyshows identity=user and correct tenant. Strictly separate work and personal Feishu; do not mix profiles/tokens. - Private state directory
~/.codex/boss-reports-to-me/(0600):roster.json(list of leaders) +state.json(scheduling + deduplication fingerprints). Can be overridden with environment variablesBOSS_REPORTS_ROSTER_PATH/BOSS_REPORTS_STATE_PATH.
Decision Flow
- First run / roster is empty → Go through "A. First-time Setup" to create roster and schedule, then run the weekly report once.
- Roster exists, user wants a weekly report → Go through "B. Weekly Run".
- User wants to change style, time, or add/remove leaders → Go through "C. Adjustments".
- User wants to enable scheduled runs → Read
references/scheduling.md.
A. First-time Setup
-
Identity Check:
lark-cli auth status --json --verify, confirm identity=user and correct tenant. -
Build Roster — Manual by default, always available (no additional authorization required):
- Directly ask the user two things: ① "Who is your direct supervisor?" ② "Besides your direct supervisor, which higher-level leaders do you want to regularly report to you?". (Provide level hints: +2 is your boss's boss, and so on, up to +4.)
- Resolve each name/email to an open_id:
For multiple matches, uselark-cli contact +search-user --as user --query "name or email" --format jsonhas_chatted: true/p2p_chat_id/departmentto help confirm the correct person. The user must verify before writing. - Write to roster (use level labels like
直属上级or+2/+3/+4):python3 scripts/roster.py add --name "Zhang San" --open-id ou_xxx --level 直属上级 python3 scripts/roster.py add --name "Li Si" --open-id ou_yyy --level +2
-
(Optional) Automatic Leader Chain: If the user is willing to grant additional permissions, can automatically traverse up 4 levels via
leader_open_id, saving the manual step:python3 scripts/leader_chain.py --levels 4- If output shows
needs_scope: true: thecontact:contact.base:readonlyscope is missing. Guide the user through one-time authorization (lark-cli auth login --scope "contact:contact.base:readonly" --no-wait --json→ give theverification_urlto the user as-is, end this round → after user confirms,lark-cli auth login --device-code <device_code>), then re-run. - Authorization is one-time; subsequent automatic runs do not need it. Lack of authorization does not block — silently remain in manual roster mode.
- Once the chain is obtained, read each leader's name to the user for confirmation, then use
roster.py addto write them.
- If output shows
-
Initialize Scheduling (default Friday 17:00, Chief-of-Staff style):
python3 scripts/state.py init --report-time 17:00 --timezone Asia/Shanghai --weekday 4 --style chief -
Then run "B. Weekly Run" once to send the first report to the user for format confirmation before discussing scheduled runs.
B. Weekly Run
- Get Time Window ("last success → now", equivalent to "last Friday → this Friday"):
python3 scripts/state.py window --at "$(date -Iseconds)" - Get Roster:
python3 scripts/roster.py show. - Collect Per Leader (by information density, meeting minutes first): For each leader, collect
① Meeting minutes/notes (primary channel) → ② Messages → ③ Documents (weak signal, supplement if available).
Commands, field names, and parsing pitfalls see
references/collection.md. Three common gotchas:- For minutes, use
--participant-ids(not--owner-ids, owner is almost always empty); results are indata.items; - IM results are in
data.messages, thecontentfield is already plain text, do not doublejson.loads; - Documents often yield no output for higher-level leaders; do not force all three categories. An empty result is a valid result.
- For minutes, use
- Deduplicate: Generate fingerprints for candidate content and filter those already reported:
printf '%s' "$content" | python3 scripts/state.py fingerprint --source minute # im / doc cat all_fps.txt | python3 scripts/state.py seen # only returns items not yet reported - Write Report: Follow the
references/output-contract.mdstandard field template — section header metadata (name, level, department, evidence count, primary scenario) + fixed four sections (Summary/Viewpoint/Original Text/Next Steps) + uniform original item format, sorted by density (meeting minutes → messages → documents). Field order is immutable; missing fields use "—" as placeholder. Leaders with high content overlap form independent sections; higher-level leaders with fewer than 3 pieces of evidence and a single source are merged into "Higher-level Scattered Signals". Current default style ischief; whenhumoris selected, use nicknames ("Xiao X") instead of leader names (chief/sairuse real names). Triple relevance filter. - Send: Get your own open_id (
lark-cli contact +get-user --as user), push:Rich cards go through lark-im's forced card workflow; do not manually write card JSON.lark-cli im +messages-send --as user --user-id ou_SELF --markdown "<weekly report>" - Persist: After successful sending, record the success time and fingerprints (to prevent cross-week duplication):
cat all_fps.txt | python3 scripts/state.py mark-success --at "<window.end RFC3339>"
C. Adjustments
- Change style:
python3 scripts/state.py set-schedule --style <chief|sair|humor>(see output-contract.md for three styles). - Change time/day of week:
python3 scripts/state.py set-schedule --report-time 09:30 --weekday 0(0=Monday…4=Friday). - Add/remove leaders:
python3 scripts/roster.py add .../remove --open-id ou_xxx/show. - Enable/confirm scheduled runs: See
references/scheduling.md(adjust host automation to create periodic tasks and read back; if pure cron cannot trigger inference, inform user that manual triggering is required).
Privacy and Security Rules
- Always use
--as user; mixing in bot identity will result in99992361 open_id cross apperrors. - Only use content you have permission to view; if no permission, mark it in the report (e.g., "No permission to view minutes"), do not fabricate or extrapolate.
- Do not treat AI meeting summaries as facts; stop drilling down when primary evidence is missing.
- State only stores scheduling parameters +
source:sha256fingerprints; never store original content/tokens/credentials; roster only stores name/open_id/level label. - This is "upward" reading of people, more sensitive than reading peers: abstract into behaviors/themes, do not create character profiles, do not evaluate performance, do not use for monitoring.
- The "Xiao X" nickname in
humorstyle appears only in this report for the user themselves; it is a tone treatment, not persisted or shared externally.