Skip to content

Scaffold Policy Engine projects - #520

Merged
bencmbrook merged 20 commits into
mainfrom
benbrook/policy-init-scaffolding
Sep 9, 2026
Merged

bencmbrook merged 20 commits into
mainfrom
benbrook/policy-init-scaffolding

Conversation

@bencmbrook

@bencmbrook bencmbrook commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Related Issues

Public Changelog

  • Added: Interactive transcend policy init scaffolding for local Policy Engine projects.
  • Updated: transcend policy lint now verifies production compilation, formatting, Regal findings, tests, and the publish contract.
Screen.Recording.2026-09-08.at.9.04.27.PM.mov

Internal Changelog

  • Generalized transactional project scaffolding across Custom Functions and Policy Engine while preserving repository boundaries and rollback safety.
  • Added repository-level editor setup, a project-local Policy Engine Agent Skill, and credential-free validation CI.
  • Isolated external-runtime integration suites and made them merge-blocking through the existing required check.

Security Implications

  • Generated CI remains read-only and contains no Transcend credentials or publish step.
  • Scaffolding rejects physical path escapes, and policy validation rejects references that activation cannot safely re-namespace.

System Availability

[none]

@bencmbrook

Copy link
Copy Markdown
Member Author

Merged the latest stacked parent through 318b98a and resolved the one content conflict semantically:

  • packages/cli/src/lib/custom-functions/scaffold-planning.ts: retained the child's shared displayProjectPath / quoteShellArgument primitives, while applying the parent's new local custom-functions run next step and canonical --parameters guidance.
  • Regenerated packages/cli/README.md from command routes/readmes after the merge.
  • Follow-up alignment switched the parent's new run/AI-handoff paths to the child's shared ScaffoldPrompts and quoteShellArgument APIs.

Targeted and full CLI validation passed with Deno 2.4.5, OPA 1.13.1, and Regal 0.42.0.

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@transcend-io/airgap.js-types

pnpm add https://pkg.pr.new/@transcend-io/airgap.js-types@520
yarn add https://pkg.pr.new/@transcend-io/airgap.js-types@520.tgz

@transcend-io/cli

pnpm add https://pkg.pr.new/@transcend-io/cli@520
yarn add https://pkg.pr.new/@transcend-io/cli@520.tgz

@transcend-io/custom-function-types

pnpm add https://pkg.pr.new/@transcend-io/custom-function-types@520
yarn add https://pkg.pr.new/@transcend-io/custom-function-types@520.tgz

@transcend-io/design-tokens

pnpm add https://pkg.pr.new/@transcend-io/design-tokens@520
yarn add https://pkg.pr.new/@transcend-io/design-tokens@520.tgz

@transcend-io/internationalization

pnpm add https://pkg.pr.new/@transcend-io/internationalization@520
yarn add https://pkg.pr.new/@transcend-io/internationalization@520.tgz

@transcend-io/privacy-types

pnpm add https://pkg.pr.new/@transcend-io/privacy-types@520
yarn add https://pkg.pr.new/@transcend-io/privacy-types@520.tgz

@transcend-io/sdk

pnpm add https://pkg.pr.new/@transcend-io/sdk@520
yarn add https://pkg.pr.new/@transcend-io/sdk@520.tgz

@transcend-io/type-utils

pnpm add https://pkg.pr.new/@transcend-io/type-utils@520
yarn add https://pkg.pr.new/@transcend-io/type-utils@520.tgz

@transcend-io/utils

pnpm add https://pkg.pr.new/@transcend-io/utils@520
yarn add https://pkg.pr.new/@transcend-io/utils@520.tgz

@transcend-io/mcp

pnpm add https://pkg.pr.new/@transcend-io/mcp@520
yarn add https://pkg.pr.new/@transcend-io/mcp@520.tgz

@transcend-io/mcp-server-admin

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-admin@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-admin@520.tgz

@transcend-io/mcp-server-assessment

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-assessment@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-assessment@520.tgz

@transcend-io/mcp-server-base

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-base@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-base@520.tgz

@transcend-io/mcp-server-consent

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-consent@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-consent@520.tgz

