@ghostpaw/affinity 0.5.0 → 0.6.0
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.
- package/README.md +184 -9
- package/SKILL.md +43 -386
- package/dist/cli.js +2797 -894
- package/dist/index.cjs +1922 -613
- package/dist/index.d.cts +333 -55
- package/dist/index.d.ts +333 -55
- package/dist/index.js +1922 -613
- package/dist/mcp-server.js +2131 -819
- package/dist/mcp.cjs +1912 -707
- package/dist/mcp.d.cts +3 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.js +1913 -708
- package/package.json +1 -1
- package/skills/affinity/SKILL.md +43 -386
- package/skills/affinity/references/identify-and-locate-contacts.md +9 -0
- package/skills/affinity/references/import-history-without-faking-evidence.md +25 -0
- package/skills/affinity/references/manage-promises-and-agreements.md +8 -0
- package/skills/affinity/references/manage-recurring-dates-and-reminders.md +8 -0
- package/skills/affinity/references/record-direct-evidence-well.md +18 -0
- package/skills/affinity/references/record-observations-and-referrals.md +10 -0
- package/skills/affinity/references/review-radar-progression-and-graph.md +13 -0
- package/skills/affinity/references/tools.md +489 -0
package/SKILL.md
CHANGED
|
@@ -15,12 +15,20 @@ Windows: `irm https://raw.githubusercontent.com/GhostPawJS/affinity/main/install
|
|
|
15
15
|
```sh
|
|
16
16
|
export GHOSTPAW_AFFINITY_DB=/abs/path/affinity.db
|
|
17
17
|
# Or --db; default ~/.ghostpaw/affinity.db. Piped output is JSON; --compact omits empty receipt arrays.
|
|
18
|
+
# Version: --version includes variant; scripts should use --version --short for exact semver matching.
|
|
19
|
+
# --version --json (or version --json) returns name, version, variant, target (null outside a binary).
|
|
20
|
+
# Missing DB reads exit 3 and create nothing; the first write creates it. MCP creates on startup.
|
|
21
|
+
# JSON: --input - reads stdin; @existing-file loads a value, @@x escapes @x. Use stdin/@file for E2BIG.
|
|
22
|
+
# Arrays accept JSON, comma lists or repeats. Tag filters accept gastro-radar or tag:gastro-radar. Use per-command --help for action flags.
|
|
18
23
|
# Exit: 0 ok/no_op, 1 tool error, 2 usage/invalid input, 3 not found/clarification, 4 conflict, 70 internal.
|
|
19
24
|
# Dates: epoch ms, ISO with offset/Z, YYYY-MM-DD, DD.MM.YYYY, today, tomorrow, +3d, -2d.
|
|
20
|
-
#
|
|
25
|
+
# CLI and MCP use the same grammar, including yesterday. Keywords use the local date.
|
|
26
|
+
# Date-only occurredAt uses UTC midnight; dueAt uses UTC end of day; calendar days are preserved.
|
|
27
|
+
# Read occurredOn/dueOn/occursOn for days; *Iso stays UTC. Future events warn and do not count yet.
|
|
28
|
+
# Commitments and resolutions do not reset recency; radar drift means gap > 1.5 times cadence.
|
|
21
29
|
ghostpaw-affinity contact create '{"name":"Fox","kind":"human","bootstrapOwner":true}'
|
|
22
30
|
ghostpaw-affinity search "Jana" # Search names, identities, tags, attributes, roles and events before creating.
|
|
23
|
-
ghostpaw-affinity contact create '{"name":"Jana Petersen","kind":"human"}'
|
|
31
|
+
ghostpaw-affinity contact create '{"name":"Jana Petersen","kind":"human"}' --if-exists return
|
|
24
32
|
ghostpaw-affinity identity add --contact '{"contactId":2}' --input '{"type":"email","value":"jana@x.de"}'
|
|
25
33
|
ghostpaw-affinity relationship tie --from '{"contactId":2}' --to '{"contactId":3}' --kind works_at --role Founder
|
|
26
34
|
ghostpaw-affinity relationship add --from '{"contactId":1}' --to '{"contactId":2}' --kind professional --role lead
|
|
@@ -31,7 +39,8 @@ ghostpaw-affinity date add --input '{"target":{"kind":"contact","contact":{"cont
|
|
|
31
39
|
ghostpaw-affinity attribute set --target '{"kind":"contact","contact":{"contactId":2}}' --name pipeline_stage --value '"proposal"'
|
|
32
40
|
ghostpaw-affinity attribute set --target '{"kind":"contact","contact":{"contactId":2}}' --name tag:gastro-radar --value null
|
|
33
41
|
ghostpaw-affinity show contact_profile --contact '{"contactId":2}'
|
|
34
|
-
ghostpaw-affinity review events.contact_journal --contact '{"contactId":2}'
|
|
42
|
+
ghostpaw-affinity review events.contact_journal --with-content --channel bluesky --contact '{"contactId":2}'
|
|
43
|
+
ghostpaw-affinity search --scope events "record id"
|
|
35
44
|
ghostpaw-affinity review links.radar
|
|
36
45
|
ghostpaw-affinity review commitments.open
|
|
37
46
|
ghostpaw-affinity review dates.upcoming --horizon-days 14
|
|
@@ -43,10 +52,14 @@ ghostpaw-affinity duplicate dismiss --left '{"contactId":5}' --right '{"contactI
|
|
|
43
52
|
ghostpaw-affinity contact revise '{"contactId":3}' --patch '{"name":"New Name"}'
|
|
44
53
|
ghostpaw-affinity contact lifecycle '{"contactId":9}' dormant
|
|
45
54
|
ghostpaw-affinity relationship state --link '{"linkId":7}' --state dormant
|
|
55
|
+
ghostpaw-affinity event revise --event-id 12 --patch '{"summary":"Corrected"}'
|
|
56
|
+
ghostpaw-affinity event delete --event-id 12 --confirm
|
|
46
57
|
ghostpaw-affinity contact export --contact '{"contactId":2}'
|
|
47
58
|
ghostpaw-affinity contact delete --contact '{"contactId":2}' --confirm
|
|
48
59
|
```
|
|
49
60
|
|
|
61
|
+
Batch imports: use `ghostpaw-affinity batch --chunk 500 < import.jsonl` with {tool,args} lines. See `ghostpaw-affinity skill import-history-without-faking-evidence`.
|
|
62
|
+
|
|
50
63
|
For bots and agents: run `ghostpaw-affinity mcp` for MCP stdio, or use this CLI with `--json`. Read a guide with `ghostpaw-affinity skill <guide>`.
|
|
51
64
|
|
|
52
65
|
|
|
@@ -62,394 +75,38 @@ CLI: `ghostpaw-affinity call <tool> '<JSON object>'` or `ghostpaw-affinity <tool
|
|
|
62
75
|
|
|
63
76
|
Inspect schemas with `ghostpaw-affinity describe <tool>`. Use `--db <path>` to select a database.
|
|
64
77
|
|
|
65
|
-
###
|
|
66
|
-
|
|
67
|
-
Search contacts by name, identity, attributes, link roles, bonds and event text. All whitespace tokens must match. Dormant and lost contacts are excluded by default; use includeDormant and includeLost to include them.
|
|
68
|
-
|
|
69
|
-
Use when: Use this when you want to find contacts from free text or a known routing identity such as an email or URL-like handle.
|
|
70
|
-
|
|
71
|
-
Not for: Do not use this when you already know the exact contact you want to inspect in depth.
|
|
72
|
-
|
|
73
|
-
Read-only.
|
|
74
|
-
|
|
75
|
-
| Parameter | Type | Required | Values / description |
|
|
76
|
-
| --- | --- | --- | --- |
|
|
77
|
-
| query | string | yes | Free-text or natural-key query. |
|
|
78
|
-
| kind | string | no | human, group, company, team, pet, service, other. Optional contact kind filter. |
|
|
79
|
-
| lifecycleState | string | no | active, dormant, merged, lost. Optional lifecycle state filter. |
|
|
80
|
-
| attribute | string / array | no | |
|
|
81
|
-
| tag | string / array | no | |
|
|
82
|
-
| includeLost | boolean | no | Include lost contacts (search excludes them by default). |
|
|
83
|
-
| includeOwner | boolean | no | Whether owner contacts are included. |
|
|
84
|
-
| includeDormant | boolean | no | Whether dormant contacts are included. |
|
|
85
|
-
| limit | integer | no | Optional result limit. |
|
|
86
|
-
| offset | integer | no | Optional result offset. |
|
|
87
|
-
|
|
88
|
-
```sh
|
|
89
|
-
ghostpaw-affinity search "Jana"
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### review_affinity
|
|
93
|
-
|
|
94
|
-
Review one affinity surface such as contacts, journals, link queues, commitments, dates, graph state, or merge history.
|
|
95
|
-
|
|
96
|
-
Use when: Use this when you want a dashboard-style list or review view instead of inspecting one exact item.
|
|
97
|
-
|
|
98
|
-
Not for: Do not use this when you already know the exact contact or link you want to inspect in depth.
|
|
99
|
-
|
|
100
|
-
Read-only.
|
|
101
|
-
|
|
102
|
-
| Parameter | Type | Required | Values / description |
|
|
103
|
-
| --- | --- | --- | --- |
|
|
104
|
-
| view | string | yes | contacts.list, contacts.duplicates, events.contact_journal, events.link_timeline, events.moments, commitments.open, links.owner, links.observed, links.progression_readiness, links.radar, dates.upcoming, graph.chart, merges.history, merges.dismissed. Which review surface to return. |
|
|
105
|
-
| now | integer / string | no | Optional current timestamp for overdue calculations. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
106
|
-
| contact | object | no | Optional target contact locator. |
|
|
107
|
-
| link | object | no | Optional target link locator. |
|
|
108
|
-
| contactIds | array | no | Optional contact-id subset. |
|
|
109
|
-
| kind | string | no | Optional contact kind or link kind filter, depending on the view. |
|
|
110
|
-
| lifecycleState | string | no | active, dormant, merged, lost. Optional contact lifecycle-state filter. |
|
|
111
|
-
| linkState | string | no | active, dormant, strained, broken, archived. Optional link state filter. |
|
|
112
|
-
| attribute | string / array | no | |
|
|
113
|
-
| tag | string / array | no | |
|
|
114
|
-
| includeLost | boolean | no | Include lost contacts (search excludes them by default). |
|
|
115
|
-
| includeOwner | boolean | no | Whether owner contacts are included. |
|
|
116
|
-
| includeDormant | boolean | no | Whether dormant rows are included. |
|
|
117
|
-
| includeArchived | boolean | no | Whether archived links are included. |
|
|
118
|
-
| includeObserved | boolean | no | Whether observed links are included. |
|
|
119
|
-
| eventTypes | array | no | Optional event-type filter. |
|
|
120
|
-
| momentKind | string | no | breakthrough, rupture, reconciliation, milestone, turning_point. Optional moment kind filter. |
|
|
121
|
-
| commitmentType | string | no | promise, agreement. Optional commitment type filter. |
|
|
122
|
-
| recurrenceKind | string | no | birthday, anniversary, renewal, memorial, custom_yearly. Optional recurrence-kind filter. |
|
|
123
|
-
| horizonDays | integer | no | Optional horizon-days filter. |
|
|
124
|
-
| exactOnly | boolean | no | Whether duplicate review is exact-only. |
|
|
125
|
-
| minScore | number | no | Optional duplicate minimum score. |
|
|
126
|
-
| includeDismissed | boolean | no | Whether dismissed pairs are included in duplicate review (marked with dismissed flag). |
|
|
127
|
-
| since | integer / string | no | Optional lower timestamp bound. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
128
|
-
| until | integer / string | no | Optional upper timestamp bound. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
129
|
-
| limit | integer | no | Optional result limit. |
|
|
130
|
-
| offset | integer | no | Optional result offset. |
|
|
131
|
-
| contact.contactId | integer | no | Exact contact id. |
|
|
132
|
-
| contact.identity | object | no | Contact identity locator. |
|
|
133
|
-
| link.linkId | integer | no | Exact link id. |
|
|
134
|
-
| link.endpoints | object | no | Endpoint-based link locator. |
|
|
135
|
-
|
|
136
|
-
```sh
|
|
137
|
-
ghostpaw-affinity review events.contact_journal --contact '{"contactId":2}'
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### inspect_affinity_item
|
|
141
|
-
|
|
142
|
-
Inspect one exact affinity item such as the owner profile, a contact profile, or one link detail.
|
|
143
|
-
|
|
144
|
-
Use when: Use this when you already know the exact item you want to inspect in depth.
|
|
145
|
-
|
|
146
|
-
Not for: Do not use this for search-style discovery or dashboard-like list reviews.
|
|
147
|
-
|
|
148
|
-
Read-only.
|
|
149
|
-
|
|
150
|
-
| Parameter | Type | Required | Values / description |
|
|
151
|
-
| --- | --- | --- | --- |
|
|
152
|
-
| kind | string | yes | owner_profile, contact_profile, link. What to inspect. |
|
|
153
|
-
| contact | object | no | Target contact. Required when kind=contact_profile. Provide contactId or identity. |
|
|
154
|
-
| link | object | no | Target link. Required when kind=link. Provide linkId or endpoints. |
|
|
155
|
-
| topLinksLimit | integer | no | Optional top-links cap. |
|
|
156
|
-
| recentEventsLimit | integer | no | Optional recent-events cap. |
|
|
157
|
-
| contact.contactId | integer | no | Exact contact id. |
|
|
158
|
-
| contact.identity | object | no | Contact identity locator. |
|
|
159
|
-
| link.linkId | integer | no | Exact link id. |
|
|
160
|
-
| link.endpoints | object | no | Endpoint-based link locator. |
|
|
161
|
-
|
|
162
|
-
```sh
|
|
163
|
-
ghostpaw-affinity show contact_profile --contact '{"contactId":2}'
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### manage_contact
|
|
167
|
-
|
|
168
|
-
Create, revise, export or permanently delete a contact (confirm: true required; owner cannot be deleted). Export without contact exports the whole database. Lifecycle lost is soft delete. ALWAYS search_affinity first before creating — duplicates corrupt the graph.
|
|
169
|
-
|
|
170
|
-
Use when: Use this for contact creation and lifecycle-safe contact maintenance.
|
|
171
|
-
|
|
172
|
-
Not for: Do not use this for identities, links, attributes, or merges.
|
|
173
|
-
|
|
174
|
-
Writes: writes_state.
|
|
175
|
-
|
|
176
|
-
| Parameter | Type | Required | Values / description |
|
|
177
|
-
| --- | --- | --- | --- |
|
|
178
|
-
| action | string | yes | create, revise, set_lifecycle, export, delete. Operation to perform. |
|
|
179
|
-
| input | object | no | New contact payload. Required when action=create. |
|
|
180
|
-
| confirm | boolean | no | Required true for permanent deletion. |
|
|
181
|
-
| contact | object | no | Target contact. Required when action=revise or set_lifecycle. Provide contactId or identity. |
|
|
182
|
-
| patch | object | no | Allowed contact patch. Required when action=revise. |
|
|
183
|
-
| lifecycleState | string | no | active, dormant, merged, lost. Target lifecycle state. Required when action=set_lifecycle. |
|
|
184
|
-
| options | object | no | Optional lifecycle metadata. |
|
|
185
|
-
| input.identities | array | no | Optional identities to attach. Identities already owned by another contact are left with that owner and reported as possible duplicates. |
|
|
186
|
-
| input.name | string | yes | Contact name. |
|
|
187
|
-
| input.kind | string | yes | Contact kind. |
|
|
188
|
-
| input.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
189
|
-
| input.bootstrapOwner | boolean | no | Whether this contact should be the owner. |
|
|
190
|
-
| contact.contactId | integer | no | Exact contact id. |
|
|
191
|
-
| contact.identity | object | no | Contact identity locator. |
|
|
192
|
-
| patch.name | string | no | Optional replacement name. |
|
|
193
|
-
| options.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
194
|
-
|
|
195
|
-
```sh
|
|
196
|
-
ghostpaw-affinity contact create '{"name":"Fox","kind":"human","bootstrapOwner":true}'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### merge_contacts
|
|
200
|
-
|
|
201
|
-
Merge one loser contact into one winner contact using explicit contact locators.
|
|
202
|
-
|
|
203
|
-
Use when: Use this only when two contacts are confirmed duplicates and the system should consolidate them.
|
|
204
|
-
|
|
205
|
-
Not for: Do not use this for routine contact edits or identity cleanup.
|
|
206
|
-
|
|
207
|
-
Writes: writes_state.
|
|
208
|
-
|
|
209
|
-
| Parameter | Type | Required | Values / description |
|
|
210
|
-
| --- | --- | --- | --- |
|
|
211
|
-
| winner | object | yes | Winner contact. Provide contactId or identity. |
|
|
212
|
-
| loser | object | yes | Loser contact. Provide contactId or identity. |
|
|
213
|
-
| reasonSummary | string | no | Optional merge reason. |
|
|
214
|
-
| now | integer / string | no | Optional merge timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
215
|
-
| winner.contactId | integer | no | Exact contact id. |
|
|
216
|
-
| winner.identity | object | no | Contact identity locator. |
|
|
217
|
-
| loser.contactId | integer | no | Exact contact id. |
|
|
218
|
-
| loser.identity | object | no | Contact identity locator. |
|
|
219
|
-
|
|
220
|
-
```sh
|
|
221
|
-
ghostpaw-affinity contact merge --winner '{"contactId":2}' --loser '{"contactId":8}' --reason-summary "same person"
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### manage_duplicate_dismissal
|
|
225
|
-
|
|
226
|
-
Dismiss or un-dismiss a duplicate candidate pair so it does not resurface in review_affinity contacts.duplicates.
|
|
227
|
-
|
|
228
|
-
Use when: Use dismiss after confirming two contacts are different people (not duplicates). Use undismiss to re-surface a pair for re-evaluation.
|
|
229
|
-
|
|
230
|
-
Not for: Do not use this to merge contacts — use merge_contacts for confirmed duplicates.
|
|
231
|
-
|
|
232
|
-
Writes: writes_state.
|
|
233
|
-
|
|
234
|
-
| Parameter | Type | Required | Values / description |
|
|
235
|
-
| --- | --- | --- | --- |
|
|
236
|
-
| action | string | yes | dismiss, undismiss. Action to perform. |
|
|
237
|
-
| left | object | yes | Left contact. Provide contactId or identity. |
|
|
238
|
-
| right | object | yes | Right contact. Provide contactId or identity. |
|
|
239
|
-
| reason | any | no | Optional reason for the dismissal. |
|
|
240
|
-
| left.contactId | integer | no | Exact contact id. |
|
|
241
|
-
| left.identity | object | no | Contact identity locator. |
|
|
242
|
-
| right.contactId | integer | no | Exact contact id. |
|
|
243
|
-
| right.identity | object | no | Contact identity locator. |
|
|
244
|
-
|
|
245
|
-
```sh
|
|
246
|
-
ghostpaw-affinity duplicate dismiss --left '{"contactId":5}' --right '{"contactId":10}' --reason '"different people"'
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### manage_identity
|
|
250
|
-
|
|
251
|
-
Add, revise, verify, or remove one routing identity on a contact. Use this for emails, phone numbers, social handles, and URLs — anything that could locate a person. Do not use manage_attribute for these.
|
|
252
|
-
|
|
253
|
-
Use when: Use this for contact identity management such as email, handle, or phone routing keys.
|
|
254
|
-
|
|
255
|
-
Not for: Do not use this for contact core fields, links, or attributes.
|
|
256
|
-
|
|
257
|
-
Writes: writes_state.
|
|
258
|
-
|
|
259
|
-
| Parameter | Type | Required | Values / description |
|
|
260
|
-
| --- | --- | --- | --- |
|
|
261
|
-
| action | string | yes | add, revise, verify, remove. Operation to perform. |
|
|
262
|
-
| contact | object | no | Target contact. Required when action=add. Provide contactId or identity. |
|
|
263
|
-
| input | object | no | New identity payload. Required when action=add. |
|
|
264
|
-
| identityId | integer | no | Identity id. Required when action=revise, verify, or remove. |
|
|
265
|
-
| patch | object | no | Identity patch. Required when action=revise. |
|
|
266
|
-
| verifiedAt | integer / string | no | Verification timestamp. Optional for action=verify. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
267
|
-
| removedAt | integer / string | no | Removal timestamp. Optional for action=remove. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
268
|
-
| contact.contactId | integer | no | Exact contact id. |
|
|
269
|
-
| contact.identity | object | no | Contact identity locator. |
|
|
270
|
-
| input.type | string | yes | Identity type: email, phone, url, website, handle, x, twitter, linkedin, github, mastodon, bluesky, telegram, whatsapp, signal, matrix, discord, slack, instagram, facebook, youtube, tiktok, address, other, account_id, alias, or custom:<name> (lowercase a-z, 0-9, underscore or hyphen). |
|
|
271
|
-
| input.value | string | yes | Identity value. |
|
|
272
|
-
| input.label | string | no | Optional label. |
|
|
273
|
-
| input.verified | boolean | no | Whether the identity starts verified. |
|
|
274
|
-
| input.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
275
|
-
| patch.type | string | no | Optional identity type: email, phone, url, website, handle, x, twitter, linkedin, github, mastodon, bluesky, telegram, whatsapp, signal, matrix, discord, slack, instagram, facebook, youtube, tiktok, address, other, account_id, alias, or custom:<name> (lowercase a-z, 0-9, underscore or hyphen). |
|
|
276
|
-
| patch.value | string | no | Optional identity value. |
|
|
277
|
-
| patch.label | string | no | Optional label. |
|
|
278
|
-
|
|
279
|
-
```sh
|
|
280
|
-
ghostpaw-affinity identity add --contact '{"contactId":2}' --input '{"type":"email","value":"jana@x.de"}'
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### manage_relationship
|
|
284
|
-
|
|
285
|
-
Seed social links, revise bond and state, and manage structural ties. Seed a link as soon as a relationship is mentioned — do not wait for repeated evidence.
|
|
286
|
-
|
|
287
|
-
Use when: Use this for direct relationship modeling and link-state changes.
|
|
288
|
-
|
|
289
|
-
Not for: Do not use this for recording social evidence or resolving commitments.
|
|
290
|
-
|
|
291
|
-
Writes: writes_state.
|
|
292
|
-
|
|
293
|
-
| Parameter | Type | Required | Values / description |
|
|
294
|
-
| --- | --- | --- | --- |
|
|
295
|
-
| action | string | yes | seed_social_link, revise_bond, override_state, set_structural_tie, remove_structural_tie. Operation to perform. |
|
|
296
|
-
| from | object | no | Source contact. Required when action=seed_social_link or set_structural_tie. Provide contactId or identity. |
|
|
297
|
-
| to | object | no | Target contact. Required when action=seed_social_link or set_structural_tie. Provide contactId or identity. |
|
|
298
|
-
| kind | string | no | Link kind. Required for seed_social_link and set_structural_tie. Can be passed here or inside input. For seed_social_link: personal, family, professional, romantic, care, service, observed, other_relational. For set_structural_tie: works_at, manages, member_of, married_to, partner_of, parent_of, child_of, sibling_of, friend_of, client_of, vendor_of, reports_to, belongs_to, other_structural. |
|
|
299
|
-
| role | string | no | Optional role for seed_social_link or set_structural_tie. Can be passed here or inside input. |
|
|
300
|
-
| input | object | no | Full payload for seed_social_link or set_structural_tie. Alternative to top-level kind/role. |
|
|
301
|
-
| link | object | no | Target link. Required when action=revise_bond, override_state, or remove_structural_tie. Provide linkId or endpoints. |
|
|
302
|
-
| bond | any | no | Bond text. Required when action=revise_bond. Null to clear. |
|
|
303
|
-
| state | string | no | active, dormant, strained, broken, archived. Link state. Required when action=override_state. |
|
|
304
|
-
| options | object | no | Optional metadata. |
|
|
305
|
-
| removedAt | integer / string | no | Removal timestamp. Optional for action=remove_structural_tie. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
306
|
-
| from.contactId | integer | no | Exact contact id. |
|
|
307
|
-
| from.identity | object | no | Contact identity locator. |
|
|
308
|
-
| to.contactId | integer | no | Exact contact id. |
|
|
309
|
-
| to.identity | object | no | Contact identity locator. |
|
|
310
|
-
| link.linkId | integer | no | Exact link id. |
|
|
311
|
-
| link.endpoints | object | no | Endpoint-based link locator. |
|
|
312
|
-
| options.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
313
|
-
|
|
314
|
-
```sh
|
|
315
|
-
ghostpaw-affinity relationship tie --from '{"contactId":2}' --to '{"contactId":3}' --kind works_at --role Founder
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### record_event
|
|
319
|
-
|
|
320
|
-
Record one social event such as an interaction, observation, milestone, or transaction. For interactions, milestones, and transactions the owner contact is auto-injected into participants if missing. Observations may omit the owner when recording third-party evidence.
|
|
321
|
-
|
|
322
|
-
Use when: Use this when you are capturing something that happened in the relationship graph.
|
|
323
|
-
|
|
324
|
-
Not for: Do not use this for commitments, date anchors, or direct relationship state overrides.
|
|
325
|
-
|
|
326
|
-
Writes: writes_state.
|
|
327
|
-
|
|
328
|
-
| Parameter | Type | Required | Values / description |
|
|
329
|
-
| --- | --- | --- | --- |
|
|
330
|
-
| kind | string | yes | interaction, observation, milestone, transaction. Event kind. |
|
|
331
|
-
| input | object | yes | Event payload. Always required. Interaction events also require `type`. |
|
|
332
|
-
| input.type | string | no | Interaction subtype. Required when kind=interaction, omit otherwise. |
|
|
333
|
-
| input.occurredAt | oneOf | yes | When the event occurred, Unix timestamp in milliseconds. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
334
|
-
| input.summary | string | yes | Event summary. Must be non-empty. |
|
|
335
|
-
| input.significance | integer | yes | Event significance from 1 to 10. |
|
|
336
|
-
| input.participants | array | yes | Participant list. Must be non-empty and include the owner contact. |
|
|
337
|
-
| input.now | oneOf | no | Optional timestamp override. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
338
|
-
|
|
339
|
-
```sh
|
|
340
|
-
ghostpaw-affinity event record --kind interaction --input '{"type":"conversation","occurredAt":"today","summary":"Call re pilot","significance":6,"participants":[{"contactId":2,"role":"recipient","directionality":"mutual"}]}'
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
### manage_commitment
|
|
344
|
-
|
|
345
|
-
Record or resolve one commitment such as a promise or agreement. The owner contact is auto-injected into participants if missing.
|
|
346
|
-
|
|
347
|
-
Use when: Use this when the work is specifically about a commitment lifecycle rather than a general event.
|
|
348
|
-
|
|
349
|
-
Not for: Do not use this for ordinary interactions or direct relationship state changes.
|
|
350
|
-
|
|
351
|
-
Writes: writes_state.
|
|
352
|
-
|
|
353
|
-
| Parameter | Type | Required | Values / description |
|
|
354
|
-
| --- | --- | --- | --- |
|
|
355
|
-
| action | string | yes | record, resolve. Operation to perform. |
|
|
356
|
-
| input | object | no | Commitment payload. Required when action=record. |
|
|
357
|
-
| commitmentEventId | integer | no | Commitment event id. Required when action=resolve. |
|
|
358
|
-
| resolution | string | no | kept, cancelled, broken. How the commitment was resolved. Required when action=resolve. |
|
|
359
|
-
| options | object | no | Optional metadata. |
|
|
360
|
-
| input.commitmentType | string | yes | Promise or agreement. |
|
|
361
|
-
| input.occurredAt | oneOf | yes | When the commitment was made, Unix timestamp in milliseconds. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
362
|
-
| input.summary | string | yes | Commitment summary. Must be non-empty. |
|
|
363
|
-
| input.significance | integer | yes | Commitment significance from 1 to 10. |
|
|
364
|
-
| input.dueAt | oneOf | no | Optional due timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
365
|
-
| input.participants | array | yes | Participant list. Must be non-empty and include the owner contact. |
|
|
366
|
-
| input.now | oneOf | no | Optional timestamp override. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
367
|
-
| options.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
368
|
-
| options.resolvingEvent | object | no | |
|
|
369
|
-
|
|
370
|
-
```sh
|
|
371
|
-
ghostpaw-affinity commitment record --input '{"commitmentType":"promise","occurredAt":"today","dueAt":"+3d","summary":"Send proposal","significance":6,"participants":[{"contactId":2,"role":"recipient"}]}'
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
### manage_date_anchor
|
|
375
|
-
|
|
376
|
-
Add, revise, or remove recurring date anchors on contacts or links. Use this for birthdays, anniversaries, and yearly events — not manage_attribute.
|
|
377
|
-
|
|
378
|
-
Use when: Use this for birthdays, anniversaries, renewals, memorials, and other recurring anchors.
|
|
379
|
-
|
|
380
|
-
Not for: Do not use this for one-off events or relationship state changes.
|
|
78
|
+
### Tool index
|
|
381
79
|
|
|
382
|
-
|
|
80
|
+
- **search_affinity**: Search contacts by name, identity, attributes, link roles, bonds and event text.
|
|
81
|
+
- **review_affinity**: Review one affinity surface such as contacts, journals, link queues, commitments, dates, graph state, or merge history..
|
|
82
|
+
- **inspect_affinity_item**: Inspect one exact affinity item such as the owner profile, a contact profile, or one link detail..
|
|
83
|
+
- **manage_contact**: Create, revise, export or permanently delete a contact (confirm: true required; owner cannot be deleted).
|
|
84
|
+
- **merge_contacts**: Merge one loser contact into one winner contact using explicit contact locators..
|
|
85
|
+
- **manage_duplicate_dismissal**: Dismiss or un-dismiss a duplicate candidate pair so it does not resurface in review_affinity contacts.duplicates..
|
|
86
|
+
- **manage_identity**: Add, revise, verify, or remove one routing identity on a contact.
|
|
87
|
+
- **manage_relationship**: Seed social links, revise bond and state, and manage structural ties.
|
|
88
|
+
- **record_event**: Record one social event such as an interaction, observation, milestone, or transaction.
|
|
89
|
+
- **manage_commitment**: Record or resolve one commitment such as a promise or agreement.
|
|
90
|
+
- **manage_date_anchor**: Add, revise, or remove recurring date anchors on contacts or links.
|
|
91
|
+
- **manage_attribute**: Set, unset, or replace custom metadata attributes on contacts, links and events.
|
|
92
|
+
- **manage_event**: Revise or delete one event by eventId or external reference.
|
|
383
93
|
|
|
384
|
-
|
|
385
|
-
| --- | --- | --- | --- |
|
|
386
|
-
| action | string | yes | add, revise, remove. Operation to perform. |
|
|
387
|
-
| input | object | no | Date anchor payload. Required when action=add. |
|
|
388
|
-
| anchorEventId | integer | no | Anchor event id. Required when action=revise or remove. |
|
|
389
|
-
| patch | object | no | Anchor patch. Required when action=revise. |
|
|
390
|
-
| options | object | no | Optional metadata. |
|
|
391
|
-
| removedAt | integer / string | no | Removal timestamp. Optional for action=remove. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
392
|
-
| input.target | object | yes | Date-anchor target. |
|
|
393
|
-
| input.recurrenceKind | string | yes | Recurrence kind. |
|
|
394
|
-
| input.anchorMonth | integer | yes | Anchor month, 1–12. |
|
|
395
|
-
| input.anchorDay | integer | yes | Anchor day, 1–31 (validated per month). |
|
|
396
|
-
| input.summary | string | yes | Summary. Must be non-empty. |
|
|
397
|
-
| input.significance | integer | yes | Significance from 1 to 10. |
|
|
398
|
-
| input.now | oneOf | no | Optional timestamp override. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
399
|
-
| input.force | boolean | no | Whether to bypass duplicate checks. |
|
|
400
|
-
| patch.recurrenceKind | string | no | Optional recurrence kind. |
|
|
401
|
-
| patch.anchorMonth | integer | no | Optional month, 1–12. |
|
|
402
|
-
| patch.anchorDay | integer | no | Optional day, 1–31. |
|
|
403
|
-
| patch.summary | string | no | Optional summary. |
|
|
404
|
-
| patch.significance | integer | no | Optional significance, 1–10. |
|
|
405
|
-
| options.now | oneOf | no | Optional timestamp. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
406
|
-
| options.force | boolean | no | Whether duplicate checks should be bypassed. |
|
|
407
|
-
|
|
408
|
-
```sh
|
|
409
|
-
ghostpaw-affinity date add --input '{"target":{"kind":"contact","contact":{"contactId":2}},"recurrenceKind":"birthday","anchorMonth":11,"anchorDay":3,"summary":"Jana bday","significance":4}'
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
### manage_attribute
|
|
413
|
-
|
|
414
|
-
Set, unset, or replace custom metadata attributes on contacts and links. For emails, phones, handles, and URLs use manage_identity instead — those are routing keys, not attributes.
|
|
415
|
-
|
|
416
|
-
Use when: Use this for metadata such as tags, notes, or small labeled facts attached to a contact or link.
|
|
417
|
-
|
|
418
|
-
Not for: Do not use this for core contact fields, identities, or direct relationship mechanics.
|
|
419
|
-
|
|
420
|
-
Writes: writes_state.
|
|
421
|
-
|
|
422
|
-
| Parameter | Type | Required | Values / description |
|
|
423
|
-
| --- | --- | --- | --- |
|
|
424
|
-
| action | string | yes | set, unset, replace. Operation to perform. |
|
|
425
|
-
| target | object | no | Attribute target. Always required. |
|
|
426
|
-
| name | string | no | Attribute name. Required when action=set or unset. |
|
|
427
|
-
| value | any | no | Attribute value. Required when action=set. Null for presence/tag semantics. |
|
|
428
|
-
| entries | array | no | Key-value map to replace all attributes. Required when action=replace. |
|
|
429
|
-
| removedAt | integer / string | no | Removal timestamp. Optional for action=unset. Accepts epoch milliseconds integer, ISO 8601 date-time with Z/offset, YYYY-MM-DD, today, tomorrow, yesterday, +3d or -2d. UTC midnight for dates; dueAt uses UTC end of day. |
|
|
430
|
-
| target.kind | string | yes | Target kind. |
|
|
431
|
-
| target.contact | object | no | Contact locator. Required when kind=contact. Provide contactId or identity. |
|
|
432
|
-
| target.link | object | no | Link locator. Required when kind=link. Provide linkId or endpoints. |
|
|
433
|
-
| entries.name | string | yes | Attribute name. |
|
|
434
|
-
| entries.value | oneOf | no | Attribute value, or null for presence/tag semantics. |
|
|
435
|
-
|
|
436
|
-
```sh
|
|
437
|
-
ghostpaw-affinity attribute set --target '{"kind":"contact","contact":{"contactId":2}}' --name pipeline_stage --value '"proposal"'
|
|
438
|
-
```
|
|
94
|
+
Parameter details and examples: `ghostpaw-affinity skill tools` or `ghostpaw-affinity describe <tool>`.
|
|
439
95
|
|
|
440
96
|
### Workflow guides
|
|
441
97
|
|
|
442
|
-
-
|
|
443
|
-
-
|
|
444
|
-
-
|
|
445
|
-
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
448
|
-
-
|
|
449
|
-
-
|
|
450
|
-
-
|
|
451
|
-
-
|
|
452
|
-
-
|
|
98
|
+
- `ghostpaw-affinity skill bootstrap-and-cold-start`: Establish a clean Affinity baseline with one owner, one verified identity, and the minimum structure needed for later evidence and review work.
|
|
99
|
+
- `ghostpaw-affinity skill identify-and-locate-contacts`: Find the right contact reliably, prefer stable natural keys when possible, and avoid creating duplicates through weak lookup discipline.
|
|
100
|
+
- `ghostpaw-affinity skill import-history-without-faking-evidence`: Import pre-existing relationship state honestly, using seeded links for known history instead of inventing fake journal evidence.
|
|
101
|
+
- `ghostpaw-affinity skill model-structure-orgs-and-households`: Model factual structure such as employment, membership, hierarchy, and household ties without confusing it with live relational mechanics.
|
|
102
|
+
- `ghostpaw-affinity skill record-direct-evidence-well`: Record direct owner-facing social evidence in a way that produces truthful mechanics, good moments, and useful future review surfaces.
|
|
103
|
+
- `ghostpaw-affinity skill record-observations-and-referrals`: Capture third-party and referral truth without overclaiming intimacy, directness, or trust that the operator did not actually earn.
|
|
104
|
+
- `ghostpaw-affinity skill capture-transactions-and-commercial-events`: Capture commercially meaningful interactions as transactions so operational and service relationships accumulate the right evidence shape.
|
|
105
|
+
- `ghostpaw-affinity skill manage-promises-and-agreements`: Track obligations explicitly from creation to resolution so open commitments remain actionable and trust consequences stay honest.
|
|
106
|
+
- `ghostpaw-affinity skill manage-recurring-dates-and-reminders`: Use date anchors for recurring salience so important birthdays, anniversaries, renewals, and memorials feed review surfaces cleanly.
|
|
107
|
+
- `ghostpaw-affinity skill review-radar-progression-and-graph`: Use the review surfaces to prioritize maintenance, understand progression readiness, and read the shape of the relationship graph without guessing from raw rows.
|
|
108
|
+
- `ghostpaw-affinity skill reconcile-duplicates-and-merge-safely`: Review duplicate candidates carefully and merge only after the identity, history, and structural consequences are understood.
|
|
109
|
+
- `ghostpaw-affinity skill tools`: Tool parameters, nested fields, and examples.
|
|
453
110
|
|
|
454
111
|
### Principles
|
|
455
112
|
|