Skip to content

feat(raijin): generate project scaffolds#863

Draft
TorinAsakura wants to merge 21 commits into
pre-v3/architecture-foundationfrom
feat/generate-project-scaffolds
Draft

feat(raijin): generate project scaffolds#863
TorinAsakura wants to merge 21 commits into
pre-v3/architecture-foundationfrom
feat/generate-project-scaffolds

Conversation

@TorinAsakura

@TorinAsakura TorinAsakura commented Jul 20, 2026

Copy link
Copy Markdown
Member

Task

  • Close [Feature] Generate project scaffolds #846
  • Restore nested Yarn command execution to Yarn's makeScriptEnv wrappers without Corepack re-entry; keep the package-script setup hook limited to the managed Node loader
  • Rebuild generate project as the project-generation slice under [Epic] Generation architecture #803: yarn/plugin-generate owns the Clipanion command and project presentation, yarn/raijin/src/application/generation/project/scaffold owns the typed application scenario, and yarn/raijin/src/infrastructure/generation/project owns the Angular, Yarn, and generated GitHub workflow adapters
  • Replace the old code/code-schematics and plugin-schematics route with the bundled @atls/raijin Angular collection resolved through package schematics metadata
  • Generate workflow templates through a Raijin-owned workflow policy instead of carrying the legacy Node 18.19, GCR, GCR_*, and old action-version baseline
  • Remove the legacy command workflow, provider-shaped results, path guesses, package-local MJS consumer, root subject buckets, and interfaces embedded in implementation files from this route
  • Keep existing-workspace script migration outside this PR: generate project preserves existing package.json scripts and does not rewrite old start: "yarn node dist/index.js" entries to yarn service start or yarn renderer start

How to verify

Main scenario

  1. Context: Disposable PnP and node-modules monorepos use the checked-in Yarn runtime and a packed current @atls/raijin
    Action: Run yarn generate project for project and library from nested workspace directories
    Expected result: Yarn resolves the installed Raijin package, materializes its bundled Angular collection from package metadata, and writes the exact variant scaffold files with the expected package.json, tsconfig.json, .gitignore, Husky, and GitHub workflow content

  2. Context: An existing workspace has its own package.json scripts and project-specific .gitignore
    Action: Run yarn generate project against that workspace
    Expected result: The scaffold applies the generated baseline, preserves existing scripts as-is, and merges .gitignore without treating script migration as part of generation

  3. Context: Raijin is installed with its current package manifest
    Action: Render generated GitHub workflows for project and library scaffolds
    Expected result: Workflow actions are resolved from the generated workflow policy, Node is derived from the installed @types/node major, publishing uses NPM_TOKEN, and project image workflows target GHCR with GITHUB_TOKEN

  4. Context: A Raijin command delegates to a nested Yarn command under project PnP
    Action: Run formatting, type checking, tests, and package builds through the checked-in runtime
    Expected result: Yarn materializes its own command wrappers without nested Corepack package resolution, while the managed Node loader and project PnP state remain active

Additional scenario

  1. Context: A disposable workspace requests an unsupported scaffold type
    Action: Run yarn generate project --type service
    Expected result: The command exits with code 1, reports the typed validation failure, and leaves the target unchanged

  2. Context: The collection provider is unavailable, the collection is corrupt, or a schematic rule fails after staging tree changes
    Action: Execute the application scenario through the Yarn and Angular infrastructure adapters
    Expected result: The scenario returns a typed failure, releases temporary package files, and commits no partial tree writes

Proofs

  • Project generation contract tests
yarn node --test yarn/raijin/src/infrastructure/generation/project/github/workflows/policy.test.ts
yarn node --test yarn/raijin/src/infrastructure/generation/project/angular/scaffold/execute.test.ts
yarn test yarn/raijin/src/application/generation/project/scaffold/use-case.test.ts yarn/plugin-generate/sources/project/presentation/render.test.ts yarn/raijin/src/infrastructure/generation/project/angular/rules/gitignore/rule.test.ts yarn/raijin/src/infrastructure/generation/project/yarn/collection/package.test.ts
exit 0
  • Package and runtime builds
yarn workspace @atls/raijin build
yarn workspace @atls/yarn-plugin-generate build
yarn workspace @atls/yarn-cli build
exit 0
  • Checked runtime, documentation, and disposable consumer gate
yarn raijin:check
Generated raijin artifacts: 38 commands 58 workspace packages (active: 38, inactive: 0)
CLI surface check passed (38 commands, 46 plugins)
Localization sync check passed
Deterministic smoke passed (7 cases)
Disposable generate project consumer passed with pnp
Disposable generate project consumer passed with node-modules
Disposable yarnPath consumer passed (1.3.27-atls)
  • Consumer compatibility for nested command execution
Node 24.16.0: owner/guard tests 10/10; typecheck/test; renderer, service, and library builds; renderer/service HTTP 200
Node 25.9.0: owner/guard tests 10/10; typecheck/test; renderer, service, and library builds; renderer HTTP 200
Node 22.22.3: owner/guard tests 10/10; typecheck/test; renderer, service, and library builds; renderer HTTP 200
yarn check
yarn version check
git diff --check
exit 0
  • Deterministic runtime SHA-256
d6fc9f42203e251ed179a10dd93ef74887f6f6e5771e6577ea9222b56ed681a2  yarn/cli/dist/runtime/yarn.mjs
d6fc9f42203e251ed179a10dd93ef74887f6f6e5771e6577ea9222b56ed681a2  .yarn/releases/yarn.mjs

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@TorinAsakura

Copy link
Copy Markdown
Member Author

@codex review

@TorinAsakura TorinAsakura self-assigned this Jul 20, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 2f975aeb41

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

@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: e61e4155c0

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

@TorinAsakura

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: e61e4155c0

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

Base automatically changed from feat/generate-commands to pre-v3/architecture-foundation July 24, 2026 00:41
… into fix/raijin-package-artifact-contract

# Conflicts:
#	.yarn/releases/yarn.mjs
#	package.json
fix(raijin): restore package artifact exports

@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: 143097fb55

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

@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: 8a6360f517

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

@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: fce1af9fe8

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

@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: 48b459d391

ℹ️ 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 +14 to +16
const child = spawn(file, args, {
stdio: 'inherit',
shell: false,

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 Launch Windows command shims through a shell

On Windows, the yarn and builder executables placed in the script environment are .cmd shims, which child_process.spawn cannot execute with shell: false. Consequently, yarn workspace @atls/yarn-cli build fails immediately at the nested yarn invocation (and would likewise fail at builder), whereas the previous Yarn-script implementation used Yarn's portable shell. Select the platform-specific .cmd executable or enable a shell on Windows.

Useful? React with 👍 / 👎.

@TorinAsakura
TorinAsakura marked this pull request as draft July 25, 2026 01:29
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.

2 participants