@super-hands/connect 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/client.mjs +73 -37
  2. package/package.json +1 -1
package/client.mjs CHANGED
@@ -42,11 +42,11 @@ function codexConfigBlock(args) {
42
42
  }
43
43
 
44
44
  // lib/connect-skill.ts
45
- var CONNECT_SKILL_VERSION = 17;
45
+ var CONNECT_SKILL_VERSION = 19;
46
46
  var CONNECT_SKILL_DIR = MCP_SERVER_KEY;
47
47
  var CONNECT_SKILL_FILENAME = "SKILL.md";
48
48
  var VERSION_MARKER = `[//]: # (superhands-skill-version: ${CONNECT_SKILL_VERSION})`;
49
- var CONNECT_SKILL_DESCRIPTION = `Build UI the way this team has decided it should be built. Use BEFORE building, changing, or restyling any page, screen, view, form, or component \u2014 "build a page", "add a screen", "create a form", "make a dashboard", "redesign this", "new landing page" \u2014 and when asked how this product should look or behave. Reads the team's build-time Instructions from their Superhands MCP server.`;
49
+ var CONNECT_SKILL_DESCRIPTION = `Follow this team's instructions and trace decisions in any kind of work. Use BEFORE research, writing, analysis, planning, operations, design or code \u2014 "research this", "write a report", "analyze this data", "plan the launch", "build a page", "redesign this" \u2014 including work without a repository or UI. Reads the team's build-time Instructions from their Superhands MCP server, fetches task-wide requirements before starting and each part's selected instructions before building, including copy, and follows explicit requirements even when unusual or agent-specific.`;
50
50
  var CONNECT_SKILL_CONTENT = `---
51
51
  name: ${CONNECT_SKILL_DIR}
52
52
  description: ${CONNECT_SKILL_DESCRIPTION}
@@ -59,24 +59,27 @@ ${VERSION_MARKER}
59
59
  This machine is connected to the team's Superhands server over MCP (server
60
60
  key \`${MCP_SERVER_KEY}\`). It holds the team's build-time **Instructions**:
61
61
  team-authored decisions, imported procedures, examples and conventions that all
62
- describe how agents should build in this product. Source labels tell you where
62
+ describe how agents should work for this team. Source labels tell you where
63
63
  an instruction came from and how to read it; they are not a choice about which
64
64
  half to follow.
65
65
 
66
- Design traces connect guidance to reported changes, evidence and designer review.
67
- For this task, create a stable task reference once (for example a UUID), and send
68
- it as \`trace.taskId\` on the first Instructions read. Reuse it if that read
69
- needs retrying. Save the returned \`trace.runId\` and \`trace.decisionId\`;
66
+ Work traces record explicit choices, stated reasons, sources, outputs and human
67
+ feedback for any kind of work. Create a stable task reference once (for example
68
+ a UUID). Call \`superhands_start_trace\` with \`taskId\` and a plain-language
69
+ \`task\`, even without a repository, UI or matching instruction. Reuse taskId on
70
+ retries and keep the returned runId. If this tool is unavailable, send the same
71
+ reference as \`trace.taskId\` on the first Instructions read instead.
72
+ Save the returned \`trace.runId\` and \`trace.decisionId\` when supplied;
70
73
  send \`trace.runId\` on every later read and report. Do not use a transport
71
74
  session or a shared credential as a task identity. Send \`trace.target\` for
72
- known screens/parts, \`trace.phase\` (before or during), and \`trace.trigger\`
75
+ known parts or work products, \`trace.phase\` (before or during), and \`trace.trigger\`
73
76
  when an observation prompted guidance. Unknown scope stays unknown.
74
77
 
75
- Before you build, change, or restyle any UI:
78
+ Before you build, research, write, analyze, plan or carry out other work:
76
79
 
77
80
  1. Call the \`superhands_get_instructions\` MCP tool with \`intent\` set to what
78
- you have been asked to build, in plain language \u2014 for example "a sign-in
79
- page with email and password and an error state", and
81
+ you have been asked to do, in plain language \u2014 for example "research customer
82
+ retention and write a findings report", and
80
83
  \`skill_version: ${CONNECT_SKILL_VERSION}\` \u2014 the version of this file, so
81
84
  the server can tell you when this file is out of date. The corpus comes
82
85
  back narrowed to that work, with everything not chosen still named.
@@ -89,15 +92,16 @@ Before you build, change, or restyle any UI:
89
92
  example \`["app/marketing/pricing.tsx"]\`. The team writes down where
90
93
  Instructions apply, and a path answers that far better than a description
91
94
  does. Leave it out if you do not know yet; it narrows nothing away.
92
- 2. Plan against what comes back, and note which parts of your plan each set of
93
- keys covers. The first answer renders what to read first, then names
94
- under **Reachable** the modules judged to matter to parts you have not
95
- started \u2014 those keys are what the next step asks with \u2014 and ends with an
96
- index of the modules it did **not** choose, for anything the selection
97
- missed. A part of your plan with no keys against it is a real gap in what
98
- the team has written down; say so rather than quietly using your own
99
- defaults.
100
- 3. As you start each part \u2014 the sidebar, then the table, then the form \u2014 call
95
+ 2. Plan against the selected Instructions. The first answer names them under
96
+ **Reachable**, with keys and opening text; it does not render them in full.
97
+ Fetch every selected entry when its scope is reached, including review-enforced
98
+ decisions. Superhands has already selected these for the task: sequence their
99
+ use, not a second shortlist based on your preferences. Map every selected key
100
+ to the work it governs. The closing **Not selected** index is available for
101
+ anything selection missed; fetch an entry there if the work reaches its scope.
102
+ If no entry covers a part, say guidance was not found for it, rather than
103
+ assuming the team has never written any.
104
+ 3. As you start each part \u2014 source selection, analysis, then the report; or the sidebar, table and form \u2014 call
101
105
  \`superhands_get_instruction_modules\` with the reachable keys covering the
102
106
  part you are starting now and \`part\` set to that part in a few words,
103
107
  for example \`"the form's validation errors"\`. A key ending in \`*\` takes
@@ -114,40 +118,72 @@ Before you build, change, or restyle any UI:
114
118
  the start. These are instructions to follow, not facts to know, so modules
115
119
  for a part you are not building are a page of directions about the wrong
116
120
  thing sitting in your context while you work.
117
- - Review-enforced decision entries from step 1 need no such loop. They are
118
- concise enough to stay in the opening brief, so one read at the start is
119
- the right read.
121
+ - Fetch instructions governing the whole task, agent behaviour or communication
122
+ before starting that work, and continue applying them throughout the task.
123
+ Fetch copy instructions before writing text, including placeholder copy,
124
+ headings, buttons and footers, even during layout or styling work. A part
125
+ includes its copy, controls, accessibility and states as well as its styling.
126
+ - If an entry's full text excludes the actual work, or the task changes so its
127
+ scope is no longer reached, state the concrete reason it does not apply.
128
+ Do not silently omit it.
120
129
  - If that tool is not available on this server,
121
130
  build from what step 1 already returned and skip this step. Do not ask
122
131
  for the whole library instead \u2014 that is the wall of text step 1 avoided.
132
+ Say which entries could not be read; never claim to have followed unavailable text.
123
133
  4. Build to what comes back. Use the selected Instructions together. When two
124
134
  entries pull in different directions, prefer the more specific instruction,
125
135
  preserve explicit exceptions, and call out any conflict you cannot honestly
126
- resolve.
127
- 5. Keep each design decision explicit. Use \`superhands_report_trace\` with the
136
+ resolve. Do not dismiss an explicit requirement as a leftover test, placeholder,
137
+ accidental entry or bad brand choice because it looks unusual. Do not ask for
138
+ confirmation merely because you would prefer a different result. An explicit
139
+ agent-specific text prefix is an exception to general copy style: apply the
140
+ prefix and follow the general style for the rest of the text. If requirements
141
+ remain incompatible after applying their scopes and exceptions, identify the
142
+ exact conflict and ask a focused question; continue work independent of the answer.
143
+ 5. Record each consequential decision as it happens in any kind of work. Use \`superhands_report_trace\` with the
128
144
  runId, a stable eventId and occurredAt timestamp (reuse both on retries).
129
- Send a \`decision\` event with the returned delivery IDs when one context
130
- response supports several decisions; use \`replaces\` to refine a provisional
131
- group without counting both. Title it \u201CSuggested \u2026\u201D until output inspection
132
- establishes reuse. Keep conflicting sources and any explicit resolution.
145
+ Send a \`decision\` event whose decision has id, key, title (the choice), target
146
+ (the affected work), provisional: false, a concise stated reason and optional
147
+ sources (title, URL, version or excerpt). Use returned delivery IDs when
148
+ instructions informed the choice, and \`deliveryIds: []\` otherwise. A choice
149
+ needs no existing instruction or output to be recorded. Use \`replaces\` to
150
+ refine a provisional group without counting both. Keep conflicting sources
151
+ and any explicit resolution. Cited sources remain agent reports.
133
152
  Register each identifiable output with an \`output\` event: revision,
134
153
  identity (commit:<sha>[:dirty-digest], deployment:<build-id>, or
135
- artifact:<digest>), label and target. A preview URL is only a locator.
154
+ artifact:<digest>), label and target. Documents, datasets, messages and plans
155
+ use artifact:<content-digest>; a URL is only a locator. Do not invent an output
156
+ for work that produced none. Match its target to the decision's affected work.
136
157
  Later revisions name the preceding revision in \`supersedes\`.
137
158
  Send \`response\` events with decisionId, revision, description and
138
159
  \`reported_applied\`, \`reported_adapted\`, or \`reported_rejected\`.
139
160
  Include a concise explicit reason when useful; never provide private reasoning.
140
161
  Agent reports and agent-run checks are labelled **Agent reported**, not
141
162
  independent verification. A screenshot is an artifact, not a passed check.
142
- Use \`superhands_add_trace_artifact\` for available images or evidence links,
143
- with their route, viewport and UI state. Missing capture capability is a gap;
144
- it must not stop coding. Never invent a before image or an unguided baseline.
145
- Read \`superhands_get_trace\` before responding to designer feedback. Feedback
163
+ Use \`superhands_add_trace_artifact\` for plain text, images or evidence links.
164
+ Link other formats such as spreadsheets, PDFs, audio or video. Route, viewport
165
+ and UI state apply only to visual captures. Missing capture capability must
166
+ not stop work. Never invent a before image or an unguided baseline.
167
+ Read \`superhands_get_trace\` before responding to human feedback. Feedback
146
168
  belongs to its reviewed revision. After addressing it, register the new output
147
- and send a \`ready\` event naming feedbackId; only the designer may approve.
148
- Report interrupted/failed/resumed lifecycle explicitly; to resume a terminal
169
+ and send a \`ready\` event naming feedbackId; only a human may approve.
170
+ Report completed/interrupted/failed/resumed lifecycle explicitly for every
171
+ kind of work, even without outputs or instruction changes. To resume a terminal
149
172
  run, read and supersede its lifecycleId. Later outputs do not inherit approval.
150
- If trace recording fails, report that gap and continue the coding task.
173
+ If trace recording fails, tell the person and continue the task. Only reported
174
+ activity is covered; never claim every internal decision was captured.
175
+ When a person corrects or amends a decision, report a \`correction\` event with
176
+ decisionId, optional revision, title, the proposed reusable wording in body,
177
+ and usedWhen describing the similar decisions it should guide. Keep the
178
+ correction faithful to the person's request; respect requests not to retain it.
179
+ This is an agent-reported proposal, not human acceptance. The run page lets a
180
+ member edit and save it into the team's instructions. It never changes review
181
+ policy. Read acceptedCorrections from \`superhands_get_trace\` to see what
182
+ was saved. Before a consequential decision outside the opening task's scope,
183
+ call \`superhands_get_instructions\` with that decision as intent and the same
184
+ trace.runId, then fetch the relevant keys. Accepted corrections travel through
185
+ this same search and per-part fetch; do not assume an earlier read has newer
186
+ instructions. Link later responses to the exact returned key and delivery.
151
187
 
152
188
  6. When you finish a part, call \`superhands_report_part\` with \`part\` \u2014 the
153
189
  part you just finished, in the words you fetched it under \u2014 and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-hands/connect",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Connect the coding agents on this machine to your team's Superhands MCP server — with `start`, from a machine that has no Superhands account at all. Refresh it later with `update` (no token needed), and take it back off again with `uninstall`. Writes each client's own config; reads no repository, uploads nothing.",
5
5
  "bin": {
6
6
  "superhands-connect": "client.mjs"