Skip to content

chore: initialize marketplace scaffold#1

Merged
kyle-sexton merged 1 commit into
mainfrom
scaffold/initialize-marketplace
Jun 22, 2026
Merged

chore: initialize marketplace scaffold#1
kyle-sexton merged 1 commit into
mainfrom
scaffold/initialize-marketplace

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Initialize the fresh public marketplace.

  • marketplace.json catalog (name: melodic-software, empty plugins, pluginRoot ./plugins)
  • README (consumer add/install)
  • CLAUDE.md fresh-docs mandate + canonical doc links
  • docs/MIGRATION-PLAYBOOK.md (design charter, extensibility model, caveats, per-plugin gate)
  • .gitignore, .gitattributes (LF)

Scaffold only; plugins migrated one at a time.

Fresh public marketplace skeleton: marketplace.json catalog, README,
CLAUDE.md fresh-docs mandate, migration playbook, plugins/ dir.

Co-Authored-By: Claude <noreply@anthropic.com>
@kyle-sexton
kyle-sexton merged commit 87597d0 into main Jun 22, 2026
@kyle-sexton
kyle-sexton deleted the scaffold/initialize-marketplace branch June 22, 2026 18:47

@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: 5a7469e640

ℹ️ 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".

Comment on lines +54 to +55
- **Namespacing.** An in-repo `/foo` becomes `/melodic-software:foo` (plugin-namespaced). Internal
cross-references to the bare name break — update them.

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 Use the plugin name in command namespaces

When this playbook is used to migrate a skill whose plugin name is not exactly melodic-software, it tells maintainers to rewrite slash-command references to the marketplace name. I checked the current Claude Code plugin marketplace docs, and installed plugin skills are namespaced by the plugin name (for example /quality-review-plugin:quality-review after installing quality-review-plugin@my-plugins), so references like /melodic-software:foo will not resolve for plugins published under this marketplace. Please make the example use the actual plugin name, e.g. /<plugin-name>:foo.

Useful? React with 👍 / 👎.

This was referenced Jul 11, 2026
kyle-sexton added a commit that referenced this pull request Jul 12, 2026
…r self-contained

Address three more Codex P2 findings:

- teach topic case (#1): topic is start-or-resume, so a fresh-workspace
  expectation flakes on a machine with prior data. Assert the
  start-or-resume contract — mission interview for a new workspace,
  resume for an existing one.
- teach primer case (#3): the primer intakes the user's starting point
  with one question before building the ladder, so a single-turn run may
  correctly open with the intake. Make the expectation intake-first.
- diagnose cleanup case (#6): a broad grep -r "[DEBUG-" already matches
  the diagnose docs and this fixture in the checkout. Scope the assertion
  to the specific [DEBUG-a4f2] tag across the changed source.
kyle-sexton added a commit that referenced this pull request Jul 13, 2026
… hardening (#138)

Applies the resolved `planning/setup` hardening to `knowledge/setup`'s
`library_dir` seam (same single-directory `userConfig` shape, same
latent issues).

## Changes

**`plugins/knowledge/skills/setup/SKILL.md`**
- **Precedence** — step 1 now resolves the full documented order
(Managed > `--settings` > Local > Project > User), warns when higher
layers are unreadable instead of declaring a lower value authoritative,
and surfaces layer shadowing before the project write.
- **Portability** — step 5 guards the tracked project write: never
propagate a machine-specific personal-layer value into team settings;
route personal-only overrides to `.claude/settings.local.json`
(portability required only for the shared project write).
- **Declared-convention alignment** — inspect the repo's declared
working-notes/artifacts convention even when a value is set; surface
divergence and offer to reconcile.

**`plugins/codebase-audit/skills/setup/SKILL.md`** (partial match —
writes a tracked `.md`, not settings)
- Applied only the precedence/shadowing subset: step 1 reports the
*effective additively-merged* config across user-global → team → local
layers (and warns on unreadable layers), instead of summarizing the team
file alone. Settings-write portability specifics do not apply.

## Deviations (own-flagged)

1. **Fix #3 premise softened for knowledge.** The issue's fix #3
parenthetical assumed knowledge "honors that convention over the config
at write time" (true for planning). Verified via
`skills/youtube/extraction/lib/work-root.js` and the youtube pipeline
that **knowledge resolves `library_dir` directly at write time — no
skill overrides it with a repo convention at runtime.** Documenting that
behavior would be false, so I softened the imported write-time-override
claim: `library_dir` is runtime-authoritative, and setup's job is to
keep it *aligned* with any declared convention. Fixes #1 and #2 are
unaffected.
2. **`codebase-audit` version bump not in issue scope.** Patch-bumped
`0.1.0 → 0.1.1` because its SKILL behavior changed; the issue only
specified the `knowledge` minor bump.

## Verification
- `knowledge` `plugin.json` minor bump `0.2.0 → 0.3.0`; `codebase-audit`
`0.1.0 → 0.1.1`.
- `claude plugin validate` clean on both plugins.
- markdownlint clean on both edited files.

Refs melodic-software/medley#1463

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are limited to plugin skill documentation and version
metadata; no application runtime or security-sensitive code paths are
modified.
> 
> **Overview**
> **Hardens setup skills** for the `knowledge` and `codebase-audit`
plugins so interactive setup reflects layered config reality instead of
treating a single team file as authoritative.
> 
> For **`knowledge/setup`**, step 1 now follows the full Claude Code
precedence chain (Managed → `--settings` → Local → Project → User),
warns when higher layers are unreadable, and calls out when a project
write would stay shadowed. A new step reconciles `library_dir` with
repo-declared working-notes conventions even when a value is already
set. Persistence (step 5) blocks copying machine-specific personal paths
into tracked project settings, routes personal-only overrides to
`.claude/settings.local.json`, and the output section documents honest
pipeline behavior (`book-distill` ignores `library_dir`; YouTube does
not yet honor it). **`knowledge`** bumps **0.2.0 → 0.3.0**.
> 
> For **`codebase-audit/setup`**, step 1 is expanded to summarize the
**effective merged** config across user-global → team → local layers
(including dimension opt-outs via empty source lists), explain that only
the team file is written, and warn when overlays block re-enabling
dimensions. **`codebase-audit`** patch-bumps **0.1.0 → 0.1.1**.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f13139a. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
kyle-sexton added a commit that referenced this pull request Jul 14, 2026
…ntion (#175)

## What

Adds a durable guardrail against fragile Claude Code permission grants,
in two parts:

- **(a) Enforceable check** — a new `permission-hygiene` skill in the
`claude-config-audit` plugin,
matching the plugin's established idiom (deterministic detector script +
`.test.sh` contract test +
`reference/criteria.md` + `evals/evals.json`). A
`permission-rule-check.sh` detector scans
skill/command/agent frontmatter `allowed-tools` and `settings.json` /
`settings.local.json`
  `permissions.allow`, and flags three anti-patterns.
- **(b) Convention doc** — `docs/conventions/permission-rule-hygiene/`
(README + CHANGELOG), matching
the existing `hook-telemetry` / `ecosystem-commands`
convention-directory house style, stating the
principle, the three anti-patterns, the correct pattern, and the
operator-setup boundary — each with
official-doc citations. The skill's criteria link to it (reference,
don't restate).

## The three anti-patterns → the correct pattern

All three make a grant silently do nothing. Verified against current
official docs (URLs below):

1. **Interpreter-wildcard / blanket allow rules are dropped in auto
mode.** Per permission-modes:
"On entering auto mode, broad allow rules that grant arbitrary code
execution are dropped: Blanket
`Bash(*)` or `PowerShell(*)`; Wildcarded interpreters like
`Bash(python*)`; Package-manager run
commands; `Agent` allow rules. Narrow rules like `Bash(npm test)` carry
over." So a frontmatter
grant such as `Bash(python "*helper.py":*)` grants nothing under auto
mode. Empirically, a guarded
   merge helper granted this way was denied even when invoked bare.
2. **Hardcoded absolute machine/user paths.** Bash rules match the
command string literally — no
`~`/`$HOME`/env expansion — so `Bash(/c/Users/<name>/.../x.sh:*)` breaks
on other machines/usernames
   and leaks a username into source control.
3. **Assuming a skill or plugin can self-grant.** Skill `allowed-tools`
is skill-scoped and (per #1)
ineffective for auto-mode-gated actions; a plugin `settings.json`
supports only the `agent` and
`subagentStatusLine` keys, so a `permissions` block there is inert; and
an agent editing its own
settings to self-grant is blocked (`.claude/` is a protected path;
`defaultMode: auto` is ignored
   from project/local settings so a repo can't grant itself auto mode).

**Correct pattern:** expose the guarded helper as a stable bare command
on the Bash tool PATH
(pre-plugin: a PATH shim in a dir already on PATH; post-migration: the
plugin's `bin/`), allow the bare
name narrowly (`Bash(babysit_merge.sh:*)` — carries over into auto mode
like `Bash(npm test)`, machine
-independent, identical before/after migration), and have the
**operator** add that bare-name rule once
to user-global `~/.claude/settings.json`.

## The check (detector → criteria → evals)

`permission-rule-check.sh` (advisory, exits 0; `--count` for a count;
requires `jq`) flags:

- **P1** interpreter-wildcard / blanket rules (`Bash(*)`,
`Bash(python*)`, `Bash(bash <path>*)`,
`Bash(sh -c*)`, package-manager runners, `Bash(*.py:*)`). Narrow rules
(`Bash(npm test)`,
`Bash(babysit_merge.sh:*)`) are NOT flagged — a negative fixture proves
this.
- **P2** hardcoded machine/user paths (`/c/Users/…`, `/home/…`,
`/Users/…`, `C:\Users\…`);
  `${CLAUDE_PROJECT_DIR}`/`~/` forms are exempt.
- **P3** a plugin `settings.json` that declares an inert `permissions`
block.

`settings.local.json` is parsed for its `permissions.allow` array only —
never read or echoed wholesale
(matching the sibling `settings-audit` secret-handling posture). Scope
vs `settings-audit` is explicit:
this skill owns grant portability + auto-mode durability + who adds the
operative rule; file
correctness (baseline deny/ask, deprecated `:*`, drift) routes to
`settings-audit`.

Detector and test fixtures assemble machine-path strings from fragments
(and the docs use `<name>`
placeholders) so no contiguous machine-path literal sits in a committed
file — the repo's own
machine-specific-path CI lane stays clean without a CI exclude.

## Empirical evidence the guardrail is needed

Running the new detector against this marketplace surfaced **six
pre-existing interpreter/runner-led
frontmatter grants** across unrelated plugins (shapes like `Bash(bash
<script>:*)`, `Bash(bash <dir>/*)`,
and `Bash(npx:*)`) — none of them the portable bare-name pattern, and
the broad forms among them (a
globbed script target, a package runner) are exactly what auto mode
drops. (For a grant that invokes
one fixed script through an interpreter, the detector flags the same
authoring anti-pattern without
asserting the drop; the bare-name fix is identical.) Those live in other
contributors' plugins and are
left for a separate follow-up (out of this PR's lane).

## Tests

- `permission-rule-check.test.sh`: 27 checks pass (positive + negative
fixtures for all three checks,
`--count`, `--help`, jq-missing → exit 2, and the
narrow-rule-not-flagged negative case).
- Full `scripts/run-plugin-tests.sh` suite green; `shellcheck -x` and
`shfmt -ci -i 2` clean;
  markdownlint clean; scripts carry the executable bit.

## Sources (verified this session)

- Auto-mode drop / decision order —
https://code.claude.com/docs/en/permission-modes
- `classifyAllShell`, narrow-rule carryover —
https://code.claude.com/docs/en/auto-mode-config
- Literal matching, wildcard / `:*` semantics —
https://code.claude.com/docs/en/permissions
- `allowed-tools` scope, `${CLAUDE_PROJECT_DIR}` substitution —
https://code.claude.com/docs/en/skills
- Plugin `bin/` on PATH + `agent`/`subagentStatusLine`-only
`settings.json` — https://code.claude.com/docs/en/plugins-reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013gKgRoW8zkFadbE2hE4r4b

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are documentation plus read-only local scanning scripts; they
do not alter Claude Code behavior or auto-modify user settings.
> 
> **Overview**
> Adds a **permission-rule-hygiene** marketplace convention
(`docs/conventions/permission-rule-hygiene/`) and a fourth
**`claude-config-audit`** skill, **`permission-hygiene`**, that audits
whether `allowed-tools` and `permissions.allow` grants are portable and
still effective in auto mode.
> 
> The skill runs a deterministic **`permission-rule-check.sh`** detector
(plus **`permission-rule-check.test.sh`**, **`reference/criteria.md`**,
and **`evals/evals.json`**) that flags **P1**
interpreter/blanket/`Agent` grants auto mode drops, **P2** hardcoded
user-home paths, and **P3** inert `permissions` blocks in plugin
`settings.json`. It is **report-only** (remediation is operator manual:
bare command on PATH + user-global allow rule), with scope filters and
explicit routing of file-correctness work to **`settings-audit`**.
> 
> Plugin manifest and docs move **`claude-config-audit`** to **0.3.0**
and update the root catalog to describe four audit skills.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
867e5f2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 21, 2026
…th routing

Eval #1 (create-routing-enterworktree-last) still asserted the old
EnterWorktree(name: ...) final action. The create action now routes through the
shared worktree-create.sh helper and calls EnterWorktree(path: ...) on the
printed path. Update the expected_output prose and add an expectation locking
the helper-routing / path: invariant so the eval no longer rewards the in-repo
name: path this change removes.
kyle-sexton added a commit that referenced this pull request Jul 23, 2026
…tion

Codex P2 on PR #1160: the interim .claude/architecture/ default bypassed
the marketplace topic-docs convention — it ignored memory_dir overrides
and created a second, unignored generated surface under .claude, which
the convention reserves for observability only.

The deepening candidate artifact is a cross-stage handoff (a planning
step consumes its agreed-shape entry), so it now resolves through the
convention: memory tier,
<memory_dir>/<topic-slug>/deepening-candidates-<timestamp>.md, default
.work/<topic-slug>/, self-ignored — which also structurally answers the
security review's gitignore concern (scan output cannot leak into git
history) and the review's directory-creation note (slice creation +
self-ignore guard are convention-owned, now cited).

- New plugins/architecture/reference/topic-docs.md delta binding
- deepening.md Phase 2 resolves via the binding
- Eval #1 expectation matches
- README Persistence section rewritten
- topic-docs convention 2.1.0: architecture row in Implementers table

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 23, 2026
…t path (F1) (#1160)

Closes #1156

## Summary

The deepening lens's durable candidate artifact defaulted to
`${CLAUDE_PLUGIN_DATA}/deepening-candidates-<timestamp>.md` — broken
twice over, verified against current official docs (fetched 2026-07-23):

1. **The token does not substitute in skill markdown content.** The
skills reference's "Available string substitutions" set is
`${CLAUDE_SESSION_ID}`, `${CLAUDE_EFFORT}`, `${CLAUDE_SKILL_DIR}`,
`${CLAUDE_PROJECT_DIR}` + named args. `${CLAUDE_PLUGIN_DATA}` is a path
substitution for hook/monitor commands and MCP/LSP server configs only
(plugins-reference "Environment variables"). A consumer following the
default literally writes to an unexpanded literal
`${CLAUDE_PLUGIN_DATA}/…` directory — observed in the SW2030 consumer
audit that produced this finding.
2. **Wrong scope even if it resolved.** `${CLAUDE_PLUGIN_DATA}` →
`~/.claude/plugins/data/{id}/` — plugin-global, so per-codebase
candidates would collide across projects.

Changes (architecture 0.3.5 → 0.3.6):

- `actions/deepening.md` Phase 2 default →
`${CLAUDE_PROJECT_DIR}/.claude/architecture/deepening-candidates-<timestamp>.md`
(per-project). The honor-project-convention override branch is unchanged
— it worked correctly in the audit run and masked the broken default.
- `evals/evals.json` eval #1 expectation updated to match.
- `README.md` Persistence section updated to name the real default path.
- CHANGELOG + version bump.

## Test plan

- `scripts/check-changelog-parity.sh --check-bump origin/main` — pass
(0.3.6 has a CHANGELOG entry).
- `scripts/check-changed-skills.sh origin/main` — PASS, 0 errors (1
pre-existing Gotchas warning, scoped to #1158).
- `grep -rn CLAUDE_PLUGIN_DATA plugins/architecture/` — no remaining
references.

## Related

Refs #1157, #1158 — follow-up findings from the same consumer audit
(handoff-inbox item
`20260723-092605-architecture-improve-deepening-audit`), serialized
behind this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 23, 2026
…ld (PR #1162 review)

Two Important review findings on the scan-briefing change:

- scan-briefing.md intro declared "four parts" but the template has five
  sections; the omitted one is §4 badge-acceptance heuristics — exactly
  the scan-time calibration this change exists to inject (F4). A caller
  following the stated count could send a briefing without it. Now "five
  parts", heuristics enumerated. (claude review #1 + Codex P2)
- Phase 1.5 gated on candidates that "will carry a Strong badge" and their
  shallow-signal, but at Phase 1.5 only the scan-time confidence field
  exists (strong|worth-exploring|speculative) — the recommendation badge
  is assigned in Phase 2. Gate now keys on `confidence: strong`, and
  Phase 2 states the confidence->badge mapping explicitly, resolving the
  field-name and case-style mismatch. (claude review #2)

Also sharpened the durable artifact's deepening vs shallow-signal field
descriptions with contrasting examples so they aren't filled redundantly
(claude review nit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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