Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Saved Brain audit + production-hardening build prompt - #1

Open
manazoid4 wants to merge 1 commit into
mainfrom
audit/saved-brain-2026-06-09
Open

Saved Brain audit + production-hardening build prompt#1
manazoid4 wants to merge 1 commit into
mainfrom
audit/saved-brain-2026-06-09

Conversation

@manazoid4

Copy link
Copy Markdown
Owner

Summary

4-agent read-only audit of the saved-brain Next.js app (C:\Users\manaz\saved-brain) + synthesized phased build prompt. No code in saved-brain was modified; this PR only adds wiki docs.

Three root failures

  1. No auth / no user concept — every API route fully public.
  2. Flat JSON file "DB" (lib/db.ts) — doesn't persist on Vercel serverless; webhook purchases vanish.
  3. No entitlement gating — all Pro features free; checkout works but sells nothing.

Plus stub features sold as real: semantic search == fulltext, embeddings dead code, cron unwired, sync/graph subsystems don't exist.

Files

  • wiki/projects/saved-brain/index.md
  • wiki/projects/saved-brain/build-prompt.md (the deliverable — 8 phases + GATE 0)
  • wiki/projects/saved-brain/audit-security.md
  • wiki/projects/saved-brain/audit-ux.md
  • wiki/projects/saved-brain/audit-monetization.md
  • wiki/projects/saved-brain/audit-architecture.md

🤖 Generated with Claude Code

4-agent read-only audit (security/UX/monetization/architecture) of the
saved-brain Next.js app, plus a phased build prompt synthesizing findings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07eff59077

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,34 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rename duplicate project index

Adding this page as index.md duplicates the existing wiki/index.md, which violates the vault convention that filenames must be unique (skills/wiki-lint/SKILL.md:99). The tooling also keys pages by filename stem (scripts/boundary-score.py:205-206), so one index page overwrites the other in graph analysis and the many existing [[index]] wikilinks become ambiguous. Rename this project page to a unique filename, or path-qualify all affected links consistently.

Useful? React with 👍 / 👎.

manazoid4 pushed a commit that referenced this pull request Jun 15, 2026
setup-retrieve.sh was passing --all as a positional argument to argparse,
which rejected it because the parser was declared with a required `path`
positional. Real-vault end-to-end smoke test surfaced this.

Make `path` optional via nargs="?" and add an explicit --all flag that
sets the same behavior. Default (no args) also processes every page —
matches the most-common usage pattern (full reindex during setup).

End-to-end smoke after the fix: 47 wiki pages -> 117 chunks indexed; BM25
+ cosine rerank pipeline returns correct page for "what is dragonscale
memory" and cross-cuts correctly for "v1.7 transport CLI and multi-writer
locking" (3 distinct sources, rerank correctly demoted BM25's #1 in favor
of the more contextually-relevant hot.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
manazoid4 pushed a commit that referenced this pull request Jun 15, 2026
Closes the 5th and final priority gap from the May 2026 compass artifact
(methodology support — no other Claude+Obsidian competitor ships it as
a first-class skill). After this release, claude-obsidian is #1 on 5/7
compass axes (up from 4/7 in v1.7).

## Added

