owfadev 0.0.1 → 0.3.1
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/.agents/skills/asset-read/SKILL.md +39 -0
- package/.agents/skills/check/SKILL.md +130 -0
- package/.agents/skills/docs/SKILL.md +24 -0
- package/.agents/skills/map/SKILL.md +72 -0
- package/.agents/skills/plugin/SKILL.md +74 -0
- package/.agents/skills/profile/SKILL.md +75 -0
- package/.agents/skills/query/SKILL.md +48 -0
- package/.agents/skills/save/SKILL.md +94 -0
- package/.agents/skills/wiki_plugin_kernel/SKILL.md +104 -0
- package/.meta/VERSION +1 -0
- package/.meta/command/asset-read/SKILL.md +39 -0
- package/.meta/command/check/SKILL.md +130 -0
- package/.meta/command/docs/SKILL.md +24 -0
- package/.meta/command/map/SKILL.md +72 -0
- package/.meta/command/plugin/SKILL.md +74 -0
- package/.meta/command/profile/SKILL.md +75 -0
- package/.meta/command/query/SKILL.md +48 -0
- package/.meta/command/save/SKILL.md +94 -0
- package/.meta/command/wiki_plugin_kernel/SKILL.md +104 -0
- package/.meta/docs/agent-behavior.md +68 -0
- package/.meta/docs/agents-example.md +34 -0
- package/.meta/docs/conversion.md +24 -0
- package/.meta/docs/deployment.md +311 -0
- package/.meta/docs/developer.md +33 -0
- package/.meta/docs/distribution.md +132 -0
- package/.meta/docs/intro.md +56 -0
- package/.meta/docs/log-example.md +19 -0
- package/.meta/docs/map.md +23 -0
- package/.meta/docs/mechanics.md +180 -0
- package/.meta/docs/naming.md +113 -0
- package/.meta/docs/packages.md +140 -0
- package/.meta/docs/quickstart.md +79 -0
- package/.meta/docs/research-landscape.md +132 -0
- package/.meta/docs/research-user-profile.md +27 -0
- package/.meta/docs/sandbox.md +40 -0
- package/.meta/docs/usage.md +45 -0
- package/.meta/plugins/core/calendar/PLUGIN.md +35 -0
- package/.meta/plugins/core/calendar/PLUGIN.yaml +21 -0
- package/.meta/plugins/core/cron/PLUGIN.md +38 -0
- package/.meta/plugins/core/cron/PLUGIN.yaml +24 -0
- package/.meta/plugins/core/device/PLUGIN.md +38 -0
- package/.meta/plugins/core/device/PLUGIN.yaml +21 -0
- package/.meta/plugins/core/device/scripts/check.py +29 -0
- package/.meta/plugins/core/domain/PLUGIN.md +43 -0
- package/.meta/plugins/core/domain/PLUGIN.yaml +8 -0
- package/.meta/plugins/core/hot/PLUGIN.md +40 -0
- package/.meta/plugins/core/hot/PLUGIN.yaml +15 -0
- package/.meta/plugins/core/index/PLUGIN.md +39 -0
- package/.meta/plugins/core/index/PLUGIN.yaml +18 -0
- package/.meta/plugins/core/instance-git/PLUGIN.md +39 -0
- package/.meta/plugins/core/instance-git/PLUGIN.yaml +15 -0
- package/.meta/plugins/core/instance-git/scripts/check.py +90 -0
- package/.meta/plugins/core/language/PLUGIN.md +38 -0
- package/.meta/plugins/core/language/PLUGIN.yaml +23 -0
- package/.meta/plugins/core/language/scripts/check.py +23 -0
- package/.meta/plugins/core/link/PLUGIN.md +39 -0
- package/.meta/plugins/core/link/PLUGIN.yaml +16 -0
- package/.meta/plugins/core/link/scripts/check.py +122 -0
- package/.meta/plugins/core/log/PLUGIN.md +58 -0
- package/.meta/plugins/core/log/PLUGIN.yaml +18 -0
- package/.meta/plugins/core/log/scripts/check.py +21 -0
- package/.meta/plugins/core/mapping/PLUGIN.md +32 -0
- package/.meta/plugins/core/mapping/PLUGIN.yaml +24 -0
- package/.meta/plugins/core/mapping/scripts/check.py +90 -0
- package/.meta/plugins/core/notes/PLUGIN.md +42 -0
- package/.meta/plugins/core/notes/PLUGIN.yaml +19 -0
- package/.meta/plugins/core/sessions/PLUGIN.md +63 -0
- package/.meta/plugins/core/sessions/PLUGIN.yaml +20 -0
- package/.meta/plugins/core/sessions/scripts/check.py +33 -0
- package/.meta/plugins/core/structure/PLUGIN.md +29 -0
- package/.meta/plugins/core/structure/PLUGIN.yaml +18 -0
- package/.meta/plugins/core/structure/scripts/check.py +32 -0
- package/.meta/plugins/core/tag/PLUGIN.md +37 -0
- package/.meta/plugins/core/tag/PLUGIN.yaml +18 -0
- package/.meta/plugins/core/tag/scripts/check.py +28 -0
- package/.meta/plugins/core/tmp/PLUGIN.md +26 -0
- package/.meta/plugins/core/tmp/PLUGIN.yaml +16 -0
- package/.meta/plugins/core/todo/PLUGIN.md +33 -0
- package/.meta/plugins/core/todo/PLUGIN.yaml +22 -0
- package/.meta/plugins/core/trust/PLUGIN.md +70 -0
- package/.meta/plugins/core/trust/PLUGIN.yaml +23 -0
- package/.meta/plugins/core/trust/scripts/check.py +77 -0
- package/.meta/plugins/core/user-profile/PLUGIN.md +39 -0
- package/.meta/plugins/core/user-profile/PLUGIN.yaml +30 -0
- package/.meta/plugins/core/vault/PLUGIN.md +28 -0
- package/.meta/plugins/core/vault/PLUGIN.yaml +13 -0
- package/.meta/plugins/core/wiki/PLUGIN.md +37 -0
- package/.meta/plugins/core/wiki/PLUGIN.yaml +8 -0
- package/.meta/protocol/actions.md +42 -0
- package/.meta/protocol/experiments.md +40 -0
- package/.meta/protocol/registry.yaml +75 -0
- package/.meta/scripts/pipeline.py +428 -0
- package/.meta/scripts/wiki_plugin_kernel.py +1891 -0
- package/.meta/scripts/wikilib.py +79 -0
- package/.meta/tests/test_install_preflight.py +177 -0
- package/LICENSE +21 -21
- package/README.md +96 -15
- package/README.zh-CN.md +103 -0
- package/bin/owfa.js +594 -0
- package/package.json +36 -7
- package/templates/AGENTS.template.md +19 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: log
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.15
|
|
4
|
+
bridge: 必依
|
|
5
|
+
depends:
|
|
6
|
+
- wiki
|
|
7
|
+
updated: 2026-10-06
|
|
8
|
+
attachment:
|
|
9
|
+
- "wiki/log.md — single-file operation journal (rolling window)"
|
|
10
|
+
- "wiki/archive/YYYY-MM/log.md — archive spillover (immutable zone, grouped by entry month)"
|
|
11
|
+
- "scripts/check.py — attached audit (entry date contract)"
|
|
12
|
+
fields: {}
|
|
13
|
+
inject: "Run log `wiki/log.md`: new entries prepended at the top, entries never rewritten; entry = date + type (map/save/query/check/plugin/todo/profile/other) + [domain] (omissible — domainless transactions; log is a mandatory bridge: domain bases must depend on this plugin, constitution principle 11) + one sentence; window ≤100 entries, overflow is mechanically archived to `wiki/archive/<month>/log.md`"
|
|
14
|
+
usage:
|
|
15
|
+
- Writing lines (mechanical, automatic): `python .meta/scripts/pipeline.py log <type> "<one sentence>" [--domain <domain>]` (type value set in the log block of the AGENTS injection region; domain tag = domain-plugin name such as bb/lark/vault, mandatory for in-domain transactions, omitted for framework and native transactions); rolling window and archiving are performed by the script
|
|
16
|
+
checks:
|
|
17
|
+
- Mechanical items (attached-audit script `scripts/check.py`, executed on audit discovery): undated entries (starting with `- ` yet not matching the date format, main file and archive checked alike) → error
|
|
18
|
+
- Semantic items (check command): historical entries modified (verifiable via git) → error; capacity over the limit → re-check after mechanical archiving
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""log plugin attached audit: mechanical items (entry date contract).
|
|
4
|
+
|
|
5
|
+
Auditing modification of historical entries relies on git traces (semantic item, under the check command); capacity archiving is converged by the write pipeline.
|
|
6
|
+
"""
|
|
7
|
+
import re
|
|
8
|
+
|
|
9
|
+
DATE_RE = re.compile(r"^- \d{4}-\d{2}-\d{2} ")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check(ctx):
|
|
13
|
+
issues = []
|
|
14
|
+
for rel, _fm, body in ctx.pages:
|
|
15
|
+
if rel != "log.md" and not (rel.startswith("archive/") and rel.endswith("/log.md")):
|
|
16
|
+
continue
|
|
17
|
+
for i, raw in enumerate(body.splitlines(), 1):
|
|
18
|
+
line = raw.rstrip()
|
|
19
|
+
if line.startswith("- ") and not DATE_RE.match(line):
|
|
20
|
+
issues.append({"level": "error", "message": f"{rel}:{i}: entry missing date ({line[:40]}…)"})
|
|
21
|
+
return issues
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# mapping: vault Domain Mapping Rules
|
|
2
|
+
|
|
3
|
+
## Design Summary
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: the mapping rules of the vault domain — maps every file in `vault/` to a proxy page in `wiki/vault/`, executed by the map command; projections of arbitrary-format assets take the 1:1 mirror density, the densest end of projection density, see Section 8 of mechanics. A proxy is the asset's representative in the md world: registration plus a one-line description to start, summaries are optional enhancements
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- 1:1 mirror with zero exceptions: md files also get proxies, preventing confusion between wiki-native and proxy; proxy name = original name plus .md, preventing name collisions
|
|
8
|
+
- The hash is a mismatch detector, not an enforcer: disposition of original changes goes through check triage, and triage writes a log line when done — mapping does not adjudicate
|
|
9
|
+
- Proxy pages belong to the regenerable zone: precious content goes into notes, not proxy pages; the body never copies the full original text — a proxy is not a copy
|
|
10
|
+
|
|
11
|
+
## Structure
|
|
12
|
+
|
|
13
|
+
- `wiki/vault/**` and `vault/**` in a one-to-one mirror: paths isomorphic; proxy file name = the original file's full name plus `.md` — e.g. `a.pdf` corresponds to `a.pdf.md`, preventing name collisions
|
|
14
|
+
- md files also get proxies, no exceptions
|
|
15
|
+
|
|
16
|
+
## Invariants
|
|
17
|
+
|
|
18
|
+
- The path is the origin proof: pages under `wiki/vault/` always have a vault counterpart; the origin-dichotomy concept belongs to the wiki plugin. Reserved name `index.md` exemption — directory indexes belong to the navigation layer, not concept pages; having no vault counterpart does not count as an orphan proxy
|
|
19
|
+
- The registration fields raw_file and raw_sha256 are mechanically recomputable from vault
|
|
20
|
+
- Proxy pages belong to the regenerable zone: pipelines may rerun and overwrite; precious content is written into notes, not kept in proxy pages
|
|
21
|
+
- A proxy body must not copy the full original text
|
|
22
|
+
|
|
23
|
+
## Changelog
|
|
24
|
+
|
|
25
|
+
- 0.8 2026-09-22: domain-ization — the first paragraph renamed from "bridge plugin" to "vault domain mapping rules", zero change in semantics and mechanism, positioning set right; depends keeps the two ends vault and wiki
|
|
26
|
+
- 0.7 2026-09-14: vault governance batch — orphan-proxy messages gained reference counts, see the impact surface before deleting; triage writes a log line right after recalculation, leaving an audit trail of changes — under the snapshot model, mismatch facts used to vanish silently; usage gained the url registration contract, the write side of vault source preservation
|
|
27
|
+
- 0.6 2026-09-13: attached audit gained the hard check for missing registration fields — expert review: the injection region said always-present while the attached audit silently skipped
|
|
28
|
+
- 0.5 2026-09-13: usage absorbed the diary-type exemption — moved in from the map command's prohibitions, removing the body echo
|
|
29
|
+
- 0.4 2026-09-13: injection source moved to the manifest — removed Fields, Checks, Usage, Inject, Attachments sections, md returned to pure documentation
|
|
30
|
+
- 0.3 2026-09-13: established the "Usage" section — the write-side contract is projected by the command's injection region, a single text source
|
|
31
|
+
- 0.2 2026-09-12: command ingest renamed map and slimmed — the polishing questions removed, pure registration; vault governance discussed separately
|
|
32
|
+
- 0.1 2026-09-12: renamed and established from the vault plugin, version restarted, old history in git — semantically depends on vault and wiki; the clause "commands are append-only toward vault, freedom to delete and modify belongs to the human" moved to the vault concept plugin's injection line; the origin-dichotomy concept moved to the wiki plugin
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
id: mapping
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.8
|
|
4
|
+
depends:
|
|
5
|
+
- vault
|
|
6
|
+
- wiki
|
|
7
|
+
updated: 2026-10-06
|
|
8
|
+
attachment:
|
|
9
|
+
- "wiki/vault/ — proxy-layer directory, one-to-one mirror of the root vault/"
|
|
10
|
+
- "scripts/check.py — attached audit (mirror diff / hash verification / full-text duplication / stub aging)"
|
|
11
|
+
fields:
|
|
12
|
+
raw_file: "root-relative path, always present on proxy pages"
|
|
13
|
+
raw_sha256: "hexadecimal SHA-256, mechanically recomputable from vault"
|
|
14
|
+
commands:
|
|
15
|
+
- map
|
|
16
|
+
inject: "Proxy layer `wiki/vault/`: 1:1 mirror of root `vault/` (proxy name = original name + .md), pages always carry raw_file / raw_sha256; the path is the origin proof"
|
|
17
|
+
usage:
|
|
18
|
+
- Mirror locating: proxy path = `wiki/vault/<original-path>.md` (original name + .md, prevents name collisions); md assets also get proxies, no exceptions
|
|
19
|
+
- Registration fields: `type: source` + `raw_file` (root-relative path) / `raw_sha256` (hexadecimal SHA-256, never skip the computation)
|
|
20
|
+
- Body starts with a one-line description, never copying the full original text; summary / structure extraction are optional enhancements; diary-type assets are registration-first, summaries not enforced
|
|
21
|
+
- URL-type assets: the proxy page carries `url` (vault field — source link, source preservation; required when placed via agent channels, optional for manual placement)
|
|
22
|
+
checks:
|
|
23
|
+
- Mechanical items (attached-audit script `scripts/check.py`, executed on audit discovery): mirror diff (file in vault without proxy → info backlog; proxy without counterpart → error, message carries the reference count — see the impact surface before deleting); missing registration fields (raw_file / raw_sha256) → error; dangling raw_file → error; raw_sha256 mismatch → warning; suspected full-text duplication (md asset body ≥80% of the original) → warning; description-less stub with updated older than 90 days → warning
|
|
24
|
+
- Semantic items (check command): mismatch-disposition triage (description still applies → mechanical recalculation auto-repairs, writing a log line on completion (type map, one sentence with the asset name and 'original changed, description still applies'); suspected invalid → human decides remap or delete); diary-type full-text duplication exemption judgment; before disposing an orphan proxy, handle its references first (update references in sync or leave aliases to redirect)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""mapping plugin attached audit: mirror diff, registry-field completeness, raw_file dangling, hash verification, suspected full-text copies, stub aging.
|
|
4
|
+
|
|
5
|
+
Read-only report — repair actions such as hash recalculation belong to the command (actions.md mechanical automatic items); the attached audit does not execute them.
|
|
6
|
+
Parameter basis: forensic evidence from the original library (40% hash mismatch, 33% full-text copies) and the progressive-enrichment promise (new stubs exempt from alerts).
|
|
7
|
+
"""
|
|
8
|
+
import datetime
|
|
9
|
+
import hashlib
|
|
10
|
+
import os
|
|
11
|
+
import re
|
|
12
|
+
|
|
13
|
+
TODAY = datetime.date.today()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _file_set(root, sub, strip_md):
|
|
17
|
+
"""Collect the file set under a subdirectory (ignore .gitkeep); when strip_md, collect md only and strip the suffix (proxy page set)."""
|
|
18
|
+
out = set()
|
|
19
|
+
base = os.path.join(root, sub)
|
|
20
|
+
for dirpath, dirs, files in os.walk(base):
|
|
21
|
+
dirs.sort()
|
|
22
|
+
for fn in sorted(files):
|
|
23
|
+
if fn == ".gitkeep":
|
|
24
|
+
continue
|
|
25
|
+
if strip_md and fn == "index.md":
|
|
26
|
+
continue # directory index: navigation-layer reserved name (per-directory by the index plugin), not a concept page, no counterpart
|
|
27
|
+
if strip_md and not fn.endswith(".md"):
|
|
28
|
+
continue
|
|
29
|
+
rel = os.path.relpath(os.path.join(dirpath, fn), base).replace(os.sep, "/")
|
|
30
|
+
out.add(rel[:-3] if strip_md else rel)
|
|
31
|
+
return out
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _ref_count(ctx, full):
|
|
35
|
+
"""Count references across the whole library pointing to full (page full name): body wikilinks + related field."""
|
|
36
|
+
n = 0
|
|
37
|
+
pat = re.compile(r"\[\[([^\]\|#]+)")
|
|
38
|
+
for _rel, fm, body in ctx.pages:
|
|
39
|
+
for m in pat.finditer(str(body)):
|
|
40
|
+
if m.group(1).strip() == full:
|
|
41
|
+
n += 1
|
|
42
|
+
for r in (fm.get("related") or []):
|
|
43
|
+
if str(r).strip() == full:
|
|
44
|
+
n += 1
|
|
45
|
+
return n
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def check(ctx):
|
|
49
|
+
issues = []
|
|
50
|
+
root = ctx.root
|
|
51
|
+
real = _file_set(root, "vault", strip_md=False)
|
|
52
|
+
proxy = _file_set(root, os.path.join("wiki", "vault"), strip_md=True)
|
|
53
|
+
for f in sorted(real - proxy):
|
|
54
|
+
issues.append({"level": "info", "message": f"vault pending registration (backlog): {f}"})
|
|
55
|
+
for p in sorted(proxy - real):
|
|
56
|
+
refs = _ref_count(ctx, f"vault/{p}")
|
|
57
|
+
note = f", referenced from {refs} places" if refs else ", no references"
|
|
58
|
+
issues.append({"level": "error", "message": f"orphan proxy (no vault counterpart{note}): wiki/vault/{p}"})
|
|
59
|
+
for rel, fm, body in ctx.pages:
|
|
60
|
+
if not rel.startswith("vault/"):
|
|
61
|
+
continue
|
|
62
|
+
if os.path.basename(rel) == "index.md":
|
|
63
|
+
continue # directory index: navigation-layer reserved name, not a proxy page
|
|
64
|
+
rf = fm.get("raw_file")
|
|
65
|
+
if not rf:
|
|
66
|
+
issues.append({"level": "error", "message": f"{rel}: missing registry field raw_file (mandatory on proxy pages)"})
|
|
67
|
+
continue
|
|
68
|
+
if not fm.get("raw_sha256"):
|
|
69
|
+
issues.append({"level": "error", "message": f"{rel}: missing registry field raw_sha256 (mandatory on proxy pages)"})
|
|
70
|
+
fp = os.path.join(root, rf)
|
|
71
|
+
if not os.path.exists(fp):
|
|
72
|
+
issues.append({"level": "error", "message": f"{rel}: raw_file points to a nonexistent file ({rf})"})
|
|
73
|
+
continue
|
|
74
|
+
sh = fm.get("raw_sha256")
|
|
75
|
+
if sh and hashlib.sha256(open(fp, "rb").read()).hexdigest() != sh:
|
|
76
|
+
issues.append({"level": "warning", "message": f"{rel}: raw_sha256 mismatch (source file changed; if the description still applies, recalculate mechanically)"})
|
|
77
|
+
if rf.endswith(".md"):
|
|
78
|
+
try:
|
|
79
|
+
raw_text = open(fp, encoding="utf-8").read()
|
|
80
|
+
except UnicodeDecodeError:
|
|
81
|
+
raw_text = open(fp, encoding="utf-8", errors="replace").read()
|
|
82
|
+
if raw_text and len(body) >= 0.8 * len(raw_text):
|
|
83
|
+
issues.append({"level": "warning", "message": f"{rel}: suspected full-text copy (body ≥80% of the source; diary-type exemption is a semantic judgment)"})
|
|
84
|
+
if not body.strip(): # stub: body has no one-line description
|
|
85
|
+
m = re.fullmatch(r"(\d{4})-(\d{2})-(\d{2})", str(fm.get("updated") or ""))
|
|
86
|
+
if m:
|
|
87
|
+
age = (TODAY - datetime.date(*map(int, m.groups()))).days
|
|
88
|
+
if age > 90:
|
|
89
|
+
issues.append({"level": "warning", "message": f"{rel}: stub over 90 days without a description (new stubs exempt)"})
|
|
90
|
+
return issues
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# notes: native notes
|
|
2
|
+
|
|
3
|
+
## Design Overview
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: knowledge whose provenance is the wiki itself — the 'original text' is the wiki, with no counterpart in vault. The main territory of native knowledge; session minutes and profile cognition are routed by closed type values to their own territories
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- No-regeneration zone: pipelines and commands must not overwrite or rewrite existing notes; they may only add, and humans may edit freely — the true copy lives here, writing is birth
|
|
8
|
+
- Subdivision relies on the type field, not directories: form values are open, default vocabulary in registry, self-extended by instances — the architecture takes no responsibility for form classification. The 0.13 ruling: the 'concept/question/decision/entity' enumeration was a residue of the personal-library migration and had drifted from registry
|
|
9
|
+
- The boundary with the proxy layer is proven by path: wiki/vault/ always has a counterpart, wiki/notes/ never does — the path is the provenance
|
|
10
|
+
|
|
11
|
+
## Structure
|
|
12
|
+
|
|
13
|
+
- `wiki/notes/**`; file names free, named by humans, in contrast to the mechanical naming of the mirror zone
|
|
14
|
+
- Subdivision via the type field, not directories; form values open, default vocabulary in registry, self-extended by instances; territory values session and profile are closed and must land in their own territories
|
|
15
|
+
|
|
16
|
+
## Invariants
|
|
17
|
+
|
|
18
|
+
- No-regeneration zone: pipelines and commands must not overwrite or rewrite existing notes; only additions or manual human edits
|
|
19
|
+
- The boundary with the vault proxy layer is proven by path: wiki/vault/ always has a counterpart, wiki/notes/ never does
|
|
20
|
+
- The boundary with sessions and user-profile is proven by type: type: session lands in `wiki/sessions/`; type: profile lands in `wiki/profile.md`; neither lands in this zone
|
|
21
|
+
|
|
22
|
+
## Bridge: on-demand
|
|
23
|
+
|
|
24
|
+
A derivation-destination bridge governing high-value conclusions: domain plugins one-way derive high-value conclusions that emerge as native notes, with a required back-link to the source page. Constitutional principle 11. Attachment cardinality **on-demand**. Format authority is in this plugin's usage, projected to the point of consumption — division-of-labor ruling. This section elaborates: the type is freely chosen within the form vocabulary, the body back-links via wikilink; the domain plugin keeps a one-sentence self-description disclosure, SASU-L.
|
|
25
|
+
|
|
26
|
+
## Changelog
|
|
27
|
+
|
|
28
|
+
- 0.15 2026-10-02: global-domain batch two — established the on-demand bridge as the derivation destination; domain-plugin self-descriptions retained with a pointer
|
|
29
|
+
- 0.14 2026-09-23: added the wiki dependency edge — inner plugins attach to wiki, aligning with the domain 0.1 declaration; missed in the 2026-09-22 domainization batch
|
|
30
|
+
- 0.13 2026-09-14: slimmed down; ruling: the architecture takes no responsibility for form classification — the form enumeration removed from body and inject line; 'concept/question/decision/entity' was personal-library migration residue, drifted from registry, comparison missed; type layering: territory values closed, namely source, session, profile — the basis for mechanical checks; form values demoted to an instance default vocabulary, registry defaults, open to self-extension
|
|
31
|
+
- 0.12 2026-09-13: usage updated for semantic stitching — update = append-style merge under user instruction leaving a trace, or manual edits; expert review: two tellings alongside the save dedup section
|
|
32
|
+
- 0.11 2026-09-13: usage dropped the type enumeration; the value set's single source is registry, removing triple restatement
|
|
33
|
+
- 0.10 2026-09-13: inject source moved to the manifest — deleted the Checks, Usage, Inject, Attachments sections; md returns to pure documentation
|
|
34
|
+
- 0.9 2026-09-13: established the Usage section — write-side contracts handed to command injection regions for projection, single text source
|
|
35
|
+
- 0.8 2026-09-12: manifest dropped layer — layering abolished: injection order changed to dependency topology plus alphabetical, direction checks removed
|
|
36
|
+
- 0.7 2026-09-12: identifiers anglicized — section headers, attached-audit contract keys, type enumerations, pipeline call parameters
|
|
37
|
+
- 0.6 2026-09-11: manifest added commands: [save] — save is jointly driven by this plugin and sessions
|
|
38
|
+
- 0.5 2026-09-10: narrowed scope — session backbone pages moved to the sessions plugin, an independent territory `wiki/sessions/`; this zone kept concept, question, decision, entity
|
|
39
|
+
- 0.4 2026-09-10: type enumeration wording fixed — defers to the registry value set, resolving the contradiction with registry closure
|
|
40
|
+
- 0.3 2026-09-10: manifest added layer: origin — layering established: the provenance layer, zero dependencies
|
|
41
|
+
- 0.2 2026-09-09: orphan checks moved to the link plugin — graph properties belong to the link layer
|
|
42
|
+
- 0.1 2026-09-08: merged and simplified from the original wiki concepts, questions, comparisons, and sessions zones; subdivision batch two
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: notes
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.15
|
|
4
|
+
bridge: 按需
|
|
5
|
+
depends:
|
|
6
|
+
- wiki
|
|
7
|
+
updated: 2026-10-06
|
|
8
|
+
attachment:
|
|
9
|
+
- "wiki/notes/ — native notes zone"
|
|
10
|
+
fields: {}
|
|
11
|
+
commands:
|
|
12
|
+
- save
|
|
13
|
+
inject: "Native notes `wiki/notes/`: knowledge whose provenance is the wiki itself, subdivided by the type field (open form vocabulary, default values in registry); no-regeneration zone, commands append-only and never modify; session and profile types do not land in this zone (they belong to the sessions / user-profile territories); notes on-demand bridge — domain plugins one-way derive high-value conclusions into this zone on an emergence basis, and must back-link the source page (constitutional principle 11, format owned by this bridge)"
|
|
14
|
+
usage:
|
|
15
|
+
- Landing spot `wiki/notes/<title>.md`, file name free (named by humans); type form vocabulary in registry (open, self-extended by instances), territory values do not land in this zone
|
|
16
|
+
- Append-only: commands never rewrite an existing note wholesale; updating = append-style merge under user instruction (trace left in the body) or manual human edits
|
|
17
|
+
checks:
|
|
18
|
+
- Traces of a note overwritten by a command → error
|
|
19
|
+
- Near-duplicate notes (Jaccard > 0.7) → warning
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# sessions: native sessions
|
|
2
|
+
|
|
3
|
+
## Design Overview
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: the backbone structure for session distillation — the knowledge of one collaboration session is archived as a backbone page, high-value topics promoted to standalone notes. In the original wiki vision sessions were a first-class zone; when merged into notes on 2026-09-08 they were demoted to a type, with the structure lodged in the save command; once this plugin was established the structure returned home and the command went back to pure operation — an example of separating territory and command responsibilities
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- Session pages are minutes, not mirrors: once the conversation fades the page is the true copy, writing is birth — a specimen of wiki provenance determination
|
|
8
|
+
- participants required, using the actor convention: recorded even for a single agent; multi-agent collaboration extends the list directly — reserved for the collaborative state
|
|
9
|
+
- Promotion rule: standalone high-value topics rise to notes pages, whose provenance is knowledge rather than session record; the backbone page keeps a wikilink — distillates belong to notes
|
|
10
|
+
- No-regeneration zone: append-only, never modified
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
- `wiki/sessions/**`; default naming `YYYY-MM-DD-<topic>.md`
|
|
15
|
+
- type: session, value set in registry; participants required: YAML list, the actor convention being human:name, process:flow name, agent/model id — recorded even for a single agent; multi-agent collaboration extends this list directly
|
|
16
|
+
- Backbone page shape: Core Conclusions; Decisions & Rationale; Non-obvious Insights; Open Questions; Related Pages — promoted topics attached via wikilink
|
|
17
|
+
- Promotion rule: standalone high-value topics promoted to `wiki/notes/` pages, whose provenance is knowledge rather than session record; the backbone page keeps a wikilink
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
`wiki/sessions/2026-09-12-fog-harbor-art-style-finalized.md`:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
---
|
|
25
|
+
type: session
|
|
26
|
+
title: Fog Harbor art style finalized
|
|
27
|
+
participants: [human:Joss, agent/GLM-5.3]
|
|
28
|
+
created: 2026-09-12
|
|
29
|
+
tags: [game/art]
|
|
30
|
+
---
|
|
31
|
+
# Core Conclusions
|
|
32
|
+
Low-poly plus volumetric fog finalized; moving on to scene art outsourcing inquiries.
|
|
33
|
+
|
|
34
|
+
# Decisions & Rationale
|
|
35
|
+
Pixel art rejected: poor silhouette readability. See [[notes/fog-harbor-art-style-decision]].
|
|
36
|
+
|
|
37
|
+
# Non-obvious Insights
|
|
38
|
+
The budget-overrun risk concentrates in scene art outsourcing (quoted 168k, 40% over budget).
|
|
39
|
+
|
|
40
|
+
# Open Questions
|
|
41
|
+
The performance budget for volumetric fog on low-end machines?
|
|
42
|
+
|
|
43
|
+
# Related Pages
|
|
44
|
+
- [[notes/fog-harbor-art-style-decision]] (the decision page promoted out of this session)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Invariants
|
|
48
|
+
|
|
49
|
+
- No-regeneration zone: pipelines and commands append-only, never modify
|
|
50
|
+
- Territory boundary complementary with notes: type: session must land in `wiki/sessions/`; all other native notes land in `wiki/notes/`
|
|
51
|
+
- Promoted pages belong to the notes territory; this plugin owns only backbone pages
|
|
52
|
+
|
|
53
|
+
## Changelog
|
|
54
|
+
|
|
55
|
+
- 0.9 2026-09-23: added the wiki dependency edge — inner plugins attach to wiki, aligning with the domain 0.1 declaration; missed in the 2026-09-22 domainization batch
|
|
56
|
+
- 0.8 2026-09-13: made the usage sample pointer explicit — added the `.meta/plugins/sessions/PLUGIN.md` path, zero priors
|
|
57
|
+
- 0.7 2026-09-13: inject source moved to the manifest — deleted the Checks, Usage, Inject, Attachments sections; md returns to pure documentation
|
|
58
|
+
- 0.6 2026-09-13: established the Usage section — write-side contracts handed to command injection regions for projection, single text source
|
|
59
|
+
- 0.5 2026-09-12: manifest dropped layer — layering abolished: injection order changed to dependency topology plus alphabetical, direction checks removed
|
|
60
|
+
- 0.4 2026-09-12: identifiers anglicized — section headers, attached-audit contract keys, type enumerations, pipeline call parameters
|
|
61
|
+
- 0.3 2026-09-12: disclosure repair — inlined the full-shape backbone page sample; a cold-start audit guess point: no instances in the zone
|
|
62
|
+
- 0.2 2026-09-11: manifest added commands: [save] — save is jointly driven by this plugin and notes
|
|
63
|
+
- 0.1 2026-09-10: established — extracted from the save command's long-session segment and the merged notes zone, a return of the 2026-09-08 'subdivision batch two'; territory `wiki/sessions/`; participants uses the actor convention, reserving a multi-agent extension point
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
id: sessions
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.9
|
|
4
|
+
depends:
|
|
5
|
+
- wiki
|
|
6
|
+
updated: 2026-10-06
|
|
7
|
+
attachment:
|
|
8
|
+
- "wiki/sessions/ — native sessions zone, session-type backbone pages"
|
|
9
|
+
fields:
|
|
10
|
+
participants: "YAML list, actor convention (human:name / process:flow name / agent/model id), the multi-agent collaboration extension point"
|
|
11
|
+
commands:
|
|
12
|
+
- save
|
|
13
|
+
inject: "Native sessions `wiki/sessions/`: session backbone pages (type: session, participants required = actor list, default naming YYYY-MM-DD-<topic>); high-value topics promoted to standalone `wiki/notes/` pages with a back-link; no-regeneration zone, commands append-only and never modify"
|
|
14
|
+
usage:
|
|
15
|
+
- Landing spot `wiki/sessions/YYYY-MM-DD-<topic>.md` (default naming), type: session, participants required (actor list)
|
|
16
|
+
- Backbone page five-section shape: Core Conclusions / Decisions & Rationale / Non-obvious Insights / Open Questions / Related Pages (full-shape sample in the Example section of `.meta/plugins/sessions/PLUGIN.md`)
|
|
17
|
+
- Standalone high-value topics promoted to `wiki/notes/` pages, the backbone page keeping a wikilink; dedupe before promotion
|
|
18
|
+
checks:
|
|
19
|
+
- Mechanical (covered by audit): session-type pages outside `wiki/sessions/` (or the reverse) → warning; participants missing or entries violating the actor convention → warning
|
|
20
|
+
- Semantic: backbone page bloated past due promotion (should have been promoted but was not) → warning
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""sessions plugin attached audit: mechanical items (territory boundary / participants contract).
|
|
4
|
+
|
|
5
|
+
Whether a backbone page should have been promoted but was not is a semantic item (bloat judgment), under the check command.
|
|
6
|
+
"""
|
|
7
|
+
import re
|
|
8
|
+
|
|
9
|
+
ACTOR_RE = re.compile(r"^(human:.+|process:.+|agent/.+)$")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check(ctx):
|
|
13
|
+
issues = []
|
|
14
|
+
for rel, fm, body in ctx.pages:
|
|
15
|
+
if rel.endswith("/index.md") or rel == "index.md":
|
|
16
|
+
continue # derived pages are not backbone pages and take no part in territory determination
|
|
17
|
+
ptype = fm.get("type")
|
|
18
|
+
in_sessions = rel.startswith("sessions/")
|
|
19
|
+
if ptype == "session" and not in_sessions:
|
|
20
|
+
issues.append({"level": "warning", "message": f"{rel}: session-type page should live under wiki/sessions/ (sessions plugin territory)"})
|
|
21
|
+
elif in_sessions and ptype != "session":
|
|
22
|
+
issues.append({"level": "warning", "message": f"{rel}: pages under wiki/sessions/ should be type: session (actually {ptype or 'untyped'})"})
|
|
23
|
+
if ptype == "session" or in_sessions:
|
|
24
|
+
parts = fm.get("participants")
|
|
25
|
+
if parts is None:
|
|
26
|
+
issues.append({"level": "warning", "message": f"{rel}: missing participants (actor list)"})
|
|
27
|
+
else:
|
|
28
|
+
if not isinstance(parts, list):
|
|
29
|
+
parts = [parts]
|
|
30
|
+
for p in parts:
|
|
31
|
+
if not ACTOR_RE.match(str(p)):
|
|
32
|
+
issues.append({"level": "warning", "message": f"{rel}: participants item {p!r} does not match the actor convention (human:name / process:name / agent/model)"})
|
|
33
|
+
return issues
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# structure: vault Layout
|
|
2
|
+
|
|
3
|
+
## Design Summary
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: vault presets no structure, but a total absence of structure means fast-growing entropy — user-write manuscript 2026-09-07. This plugin sets the layout rules: structure is declared by the instance, the framework provides a preset menu, placement rules, and drift detection. Another instance of skeleton/instance separation; the vault side is henceforth symmetric with the wiki side: the concept plugin governs "what it is", the structure plugin governs "how it is organized"
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- Declaration page machine-readable plus a human-readable body: the frontmatter `structure` block mapping holds the declaration proper, the body holds preset notes; page absent = flat tolerance, a legal state — structure is an optional enhancement, not a requirement
|
|
8
|
+
- vault belongs to the human: structural adjustment is free; the agent only places and reminds, never coerces. The declaration is intent, the diff is a drift reminder, disposition always belongs to the human
|
|
9
|
+
- The two-way diff is mechanically decidable, done by the attached audit: constraining only top-level directories; loose top-level files are the flat slot
|
|
10
|
+
- Governance pages inside wiki, governance targets outside in vault — the same-shaped general rule of the domain contract
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
- `wiki/structure.md` — the structure declaration page, type: structure. The frontmatter `structure` block mapping holds the declaration proper — top-level directory to one-line semantics, machine-readable; the body holds preset choices and notes, for humans; page absent = flat tolerance, a legal state
|
|
15
|
+
- Preset menu: date — `xxxx-xx-xx` daily folders; format — `pdf/`, `md/`; type — semantic categories such as diary, clippings; mixed — nesting without mutual exclusion
|
|
16
|
+
- The shell's natural-language declaration retired: inside wiki is the only retrieval-reachable zone for agents; the shell keeps a pointer to the declaration page
|
|
17
|
+
|
|
18
|
+
## Invariants
|
|
19
|
+
|
|
20
|
+
- Structural choice is instance configuration, not architecture. Touchstone: a concrete directory layout cannot be carried into a new instance
|
|
21
|
+
- vault belongs to the human: structural adjustment is free; the agent only places and reminds, never coerces
|
|
22
|
+
- The two-way diff between declaration and reality is mechanically decidable, via the attached-audit script; the declaration is intent, the diff is a drift reminder, disposition always belongs to the human
|
|
23
|
+
- The diff constrains only top-level directories; loose top-level files are the flat slot, unconstrained by the declaration
|
|
24
|
+
|
|
25
|
+
## Changelog
|
|
26
|
+
|
|
27
|
+
- 0.3 2026-09-22: domain-ization — the first paragraph gained in-domain governance positioning, transitively belonging to the vault domain, governance page inside and target outside; depends unchanged, transitivity means membership
|
|
28
|
+
- 0.2 2026-09-14: territory moved into wiki — declaration page `wiki/structure.md`, frontmatter structure block mapping machine-readable; drift detection upgraded from a semantic item to the attached-audit script, i.e. the declaration diff; depends gained wiki; the shell's natural-language declaration retired
|
|
29
|
+
- 0.1 2026-09-14: established — from the user-write manuscript, i.e. the four presets plus the AGENTS declaration, distilled with the vault governance discussion; the layout responsibility separated from the vault concept plugin, symmetric to the wiki side's concept-and-structure layering
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: structure
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.3
|
|
4
|
+
depends:
|
|
5
|
+
- vault
|
|
6
|
+
- wiki
|
|
7
|
+
updated: 2026-10-06
|
|
8
|
+
attachment:
|
|
9
|
+
- "wiki/structure.md — structure declaration page (the vault layout declaration proper: frontmatter structure block mapping + body preset notes)"
|
|
10
|
+
- "scripts/check.py — attached audit (declaration diff / territory placement / declaration-page existence)"
|
|
11
|
+
fields: {}
|
|
12
|
+
inject: "vault structure declaration `wiki/structure.md` (type: structure): frontmatter `structure` block mapping = directory → one-line semantics, body records presets (date/format/type/mixed, nestable) and notes; agents read this page before placing assets, placing them by position; page absent = flat tolerance; after the human adjusts vault, sync the declaration, check does a mechanical diff (undeclared top-level directory / declared-but-nonexistent directory → warning)"
|
|
13
|
+
usage:
|
|
14
|
+
- How to declare: frontmatter `structure` block mapping (key = top-level directory name with trailing slash, value = one-line semantics); the body records preset choices and nesting-rule notes
|
|
15
|
+
- Agent placing assets into vault: read the declaration page first and place by position; with no fitting position, use the flat slot or create a directory then supplement the declaration; if the page is absent, place flat in the root directory
|
|
16
|
+
- The human adjusts structure freely (vault belongs to the human); after adjusting, sync the declaration; drift is flagged mechanically by the attached audit
|
|
17
|
+
checks:
|
|
18
|
+
- Mechanical items (attached-audit script `scripts/check.py`, executed on audit discovery): declaration diff — vault top-level directory undeclared → warning, declaration key pointing to a nonexistent directory → warning; type: structure landing outside `wiki/structure.md` → error; declaration page absent → info (flat tolerance)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""structure plugin attached audit: structure declaration page existence, diff between declarations and vault's actual top-level directories, territory misplacement.
|
|
4
|
+
|
|
5
|
+
A missing declaration page = flat-layout tolerance (legal, info); the diff covers top-level directories only — loose top-level files are flat slots, unconstrained.
|
|
6
|
+
"""
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def check(ctx):
|
|
11
|
+
issues = []
|
|
12
|
+
# territory misplacement: type: structure is allowed only at wiki/structure.md
|
|
13
|
+
decl = None
|
|
14
|
+
for rel, fm, _body in ctx.pages:
|
|
15
|
+
if fm.get("type") == "structure" and rel != "structure.md":
|
|
16
|
+
issues.append({"level": "error", "message": f"{rel}: type: structure outside the declaration page (territory misplacement)"})
|
|
17
|
+
if rel == "structure.md":
|
|
18
|
+
decl = fm.get("structure") or {}
|
|
19
|
+
if decl is None:
|
|
20
|
+
issues.append({"level": "info", "message": "no structure declaration page (flat-layout tolerance)"})
|
|
21
|
+
return issues
|
|
22
|
+
vroot = os.path.join(ctx.root, "vault")
|
|
23
|
+
if not os.path.isdir(vroot):
|
|
24
|
+
return issues
|
|
25
|
+
actual = {d + "/" for d in os.listdir(vroot)
|
|
26
|
+
if os.path.isdir(os.path.join(vroot, d)) and not d.startswith(".")}
|
|
27
|
+
declared = {str(k).strip() for k in decl}
|
|
28
|
+
for d in sorted(actual - declared):
|
|
29
|
+
issues.append({"level": "warning", "message": f"vault top-level directory undeclared: {d} (add a declaration or put it in place)"})
|
|
30
|
+
for d in sorted(declared - actual):
|
|
31
|
+
issues.append({"level": "warning", "message": f"declaration points to a nonexistent directory: {d} (declaration outdated; sync or delete)"})
|
|
32
|
+
return issues
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# tag: Semantic Classification
|
|
2
|
+
|
|
3
|
+
## Design Summary
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: semantic classification across all pages — a semantic index with zero infrastructure: the semantic work is done at write time, map and save tag along the way; retrieval only does mechanical matching
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- Division of labor between type and tags: type is a closed protocol enum, origin, for machines to read; tags are open semantic classification, for humans and agents to retrieve — the two axes never mix, restating type is forbidden
|
|
8
|
+
- The vocabulary grows freely, governance is after-the-fact merging, no up-front control — consistent with "the architecture does not enumerate"
|
|
9
|
+
- Lightweight discipline: the primary language follows the language page's default key (absent → session language, preventing mixed Chinese-English fragmentation of the vocabulary); English proper names in kebab-case; hierarchy `/`-separated up to two levels; at most 5 per page, a soft cap. The former "Chinese-primary" hardcoding was removed in the language-neutralization batch (2026-10-04) — Chinese was merely a development-phase instance fact of this project
|
|
10
|
+
|
|
11
|
+
## Structure
|
|
12
|
+
|
|
13
|
+
Owns the `tags` field conventions:
|
|
14
|
+
|
|
15
|
+
- YAML list; the primary language follows the language page's default key (absent → session language), English proper names keep their original form
|
|
16
|
+
- English tags use lowercase kebab-case, e.g. local-llm
|
|
17
|
+
- Hierarchy allows the `parent/child` form; depth at most 2
|
|
18
|
+
- At most 5 per page, a soft cap
|
|
19
|
+
|
|
20
|
+
## Invariants
|
|
21
|
+
|
|
22
|
+
- `type` is a closed protocol enum, origin, for machines to read; `tags` are open semantic classification, for humans and agents to retrieve; restating type semantics is forbidden
|
|
23
|
+
- The vocabulary grows freely; governance is after-the-fact merging, no up-front control
|
|
24
|
+
|
|
25
|
+
## Changelog
|
|
26
|
+
|
|
27
|
+
- 0.11 2026-10-04: language neutralization — "Chinese-primary" removed; the primary language follows the language page's default key (absent → session language); hierarchy wording changed to "≤2, `/` separated"; the English kebab-case word-shape rule kept (already neutral); same batch as the language v0.2 follow-up cleanup
|
|
28
|
+
- 0.10 2026-09-23: added the wiki dependency edge — inner-side plugins attach to wiki, aligning with the domain 0.1 declaration; omitted from the 2026-09-22 domain-ization batch
|
|
29
|
+
- 0.9 2026-09-13: checks merged with executors unified as mechanically-confirmed items; expert review: two conflicting tellings versus actions.md
|
|
30
|
+
- 0.8 2026-09-13: injection source moved to the manifest — removed Checks, Usage, Inject, Attachments sections, md returned to pure documentation
|
|
31
|
+
- 0.7 2026-09-13: established the "Usage" section — the write-side contract is projected by the command's injection region, a single text source
|
|
32
|
+
- 0.6 2026-09-12: manifest dropped layer — layering abolished: injection order changed to dependency topology plus alphabetical order, direction checks removed
|
|
33
|
+
- 0.5 2026-09-12: identifiers anglicized — section headers, attached-audit contract keys, type enums, pipeline call parameters
|
|
34
|
+
- 0.4 2026-09-11: attached audit gained the hierarchy-depth check, parent/child at most 2, empty-segment warnings
|
|
35
|
+
- 0.3 2026-09-10: manifest gained layer: field — layering established: field layer, zero dependencies
|
|
36
|
+
- 0.2 2026-09-09: mechanical check items landed in the attached-audit script scripts/check.py; this file keeps the semantic items
|
|
37
|
+
- 0.1 2026-09-08: newly established, absorbing the original lint's near-duplicate check idea
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: tag
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.11
|
|
4
|
+
depends:
|
|
5
|
+
- wiki
|
|
6
|
+
updated: 2026-10-06
|
|
7
|
+
attachment:
|
|
8
|
+
- "Cross-cutting plugin: owns the frontmatter tags field across all pages plus vocabulary governance"
|
|
9
|
+
- "scripts/check.py — attached audit (>5 per page / restating type / hierarchy depth)"
|
|
10
|
+
fields:
|
|
11
|
+
tags: "YAML list ≤5; primary language follows the language page's default key (absent → session language); English tags lowercase kebab-case; hierarchy ≤2, `/` separated; restating type forbidden"
|
|
12
|
+
inject: "Page `tags` field: YAML list; primary language follows the default key of the writing-style declaration page `wiki/language.md` (page or key absent → session language); English tags lowercase kebab-case; hierarchy ≤2 (`/` separated), ≤5 per page; open semantic classification, restating type forbidden"
|
|
13
|
+
usage:
|
|
14
|
+
- Before writing, read `wiki/tags.md` and prefer reusing existing terms
|
|
15
|
+
- New-term conventions: primary language follows the language page's default key (absent → session language, preventing mixed Chinese-English fragmentation of the vocabulary); English lowercase kebab-case; hierarchy ≤2; ≤5 per page; restating type forbidden
|
|
16
|
+
checks:
|
|
17
|
+
- Mechanical items (attached-audit script `scripts/check.py`, executed on audit discovery): >5 tags on one page → warning; tags restating type → warning; hierarchy over the limit (parent/child ≤2) or empty segment → warning
|
|
18
|
+
- Semantic items (check command): near-duplicate tags → warning suggesting a merge; merging is a mechanically-confirmed item (list presented, executed after user confirmation)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""tag plugin attached audit: mechanical items (per-page count cap / restating type / hierarchy depth).
|
|
4
|
+
|
|
5
|
+
Near-duplicate tags are a semantic item (cross-language synonyms are not decidable at the string level), under the check command.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def check(ctx):
|
|
10
|
+
issues = []
|
|
11
|
+
for rel, fm, body in ctx.pages:
|
|
12
|
+
tags = fm.get("tags")
|
|
13
|
+
if tags is None:
|
|
14
|
+
continue
|
|
15
|
+
if not isinstance(tags, list):
|
|
16
|
+
tags = [tags]
|
|
17
|
+
if len(tags) > 5:
|
|
18
|
+
issues.append({"level": "warning", "message": f"{rel}: {len(tags)} tags (>5 soft cap)"})
|
|
19
|
+
ptype = fm.get("type")
|
|
20
|
+
if ptype and ptype in tags:
|
|
21
|
+
issues.append({"level": "warning", "message": f"{rel}: tag restates type ({ptype})"})
|
|
22
|
+
for t in tags:
|
|
23
|
+
s = str(t)
|
|
24
|
+
if "/" in s:
|
|
25
|
+
parts = s.split("/")
|
|
26
|
+
if len(parts) > 2 or any(not p.strip() for p in parts):
|
|
27
|
+
issues.append({"level": "warning", "message": f"{rel}: tag hierarchy over limit or empty segment ({s}, parent/child ≤2)"})
|
|
28
|
+
return issues
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# tmp: temporary zone
|
|
2
|
+
|
|
3
|
+
## Design Overview
|
|
4
|
+
|
|
5
|
+
- **Why it exists**: the wiki's /tmp — a legitimate home for drafts and parsing intermediates. All the framework's territories until now were formal: immutable, append-only, sources of truth; intermediate states had nowhere to go. This plugin fills the gap: failure allowed, incompleteness allowed
|
|
6
|
+
- **Key rulings**:
|
|
7
|
+
- Invisible to the derived layer, treated like archive: absent from index and tags, never a link source, broken links exempt — [[a page not yet written]] in a draft is the normal state of 'not yet written down'; closure is required only upon promotion
|
|
8
|
+
- No retention promise, yet no automatic cleanup: cleanable at any time; disposal goes through confirmation — check reports the over-age list; promotion or deletion belongs to the human. Deletion belongs to the human, breaking nothing
|
|
9
|
+
- Delete the draft upon promotion: promote precious drafts promptly, via save into notes or merged into a project decision section; tmp hoards no treasures
|
|
10
|
+
- The path is the territory: everything under `wiki/tmp/**` is tmp
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
- `wiki/tmp/**` — the path is the territory; everything below is tmp; type optional, `type: tmp` landing outside the territory → error
|
|
15
|
+
- Flat layout tolerated, subdirectories free, no reserved-name constraints
|
|
16
|
+
|
|
17
|
+
## Invariants
|
|
18
|
+
|
|
19
|
+
- No retention promise, the /tmp contract: cleanable at any time; promote precious drafts promptly — via save into notes, merged into a project decision section, etc. — deleting the draft upon promotion
|
|
20
|
+
- Cleanup is never automatic: parsing intermediates set `stale_after` as they go, check reports the over-age list, disposal goes through confirmation; drafts without stale_after are not flagged — deletion belongs to the human, breaking nothing
|
|
21
|
+
- The invisibility triple: excluded from concept-page determination, unseen by index and tags; under link never a link source and exempt from graph checks; hot naturally uninvolved, being hand-written
|
|
22
|
+
- Sensitivity reminder: parsing intermediates may contain personal data such as chat transcripts; instances may gitignore `wiki/tmp/`
|
|
23
|
+
|
|
24
|
+
## Changelog
|
|
25
|
+
|
|
26
|
+
- 0.3 (2026-10-06) inject line: code formatting restored on the territory path (issue #12 post-migration nit)- 0.2 (2026-10-06) inject line compressed to pointer density (issue #12 layer discipline) — procedural detail lives in usage / PLUGIN.md / skills- 0.1 2026-09-19: established — path-as-territory, invisible to the derived layer, stale_after cleanup prompts, delete upon promotion
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: tmp
|
|
2
|
+
schema_version: 1
|
|
3
|
+
version: 0.3
|
|
4
|
+
depends:
|
|
5
|
+
- wiki
|
|
6
|
+
updated: 2026-10-06
|
|
7
|
+
attachment:
|
|
8
|
+
- "wiki/tmp/ — temporary zone (the path is the territory; instance data — real contents never enter the framework repo or test-repo)"
|
|
9
|
+
fields: {}
|
|
10
|
+
inject: "Temporary zone `wiki/tmp/` (the path is the territory; type: tmp optional, landing outside → error): drafts and parsing intermediates, no retention promise, cleanable any time; invisible to the derived layer — excluded from index/tags, never a link source, broken links exempt; promote precious drafts promptly (draft deleted on promotion); intermediates set stale_after as they go — check reports over-age, disposal via confirmation (no automatic deletion); sensitive intermediates best gitignored instance-side"
|
|
11
|
+
usage:
|
|
12
|
+
- Drafts / parsing scratch: land directly at `wiki/tmp/<name>.md`, frontmatter kept simple (title + optional stale_after); broken links may stay as written
|
|
13
|
+
- Promotion: content distilled via save into notes or merged into the target territory (a project decision section, etc.); delete the draft after the links close (agent-created drafts deleted by the agent; human drafts upon confirmation)
|
|
14
|
+
- Cleanup: check reports the stale over-age list → delete after confirmation; long-unpromoted drafts go to the user for keep-or-drop adjudication
|
|
15
|
+
checks:
|
|
16
|
+
- Semantic (v0.1 manual, attached audit deferred): type: tmp landing outside wiki/tmp/ → error; stale_after already past → warning (cleanup prompt); tmp page count > 20 → info (backlog triage)
|