agent-concepts 0.0.0-stage → 0.4.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.
Files changed (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +771 -2
  3. package/concepts/bc-brainstorming/body/SKILL.md +43 -0
  4. package/concepts/bc-code-review/body/SKILL.md +120 -0
  5. package/concepts/bc-codebase-design/body/SKILL.md +54 -0
  6. package/concepts/bc-codebase-docs/body/SKILL.md +150 -0
  7. package/concepts/bc-council-audit-security/body/SKILL.md +72 -0
  8. package/concepts/bc-council-chain/body/SKILL.md +71 -0
  9. package/concepts/bc-council-challenge-plan/body/SKILL.md +78 -0
  10. package/concepts/bc-council-find-bugs/body/SKILL.md +70 -0
  11. package/concepts/bc-council-improve-architecture/body/SKILL.md +52 -0
  12. package/concepts/bc-council-mode/body/SKILL.md +56 -0
  13. package/concepts/bc-council-mode/body/examples/agents/README.md +11 -0
  14. package/concepts/bc-council-mode/body/examples/agents/council-change.md +14 -0
  15. package/concepts/bc-council-mode/body/examples/agents/council-compat.md +14 -0
  16. package/concepts/bc-council-mode/body/examples/agents/council-risk.md +14 -0
  17. package/concepts/bc-council-mode/body/references/pass-contracts.md +133 -0
  18. package/concepts/bc-delegate-investigation/body/SKILL.md +119 -0
  19. package/concepts/bc-delegate-investigation/body/examples/pi-settings-snippet.json +8 -0
  20. package/concepts/bc-delegate-investigation/body/pi.md +168 -0
  21. package/concepts/bc-design/body/SKILL.md +49 -0
  22. package/concepts/bc-design/body/design-framework.md +39 -0
  23. package/concepts/bc-design/body/existing-app.md +9 -0
  24. package/concepts/bc-design/body/new-work.md +22 -0
  25. package/concepts/bc-design/body/principles.md +34 -0
  26. package/concepts/bc-design/body/surfaces.md +13 -0
  27. package/concepts/bc-diagnosing-bugs/body/SKILL.md +83 -0
  28. package/concepts/bc-dispatching-parallel-agents/body/SKILL.md +63 -0
  29. package/concepts/bc-domain-modeling/body/SKILL.md +40 -0
  30. package/concepts/bc-executing-plans/body/SKILL.md +50 -0
  31. package/concepts/bc-explain-visually/body/SKILL.md +167 -0
  32. package/concepts/bc-find-bugs/body/SKILL.md +90 -0
  33. package/concepts/bc-finishing-development-branch/body/SKILL.md +73 -0
  34. package/concepts/bc-grilling/body/SKILL.md +22 -0
  35. package/concepts/bc-handoff/body/SKILL.md +104 -0
  36. package/concepts/bc-handoff/body/pickup.md +107 -0
  37. package/concepts/bc-handoff/body/writing.md +217 -0
  38. package/concepts/bc-improve-codebase-architecture/body/SKILL.md +101 -0
  39. package/concepts/bc-json-canvas/body/SKILL.md +40 -0
  40. package/concepts/bc-json-canvas/body/references/EXAMPLES.md +71 -0
  41. package/concepts/bc-json-canvas/body/references/SPEC.md +55 -0
  42. package/concepts/bc-json-canvas/body/references/VALIDATION.md +26 -0
  43. package/concepts/bc-minimal-solution-ladder/body/SKILL.md +120 -0
  44. package/concepts/bc-obsidian-bases/body/SKILL.md +59 -0
  45. package/concepts/bc-obsidian-bases/body/references/EXAMPLES.md +80 -0
  46. package/concepts/bc-obsidian-bases/body/references/FUNCTIONS.md +49 -0
  47. package/concepts/bc-obsidian-bases/body/references/SYNTAX.md +82 -0
  48. package/concepts/bc-obsidian-bases/body/references/TROUBLESHOOTING.md +41 -0
  49. package/concepts/bc-obsidian-markdown/body/SKILL.md +47 -0
  50. package/concepts/bc-obsidian-markdown/body/references/CALLOUTS.md +40 -0
  51. package/concepts/bc-obsidian-markdown/body/references/EMBEDS.md +35 -0
  52. package/concepts/bc-obsidian-markdown/body/references/PROPERTIES.md +37 -0
  53. package/concepts/bc-optimize-code/body/SKILL.md +41 -0
  54. package/concepts/bc-performance-guardrails/body/SKILL.md +53 -0
  55. package/concepts/bc-performance-guardrails/body/measuring.md +29 -0
  56. package/concepts/bc-performance-guardrails/body/targets.md +20 -0
  57. package/concepts/bc-pipeline-to-done/body/SKILL.md +205 -0
  58. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-auditor.md +19 -0
  59. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-reviewer.md +19 -0
  60. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-worker.md +19 -0
  61. package/concepts/bc-pipeline-to-done/body/execute-issue.md +71 -0
  62. package/concepts/bc-pipeline-to-done/body/recovery-bundle.md +79 -0
  63. package/concepts/bc-pipeline-to-done/body/review-contract.md +105 -0
  64. package/concepts/bc-pipeline-to-done/body/roles.md +13 -0
  65. package/concepts/bc-pipeline-to-done/body/scripts/publish-check.py +172 -0
  66. package/concepts/bc-pipeline-to-done/body/source-issues.md +86 -0
  67. package/concepts/bc-pipeline-to-done/body/source-work-items.md +76 -0
  68. package/concepts/bc-plain-language/body/SKILL.md +134 -0
  69. package/concepts/bc-plan-slicing/body/SKILL.md +56 -0
  70. package/concepts/bc-plan-to-pipeline/body/SKILL.md +89 -0
  71. package/concepts/bc-prd-drafting/body/SKILL.md +43 -0
  72. package/concepts/bc-prompting-agents/body/SKILL.md +278 -0
  73. package/concepts/bc-prototype/body/SKILL.md +40 -0
  74. package/concepts/bc-qmd/body/SKILL.md +64 -0
  75. package/concepts/bc-research/body/SKILL.md +26 -0
  76. package/concepts/bc-security-audit/body/AI-AND-LLM.md +25 -0
  77. package/concepts/bc-security-audit/body/ATTACK-CLASSES.md +35 -0
  78. package/concepts/bc-security-audit/body/DESKTOP-MOBILE-AND-LOCAL-IPC.md +28 -0
  79. package/concepts/bc-security-audit/body/RECONNAISSANCE.md +49 -0
  80. package/concepts/bc-security-audit/body/SKILL.md +117 -0
  81. package/concepts/bc-security-audit/body/SUPPLY-CHAIN-AND-RELEASE.md +28 -0
  82. package/concepts/bc-security-audit/body/VALIDATION-AND-REPORTING.md +124 -0
  83. package/concepts/bc-security-audit/body/WEB-PROTOCOL-AND-AUTH.md +27 -0
  84. package/concepts/bc-security-audit/body/validate_audit.py +151 -0
  85. package/concepts/bc-self-improve/body/SKILL.md +104 -0
  86. package/concepts/bc-seo/body/CITATIONS.md +23 -0
  87. package/concepts/bc-seo/body/IMAGE-SEO.md +350 -0
  88. package/concepts/bc-seo/body/SKILL.md +453 -0
  89. package/concepts/bc-setup-project/body/SKILL.md +252 -0
  90. package/concepts/bc-setup-project/body/scaffold.py +2751 -0
  91. package/concepts/bc-setup-project/body/starter-items.md +157 -0
  92. package/concepts/bc-setup-project/body/work-data.md +114 -0
  93. package/concepts/bc-setup-project/body/work_index.py +626 -0
  94. package/concepts/bc-setup-project/body/work_spent.py +220 -0
  95. package/concepts/bc-subagent-driven-development/body/SKILL.md +61 -0
  96. package/concepts/bc-tdd/body/SKILL.md +184 -0
  97. package/concepts/bc-tdd/body/formal.md +77 -0
  98. package/concepts/bc-tdd/body/mocking.md +49 -0
  99. package/concepts/bc-tdd/body/properties.md +59 -0
  100. package/concepts/bc-tdd/body/refactoring.md +12 -0
  101. package/concepts/bc-tdd/body/scripts/confirm-red.py +136 -0
  102. package/concepts/bc-tdd/body/tests.md +59 -0
  103. package/concepts/bc-teach/body/GLOSSARY-FORMAT.md +36 -0
  104. package/concepts/bc-teach/body/LEARNING-RECORD-FORMAT.md +60 -0
  105. package/concepts/bc-teach/body/MISSION-FORMAT.md +34 -0
  106. package/concepts/bc-teach/body/RESOURCES-FORMAT.md +53 -0
  107. package/concepts/bc-teach/body/REVIEW-FORMAT.md +48 -0
  108. package/concepts/bc-teach/body/SKILL.md +281 -0
  109. package/concepts/bc-teach/body/WIKI-FORMAT.md +58 -0
  110. package/concepts/bc-teach/body/scripts/due.py +65 -0
  111. package/concepts/bc-to-spec/body/SKILL.md +21 -0
  112. package/concepts/bc-to-tickets/body/SKILL.md +21 -0
  113. package/concepts/bc-triage/body/AGENT-BRIEF.md +38 -0
  114. package/concepts/bc-triage/body/OUT-OF-SCOPE.md +51 -0
  115. package/concepts/bc-triage/body/SKILL.md +81 -0
  116. package/concepts/bc-unslop/body/SKILL.md +269 -0
  117. package/concepts/bc-using-git-worktrees/body/SKILL.md +91 -0
  118. package/concepts/bc-wiki-maintain/body/SKILL.md +361 -0
  119. package/concepts/bc-wiki-maintain/body/runner/README.md +552 -0
  120. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.service +24 -0
  121. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.timer +15 -0
  122. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.service +29 -0
  123. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.timer +16 -0
  124. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.service +28 -0
  125. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.timer +12 -0
  126. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-notify@.service +15 -0
  127. package/concepts/bc-wiki-maintain/body/runner/notify-failure.sh +92 -0
  128. package/concepts/bc-wiki-maintain/body/runner/run-lint.sh +69 -0
  129. package/concepts/bc-wiki-maintain/body/runner/run-promotion-all.sh +103 -0
  130. package/concepts/bc-wiki-maintain/body/runner/run-promotion.sh +270 -0
  131. package/concepts/bc-wiki-maintain/body/wiki_lint.py +958 -0
  132. package/concepts/bc-wiki-maintain/body/wiki_search.py +206 -0
  133. package/concepts/bc-work-sync/body/PLAN.md +46 -0
  134. package/concepts/bc-work-sync/body/SKILL.md +71 -0
  135. package/concepts/bc-writing-plans/body/SKILL.md +79 -0
  136. package/package.json +130 -4
  137. package/packages/agent-kernel-pi/AGENT-KERNEL.md +109 -0
  138. package/packages/agent-kernel-pi/index.js +8 -0
  139. package/packages/agent-kernel-pi/package.json +12 -0
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: bc-obsidian-bases
3
+ description: Author and validate Obsidian Bases .base files with YAML filters, formulas, views, properties, and summaries. Use when a task involves Bases or database-like views over notes.
4
+ ---
5
+
6
+ # Obsidian Bases
7
+
8
+ A `.base` file is YAML describing one or more views over note properties and file metadata. This skill covers the format and validation; it is not a permission to mutate a vault.
9
+
10
+ ## Authority boundary
11
+
12
+ For an existing vault, use the available safe Obsidian/vault authority for retrieval, validation, and any targeted write. A write requires explicit user intent and an explicit safe target. Do not use generic Obsidian CLI commands, JavaScript evaluation, shell redirection, or direct filesystem writes to bypass approval and path-safety rails. Do not overwrite an existing Base or create a broad batch operation by inference.
13
+
14
+ ## Workflow
15
+
16
+ 1. Identify the exact `.base` target and inspect its current schema and the properties it references. Preserve project naming and view conventions.
17
+ 2. Draft valid YAML with only the sections needed: `filters`, `formulas`, `properties`, `summaries`, and `views`.
18
+ 3. Use a filter string or a recursive filter object with exactly one logical key (`and`, `or`, or `not`) at each object level. Quote expressions containing YAML-special characters or nested quotes.
19
+ 4. Reference note properties directly, file metadata as `file.*`, and formulas as `formula.*`. Guard formulas against missing properties.
20
+ 5. Validate YAML, formula references, view types, property names, and summary compatibility. If Obsidian is available, open the Base and check that every view renders.
21
+ 6. Load the focused references as needed: [schema and filters](references/SYNTAX.md), [functions and formulas](references/FUNCTIONS.md), [examples](references/EXAMPLES.md), and [troubleshooting](references/TROUBLESHOOTING.md).
22
+
23
+ ## Minimal shape
24
+
25
+ ```yaml
26
+ filters:
27
+ and:
28
+ - 'status == "active"'
29
+ - 'file.hasTag("project")'
30
+
31
+ formulas:
32
+ days_until_due: 'if(due, (date(due) - today()).days, "")'
33
+
34
+ properties:
35
+ status:
36
+ displayName: Status
37
+ formula.days_until_due:
38
+ displayName: Days until due
39
+
40
+ views:
41
+ - type: table
42
+ name: Active work
43
+ order:
44
+ - file.name
45
+ - status
46
+ - formula.days_until_due
47
+ ```
48
+
49
+ The supported view types in the upstream format guidance are `table`, `cards`, `list`, and `map`. A map view needs the relevant location properties and the map support expected by that vault.
50
+
51
+ ## References
52
+
53
+ - [Obsidian Bases syntax](https://help.obsidian.md/bases/syntax)
54
+ - [Obsidian Bases views](https://help.obsidian.md/bases/views)
55
+ - [Obsidian formulas](https://help.obsidian.md/formulas)
56
+ - [Schema and filters](references/SYNTAX.md)
57
+ - [Functions and formulas](references/FUNCTIONS.md)
58
+ - [Examples](references/EXAMPLES.md)
59
+ - [Troubleshooting](references/TROUBLESHOOTING.md)
@@ -0,0 +1,80 @@
1
+ # Bases examples
2
+
3
+ These examples are starting points. Replace property names with the vault's actual schema and validate every expression before writing a Base.
4
+
5
+ ## Active task table
6
+
7
+ ```yaml
8
+ filters:
9
+ and:
10
+ - 'file.hasTag("task")'
11
+ - 'file.ext == "md"'
12
+
13
+ formulas:
14
+ days_until_due: 'if(due, (date(due) - today()).days, "")'
15
+ overdue: 'if(due, date(due) < today() && status != "done", false)'
16
+
17
+ properties:
18
+ status:
19
+ displayName: Status
20
+ formula.days_until_due:
21
+ displayName: Days until due
22
+ formula.overdue:
23
+ displayName: Overdue
24
+
25
+ views:
26
+ - type: table
27
+ name: Active tasks
28
+ filters:
29
+ and:
30
+ - 'status != "done"'
31
+ order:
32
+ - file.name
33
+ - status
34
+ - due
35
+ - formula.days_until_due
36
+ - formula.overdue
37
+ groupBy:
38
+ property: status
39
+ direction: ASC
40
+ ```
41
+
42
+ ## Reading list cards and table
43
+
44
+ ```yaml
45
+ filters:
46
+ or:
47
+ - 'file.hasTag("book")'
48
+ - 'file.hasTag("article")'
49
+
50
+ formulas:
51
+ status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
52
+ year_read: 'if(finished_date, date(finished_date).year, "")'
53
+
54
+ views:
55
+ - type: cards
56
+ name: Library
57
+ order:
58
+ - file.name
59
+ - author
60
+ - formula.status_icon
61
+ - type: table
62
+ name: To read
63
+ filters:
64
+ and:
65
+ - 'status == "to-read"'
66
+ order:
67
+ - file.name
68
+ - author
69
+ - pages
70
+ - formula.year_read
71
+ ```
72
+
73
+ ## Embedding a Base
74
+
75
+ A Base can be embedded in a Markdown note, including a named view when supported:
76
+
77
+ ```markdown
78
+ ![[Tasks.base]]
79
+ ![[Tasks.base#Active tasks]]
80
+ ```
@@ -0,0 +1,49 @@
1
+ # Bases functions and formulas reference
2
+
3
+ Define reusable formulas under `formulas`, then reference them as `formula.name` in view order or display properties.
4
+
5
+ ```yaml
6
+ formulas:
7
+ total: 'price * quantity'
8
+ status_icon: 'if(done, "✅", "⏳")'
9
+ created: 'file.ctime.format("YYYY-MM-DD")'
10
+ days_old: '(now() - file.ctime).days'
11
+ days_until_due: 'if(due, (date(due) - today()).days, "")'
12
+ ```
13
+
14
+ ## Common functions
15
+
16
+ | Function | Purpose |
17
+ |---|---|
18
+ | `date(string)` | Parse a date value. |
19
+ | `now()` | Current date and time. |
20
+ | `today()` | Current date at midnight. |
21
+ | `if(condition, yes, no?)` | Conditional result. |
22
+ | `duration(string)` | Parse a duration. |
23
+ | `file(path)` | Resolve a file value. |
24
+ | `link(path, display?)` | Build a link value. |
25
+
26
+ For exhaustive function signatures, consult the [official formulas documentation](https://help.obsidian.md/formulas) and the pinned upstream reference at [kepano/obsidian-skills](https://github.com/kepano/obsidian-skills/blob/a1dc48e68138490d522c04cbf5822214c6eb1202/skills/bc-obsidian-bases/references/FUNCTIONS_REFERENCE.md); use official Obsidian documentation as the authority when syntax changes.
27
+
28
+ ## Dates and durations
29
+
30
+ Subtracting dates returns a Duration, not a number. Access a field before applying numeric functions:
31
+
32
+ ```yaml
33
+ formulas:
34
+ age_days: '(now() - file.ctime).days'
35
+ rounded_age: '(now() - file.ctime).days.round(0)'
36
+ due_days: 'if(due, (date(due) - today()).days, "")'
37
+ ```
38
+
39
+ Do not round or divide a Duration directly. Guard optional properties before parsing or subtracting them; a Base usually spans notes with incomplete frontmatter.
40
+
41
+ Date arithmetic accepts duration strings such as `"1 day"`, `"7d"`, or `"2 weeks"`:
42
+
43
+ ```yaml
44
+ formulas:
45
+ tomorrow: 'today() + "1 day"'
46
+ next_week: 'today() + "7d"'
47
+ ```
48
+
49
+ Use single-quoted YAML strings when the expression contains double-quoted string literals. If a formula includes YAML-special characters, quote the complete expression and validate the parsed YAML before relying on it.
@@ -0,0 +1,82 @@
1
+ # Bases syntax reference
2
+
3
+ A `.base` file is YAML. The top-level sections are optional, but each must use the expected shape.
4
+
5
+ ```yaml
6
+ filters: <filter string or recursive filter object>
7
+ formulas:
8
+ formula_name: <expression>
9
+ properties:
10
+ property_name:
11
+ displayName: Display name
12
+ summaries:
13
+ summary_name: <expression>
14
+ views:
15
+ - type: table
16
+ name: View name
17
+ order:
18
+ - file.name
19
+ - status
20
+ ```
21
+
22
+ ## Filters
23
+
24
+ A filter can be one expression:
25
+
26
+ ```yaml
27
+ filters: 'status == "active"'
28
+ ```
29
+
30
+ Or a recursive object with exactly one logical key at each level:
31
+
32
+ ```yaml
33
+ filters:
34
+ and:
35
+ - 'status == "active"'
36
+ - or:
37
+ - 'file.hasTag("project")'
38
+ - 'file.inFolder("Projects")'
39
+ - not:
40
+ - 'file.hasTag("archived")'
41
+ ```
42
+
43
+ Operators include `==`, `!=`, `>`, `<`, `>=`, `<=`, `&&`, `||`, and `!`. Quote filter expressions whenever YAML punctuation, `:`, `#`, brackets, or nested quotes could change parsing.
44
+
45
+ ## Property namespaces
46
+
47
+ - **Note properties:** frontmatter values such as `status` or `note.author`.
48
+ - **File properties:** metadata such as `file.name`, `file.path`, `file.folder`, `file.ext`, `file.size`, `file.ctime`, `file.mtime`, `file.tags`, `file.links`, `file.backlinks`, `file.embeds`, and `file.properties`.
49
+ - **Formula properties:** computed values referenced as `formula.name` after defining `name` under `formulas`.
50
+
51
+ The `this` value refers to the Base in its main content area, the embedding file when the Base is embedded, or the active file in a sidebar.
52
+
53
+ ## Views
54
+
55
+ Each view may include `type`, `name`, `limit`, `filters`, `groupBy`, `order`, and `summaries` as appropriate.
56
+
57
+ ```yaml
58
+ views:
59
+ - type: table
60
+ name: Active
61
+ limit: 20
62
+ groupBy:
63
+ property: status
64
+ direction: ASC
65
+ order:
66
+ - file.name
67
+ - status
68
+ - formula.days_until_due
69
+ summaries:
70
+ estimate: Sum
71
+ ```
72
+
73
+ The format guidance names these view types:
74
+
75
+ - `table` — properties in ordered columns.
76
+ - `cards` — card-style property display.
77
+ - `list` — compact ordered entries.
78
+ - `map` — location-oriented display; verify the vault's map support and coordinate properties.
79
+
80
+ ## Display names and summaries
81
+
82
+ Use `properties` to customize display names, including `formula.name` and file properties. Built-in summary names include `Average`, `Min`, `Max`, `Sum`, `Range`, `Median`, `Stddev`, `Earliest`, `Latest`, `Checked`, `Unchecked`, `Empty`, `Filled`, and `Unique`; select a summary compatible with the property's type.
@@ -0,0 +1,41 @@
1
+ # Bases troubleshooting and validation
2
+
3
+ Before treating a Base as complete, check:
4
+
5
+ - YAML parses as one document with the intended top-level keys.
6
+ - Every recursive filter object has exactly one of `and`, `or`, or `not`.
7
+ - Every `formula.name` reference has a matching `formulas.name` definition.
8
+ - Every ordered property exists or is a valid `file.*`, note property, or formula property.
9
+ - Optional properties are guarded before date parsing, arithmetic, or string methods.
10
+ - Formulas use valid YAML quoting; nested double quotes usually need an outer single-quoted string.
11
+ - View `type`, `groupBy`, `limit`, `order`, and `summaries` values match the current official syntax.
12
+ - The file remains a `.base` file and is not silently converted to Markdown.
13
+
14
+ ## Frequent errors
15
+
16
+ ### YAML punctuation
17
+
18
+ Unquoted `:`, `{}`, `[]`, `#`, `?`, `|`, `>`, `=`, or nested quotes can change YAML parsing. Quote the complete expression:
19
+
20
+ ```yaml
21
+ # Safe
22
+ label: 'if(done, "Yes", "No")'
23
+ ```
24
+
25
+ ### Undefined formulas
26
+
27
+ A display property or view order such as `formula.total` is invalid unless `formulas.total` exists. Define it first or remove the reference.
28
+
29
+ ### Duration arithmetic
30
+
31
+ `now() - file.ctime` produces a Duration. Use `.days`, `.hours`, or another duration field before calling number methods.
32
+
33
+ ### Missing values
34
+
35
+ Not every note has every property. Guard expressions with `if(property, ..., ...)` instead of assuming a value exists across the entire view.
36
+
37
+ ### Rendering mismatch
38
+
39
+ A YAML parser can accept a file that Obsidian still rejects semantically. If possible, open the exact Base in Obsidian and inspect each view; report version/plugin limitations rather than silently changing the schema.
40
+
41
+ For current syntax, defer to the official [Bases syntax](https://help.obsidian.md/bases/syntax), [views](https://help.obsidian.md/bases/views), and [formulas](https://help.obsidian.md/formulas) documentation.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: bc-obsidian-markdown
3
+ description: Author and review Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, tags, comments, and other Obsidian-specific syntax. Use when working with Obsidian Markdown or when a note needs Obsidian-aware formatting.
4
+ ---
5
+
6
+ # Obsidian Flavored Markdown
7
+
8
+ Use this skill for the Obsidian-specific layer on top of CommonMark and GFM. Standard Markdown remains the default for ordinary headings, lists, tables, quotes, emphasis, and code.
9
+
10
+ ## Authority boundary
11
+
12
+ This is format guidance, not permission to mutate a vault. When an agent-safe Obsidian or vault tool is available, use it for retrieval, validation, creation, editing, moving, or deletion. Never bypass that tool's approval, target, or path-safety rails with shell commands or direct filesystem writes. Do not infer a vault path, bulk-edit notes, overwrite a full note, or impose a note methodology without explicit user/project instruction.
13
+
14
+ ## Workflow
15
+
16
+ 1. Inspect the existing note or the user's explicit target and preserve the vault's established naming, linking, and frontmatter conventions.
17
+ 2. Draft ordinary Markdown first, then add only the Obsidian extensions the note needs.
18
+ 3. Use wikilinks for notes inside the vault and normal Markdown links for external URLs. Use embeds only when the referenced file, heading, or block is known.
19
+ 4. Treat frontmatter, `tags`, `aliases`, and `cssclasses` as optional. Add them only when the user or project requires them; never make a generic template mandatory.
20
+ 5. Load the focused reference when needed: [properties](references/PROPERTIES.md), [callouts](references/CALLOUTS.md), or [embeds](references/EMBEDS.md).
21
+ 6. Validate syntax and links with the available safe validator, then check the rendered result in Obsidian when a rendering check is available.
22
+
23
+ ## Core syntax
24
+
25
+ ```markdown
26
+ [[Note Name|Display Text]]
27
+ [[Note Name#Heading]]
28
+ [[Note Name#^block-id]]
29
+
30
+ ![[Note Name#Heading]]
31
+ ![[image.png|300]]
32
+
33
+ > [!note] Optional title
34
+ > Callout content.
35
+
36
+ ==highlighted text==
37
+ ```
38
+
39
+ A block ID is written as `^id` after a paragraph, list, or quote. Obsidian also supports inline and fenced comments, LaTeX math, Mermaid diagrams, footnotes, and inline tags; use the references and official documentation for their exact forms.
40
+
41
+ ## References
42
+
43
+ - [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown)
44
+ - [Internal links](https://help.obsidian.md/links)
45
+ - [Embeds](https://help.obsidian.md/embeds)
46
+ - [Callouts](https://help.obsidian.md/callouts)
47
+ - [Properties](https://help.obsidian.md/properties)
@@ -0,0 +1,40 @@
1
+ # Callouts reference
2
+
3
+ Obsidian callouts are blockquotes whose first line begins with `[!type]`. The marker may include a title; `-` or `+` immediately after the type makes the callout collapsed or expanded by default.
4
+
5
+ ```markdown
6
+ > [!note]
7
+ > A basic callout.
8
+
9
+ > [!warning] Custom title
10
+ > A warning with a visible title.
11
+
12
+ > [!faq]- Collapsed question
13
+ > Details hidden until expanded.
14
+
15
+ > [!question] Outer callout
16
+ > > [!note] Nested callout
17
+ > > Nested content.
18
+ ```
19
+
20
+ ## Common types
21
+
22
+ | Type | Aliases |
23
+ |---|---|
24
+ | `note` | — |
25
+ | `abstract` | `summary`, `tldr` |
26
+ | `info` | — |
27
+ | `todo` | — |
28
+ | `tip` | `hint`, `important` |
29
+ | `success` | `check`, `done` |
30
+ | `question` | `help`, `faq` |
31
+ | `warning` | `caution`, `attention` |
32
+ | `failure` | `fail`, `missing` |
33
+ | `danger` | `error` |
34
+ | `bug` | — |
35
+ | `example` | — |
36
+ | `quote` | `cite` |
37
+
38
+ Custom callout types need CSS in the vault. Do not assume a community plugin or custom CSS exists; a plain supported type is safer when portability matters.
39
+
40
+ See the official [callouts documentation](https://help.obsidian.md/callouts) for nesting and rendering details.
@@ -0,0 +1,35 @@
1
+ # Embeds reference
2
+
3
+ Prefix an internal wikilink with `!` to embed a note, section, block, or supported file.
4
+
5
+ ```markdown
6
+ ![[Note Name]]
7
+ ![[Note Name#Heading]]
8
+ ![[Note Name#^block-id]]
9
+ ![[image.png]]
10
+ ![[image.png|300]]
11
+ ![[image.png|640x480]]
12
+ ![[document.pdf#page=3]]
13
+ ![[audio.mp3]]
14
+ ```
15
+
16
+ A block ID can follow a paragraph or list:
17
+
18
+ ```markdown
19
+ - First item
20
+ - Second item
21
+
22
+ ^list-id
23
+ ```
24
+
25
+ Then embed it with `![[Note Name#^list-id]]`. Bases may be embedded as `![[Tasks.base]]` or, when supported by the file, `![[Tasks.base#View Name]]`.
26
+
27
+ Use normal Markdown image syntax for external images:
28
+
29
+ ```markdown
30
+ ![Alt text](https://example.com/image.png)
31
+ ```
32
+
33
+ Do not invent a target path. Confirm that the referenced note or file exists through the available safe vault retrieval tool, and preserve the vault's choice of wikilinks versus Markdown links.
34
+
35
+ See the official [embeds documentation](https://help.obsidian.md/embeds).
@@ -0,0 +1,37 @@
1
+ # Properties reference
2
+
3
+ Properties are YAML frontmatter at the beginning of a note. They are optional: use the vault's existing schema when one exists, and do not add a generic schema merely because a note can have one.
4
+
5
+ ```yaml
6
+ ---
7
+ title: Project Alpha
8
+ date: 2026-08-17
9
+ tags:
10
+ - project
11
+ - active
12
+ aliases:
13
+ - Alpha
14
+ status: in-progress
15
+ rating: 4.5
16
+ completed: false
17
+ due: 2026-08-31T14:30:00
18
+ ---
19
+ ```
20
+
21
+ Common value shapes include:
22
+
23
+ | Shape | Example |
24
+ |---|---|
25
+ | Text | `title: Project Alpha` |
26
+ | Number | `rating: 4.5` |
27
+ | Checkbox | `completed: false` |
28
+ | Date | `date: 2026-08-17` |
29
+ | Date/time | `due: 2026-08-31T14:30:00` |
30
+ | List | `tags: [project, active]` or a YAML list |
31
+ | Internal link | `related: "[[Other Note]]"` |
32
+
33
+ Inline tags use forms such as `#project` and `#nested/topic`. In frontmatter, tags are normally a list of tag strings. Tags may contain letters, numbers (not as the first character), underscores, hyphens, and `/` for nesting.
34
+
35
+ `tags`, `aliases`, and `cssclasses` are common Obsidian properties, not a universal project contract. Preserve existing key names, value types, date conventions, and ordering when editing a note.
36
+
37
+ See the official [properties documentation](https://help.obsidian.md/properties).
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: bc-optimize-code
3
+ description: Improve code against an objective metric without regressing behavior — bounded, measured iterations that are kept only when correctness still holds AND the metric provably improved. Use when a task targets a measurable improvement (speed, size, memory, cost) or asks you to optimize.
4
+ ---
5
+
6
+ # AutoResearch — bounded, gated improvement
7
+
8
+ Improve code along a measurable axis (speed, output size, memory, allocations, API calls, cost — anything objective) **without regressing behavior**, by making it impossible to keep a change that isn't proven better. This is a discipline, not a tool: it works in any repo, on its own terms.
9
+
10
+ **The core idea:** the *check* owns truth; you propose *bounded* changes; a change survives only if it proves **both** that correctness still holds **and** that the chosen metric improved enough to justify it. Anything else gets reverted.
11
+
12
+ Use targeted correctness checks, run pytest through the guarded test runner the project's or machine's instructions name (otherwise plain `pytest`, with `tmp_path` for test fixtures and cleanup even on failure; never custom `--basetemp`), and make scratch folders with `mktemp -d`, never under `/tmp`. Run the full suite once, for landing, not on each iteration. If the machine names a storage health check, require it to pass first. If no storage health check is configured, skip it and note that in one line in the report. The `agent-kernel` concept's Storage safety section holds the temp-file and scratch-folder rules, when loaded. Why: repeated experiments multiply temporary storage.
13
+
14
+ ## Before you touch code
15
+
16
+ 1. **Name one metric.** A single, objective, reproducible number (median wall-time on a fixed input, output bytes, peak RSS, allocation count, request count, …). **If you cannot name an objective metric, STOP — do not optimize blind.** Say so and return; "looks cleaner/faster" is not a metric.
17
+ 2. **Lock correctness.** Identify the check that must keep passing — the project's tests, or if they're thin, a concrete check you can re-run (output count, content hash, golden output, a regression test). **Fix any correctness bug first**, then establish the baseline against the corrected code.
18
+ 3. **Baseline it.** Measure the metric on a fixed, representative input, enough runs to be stable (take a median; watch for noise). Measure and judge noise the way the `bc-performance-guardrails` skill's `measuring.md` says, so a kept win means the same as a guardrail limit. Write the number down. If the runtime is dominated by external tools, paid APIs, GPUs, or large model files, build a **dry-run / shadow** measurement first so iterations stay cheap and deterministic.
19
+
20
+ ## The loop — one bounded change per iteration
21
+
22
+ 1. **Target the biggest measured cost**, not a guess about where time goes.
23
+ 2. **Make ONE bounded change** to one unit (one function / script / directly-related helper). No bundled rewrites.
24
+ 3. **Re-run correctness.** If it breaks → **revert**; this change is done.
25
+ 4. **Re-measure the metric.** If it didn't beat the baseline by your threshold → **revert**.
26
+ 5. **Keep only if BOTH passed.** Record baseline → current → delta and the *kind* of win.
27
+ 6. **Re-baseline** against the kept change and repeat while budget remains.
28
+ 7. **Tighten the guardrail.** If the project's `docs/guardrails/README.md` has a limit on this metric, tighten it to the new value plus its noise allowance in the same commit as the kept change (never one the page marks as the owner's choice; mention that one in the report instead).
29
+
30
+ ## Guards — the failure modes this exists to prevent
31
+
32
+ - **Don't "optimize" by deleting required output or skipping real work** — a faster program that does less is not a win.
33
+ - **Pair every scalar metric with a correctness check** — a faster wrong answer is a regression, not an improvement.
34
+ - **Distinguish overhead/dry-run wins from real-workload wins** — and say which one you got.
35
+ - **One bounded change per iteration** — so a regression is attributable and a revert is clean.
36
+ - **Correctness before performance, always** — never trade behavior for speed.
37
+ - **Stop on diminishing returns** — out of budget, or no change clears the threshold, is a valid stop, not a failure. Don't force a marginal win by loosening the correctness check.
38
+
39
+ ## Recording
40
+
41
+ For each kept change, record (in the commit message and/or the issue comment): the **metric**, **baseline**, **current**, **delta/speedup**, the **win kind** (real workload vs dry-run/overhead), and the **correctness check that held**. A reader must be able to see what improved and trust that behavior didn't change.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: bc-performance-guardrails
3
+ description: >-
4
+ Use when setting or changing a speed, size, memory or structure limit (a performance budget, a bundle-size cap, a frame or load-time target, a dependency or layering rule); adding or changing a check that protects such a property; fixing a regression in one (something got slower, bigger, hungrier or more tangled); or setting up a project's guardrails. Skip design-consistency checks: those live on the project's design page (bc-design).
5
+ ---
6
+ # Guardrails
7
+
8
+ A guardrail is a limit on how fast, small, lean or well-structured a project must stay, plus the automated check that fails when a change breaks it. Performance budgets (limits on time, bytes or memory) and fitness functions (checks for a structural property, such as "the UI layer never imports the database") follow the same method. The goal is that short-lived agents cannot make the project slower, bigger or more tangled one change at a time without a check failing.
9
+
10
+ ## Start from the project's guardrails page
11
+
12
+ Read the project's `docs/guardrails/README.md` first; it lists the project's targets, budgets and checks. If it is missing, copy the `GUARDRAILS_README` text from `bc-setup-project`'s `body/scaffold.py` into `docs/guardrails/README.md` in its own commit; do not run the scaffold just for this. Without `bc-setup-project`, write the sections Who chooses a limit, Where a rule lives, How to measure, Targets, Budgets and Checks. Then add the setup checks in [Setup checks](#setup-checks).
13
+
14
+ Every check runs inside the project's existing full gate (`scripts/gate` or its equivalent); add no separate runner. Design-consistency checks stay on the project's design page (`docs/design/README.md`); the guardrails page links to it rather than copying them.
15
+
16
+ ## Where a rule lives
17
+
18
+ Classify each check by what it needs to run, and pick the cheapest kind that reliably catches the problem:
19
+
20
+ | Kind | What it does | Example |
21
+ |---|---|---|
22
+ | static | inspects source or settings without running anything | a lint rule banning blocking file reads in an Electron main process; a forbidden import between layers |
23
+ | artifact | measures a built output without running the program | download size of the built bundle; number of dependencies in the lockfile |
24
+ | dynamic | runs the program and measures | startup time; time per frame; memory after a fixed workload |
25
+
26
+ Why: a static check is fast and never flaps, so it can run on every change; a dynamic check costs time and has noise, so use it only when nothing cheaper sees the problem. A text-search rule catches a known bad pattern; it does not prove the program is fast, so a user-facing target still needs a dynamic check.
27
+
28
+ ## Set a limit without asking
29
+
30
+ Do not ask the owner for a number. Choose it yourself, record it as the agent's choice the owner may change, and list it as one FYI line in your report. Why: the goal is that guardrails exist, not sign-off; one recorded number is one edit for the owner to change.
31
+
32
+ - **No limit yet (ratchet).** Measure today's value, with enough repeated runs to see the noise, and set the limit at today's value plus a noise allowance. Anything worse fails. Never invent a number you did not measure. Method: [measuring.md](measuring.md).
33
+ - **User-facing target** (time per frame, page load, delay after a tap or keypress). Take it from a published guideline and cite the source on the page; defaults are in [targets.md](targets.md). Split a target into smaller allowances per step when one step owns part of it (budget decomposition).
34
+ - **After a verified improvement**, tighten the limit to the new value plus the noise allowance in the same commit. A limit only ever moves toward better unless the owner says otherwise.
35
+ - **Owner-chosen limits are fixed.** Never loosen, remove or re-measure a limit the page marks as the owner's choice to make a check pass. Fix the code, or stop and ask the owner. Why: loosening the limit hides exactly the regression the owner asked to be stopped.
36
+
37
+ ## Write path
38
+
39
+ Record every limit and check on `docs/guardrails/README.md`: the measure, the limit, its source (a measurement with its date and run count, a guideline link, or a past bug) and who chose it (agent or owner). The page line lands in the same commit as the check that enforces it. Why: a line without a check is a wish, and a check without a line is a number nobody can find or change.
40
+
41
+ Pages state current values only: one fact per line, no history. Link the decision log for why an owner limit is what it is.
42
+
43
+ ## After fixing a regression
44
+
45
+ When you fix something that got slower, bigger, hungrier or more tangled, and a check could have caught it, add that check in the same change, record it on the page, and mention it in one line of your report. Do this even when told there is no time: the check is part of the fix, not a separate task. Why: without the check the same mistake comes back with the next agent, who never saw this one.
46
+
47
+ ## Setup checks
48
+
49
+ `bc-setup-project` files an accepted guardrails starter item (for a new project, limits wait until the first code exists); add the checks when executing that item, not during scaffolding. When executing it or first adding the guardrails page, add checks for well-known problems of the project's stack: for example blocking file or network I/O in an Electron main process, or download size for a web app. Ratchet each one at today's value so existing shortfalls do not fail the gate. Add a check only when you can name a source (official guidance, a published guideline) or a past bug in this project for it; record that source on the page. Why: unsourced checks add noise and cost without catching anything real.
50
+
51
+ ## Report
52
+
53
+ List each limit you set or tightened and each check you added: measure, limit, source, and "agent's choice" where it applies, one line each.
@@ -0,0 +1,29 @@
1
+ # Measuring and noise
2
+
3
+ Use this when setting a limit from a measurement, tightening one after an improvement, or deciding whether a change made something worse. `bc-optimize-code` uses the same method to decide whether an improvement is real.
4
+
5
+ ## What to measure
6
+
7
+ - One number per limit, on a fixed input: median wall time, peak memory, bytes after compression, number of dependencies, frames over budget in a fixed scene. Write down the input and the command so the next agent measures the same thing.
8
+ - Static and artifact measures (counts, bytes) usually have no noise: one run is enough, and the allowance can be zero.
9
+ - Dynamic measures (time, memory, frames) vary between runs. Measure them on the machine that runs the gate, because a limit measured elsewhere does not hold there.
10
+
11
+ ## How many runs
12
+
13
+ Run the measurement at least 10 times after one warm-up run you discard. Take the median as today's value. Note the spread: drop the fastest and slowest tenth of the runs (at least one each), then take the slowest minus the fastest of the rest. If the spread is more than about a tenth of the median, the measurement is too noisy for a limit: make the input larger, close other work, or measure something steadier (count operations or allocations instead of time) before setting a limit. Why: a limit inside the noise either fails at random, so people stop trusting it, or is set so loose that real slowdowns pass.
14
+
15
+ ## Setting the limit (ratchet)
16
+
17
+ Limit = today's median + noise allowance. Use the spread you measured as the allowance, rounded up to a plain number, and never less than zero. Anything worse than the limit fails the check. In the check, take the median of several runs rather than one run, so one slow run does not fail the gate.
18
+
19
+ This is a ratchet: it accepts what the project already is and stops it getting worse. When an improvement is verified (median clearly better than the limit, across fresh runs), lower the limit to the new median plus the allowance in the same commit.
20
+
21
+ ## Recording
22
+
23
+ On the guardrails page, the source of a measured limit is the date, the run count, the median and the allowance, for example "agent's choice, measured 2026-11-25: 10 runs, median 412 ms, allowance 30 ms".
24
+
25
+ ## Sources
26
+
27
+ - Benchmark regression testing compares against a reference with a tolerance for variability; [CodSpeed per-benchmark regression thresholds](https://codspeed.io/changelog/2025-10-31-per-benchmark-regression-thresholds).
28
+ - The ratchet (tolerate existing debt, reject new deterioration) is the same idea as [Spotless ratchet](https://github.com/diffplug/spotless/blob/main/plugin-gradle/README.md#ratchet), applied to a number.
29
+ - Run counts and the noise threshold above are this method's defaults, not a published standard; record them as the agent's choice.
@@ -0,0 +1,20 @@
1
+ # Targets from published guidelines
2
+
3
+ Use this when a limit is about what a person feels (smooth motion, a page appearing, a reply to a tap or keypress). Take the number from a guideline, cite it on the guardrails page, and record it as the agent's choice. These are guidelines for typical devices, not measurements of this project.
4
+
5
+ | Target | Default | Source |
6
+ |---|---|---|
7
+ | Animation and scrolling | one frame every 16 ms (60 per second); the app's own work about 10 ms, leaving about 6 ms for drawing | [Google RAIL](https://web.dev/articles/rail) |
8
+ | Web page: main content shown | 2.5 s or less (Largest Contentful Paint) | [Core Web Vitals](https://web.dev/articles/vitals) |
9
+ | Web page: reply to interaction | 200 ms or less (Interaction to Next Paint) | [Core Web Vitals](https://web.dev/articles/vitals) |
10
+ | Web page: layout shift | 0.1 or less (Cumulative Layout Shift) | [Core Web Vitals](https://web.dev/articles/vitals) |
11
+
12
+ Core Web Vitals are judged at the 75th percentile of page loads; measured in a test, use the same percentile over repeated runs.
13
+
14
+ ## Splitting a target (budget decomposition)
15
+
16
+ When several steps share one target, give each step its own allowance and leave slack. Example: a 10 ms frame allowance for app work could be 4 ms for game logic, 4 ms for preparing what to draw, and 2 ms spare. Check the split against a real trace or timing, not a guess about where time goes. Source: [AWS Well-Architected, latency budgets](https://docs.aws.amazon.com/wellarchitected/latest/agentic-ai-lens/agentperf01-bp01.html).
17
+
18
+ ## Size budgets
19
+
20
+ A download-size limit for a web app is a performance budget on bytes ([web.dev performance budgets](https://web.dev/articles/performance-budgets-101)). It has no published default: ratchet it from today's built size ([measuring.md](measuring.md)). Tools such as [Size Limit](https://github.com/ai/size-limit) or [Lighthouse CI](https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md#assert) can run it inside the gate.