- skills/wiki-mode/SKILL.md — new skill (skill AgriciDaniel#14). Reads
  .vault-meta/mode.json; defaults to "generic" (v1.7 behavior byte-for-
  byte) when absent. Four modes: LYT (MOCs + atomic notes flat under
  wiki/notes/), PARA (Projects / Areas / Resources / Archives),
  Zettelkasten (timestamped IDs, flat, dense linking), Generic
  (v1.6/v1.7 default — no opinion).
- scripts/wiki-mode.py — pure-stdlib router + config helper.
  Subcommands: get, config, route <type> <name>, set <mode>, id,
  templates. Single source of truth for "where should new content of
  type X be filed under mode Y." No special-casing needed in consumer
  skills.
- bin/setup-mode.sh — interactive setup with --mode flag for non-
  interactive use. Idempotent. Optionally seeds template folders.
- skills/wiki-mode/templates/ — 6 per-mode templates:
  lyt/{moc,atomic}-template.md, para/{project,area,resource}-
  template.md, zettel/atomic-template.md.
- tests/test_wiki_mode.py — 15 hermetic assertions covering load/save
  round-trip, all 4 modes' routing, slugify Unicode handling, Zettel
  ID format, corrupted-config fallback, CLI subprocess paths.
  make test is now 8 suites.
- docs/methodology-modes-guide.md — narrative guide; when-to-use-which
  decision tree per mode; full schema; migration guidance.

## Changed

- skills/wiki-ingest/SKILL.md — new "## Mode awareness (v1.8+)"
  section consults wiki-mode.py before filing source/entity/concept
  pages. mode=generic preserves v1.7 behavior.
- skills/save/SKILL.md — new "## Mode awareness (v1.8+)" section
  routes session notes per active mode (with explicit note that the
  global ~/Documents/Obsidian Vault/sessions/ rule still applies to
  cross-project saves).
- skills/autoresearch/SKILL.md — new "## Mode awareness (v1.8+)"
  section routes research synthesis output per active mode.
- Makefile — new test-mode + setup-mode targets; test aggregate now
  runs 8 suites; clean-test-state removes .vault-meta/mode.json +
  .vault-meta/hook.log.
- .gitignore — .vault-meta/mode.json + .vault-meta/mode.*.tmp added.
  Host-specific runtime config by default; `git add -f` to commit if
  the user wants the mode choice to follow the repo.
- CLAUDE.md — new "## Methodology Modes (v1.8+)" section + skill
  table row + plugin-name header reference.
- .claude-plugin/{plugin,marketplace}.json — version 1.7.2 → 1.8.0;
  descriptions refreshed to mention methodology modes + "5 of 5
  priority gaps closed."

## Verified

- make test → 8 suites green (the new test-mode suite runs 15
  hermetic assertions; total ~1180+ assertions, zero ollama and zero
  network dependency)
- python3 scripts/wiki-mode.py get → "generic" (default)
- bash bin/setup-mode.sh --mode generic --no-seed → writes
  .vault-meta/mode.json with mode=generic + configured_at timestamp
- All 4 mode routings produce sensible vault paths (generic preserves
  case; lyt/para/zettel use lowercase slugs)
- Existing wiki-ingest / save / autoresearch behavior unchanged in
  generic mode (regression-safe by design)

## Compass axis status after v1.8.0

| Axis | v1.7.2 | v1.8.0 |
| Compounding wiki primitive | #1 | #1 |
| Multi-writer safety | #1 | #1 |
| Retrieval architecture (free tier) | #1 | #1 |
| License / openness | #1 | #1 |
| Methodology support | TIE | #1 ← this release |
| Derivative outputs | NO | NO (v2.0 scope) |
| GUI / install ergonomics | NO | NO (v2.5+ scope) |

5 of 7 axes #1. Remaining 2 axes are multi-release effort.

Branch remains local. No push, no tag without explicit authorization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
manazoid4 pushed a commit that referenced this pull request Jun 15, 2026
… AI-Marketing-Hub migration

v1.8.2 — pre-push audit fixes (all 4 HIGH closed):
- scripts/detect-transport.sh: implement manual_override (round-trips through snapshot, preserves preferred + fallback_chain across --force)
- agents/wiki-ingest.md: add Bash to tools + new Mode awareness (v1.8+) section
- skills/autoresearch/SKILL.md: new Web egress hygiene section (URL validation + content sanitization + cost expectation + failure mode)
- skills/save/SKILL.md: prepend Step 0 destination decision (user override / CLAUDE.md /save rule / project-local default)

v1.9.0 — 10-principle thinking framework:
- NEW skills/think/SKILL.md (skill AgriciDaniel#15): canonical OBSERVE-OBSERVE-LISTEN-THINK-CONNECT-CONNECT-FEEL-ACCEPT-CREATE-GROW loop with stage-by-stage prompts, anti-patterns, composition notes
- 14 existing SKILL.md files: unique "How to think (10-principle mapping)" appendix per skill (not template stubs)
- CHANGELOG entry + CLAUDE.md skill-table row

Repo hygiene (first public release prep):
- NEW CONTRIBUTING.md: workflow + six-cut self-review + commit conventions + test requirements
- NEW CODE_OF_CONDUCT.md: adopts Contributor Covenant v2.1 by reference
- NEW SECURITY.md: private disclosure policy + response SLA + scope + credit policy
- NEW .github/ISSUE_TEMPLATE/bug_report.md + feature_request.md
- NEW .github/pull_request_template.md (six-cut self-review + verifier verdict + CHANGELOG reminder)
- NEW .github/workflows/test.yml: CI runs make test + SKILL.md frontmatter validation + agents tools-declaration check + plugin manifest JSON validity

URL migration (org publication):
- 20 files updated: plugin.json + marketplace.json + README + CLAUDE.md + docs + .github/ + .cursor/ + .windsurf/ + .raw/ + wiki/
- Repository URL: AgriciDaniel/claude-obsidian → AI-Marketing-Hub/claude-obsidian
- Author attribution preserved as AgriciDaniel

Verification:
- All 8 hermetic test suites green (~1234 assertions)
- v1.8.2 fix replay: 5 path-traversal vectors sanitized, mkstemp 0600, --mode preview non-mutating, manual_override survives --force
- Pre-push audit: docs/audits/v1.8.0-pre-push-audit-2026-05-18.md (verdict GREEN after fixes, was YELLOW)
- Verifier dispatch on staged diff: CLEAR TO COMMIT (0 BLOCKER / 0 HIGH / 1 MEDIUM / 4 LOW)

Average per-skill score: 84.6/100 across 15 skills.
Compass framework: 5 of 7 axes #1 (deepened methodology axis via /think framework).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
manazoid4 pushed a commit that referenced this pull request Jun 15, 2026
Flip README/docs framing so the public build (AgriciDaniel/claude-obsidian)
is the default install everywhere; reposition AI Marketing Hub Pro as
early-access to in-development features rather than the default.

- marketplace.json -> public form: add $schema, name agricidaniel-claude-obsidian,
  drop "private mirror / early access" text, remove load-ignored
  recommendedCompanions field. Passes `claude plugin validate` clean.
- Correct the plugin install slug to claude-obsidian@agricidaniel-claude-obsidian
  everywhere (matches marketplace.json name; verified against `claude plugin list`,
  which shows slugs derive from the marketplace name field, not owner-repo casing).
  Pro swap notes invert to claude-obsidian@ai-marketing-hub-claude-obsidian.
- README: live Release + CI badges on AgriciDaniel public; two-ways callout,
  Quick Start, Option 2, FAQ, uninstall all present public as default; Skool Pro
  link added; test-suite count fixed (8 -> 9); SECURITY.md wording clarified.
- install-guide.md, CONTRIBUTING.md, .cursor/.windsurf/.github copilot configs:
  public canonical as primary; PRs target public.
- Add SSS+ files: CITATION.cff, PRIVACY.md, CODEOWNERS, .github/FUNDING.yml.
- Neutralize internal tone in .raw ecosystem research.
- SEO/GEO pass (from RESEARCH-MASTER, DataForSEO-backed): H1 leads with
  "Self-Organizing AI Second Brain"; intro captures "AI second brain", "AI
  notetaker", "AI note-taking", "PKM", "Notion alternative" naturally; 4 verbatim
  GEO Q&As added to the FAQ (best AI second brain / build a second brain with AI /
  connect Claude to Obsidian / Notion alternative) for AI Overview + Perplexity
  citation. No keyword stuffing; brand "claude obsidian" already ranks #1.

Gates: secret scan clean (tree + 55-commit history), make test 9/9 suites,
plugin validate clean, fresh verifier agent SHIP (0 BLOCKER / 0 HIGH).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@manazoid4 manazoid4 added knowledge-backlog Unique vault material awaiting merge or archive decision stale-review Needs a fresh review before merge labels Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

knowledge-backlog Unique vault material awaiting merge or archive decision stale-review Needs a fresh review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant