Skip to content

CI-check flow, repo-creation safety, and dev-start/dev-complete refactors - #3

Open
vkryzhanovskyi-1544 wants to merge 9 commits into
mainfrom
feature/ci-check
Open

CI-check flow, repo-creation safety, and dev-start/dev-complete refactors#3
vkryzhanovskyi-1544 wants to merge 9 commits into
mainfrom
feature/ci-check

Conversation

@vkryzhanovskyi-1544

Copy link
Copy Markdown
Contributor

Summary

Adds an automated CI-check flow for pull requests, hardens the plugin against
ever creating a repository, and refactors the dev-start / dev-complete guidance
for clarity and DRY. Docs + JS only — no Salesforce metadata, no org needed.

What's included (by area)

  • feat(dev-check) — new /dev-check skill + shared references/ci-flow.md
    (single source of truth): watch a PR's checks, auto-fix small mechanical
    failures (lint + self-inflicted build/deploy, incl. the single-sandbox
    cross-branch case), escalate the rest into a note on the PR. dev-complete
    Step 7 runs the same flow inline after opening a PR.
  • feat(dev-complete)references/pr-description.md: PR bodies are now a
    developer-facing analysis grounded in the actual diff, with a mandatory
    LWC-vs-non-LWC breakdown (fixes Apex changes being mislabelled "LWC only").
  • refactor(dev-start) — clearer "fresh setup per feature" rule (the new-vs-
    continued-feature boundary is the user's call, not automatic); deploy guidance
    extracted into references/deploy.md to keep SKILL.md lean.
  • fix(security) — see below.
  • testtests/check_integrity.py (references resolve, frontmatter valid,
    JS compiles) and tests/test_permissions.js (safe allowlist merge + deny
    guards). Offline, non-zero exit on failure.
  • chore — bump plugin version to 0.2.0.

Notable behavior changes — reviewer, look here

  • Security (incident-driven): the plugin once created a brand-new repo,
    populated main, and opened a PR to it. Now gh repo create/delete/…,
    gh api … POST, and git init are hard-denied; gh repo is narrowed to
    list/view/clone; the blanket gh api is dropped; and Step 3 carries an
    explicit "never create a repository" rule. Deny overrides allow, so users who
    still carry a broad gh repo * from an earlier version are protected too.
  • Permissions: git push, gh pr create, gh pr edit, the read-only CI
    commands (gh pr/run), and git diff are now pre-approved so the build-and-
    ship flow runs prompt-free; the ASK list is emptied.
  • Automation: dev-check will commit and push small CI fixes on its own
    (bounded: ≤2 rounds, no force-push, feature branch only).

Volodymyr Kryzhanovskyi and others added 7 commits July 10, 2026 19:15
Add /dev-check: watches a PR's checks, auto-fixes small mechanical failures, escalates the rest. The full procedure lives in dev-check/references/ci-flow.md so dev-complete reuses it (Step 7 runs it inline after opening a PR). Widen dev-complete allowed-tools so it can apply fixes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add references/pr-description.md: base the PR body on the actual diff and always give an explicit LWC vs non-LWC breakdown (call out Apex/metadata prominently, or state 'LWC only' only after verifying). Point Step 5 at it to stop mislabelling Apex changes as LWC-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Skip setup only when this skill did the fresh setup this session for the same feature; an existing checkout on disk is never a reason to build in place. The 'new feature vs more work on the current one' boundary is the user's call — offer a fresh clone and wait for confirmation, don't auto-restart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the deploy command, the conflict-resolution decision tree, and the success card out of Step 8 into references/deploy.md (loaded on demand); Step 8 item 4 now points to it. Build-location guidance stays in item 3. Keeps SKILL.md lean and separates build from deploy.

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

Add a hard 'never create a repository' rule to Step 3 (this skill only clones existing repos). In setup-permissions.js: narrow gh repo to list/view/clone, drop the blanket gh api, and hard-deny repo-mutating commands (gh repo create/delete/fork/rename/archive/edit, gh api POST, git init) — deny overrides allow, so it also protects users who still carry a broad rule. Also pre-approve read-only CI commands (gh pr/run), git diff, and the outward push / gh pr create / gh pr edit so the build-and-ship flow runs prompt-free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tests/check_integrity.py (references resolve, frontmatter valid, JS compiles) and tests/test_permissions.js (safe allowlist merge + repo-creation deny guards). Offline, no side effects, non-zero exit on failure.

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