@arshdelight/practi 0.9.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/LICENSE +21 -0
- package/README.md +81 -0
- package/dist/client.js +84 -0
- package/dist/client.js.map +1 -0
- package/dist/cmd/blob.js +97 -0
- package/dist/cmd/blob.js.map +1 -0
- package/dist/cmd/clone.js +76 -0
- package/dist/cmd/clone.js.map +1 -0
- package/dist/cmd/comment.js +210 -0
- package/dist/cmd/comment.js.map +1 -0
- package/dist/cmd/config.js +30 -0
- package/dist/cmd/config.js.map +1 -0
- package/dist/cmd/edit.js +122 -0
- package/dist/cmd/edit.js.map +1 -0
- package/dist/cmd/init.js +11 -0
- package/dist/cmd/init.js.map +1 -0
- package/dist/cmd/lifecycle.js +69 -0
- package/dist/cmd/lifecycle.js.map +1 -0
- package/dist/cmd/login.js +125 -0
- package/dist/cmd/login.js.map +1 -0
- package/dist/cmd/ls.js +59 -0
- package/dist/cmd/ls.js.map +1 -0
- package/dist/cmd/new.js +57 -0
- package/dist/cmd/new.js.map +1 -0
- package/dist/cmd/pull.js +94 -0
- package/dist/cmd/pull.js.map +1 -0
- package/dist/cmd/push.js +84 -0
- package/dist/cmd/push.js.map +1 -0
- package/dist/cmd/remote.js +48 -0
- package/dist/cmd/remote.js.map +1 -0
- package/dist/cmd/search.js +137 -0
- package/dist/cmd/search.js.map +1 -0
- package/dist/cmd/show.js +61 -0
- package/dist/cmd/show.js.map +1 -0
- package/dist/cmd/skill.js +198 -0
- package/dist/cmd/skill.js.map +1 -0
- package/dist/cmd/spec.js +10 -0
- package/dist/cmd/spec.js.map +1 -0
- package/dist/cmd/update.js +60 -0
- package/dist/cmd/update.js.map +1 -0
- package/dist/credentials.js +65 -0
- package/dist/credentials.js.map +1 -0
- package/dist/index.js +412 -0
- package/dist/index.js.map +1 -0
- package/dist/oauth.js +244 -0
- package/dist/oauth.js.map +1 -0
- package/dist/render.js +25 -0
- package/dist/render.js.map +1 -0
- package/dist/state.js +74 -0
- package/dist/state.js.map +1 -0
- package/dist/version.js +12 -0
- package/dist/version.js.map +1 -0
- package/dist/web.js +243 -0
- package/dist/web.js.map +1 -0
- package/dist/workspace.js +38 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +48 -0
- package/skills/use-practi/SKILL.md +186 -0
package/dist/web.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAiC,MAAM,sBAAsB,CAAC;AAC5I,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQjD,MAAM,UAAU,MAAM,CAAC,IAAa;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,cAAc,EAAE,CAAC;IACjD,kFAAkF;IAClF,MAAM,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,oBAAoB,IAAI,CAAC,IAAI,GAAG,CAAC;IAE7C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,aAAa,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,2BAA2B,EAAE,GAAG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EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IAChE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { PracticeError, initWorkspace, loadWorkspace } from '@arshdelight/pop-sdk';
|
|
4
|
+
import { statePath, legacyStatePath } from './state.js';
|
|
5
|
+
/** A data dir is initialized when it carries both the CLI state (practi.json,
|
|
6
|
+
* legacy pop.json counts) and the POP workspace marker */
|
|
7
|
+
export function isInitialized(dataDir) {
|
|
8
|
+
const hasState = fs.existsSync(statePath(dataDir)) || fs.existsSync(legacyStatePath(dataDir));
|
|
9
|
+
return hasState && fs.existsSync(path.join(dataDir, 'practice.yaml'));
|
|
10
|
+
}
|
|
11
|
+
export function requireDataDir(dataDir) {
|
|
12
|
+
if (!isInitialized(dataDir)) {
|
|
13
|
+
throw new PracticeError('E_NOT_INITIALIZED', `no practi data directory at ${dataDir}`, {
|
|
14
|
+
hint: 'run `practi init <path>` first (or pass --data-dir)',
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function openWorkspace(dataDir) {
|
|
19
|
+
requireDataDir(dataDir);
|
|
20
|
+
return loadWorkspace(dataDir);
|
|
21
|
+
}
|
|
22
|
+
/** Create the data dir (idempotent): workspace + CLI state. Adopts an existing workspace if present. */
|
|
23
|
+
export function initDataDir(dataDir) {
|
|
24
|
+
fs.mkdirSync(dataDir, { recursive: true });
|
|
25
|
+
if (isInitialized(dataDir))
|
|
26
|
+
return 'exists';
|
|
27
|
+
try {
|
|
28
|
+
initWorkspace(dataDir);
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
// practice.yaml already exists (workspace created by another tool); we still adopt it
|
|
32
|
+
if (!(e instanceof PracticeError && e.code === 'E_EXISTS'))
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
fs.writeFileSync(statePath(dataDir), JSON.stringify({ schema: 1, direct: [] }, null, 2) + '\n', 'utf8');
|
|
36
|
+
return 'created';
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAExD;2DAC2D;AAC3D,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9F,OAAO,QAAQ,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,aAAa,CAAC,mBAAmB,EAAE,+BAA+B,OAAO,EAAE,EAAE;YACrF,IAAI,EAAE,qDAAqD;SAC5D,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,cAAc,CAAC,OAAO,CAAC,CAAC;IACxB,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,IAAI,aAAa,CAAC,OAAO,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC5C,IAAI,CAAC;QACH,aAAa,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,sFAAsF;QACtF,IAAI,CAAC,CAAC,CAAC,YAAY,aAAa,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;YAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;IACxG,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arshdelight/practi",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Local registry CLI for POP (Protocol of Practice): manage a personal, content-addressed collection of practice documents on top of @arshdelight/pop-sdk. Syncs to PractiHub.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"practi": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"skills"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"practi",
|
|
16
|
+
"practihub",
|
|
17
|
+
"pop",
|
|
18
|
+
"practice",
|
|
19
|
+
"cli",
|
|
20
|
+
"registry"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/Arshdelight/pop.git"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc",
|
|
34
|
+
"dev": "tsx src/index.ts",
|
|
35
|
+
"pretest": "npm run build --workspace @arshdelight/pop-sdk",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@arshdelight/pop-sdk": "^1.7.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/node": "^24.3.0",
|
|
44
|
+
"tsx": "^4.20.0",
|
|
45
|
+
"typescript": "^5.9.2",
|
|
46
|
+
"vitest": "^4.1.11"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-practi
|
|
3
|
+
description: Record, search, read, publish, evaluate, and manage practice
|
|
4
|
+
documents with the practi CLI — a local, content-addressed registry of POP
|
|
5
|
+
(Protocol of Practice) documents that syncs to a hub (default PractiHub). Use
|
|
6
|
+
whenever the user wants to save what was just done as a reusable practice
|
|
7
|
+
("record this practice", "save this session", "turn this into steps"), search
|
|
8
|
+
or read practices ("search practices", "has anyone done X", "find a how-to"),
|
|
9
|
+
evaluate them ("what do people say about this practice", "comment on this
|
|
10
|
+
step", "is this practice any good"), or manage them ("publish", "submit for
|
|
11
|
+
review", "unpublish", "delete my practice") — even when practi is not
|
|
12
|
+
mentioned by name. Also for any explicit practi CLI usage (practi new, practi
|
|
13
|
+
show, practi ls, practi push, practi pull, practi clone, practi search,
|
|
14
|
+
practi comment, practi login, practi blob add, practi skill import, practi
|
|
15
|
+
skill export, …), and for converting between formats ("turn this skill into a
|
|
16
|
+
POP", "export this practice as a skill").
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
One JSON document = one practice tree. Leaves are **actions** — atomic skills; interior nodes are **practices** — compositions. Everything except `name` is optional, and type is inferred: a node with `children` is a practice, one without is an action.
|
|
20
|
+
|
|
21
|
+
Three principles hold everywhere:
|
|
22
|
+
|
|
23
|
+
- **Identity is content.** A node's SHA-256 hash is its only address; the root hash is a Merkle root over the whole tree. Editing a node produces a new hash — nothing is edited in place (the git model). `name` is display text, not an id: renaming changes the hash like any edit.
|
|
24
|
+
- **A document format, not a workflow engine.** Nothing executes. Judgment — waiting times, acceptance prose, loop predicates — stays in human-readable text.
|
|
25
|
+
- **Prose before fields.** What needs no machine semantics belongs in `content`; a field exists only when structure earns its place.
|
|
26
|
+
|
|
27
|
+
The data directory (default `~/.practi`) is the workspace: nodes content-addressed under `nodes/*.md`; `practi.json` records the remote and the registered **direct** roots (indirect = every other node the direct POPs reference).
|
|
28
|
+
|
|
29
|
+
## Setup
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @arshdelight/practi
|
|
33
|
+
practi init # initialize the workspace
|
|
34
|
+
practi config # data dir, remote, registry summary
|
|
35
|
+
practi login # OAuth in the browser; --no-open prints the URL for headless agents
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The remote defaults to https://practihub.com — `practi remote set <url>` only when pointing at another hub. Credentials live in `practi.auth.json` (kept out of `practi.json`, auto-refreshing): log in once, keep using `practi` without prompts. `practi me` verifies the session; `practi logout` revokes and clears it.
|
|
39
|
+
|
|
40
|
+
Local use needs no account; logging in only matters for publishing, commenting, and syncing. (Upgrades from the pre-rename `pop` CLI keep working: the old data directory and credentials are found automatically.)
|
|
41
|
+
|
|
42
|
+
## Writing a document
|
|
43
|
+
|
|
44
|
+
| Field | On | Meaning |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `name` | both | display label (required); renaming changes the hash like any edit |
|
|
47
|
+
| `description` | both | one line — what this skill does, for discovery/selection |
|
|
48
|
+
| `content` | both | the body: details, narrative, warnings (trimmed for the hash) |
|
|
49
|
+
| `op` | practice | `seq` (default, ordered) · `par` parallelizable · `choice` alternatives · `loop` repetition (`{mode:"count",count:N}` or `{mode:"until",until:"<prose>"}`) · `set` directory view, no aggregation |
|
|
50
|
+
| `children` | practice | inline subtrees (recursive, same shape) or `{ "hash": … }` refs to stored POPs — interchangeable |
|
|
51
|
+
| `inputs` | action | consumed flows: `name` + optional `spec`; optional `from` wires one producer |
|
|
52
|
+
| `outputs` | action | produced flows — the step's acceptance criteria (`from` not allowed) |
|
|
53
|
+
| `attachments` | action | blob pointers (below) |
|
|
54
|
+
| `revisions` | both | history records `{when, what}` — travel with the document |
|
|
55
|
+
| `refines` | practice | hash of the node this practice improves — the refinement edge |
|
|
56
|
+
| `license` / `metadata` | both | reuse terms / vendor bag (`x-<vendor>-<name>` keys) |
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"name": "Make tea",
|
|
61
|
+
"description": "From kettle to cup",
|
|
62
|
+
"children": [
|
|
63
|
+
{ "name": "Boil water", "content": "Heat until boiling.",
|
|
64
|
+
"outputs": [{ "name": "boiling water", "spec": "100°C" }] },
|
|
65
|
+
{ "name": "Pour", "content": "Pour along the wall.",
|
|
66
|
+
"inputs": [{ "name": "boiling water", "from": "@Boil water" }] }
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Rules that bite:
|
|
72
|
+
|
|
73
|
+
- **Unknown fields are rejected** (`E_SCHEMA`), never dropped — silently dropping a field forks hashes. **Empty ≡ absent**: an optional field set to `""` or `[]` hashes exactly as if omitted.
|
|
74
|
+
- `attachments` / `inputs` / `outputs` are **action-only**; on a practice they are a schema error (they are derived aggregate views).
|
|
75
|
+
- `inputs.from` accepts authoring sugar `"@<name>"`, resolved against this document's inline nodes; the stored form always carries hashes.
|
|
76
|
+
- Children may inline recursively or reference stored content as `{ "hash": "sha256:…" }` — both forms produce the same root hash.
|
|
77
|
+
|
|
78
|
+
## Recording quality
|
|
79
|
+
|
|
80
|
+
Check every document against these before `practi new`:
|
|
81
|
+
|
|
82
|
+
- **Detailed** — someone who wasn't here can reproduce it: exact commands, file changes, config values, concrete specs. Record what was actually done — dead ends included — not the idealized version.
|
|
83
|
+
- **Sanitized** — remove values specific to the author that a reproducer won't reuse: own repos, accounts, usernames, addresses, phones, credentials, personal hostnames/IPs — even embedded in commands, and even inside attachment bytes (screenshots, logs). Replace with descriptive placeholders (`<your-github-username>/repo`). Keep third-party package names, public endpoints, standard tools, and command structure.
|
|
84
|
+
- **Curated** — a child step is something a reproducer physically does. Research and deciding are not steps; their conclusions go in `content`. Test: *would a reproducer physically do this, or only need its conclusion?*
|
|
85
|
+
|
|
86
|
+
## Attachments
|
|
87
|
+
|
|
88
|
+
Stage the bytes first, then paste the emitted entry into the document:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
practi blob add <file-or-url> [--name <name>]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- **Local file** — hashed and stored into the workspace blob channel (`blobs/<2 hex>/<64 hex>`); emits the entry without `url`. Needs an initialized workspace (`practi init`), or validation later reports `E_BLOB_MISSING`.
|
|
95
|
+
- **http(s) URL** — fetched once to compute the identity hash (25 MB limit); emits the entry **with** `url` — bytes stay external, identity remains the hash.
|
|
96
|
+
|
|
97
|
+
The command prints a ready-to-paste object. Put it on the **action's** `attachments`, then reference it from `content`:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"type": "action",
|
|
102
|
+
"name": "Demonstrate",
|
|
103
|
+
"content": "The result:\n\n",
|
|
104
|
+
"attachments": [
|
|
105
|
+
{ "name": "pour-demo.mp4", "hash": "sha256:…", "mime": "video/mp4", "size": 18342 }
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- `` resolves node-locally against this node's own list; attachment names must be unique within a node; a referenced but missing name → `E_MEDIA_REF`. A raw `` target is an external reference, exempt.
|
|
111
|
+
- Pointers hash, bytes don't: changed bytes → changed blob hash → changed pointer → a new node identity. Attachments are immutable content — the entry goes into the document **before** `practi new`, never mutated onto an existing node.
|
|
112
|
+
- `practi push` transports **pointers only**; blob bytes never leave the machine.
|
|
113
|
+
|
|
114
|
+
## Local workflow
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
practi new doc.json # or: practi new --json '<text>' / practi new < doc.json (stdin)
|
|
118
|
+
practi edit <hash> doc.json # replace a direct POP (new hash; auto-revision + GC of unreachable nodes)
|
|
119
|
+
practi show <hash> # aggregate view; --json machine view; --doc full document form
|
|
120
|
+
practi ls [-a] # direct roots; -a adds indirect nodes
|
|
121
|
+
practi search --local <q> # offline search over every stored node (name/description/content; hash prefixes too)
|
|
122
|
+
practi web # browse direct POPs in a local web UI
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- `practi new` validates through the SDK, persists the content-addressed tree, registers the root as direct, and prints the root hash with `status: valid, registered as direct`. On validation issues the tree is stored but **not** registered — read the printed `E_*` issues, fix the JSON, re-run.
|
|
126
|
+
- `practi show` accepts a unique hash prefix (≥4 hex digits); `--doc` emits the expanded document — the starting point for forking or refining.
|
|
127
|
+
|
|
128
|
+
## Remote workflow
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
practi push [hash] # push new local claims (fetch /mine, diff, upload only new ones); stored PRIVATE — record first, publish later
|
|
132
|
+
practi search [query...] # --scope public|me|all, --limit N, --json; title hits rank first; empty = browse newest; --local searches the workspace instead
|
|
133
|
+
practi pull [hash] # sync YOUR claims from the remote (default: all of mine)
|
|
134
|
+
practi clone <hash> # fetch a public POP and claim it (local direct + remote claim)
|
|
135
|
+
practi submit [hash] # PRIVATE → PENDING_REVIEW; auto review passes → public (already-approved skips re-review); default: all direct
|
|
136
|
+
practi unpublish [hash] # withdraw a submission / take a published POP out of public
|
|
137
|
+
practi delete <hash] # remove your direct claim on the remote (hash required; local workspace untouched)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- Reads of published docs are anonymous; writes and private reads need `practi login`.
|
|
141
|
+
- Re-pushing the same content is idempotent (content-addressed); pushing again after `practi delete` recreates it — fresh record, PRIVATE.
|
|
142
|
+
|
|
143
|
+
## Evaluating practices
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
practi comment list <hash> [--node <hash>] # comments: whole-doc = that document's own; --node = a shared node across the network
|
|
147
|
+
practi comment tally <hash> # support/neutral/oppose distribution
|
|
148
|
+
practi comment add <hash> --node <hash> --valence support|neutral|oppose -m "<text>"
|
|
149
|
+
practi comment edit <comment-id> -m "<text>" # free edit (author only)
|
|
150
|
+
practi comment delete <comment-id> # hard delete (author only)
|
|
151
|
+
practi comment report <comment-id> --reason illegal|infringement|spam|other [--detail "<why>"]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
- Comments are a **hub extension**, not part of the POP protocol: flat (no replies), one per (user, node), valence required (default neutral), free edit, hard delete. They never touch the document or its hash.
|
|
155
|
+
- **Viewing** — `list <hash>` shows comments made in that document's context; `--node <hash>` shows a shared node's comments across every document that uses it (the DAG view). `tally` prints the support/neutral/oppose distribution — display-only, never a score, never a ranking input.
|
|
156
|
+
- **Review** — comments are publish-then-review (automated content safety); a flagged comment is hidden and editing it resubmits it. Reported comments go through platform review with the source document as context; a confirmed report deletes the comment and notifies its author.
|
|
157
|
+
- **Endorsement is reuse** — a "support" comment is just a note. The real endorsement is structural: publishing a document that references a node is what endorses it.
|
|
158
|
+
|
|
159
|
+
## Skill ⇄ POP conversion
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
practi skill export <ref> [--dir <out>] # a POP → an installable skill directory (default: ./<name>)
|
|
163
|
+
practi skill import <dir> # replay a `practi skill export` directory back into a POP
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- An exported directory carries `SKILL.md` (a readable projection), attachment files, and `pop.doc.json` — the sidecar holding the canonical document. Import replays the sidecar byte-identically (same hash, any machine), re-staging attachment files into the local blob store.
|
|
167
|
+
- Import refuses directories without a sidecar (`E_NO_SIDECAR`): it is the inverse of export, not a skill importer. To bring a foreign skill into POP, read it and **author** a structured tree of practices and actions (the recording-quality rules apply) — flattening its text into one node would discard exactly the structure POP exists for.
|
|
168
|
+
- Hand-editing `SKILL.md` after export desynchronizes the sidecar: import warns and treats the edited body as truth (a new hash — fork semantics). Edit the POP and re-export instead.
|
|
169
|
+
|
|
170
|
+
## Error codes
|
|
171
|
+
|
|
172
|
+
| Code | Trigger |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `E_SCHEMA` | shape violation: unknown field anywhere, derived fields on a practice, op/children/loop on an action, duplicate attachment names, unresolvable `@label` |
|
|
175
|
+
| `E_DANGLING` | a `{hash}` child not stored locally / on the hub |
|
|
176
|
+
| `E_FLOW_FROM` | `from` names no node in scope |
|
|
177
|
+
| `E_HASH_FORMAT` | not `sha256:` + 64 lowercase hex |
|
|
178
|
+
| `E_MEDIA_REF` | inline media reference with no matching attachment |
|
|
179
|
+
| `E_BLOB_MISSING` / `E_BLOB_CORRUPT` | blob absent / bytes disagree with the pointer |
|
|
180
|
+
|
|
181
|
+
## Workflow quick reference
|
|
182
|
+
|
|
183
|
+
- **Record a session** — extract what was done from the conversation → shape one JSON tree (quality rules above) → `practi new doc.json` → confirm `status: valid` → `practi show <hash>` to review → optional `practi push`.
|
|
184
|
+
- **Find prior art** — `practi search <query>` → `practi clone <hash>` → `practi show <hash>`.
|
|
185
|
+
- **Edit one of your direct POPs** — `practi show <hash> --doc > doc.json` → edit the JSON → `practi edit <hash> doc.json --message "what changed"`. The edit validates and stores the new tree, swaps the direct root, appends a revision (`from` = old root — a history pointer, may dangle by design), and garbage-collects nodes no longer referenced by any direct POP (`--keep` preserves them; blobs are never GC'd). Local only: sync the hub afterwards with `practi push` then `practi delete <old-root>`. Editing is replacing — new content lives under a new root hash. Improving **someone else's** (or an indirect) practice is a new document with `refines` set, via `practi new`.
|
|
186
|
+
- **Evaluate / see what people say** — `practi comment list <hash>` → `practi comment tally <hash>`; leave feedback with `practi comment add <hash> --node <hash> --valence support|neutral|oppose -m "…"`.
|