user_intents_prompt.md
1I want to add the "user intents" feature to the site. ultrathink about this complex feature and implement it fully and completely. This will introduce a new lexicon type, dashboard settings components, and changes to profile and listing pages.
2
3# Lexicon
4
5This feature uses the user-intents lexicon as defined by:
6
7```json
8{
9 "defs": {
10 "intention": {
11 "properties": {
12 "allow": {
13 "type": "boolean"
14 },
15 "updatedAt": {
16 "format": "datetime",
17 "type": "string"
18 }
19 },
20 "required": [
21 "updatedAt"
22 ],
23 "type": "object"
24 },
25 "main": {
26 "description": "A declaration of user intent",
27 "key": "any",
28 "record": {
29 "properties": {
30 "bulkDataset": {
31 "ref": "#intention",
32 "type": "ref"
33 },
34 "protocolBridging": {
35 "ref": "#intention",
36 "type": "ref"
37 },
38 "publicAccessArchive": {
39 "ref": "#intention",
40 "type": "ref"
41 },
42 "syntheticContentGeneration": {
43 "ref": "#intention",
44 "type": "ref"
45 },
46 "updatedAt": {
47 "format": "datetime",
48 "type": "string"
49 }
50 },
51 "type": "object"
52 },
53 "type": "record"
54 }
55 },
56 "id": "org.user-intents.declaration",
57 "lexicon": 1
58}
59```
60
61An example record using that lexicon would look like:
62
63```json
64{
65 "$type": "org.user-intents.declaration",
66 "updatedAt": "2025-02-20T21:37:20.362Z",
67 "publicAccessArchive": {
68 "allow": true, // true means "allow"
69 "updatedAt": "2025-02-20T21:37:20.362Z"
70 },
71 "bulkDataset": {
72 "allow": false, // false means "disallow"
73 "updatedAt": "2025-02-20T21:37:20.362Z"
74 },
75 "protocolBridging": {
76 // NOTE: missing 'allow' field means "undefined" preference (do not set to 'null')
77 "updatedAt": "2019-02-20T22:44:20.000Z",
78 }
79}
80```
81
82This lexicon would be created in the @lexicon directory as lexicon/org.user-intents.declaration.json.
83
84An example AT-URI is `at://did:plc:cbkjy5n7bk3ax2wplmtjofq2/org.user-intents.declaration/self`. Another would be `at://did:plc:cbkjy5n7bk3ax2wplmtjofq2/org.user-intents.declaration/did:web:atwork.place` referencing use within the https://atwork.place/ website.
85
86# Storage
87
88Create a storage trait and implementations for the user intents structure with the following fields:
89
90* `aturi` (string, primary key) The AT-URI of the user intents record
91* `cid` (string) The record's CID
92* `did` (string) The DID from the authority component of the AT-URI
93* `public_access_archive` (bool, default null) The value of the `publicAccessArchive` record structure's `allow` field.
94* `protocol_bridging` (bool, default null) The value of the `protocolBridging` record structure's `allow` field.
95* `synthetic_content_generation` (bool, default null) The value of the `syntheticContentGeneration` record structure's `allow` field.
96* `record` (JSON) the raw record as it exists in the PDS
97
98The storage trait should support the following operations:
99
100* Insert/Update (upsert) a user-intents record in storage
101* Get user-intents record by AT-URI
102* Get all user-intents records for a DID
103
104# Consumer
105
106Update the jetstream consumer to also subscribe to the `org.user-intents.declaration` collection. When a record is encountered, it should discard any that have a record key other than "self" or "did:web:atwork.place".
107
108These records should be inserted / updated (upserted) into storage.
109
110# Dashboard Settings
111
112On the dashboard settings page, create a section for "experimental" features.
113
114In the experimental features section, create a form that allows a user to update their user-intents record for both "self" and "did:web:atwork.place". This will result in two records being created, each with the record key being "self" and "did:web:atwork.place"".
115
116For each of the following value and label pairs, have a radio that lets them be set to "allow", "disallow", or "no preference".
117
118* `bulkDataset` as "Bulk Datasets" -- Allow data to be included in bulk "snapshot" datasets which are publicly redistributed, even if only for a fixed time period.
119* `protocolBridging` as "Protocol Bridging" -- Allow for bridging account data or interactions into distinct social web protocol ecosystems.
120* `publicAccessArchive` as "Archiving / Preservation" -- Allow public access to or replay of account data as part of archiving and preservation efforts.
121
122# Profile Page
123
124Update the `/u/[subject]` page to support this feature. All of the user-intents records are retreived from storage for an identity and intentions aggregated in the order of "self" and then "did:web:atwork.place" values.
125
126If the aggregated `publicAccessArchive` field is `false` then add the following content to the `<head>...</head>` section of the page:
127
128```html
129<meta name="robots" content="noarchive">
130```
131
132# Job Listing Page
133
134Update the `/u/[subject]/[listing]` page to support this feature. All of the user-intents records are retreived from storage for an identity and intentions aggregated in the order of "self" and then "did:web:atwork.place" values.
135
136If the aggregated `publicAccessArchive` field is `false` then add the following content to the `<head>...</head>` section of the page:
137
138```html
139<meta name="robots" content="noarchive">
140```
141
142# Help Content
143
144Create a help page at /help/user-intents. Note that this is an experimental feature based on the proposal at https://github.com/bluesky-social/proposals/tree/main/0008-user-intents.
145
146Explain that a user can set these values through the dashboard settings page in the experimental features section.