@transcend-io/mcp-server-discovery

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-discovery@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-discovery@520.tgz

@transcend-io/mcp-server-docs

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-docs@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-docs@520.tgz

@transcend-io/mcp-server-dsr

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-dsr@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-dsr@520.tgz

@transcend-io/mcp-server-inventory

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-inventory@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-inventory@520.tgz

@transcend-io/mcp-server-preferences

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-preferences@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-preferences@520.tgz

@transcend-io/mcp-server-workflows

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-workflows@520
yarn add https://pkg.pr.new/@transcend-io/mcp-server-workflows@520.tgz

commit: 1b1e4e8

@bencmbrook
bencmbrook force-pushed the benbrook/link-8250-custom-function-scaffolding branch from cfc8ec1 to 70b224b Compare September 8, 2026 21:45
Base automatically changed from benbrook/link-8250-custom-function-scaffolding to main September 8, 2026 22:00
@bencmbrook
bencmbrook force-pushed the benbrook/policy-init-scaffolding branch from 6476c44 to 74dc3ee Compare September 8, 2026 22:21
@bencmbrook
bencmbrook marked this pull request as ready for review September 8, 2026 23:28
@bencmbrook
bencmbrook requested review from a team as code owners September 8, 2026 23:28
@bencmbrook

Copy link
Copy Markdown
Member Author

@Utsav-Patel when reviewing, don't worry about policy structure itself; that is intentionally left very empty / TBD

@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

LINK-8304

Keep repository setup anchored to the invocation repository and
recheck preview assumptions before writes. Remove newly created
directories during rollback. Only point the AI handoff at the
generated example when its exact scaffold is present.
Reject package references that activation cannot safely re-namespace.
Run strict OPA checks against the production-only file set and make
Regal warnings fail the canonical gate. Keep generated CI, editor
settings, help, and Agent Skill guidance aligned with that contract.
Preserve the existing required global check while making it depend on
both the global verification suite and the external-runtime job. This
keeps Deno, OPA, and Regal contract failures merge-blocking without a
repository ruleset migration.
@bencmbrook bencmbrook changed the title feat(cli): scaffold policy projects Scaffold Policy Engine projects Sep 9, 2026
@bencmbrook
bencmbrook requested a review from a team September 9, 2026 00:22
Restore starter files when a revert leaves only empty directories. Address the AI handoff directly to the coding agent and reference the installed policy skill.
giacaglia
giacaglia previously approved these changes Sep 9, 2026

@giacaglia giacaglia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool!

@Utsav-Patel

Copy link
Copy Markdown
Member

Will review this PR tomorrow morning.

Utsav-Patel
Utsav-Patel previously approved these changes Sep 9, 2026

@Utsav-Patel Utsav-Patel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good from higher level. I couldn't find any but just wanna confirm that this won't affect any existing commands that we've.

Adopt the merged scaffold output and installation conventions. Update the new Custom Function selector to use the shared prompt adapter introduced by this branch.
@bencmbrook
bencmbrook dismissed stale reviews from Utsav-Patel and giacaglia via d0561ff September 9, 2026 22:05
@bencmbrook

Copy link
Copy Markdown
Member Author

Looks good from higher level. I couldn't find any but just wanna confirm that this won't affect any existing commands that we've.

@Utsav-Patel some minor impact:

  • policy lint becomes stricter: it now requires a manifest, OPA 1.x, Regal, formatting, production compilation, and tests. Existing lint invocations may newly fail.
  • policy publish adds stricter pre-upload validation for unsafe package/root references.

Unchanged:

  • Custom Function command flags and routes are unchanged. Their internals were generalized, with stricter filesystem safety and minor output formatting changes.
  • Other policy commands are unchanged except improved missing-OPA wording.

@bencmbrook

Copy link
Copy Markdown
Member Author

reviews were dismissed on next commit but i think we're good here

@bencmbrook
bencmbrook merged commit f74e10f into main Sep 9, 2026
6 checks passed
@bencmbrook
bencmbrook deleted the benbrook/policy-init-scaffolding branch September 9, 2026 22:57
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.

3 participants