import vault

This commit is contained in:
Marcel Arndt
2026-07-16 14:04:45 +02:00
commit a2ad5f5c6d
90 changed files with 31429 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<%*
// actionable: makes a note executable by adding status, impact and effort fields.
const componentName = "actionable";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["action_status"] = frontmatter["action_status"] ?? "open";
frontmatter["action_impact"] = frontmatter["action_impact"] ?? 1;
frontmatter["action_effort_minutes"] = frontmatter["action_effort_minutes"] ?? 30;
frontmatter["action_result"] = frontmatter["action_result"] ?? "";
});
}, 300)
-%>
## Action
- Next step:
- Definition of done:
## Result
+21
View File
@@ -0,0 +1,21 @@
<%*
// billable: marks a note as relevant for billing, invoicing or non-billable review.
const componentName = "billable";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["bill_status"] = frontmatter["bill_status"] ?? "unreviewed";
frontmatter["bill_minutes"] = frontmatter["bill_minutes"] ?? 0;
frontmatter["bill_rate"] = frontmatter["bill_rate"] ?? 0;
frontmatter["bill_amount"] = frontmatter["bill_amount"] ?? 0;
frontmatter["bill_currency"] = frontmatter["bill_currency"] ?? "EUR";
frontmatter["bill_invoice"] = frontmatter["bill_invoice"] ?? "";
frontmatter["bill_note"] = frontmatter["bill_note"] ?? "";
});
}, 300)
-%>
+17
View File
@@ -0,0 +1,17 @@
<%*
// contextual: binds this note to the closest known context, e.g. project, customer or topic.
const componentName = "contextual";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["context_target"] = frontmatter["context_target"] ?? "[[]]";
frontmatter["context_role"] = frontmatter["context_role"] ?? "project";
frontmatter["context_relation"] = frontmatter["context_relation"] ?? "belongs_to";
});
}, 300)
-%>
+29
View File
@@ -0,0 +1,29 @@
<%*
// event: makes this note a timeline event such as a meeting, decision, incident or worklog.
const componentName = "event";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["event_kind"] = frontmatter["event_kind"] ?? "note";
frontmatter["event_status"] = frontmatter["event_status"] ?? "occurred";
frontmatter["event_location"] = frontmatter["event_location"] ?? "";
frontmatter["event_participants"] = frontmatter["event_participants"] ?? [];
frontmatter["event_outcome"] = frontmatter["event_outcome"] ?? "";
});
}, 300)
-%>
## Event
### Participants
### Notes
### Outcome
+18
View File
@@ -0,0 +1,18 @@
<%*
// iterbind: binds this note to an iteration note that carries the iterdef component.
const componentName = "iterbind";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["iterbind_target"] = frontmatter["iterbind_target"] ?? "[[]]";
frontmatter["iterbind_status"] = frontmatter["iterbind_status"] ?? "planned";
frontmatter["iterbind_role"] = frontmatter["iterbind_role"] ?? "primary";
frontmatter["iterbind_order"] = frontmatter["iterbind_order"] ?? 0;
});
}, 300)
-%>
+63
View File
@@ -0,0 +1,63 @@
<%*
// iterdef: defines a planning iteration with sequence id, status, start/end and optional goal.
const componentName = "iterdef";
const newId = tp.user.auto_increment("iterdef_id");
const today = tp.date.now("YYYY-MM-DD");
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["iterdef_id"] = frontmatter["iterdef_id"] ?? newId;
frontmatter["iterdef_status"] = frontmatter["iterdef_status"] ?? "planned";
frontmatter["iterdef_start"] = frontmatter["iterdef_start"] ?? today;
frontmatter["iterdef_end"] = frontmatter["iterdef_end"] ?? today;
frontmatter["iterdef_goal"] = frontmatter["iterdef_goal"] ?? "";
frontmatter["iterdef_capacity_minutes"] = frontmatter["iterdef_capacity_minutes"] ?? 0;
frontmatter["cssclasses"] = frontmatter["cssclasses"] ?? "wide-page";
});
}, 300)
-%>
## Goal
## Workspace
```base
filters:
and:
- file.hasLink(this.file.path)
formulas:
Aufwand (ET: action_effort_minutes / 60 / 8
properties:
formula.Aufwand (ET:
displayName: Aufwand (ET)
views:
- type: table
name: Table
order:
- file.name
- action_status
- formula.Aufwand (ET
- action_impact
- action_effort_minutes
sort:
- property: action_status
direction: ASC
```
## Bound Work
```dataview
TABLE
action_status as "Action",
work_status as "Work",
round(action_effort_minutes / 60 / 8, 1) as "Aufwand (ET)",
action_impact as "Impact"
FROM ""
WHERE iterbind_target = this.file.link
SORT action_impact DESC, action_effort_minutes ASC
```
+18
View File
@@ -0,0 +1,18 @@
<%*
// reviewable: marks this note for review, follow-up or data hygiene.
const componentName = "reviewable";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["review_status"] = frontmatter["review_status"] ?? "needs_review";
frontmatter["review_reason"] = frontmatter["review_reason"] ?? "initial review required";
frontmatter["review_next"] = frontmatter["review_next"] ?? "";
frontmatter["review_by"] = frontmatter["review_by"] ?? "";
});
}, 300)
-%>
+17
View File
@@ -0,0 +1,17 @@
<%*
// source: records where this note or information came from.
const componentName = "source";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["source_target"] = frontmatter["source_target"] ?? "[[]]";
frontmatter["source_relation"] = frontmatter["source_relation"] ?? "derived_from";
frontmatter["source_excerpt"] = frontmatter["source_excerpt"] ?? "";
});
}, 300)
-%>
+11
View File
@@ -0,0 +1,11 @@
<%*
// base: keeps the note system-ready. File timestamps are managed by Obsidian/plugin metadata.
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
frontmatter["components"] = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
frontmatter["base_archived"] = frontmatter["base_archived"] ?? false;
});
}, 300)
-%>
+19
View File
@@ -0,0 +1,19 @@
<%*
// temporal: gives this note a date, deadline, reminder or time range.
const componentName = "temporal";
const today = tp.date.now("YYYY-MM-DD");
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["time_at"] = frontmatter["time_at"] ?? today;
frontmatter["time_timezone"] = frontmatter["time_timezone"] ?? "Europe/Berlin";
frontmatter["time_recurrence"] = frontmatter["time_recurrence"] ?? "";
frontmatter["time_precision"] = frontmatter["time_precision"] ?? "date";
});
}, 300)
-%>
+31
View File
@@ -0,0 +1,31 @@
<%*
// work: describes a feature, bug, change, refactor, support item or other work artifact.
const componentName = "work";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["work_kind"] = frontmatter["work_kind"] ?? "feature";
frontmatter["work_status"] = frontmatter["work_status"] ?? "backlog";
frontmatter["work_value"] = frontmatter["work_value"] ?? 3;
frontmatter["work_risk"] = frontmatter["work_risk"] ?? 3;
frontmatter["work_size"] = frontmatter["work_size"] ?? 1;
frontmatter["work_acceptance"] = frontmatter["work_acceptance"] ?? "";
});
}, 300)
-%>
## Work
### Problem
### Acceptance
- [ ]
### Notes
View File
+19
View File
@@ -0,0 +1,19 @@
<%*
// actionable removal: removes action fields and the actionable component marker.
const componentName = "actionable";
const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => {
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
frontmatter["components"] = components.filter((component) => component !== componentName);
delete frontmatter["action_status"];
delete frontmatter["action_impact"];
delete frontmatter["action_effort_minutes"];
delete frontmatter["action_blocked_by"];
delete frontmatter["action_waiting_for"];
delete frontmatter["action_result"];
});
}, 300)
-%>
+12
View File
@@ -0,0 +1,12 @@
module.exports = function(prop_name) {
let max = -1;
for (const f of app.vault.getMarkdownFiles()) {
const fm = app.metadataCache.getFileCache(f)?.frontmatter;
if(typeof fm?.[prop_name] === "number") {
max = Math.max(max, fm[prop_name])
}
}
return max + 1
}