Skip to content

Plugin reorg w python - #2

Open
JacobSal wants to merge 8 commits into
primeline-ai:mainfrom
JacobSal:plugin-reorg-w-python
Open

Plugin reorg w python#2
JacobSal wants to merge 8 commits into
primeline-ai:mainfrom
JacobSal:plugin-reorg-w-python

Conversation

@JacobSal

Copy link
Copy Markdown

Summary

What does this PR do? Keep it short.

Changes

  1. reorganized into a claude-plugin for setup into a marketplace or primeline-ai repos.
  2. added python scripts and json structures to ensure claude conforms to quantum-lens purpose.
  3. added python scripts and json structures to add folder structures into home repository of user.
  4. added Makefile for uv initiation if wanted; however, these scripts run locally in claude and this may not be necessary using paiml-ai pmat.
  5. Updated README.md using paiml-ai pmat output
  • ...

Testing

How did you verify this works?

  • [yes ] Tested locally
  • [yes ] Existing tests pass
  • [ yes] New tests added (if applicable)

Related

Closes my issue with integrating the commands into claude on windows. Commands were not available. Plugin restructuring should improve conformity of claude to protocol and flexibility for integrating the repo into a marketplace package.

JacobSal and others added 8 commits June 19, 2026 13:33
Issue: claude simply would not register the functionalities of the scenario without explicit path calling. Even then some of the  commands seem to operate poorly.

OS: windows
Claude Version: 2.1.183

Solution: reoriented to a plugin framework where overwritten files can be copied directly to project directory while skill functionalities remain usable.

Status: In progress :')
Fix output logging: JSON-source-of-truth persistence to per-repo workspace

Root cause: reads were anchored to ${CLAUDE_PLUGIN_ROOT} but writes and
system-context reads were bare-relative, resolving against the host cwd (not
the plugin) and targeting nonexistent paths -- so outputs never registered.
File-save was also double-gated behind score>=7 AND Kairn-unavailable.

Redesign: the LLM emits one schema-validated JSON record; a deterministic
Python helper does all IO (no free-form md writes, no model-chosen paths).

- schemas/{analysis,solution}_record.schema.json: record schemas
- scripts/ql_workspace.py: resolve per-repo workspace ($QUANTUM_LENS_HOME ->
  <cwd>/.quantum-lens/), seed system-context templates, report customization
  status (missing|stub|template|filled)
- scripts/ql_persist.py: validate, write canonical JSON, render md from JSON,
  upsert outputs/index.json, return kairn_payload; --link-kairn for bidi link
- scripts/test_ql_persist.py: 25 stdlib checks, all passing
- knowledge/persistence.md: the contract + Extension Point for later
  evolving-lite / Kairn-primary integration

Behavior: file write is now the guaranteed floor every run (any score); score
only decides whether to ALSO kn_learn/link, draft a plan, or mark extended.
All writes + system-context reads go to the workspace; install dir stays
read-only. /quantum-review reads index.json deterministically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
Move lens config to per-repo workspace overlay (fix /lens-calibrate read-only bug)

/lens-calibrate wrote new lens agents to ${CLAUDE_PLUGIN_ROOT}/agents/ and
mutated ${CLAUDE_PLUGIN_ROOT}/scenario.json -- breaks on a shared/read-only
install. And the config was a no-op anyway: quantum-lens Phase 1 hardcoded the
per-depth lens lists and never read scenario.json, so enable/disable/custom
lenses had no effect.

Fix: relocate all writable lens config into the existing .quantum-lens/
workspace as an overlay over plugin defaults, and resolve lens selection
deterministically in Python (not prompt prose).

- ql_workspace.py: canonical depth_map seed constant; seed .quantum-lens/
  scenario.json overlay {depth_default, depth_map, disabled_lenses,
  custom_lenses}; create agents/; subcommands --lenses --depth (resolve
  depth_map - disabled + custom), --resolve-agent (workspace-first,
  plugin-fallback), --full (materialize built-in agents for local editing)
- quantum-lens.md Phase 1: resolve lenses + agent paths via the helper
  (orchestrator resolves, passes {agent_path} to each Read-only sub-agent)
- lens-calibrate.md: read/write the workspace overlay + .quantum-lens/agents/
  only; never the plugin dir
- commands/quantum-init.md: new; seed workspace (+ --full)
- persistence.md / SETUP.md: document the config overlay + /quantum-init
- test_ql_persist.py: +11 checks (config seed, resolution, agent precedence,
  --full); all passing

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
Register /quantum-init in plugin manifest + command list

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

Removed triplicated content (lens catalog, depth/solution modes, barrier
taxonomy, output formats, scoring) that appeared across README/SETUP/CLAUDE.

- PMAT_README.md: the canonical comprehensive manifest. Fixed stale bits to
  match this session architecture (6 commands incl. /quantum-init; workspace
  tree adds agents/ + read-only-plugin note; always-write-floor scoring; lens
  resolver troubleshooting).
- CLAUDE.md: reformatted into an architecture/operating guide (two-roots model,
  persistence = JSON source of truth, deterministic lens-config overlay, editing
  rules). Catalogs now linked, not duplicated.
- README.md: reduced to a lean landing page (intro, quick start, command table,
  signature lens list, when-to-use, doc map).
- SETUP.md: reduced to install + optional MCP tiers + verify; defers
  workspace/persistence/config to PMAT_README.md + knowledge/persistence.md and
  build/test to the Makefile.
- Removed PLAN-output-logging.md (transient; content lives in persistence.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
README.md is now the comprehensive manifest (former PMAT_README content + the
landing intro, Solution Engine agents, and when-to-use tables). Deleted
PMAT_README.md and repointed all references (CLAUDE.md, SETUP.md) to README.md.
No lingering PMAT_README references remain.

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

Copy link
Copy Markdown
Author

hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant