* feat(onboarding): the first task chat delivers a small result in minutes Live runs on an RTX Spark showed the task chat surveying the whole machine, asking a plan question, and installing the picked plugins 11.5 minutes after setup. Its suggestions ignored the picks and the scan, and the handoff text said "Call me Sid." and "Start from this; look at my computer again...". - New optional skill first-task. start_chat appends it to the task chat's first message, after the ask and the "What setup learned" block, with a JSON block of the connector and plugin ids picked in setup. No system prompt changes. The history projection cuts the message at its marker, so no surface shows the skill. Its rules: connect and install the picks first, work visible in 1 minute and a finished result in 5, big asks cut to a first slice, three options only for a vague ask, machine setup as a short card interview. - setup_choose records the picked ids and the fork pick. The fork card is filled when shown: two first tasks from the picks and the scan (a daily brief from the picked apps, "Install a few apps for this Spark", a small page), then "I have something in mind", "Help me set up this <machine>", "Let's figure it out together". The machine-first "Something else" step, "automate" and "skip" rows are gone; "figure" hands off at once. - The handoff template is the ask only; no "Call me", no install or plan paragraphs. start_chat drops the "Start from this" line. - initiate-setup SKILL.md keeps only the setup beats (20.5 KB -> 10 KB). - Desktop shows the "What setup learned" block folded under the first message; the model still gets the full text. * fix(setup): one unexpected shutdown reads as singular
30 lines
1.2 KiB
Python
30 lines
1.2 KiB
Python
"""The ``first-task`` skill for the task chat a setup handoff opens.
|
|
|
|
``start_chat`` sends it in that chat's first user message, the way ``/initiate-setup`` carries its skill, so
|
|
no system prompt changes. It rides at the tail, after the visible ask and the "What setup learned" block:
|
|
session previews read the ask, and the history projection cuts the message at ``MARKER`` so no surface
|
|
shows the skill.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from hermes_constants import get_optional_skills_dir
|
|
|
|
MARKER = "\n\n[/first-task]\n\n"
|
|
|
|
|
|
def first_task_tail(connect: list, install: list) -> str:
|
|
"""``connect``: connector ids to show on one connect card; ``install``: catalog plugin ids to install."""
|
|
skill_dir = get_optional_skills_dir(Path(__file__).resolve().parent.parent / "optional-skills")
|
|
skill = (skill_dir / "productivity" / "first-task" / "SKILL.md").read_text(encoding="utf-8-sig").strip()
|
|
facts = json.dumps({"connect": connect, "install": install}, ensure_ascii=False)
|
|
return f"{MARKER}{skill}\n\n```json\n{facts}\n```"
|
|
|
|
|
|
def visible_text(text: str) -> str:
|
|
"""The part of a user message a surface shows: everything before the first-task skill."""
|
|
return text.partition(MARKER)[0]
|