Help us improve
Share bugs, ideas, or general feedback.
From aria-knowledge
Batch-reviews personal knowledge files and IDEAS-BACKLOG entries for promotion to team-shared project knowledge. Recommends target destinations and lets user approve, modify, or skip.
npx claudepluginhub mikeprasad/aria-knowledge --plugin aria-knowledgeHow this skill is triggered — by the user, by Claude, or both
Slash command
/aria-knowledge:audit-shareThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Walk personal knowledge files and IDEAS-BACKLOG.md entries; recommend a target `_project-knowledge/` destination per item; present a batch summary; let the user approve, modify, or skip.
Captures architectural decisions, patterns, conventions, and insights during Claude Code sessions and shares governed knowledge across the team via qmd. Use when making team-relevant discoveries or importing existing docs.
Loads relevant knowledge files by tag query, enabling on-demand retrieval of promoted context documents.
Captures insights as markdown files, searches prior learnings, and promotes patterns to CLAUDE.md using tiered backends (local, qmd, agent-fs) for knowledge across projects.
Share bugs, ideas, or general feedback.
Walk personal knowledge files and IDEAS-BACKLOG.md entries; recommend a target _project-knowledge/ destination per item; present a batch summary; let the user approve, modify, or skip.
Read ~/.claude/aria-knowledge.local.md and extract:
knowledge_folder — requiredprojects_enabled — required (must be true)projects_list — required (parsed into tag→path map)projects_shared_knowledge — required (comma-separated tag list; non-empty list of tags from projects_list); each tag in the list is a project enabled for shared knowledgeauthor_tag — required (non-empty); fall back to deriving from git config user.name (first 2 chars of first + first 2 chars of last) if missingIf the config file doesn't exist: "aria-knowledge is not configured. Run /setup to get started."
If projects_shared_knowledge is empty/missing (or the legacy literal true): "Shared knowledge has no projects enabled. Run /setup and pick which projects to enable in the 'Which projects do you want to enable shared knowledge for?' prompt."
If projects_enabled: false or projects_list empty: "Shared knowledge requires the project tier. Run /setup to enable projects and configure your project list."
If author_tag is missing AND no derivable git user.name: "Author tag is required. Set author_tag in ~/.claude/aria-knowledge.local.md (e.g., init) or configure git config user.name."
Walk these directories under {knowledge_folder}/:
insights/decisions/approaches/rules/projects/<tag>/ for each tag in projects_shared_knowledge (the per-project opt-in list — projects not in this list stay personal-tier and are skipped here)Plus IDEAS-BACKLOG.md entries from each project root:
projects_shared_knowledge, resolve to project root via ~/Projects/<path> (where <path> is the corresponding projects_list value).<project-root>/_project-knowledge/IDEAS-BACKLOG.md first (post-feature location).<project-root>/IDEAS-BACKLOG.md (pre-feature location, will trigger Step 7 migration on first execute).### YYYY-MM-DD — {title} headers; treat each section as a candidate "entry."Skip candidates when:
shared: array with an entry whose path matches the proposed target. (Already shared; no action needed.)feedback or references (out of scope per design Q10 — feedback memories tend to be personal preferences; references are pointers to external systems that may not apply uniformly to teammates).For each candidate, determine:
/index Phase 4 Decision #9 path-derived convention so audit-share and /index see the same tag set):
{knowledge_folder}/projects/<tag>/, that <tag> is implicit (even if not in YAML frontmatter).project: field if present (split on , for multi-value).tags: array: any tag matching a project in projects_shared_knowledge is treated as a share signal. A file tagged [architecture, cs, ss] with cs,ss in projects_shared_knowledge produces TWO share recommendations (one to cs, one to ss) — multi-tag files generate one recommendation per matching project, with independent destinations.cross (in any source) marks the file as cross-cutting within its product group, not as cross-PROJECT-GROUP. Cross-PROJECT-GROUP relevance is naturally expressed by multi-tag (e.g., [cs, ss] = relevant to both cs and ss product groups) and is handled by the multi-tag fan-out above, not by cross.cross → recommend share-to-cross (will need user to pick destination repo at execute time, since cross items can land in any repo's cross/ subfolder; cross destinations may be any tag from projects_shared_knowledge).projects_shared_knowledge → recommend share-to-{project}.projects_list but is NOT in projects_shared_knowledge → recommend skip with reason "project not enabled for shared knowledge (use /setup to enable)".projects_groups entry) require sub-repo selection because the projects_list path resolves to a container, not a git repo:
projects_groups[tag] entry):
<project-root>/_project-knowledge/<YYYY-MM-DD>-<author_tag>-<slug>.md<destination-repo-root>/_project-knowledge/cross/<YYYY-MM-DD>-<author_tag>-<slug>.mdprojects_groups[tag] is set, listing role:sub-repo pairs like backend: foo-backend, web: foo-web, mobile: foo-mobile):
projects_groups[tag] — match keywords from the role name itself plus inferable tokens._project-knowledge/cross/.projects_groups[tag] (declaration order, NOT alphabetical), OR an explicit primary: field if user has added one to the group entry. For Mike's example cs: { backend: commonspace-app, web: commonspace-ui-v3, mobile: commonspace-mobile-ui }, primary is commonspace-app.<project-root>/<role-sub-repo>/_project-knowledge/<YYYY-MM-DD>-<author_tag>-<slug>.md<project-root>/<primary-sub-repo>/_project-knowledge/cross/<YYYY-MM-DD>-<author_tag>-<slug>.mdauthor_tag from config.title:.-2, -3, etc. to the slug until unique.<project-root>/_project-knowledge/IDEAS-BACKLOG.md; multi-repo: <project-root>/<primary-sub-repo>/_project-knowledge/IDEAS-BACKLOG.md (always primary, since IDEAS-BACKLOG entries are project-wide queue items not per-role). Cross-cutting ideas append to cross/IDEAS-BACKLOG.md instead.gh repo view --json visibility 2>/dev/null (cache result for the session). If visibility is PUBLIC, mark target as needing sanitization warn-prompt at execute time. If gh is unavailable, skip the check (do not block); note in summary as "could not verify repo visibility."Group recommendations by action; number continuously across groups; flag public-repo targets:
audit-share — found N candidates not yet in shared knowledge
## Recommended: share to repo (X)
1. knowledge/insights/foo.md (project: proj-a)
→ ~/Projects/<path>/_project-knowledge/2026-04-28-init-foo.md
2. knowledge/decisions/008-bar.md (project: proj-a)
→ ~/Projects/<path>/_project-knowledge/2026-04-28-init-bar.md
⚠️ public repo — content-safety prompt at execute time
3. ...
## Recommended: share to cross (Y)
9. knowledge/approaches/api.md (project: cross)
→ ⚠️ pick destination repo at execute time
10. ...
## Recommended: skip (Z)
12. knowledge/feedback/baz.md — feedback type, not in scope
13. knowledge/insights/qux.md — no project tag, no destination
...
⚠️ T of these target public repos: <repo-1>, <repo-2>
Decide:
all — execute all recommended actions
numbers (1 3 5) — execute only specified items
modify N — change action / destination / slug for item N
skip — cancel without executing
Section omission: omit a heading entirely if its count is zero. If no candidates at all, skip Steps 4-7 and report: "No candidates to share — all eligible knowledge is already shared or out of scope."
Wait for user input. Parse:
all — proceed with all recommendations from Steps 1-3.1 3 9 or 1,3,9) — proceed only with those items.modify N — sub-prompt for item N:
skip — cancel without executing; jump to Step 8 with a "user-cancelled" report.For each approved item, execute in order:
_project-knowledge/cross/ folder (not the container). Update target path accordingly.⚠️ Target repo "<repo-name>" is PUBLIC.
Source file: <personal-path>
Confirm content has no secrets / internal URLs / personal names? [yes / no / show-file]
yes — proceed.no — skip this item; record as sanitization-blocked in the summary.show-file — print full file body for review; re-prompt yes/no.originSessionId, name, description, internal session IDs).origin: <relative-path-from-knowledge-folder>, shared_by: <author_tag>, shared_at: <YYYY-MM-DD>, project: <repo-tag-or-cross>.title:, tags:, body content as-is.shared: array:
shared:
- path: <repo>/_project-knowledge/2026-04-28-init-foo.md
date: 2026-04-28
If the array doesn't exist, create it. If it exists, append (don't overwrite — supports re-sharing to multiple repos over time)._project-knowledge/ folder (folder was empty or didn't exist before). Use the template from Step 6 below.git add the new/changed files. The git operation must run inside the destination sub-repo's working tree (<sub-repo-root> for multi-repo projects, <project-root> for single-repo) — running git add from a non-repo container directory silently no-ops. Use git -C <sub-repo-root> add <relative-path> to make the working-tree explicit. Do NOT commit — user reviews and commits via normal flow.When the first file is written to a repo's _project-knowledge/ folder, create README.md alongside it with this content:
# _project-knowledge/
This folder holds team-shared project knowledge promoted from individual developers' personal knowledge captures.
**Convention:**
- Files use `{YYYY-MM-DD}-{author-tag}-{slug}.md` naming (e.g., `2026-04-28-init-foo.md`).
- Each file's frontmatter includes `origin:` (where it came from), `shared_by:` (who promoted it), and `shared_at:` (when).
- The `cross/` subfolder holds cross-cutting knowledge that applies across multiple repos in the same product group.
- `IDEAS-BACKLOG.md` is a queue of unscheduled future work — entries are dated sections.
**Tooling (optional):**
- These files are plain markdown — readable and editable without any tool.
- The ARIA Claude Code plugin (https://github.com/mikeprasad/aria-knowledge) provides:
- `/audit-share` to promote personal knowledge here
- `/index` + `/context` to discover and load these files into Claude sessions
- Non-ARIA teammates can read and write directly; no tool dependency.
**Contributing:**
- Edit personal knowledge in your own knowledge store, then promote via `/audit-share` (or copy manually).
- Direct edits to files in this folder are fine; commit through normal PR review.
The first time audit-share writes to a repo's _project-knowledge/ folder (same trigger as Step 6's README auto-create), offer to add a _project-knowledge/ reference to that repo's CLAUDE.md so non-ARIA teammates can discover the convention. This used to be a setup-time batch prompt; it was deferred here so the documentation appears alongside the first real share rather than as an aspirational forward reference.
Per-repo, gated by these conditions in order:
<repo-root>/CLAUDE.md. If absent, skip silently (don't auto-create).## Team-Shared Knowledge heading inside the CLAUDE.md (or a previous reference to _project-knowledge/). If present, skip silently (already documented; don't append again on re-shares).git -C <repo-root> ls-files --error-unmatch CLAUDE.md (exit 0 = tracked, non-zero = untracked or no git). Cache result for the session.gh repo view --json visibility 2>/dev/null (cache per repo for the session). If gh is unavailable, treat as "unknown remote."Prompt user with the appropriate warning tier:
| Tracking state | Prompt form |
|---|---|
| Untracked or no git | Add a _project-knowledge/ reference to <repo-root>/CLAUDE.md? This is a 5-line section explaining the convention to teammates not using ARIA. (y/N) |
| Tracked, public remote | ⚠️ <repo-root>/CLAUDE.md is committed to a PUBLIC remote — this edit will be visible to anyone on push. Add a _project-knowledge/ reference? (y/N) |
| Tracked, private remote | <repo-root>/CLAUDE.md is committed to a remote — teammates will see this edit on next push. Add a _project-knowledge/ reference? (y/N) |
| Tracked, unknown remote (gh missing or repo not on GitHub) | <repo-root>/CLAUDE.md is git-tracked — committing this edit will broadcast it to anyone with the remote. Add a _project-knowledge/ reference? (y/N) |
Default is N for all four tiers. Per-repo confirmation matches the cadence of /setup's file-diff prompts.
On y: append the following block to <repo-root>/CLAUDE.md (insert after the title H1 if one exists, otherwise append at end). git add the change but do NOT commit.
## Team-Shared Knowledge
Team-shared knowledge for this repo lives in `_project-knowledge/` (committed). Files follow `{YYYY-MM-DD}-{author}-{slug}.md` naming with frontmatter origin pointers. Cross-cutting items live in `_project-knowledge/cross/`. See `_project-knowledge/README.md` for the convention.
On N or empty input: skip; record the decision in the Step 8 report ("CLAUDE.md reference declined for <repo-root>"). User can add manually later or accept on a future first-write to a different repo.
Idempotency: the existing-heading probe in step 2 above prevents duplicate sections if the user accepts on a first share, then later runs audit-share again with new content into the same repo. The "first-write hook" trigger only fires when _project-knowledge/ is newly created OR when CLAUDE.md still lacks the reference.
Single-repo projects are fully covered by Step 6.5a above — <repo-root>/CLAUDE.md is the only relevant CLAUDE.md, and the canned single-repo text accurately describes that repo's _project-knowledge/ folder.
Multi-repo projects (those with a projects_groups entry) have a second CLAUDE.md worth pointing at: the container that holds the sub-repos. Teammates navigating at the container level (above any one sub-repo) benefit from a group-level pointer that names each sub-repo's _project-knowledge/. The single-repo canned text is structurally wrong for the container — the container has no _project-knowledge/ of its own — so this step uses a different text variant.
Run this step after Step 6.5a, gated by these conditions in order:
projects_groups block from ~/.claude/aria-knowledge.local.md. For each group tag, walk the role-value pairs (e.g., backend:, web:, mobile:, plus any custom roles); if any role-value resolves to a path equal to the current sub-repo's path, the current sub-repo belongs to that group tag. Record the group tag. If no match, skip Step 6.5b entirely (pure single-repo case).projects_list to get the container's relative path; the container root is ~/Projects/<that-path>.audit-share invocation — e.g., user shared to one sub-repo, then later to a sibling sub-repo in the same group — skip silently. The cache prevents re-prompting across sibling shares within one run.<container-root>/CLAUDE.md. If absent, skip silently (don't auto-create) and record group as "container CLAUDE.md absent" in the session cache.## Team-Shared Knowledge heading OR any reference to _project-knowledge/. If present, skip silently and record group in the session cache as "container CLAUDE.md already has reference."git -C <container-root> ls-files --error-unmatch CLAUDE.md. Cache result.gh repo view --json visibility 2>/dev/null (cache per container for the session). If gh is unavailable, treat as "unknown remote."Prompt user with the appropriate warning tier (same three-tier shape as Step 6.5a, retargeted at the container path):
| Tracking state | Prompt form |
|---|---|
| Untracked or no git | Add a group-level _project-knowledge/ reference to <container-root>/CLAUDE.md? This points teammates at each sub-repo's _project-knowledge/ folder. (y/N) |
| Tracked, public remote | ⚠️ <container-root>/CLAUDE.md is committed to a PUBLIC remote — this edit will be visible to anyone on push. Add a group-level _project-knowledge/ reference? (y/N) |
| Tracked, private remote | <container-root>/CLAUDE.md is committed to a remote — teammates will see this edit on next push. Add a group-level _project-knowledge/ reference? (y/N) |
| Tracked, unknown remote | <container-root>/CLAUDE.md is git-tracked — committing this edit will broadcast it to anyone with the remote. Add a group-level _project-knowledge/ reference? (y/N) |
Default is N for all four tiers, matching Step 6.5a's posture.
On y: append the group-aware variant to <container-root>/CLAUDE.md (insert after the title H1 if one exists, otherwise append at end). git add the change but do NOT commit. Variant text:
## Team-Shared Knowledge
Team-shared knowledge for repos in this group lives in each sub-repo's `_project-knowledge/` folder (committed per repo: `{sub1}/_project-knowledge/`, `{sub2}/_project-knowledge/`, ...). Files follow `{YYYY-MM-DD}-{author}-{slug}.md` naming with frontmatter origin pointers. Cross-cutting items live in `_project-knowledge/cross/` in any one repo. See any sub-repo's `_project-knowledge/README.md` for the convention (auto-created on first share via the ARIA plugin).
Substitute {sub1}, {sub2}, etc., with the relative paths of each sub-repo from the matched group entry (preserve role ordering: backend → web → mobile → custom roles in declaration order).
On N or empty input: skip; record in session cache and Step 8 report. User can add manually later or accept on a future share that triggers a fresh first-write to this group (i.e., the group's container offer fires again on the next audit-share invocation if still not satisfied).
Why session cache, not persistent cache: the container offer should re-fire across sessions because the user may have changed their mind, the CLAUDE.md may have been edited externally, or sub-repos may have been added/removed. Within a single audit-share invocation, sibling sub-repo shares share the cache so the container offer fires at most once per run.
For each project touched in Step 5, check if migration is needed. Migration target depends on project shape:
projects_groups[tag] entry): migration target is <project-root>/_project-knowledge/IDEAS-BACKLOG.md.projects_groups[tag] set): migration target is <project-root>/<primary-sub-repo>/_project-knowledge/IDEAS-BACKLOG.md (primary sub-repo = first role in declaration order, matching Step 2.3's resolution).Migration logic:
<project-root>/IDEAS-BACKLOG.md exists AND the migration target does NOT:
git mv <source> <target>.mv (multi-repo containers are typically untracked; the move crosses from container to sub-repo).git -C <primary-sub-repo-root> add _project-knowledge/IDEAS-BACKLOG.md to stage the new file inside the sub-repo. Do NOT commit — user reviews and commits via normal flow.<project-root>/IDEAS-BACKLOG.md and <migration-target> exist. Manual reconciliation needed." Skip migration; user resolves.Output a summary of what happened:
## /audit-share complete
- N candidates reviewed
- A shared:
- A1 to repo: <count>
- A2 to cross: <count>
- A3 modified-then-shared: <count>
- B skipped:
- B1 user-declined: <count>
- B2 not-in-scope: <count>
- B3 sanitization-blocked: <count>
- C deferred (will re-prompt next invocation): <count>
- M IDEAS-BACKLOG.md migrations performed: <list>
Files written:
- <repo-1>/_project-knowledge/<filename> (from <source>)
- <repo-2>/_project-knowledge/<filename> (from <source>)
- ...
Next steps:
- Review staged changes: `cd <repo-1> && git diff --cached`
- Commit and push when ready.
- Run `/index` to refresh the tag index with the new files.
- Run `/context <project-tag>` to verify discovery works.
If the user cancelled in Step 4, report: "audit-share cancelled — no actions taken."
git add only; the user reviews staged changes and commits through their normal flow.shared: array entries matching the proposed target are skipped silently./audit-share after editing personal will offer to share again (incrementing the array, not overwriting).cross/; another user might promote a similar item to a different repo's cross/. Aggregation/dedup is a read-side concern handled by /index + /context, not write-side here.