Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates the packages/software-factory module layout by moving previously split library code from scripts/lib/ into src/, deleting an obsolete CLI entrypoint, relocating the smoke-test realm script into scripts/smoke-tests/, and updating import paths across tests, scripts, and smoke tests accordingly.
Changes:
- Move shared library modules into
src/(and adjust relative-path constants accordingly). - Split test-run functionality into cohesive modules (
test-run-*.ts) and add a barrel re-export (factory-test-realm.ts). - Update imports across tests/scripts and remove
src/cli/smoke-realm.ts+ its package.json script.
Reviewed changes
Copilot reviewed 38 out of 51 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/software-factory/tests/runtime-schema.spec.ts | Updates imports to use src/ modules after consolidation. |
| packages/software-factory/tests/realm-auth.test.ts | Updates matrixLogin import to new src/boxel location. |
| packages/software-factory/tests/factory-tool-registry.test.ts | Updates ToolRegistry imports to src/. |
| packages/software-factory/tests/factory-tool-executor.test.ts | Updates ToolExecutor/Registry imports to src/. |
| packages/software-factory/tests/factory-tool-executor.spec.ts | Updates Playwright spec imports to src/ modules. |
| packages/software-factory/tests/factory-tool-executor.integration.test.ts | Updates integration test imports to src/. |
| packages/software-factory/tests/factory-tool-builder.test.ts | Updates tool builder/executor/types imports to src/. |
| packages/software-factory/tests/factory-test-realm.test.ts | Updates factory test realm imports to src/ modules. |
| packages/software-factory/tests/factory-test-realm.spec.ts | Updates realm file ops/test realm imports to src/. |
| packages/software-factory/tests/factory-skill-loader.test.ts | Updates skill loader + agent type imports to src/. |
| packages/software-factory/tests/factory-prompt-loader.test.ts | Updates prompt loader + agent type imports to src/. |
| packages/software-factory/tests/factory-loop.test.ts | Updates loop + tool builder imports to src/. |
| packages/software-factory/tests/factory-implement.test.ts | Updates implement orchestration imports to src/. |
| packages/software-factory/tests/factory-context-builder.test.ts | Updates context builder/skill loader imports to src/. |
| packages/software-factory/tests/factory-agent.test.ts | Updates agent/tool builder imports to src/. |
| packages/software-factory/tests/factory-agent.integration.test.ts | Updates integration agent import to src/. |
| packages/software-factory/src/test-run-types.ts | Introduces shared types for realm test execution and TestRun cards. |
| packages/software-factory/src/test-run-parsing.ts | Adds QUnit result parsing + TestResult summary formatting. |
| packages/software-factory/src/test-run-execution.ts | Adjusts host dist path resolution to match new src/ location. |
| packages/software-factory/src/test-run-cards.ts | Adds TestRun card create/complete/build helpers. |
| packages/software-factory/src/realm-operations.ts | Centralizes realm HTTP operations under src/. |
| packages/software-factory/src/factory-tool-registry.ts | Moves tool manifests + ToolRegistry to src/. |
| packages/software-factory/src/factory-tool-executor.ts | Moves ToolExecutor to src/ and wires realm/script/boxel-cli execution. |
| packages/software-factory/src/factory-tool-builder.ts | Moves ToolBuilder to src/ and wraps registered tools + realm ops. |
| packages/software-factory/src/factory-test-realm.ts | Adds barrel re-export for the split test-run modules. |
| packages/software-factory/src/factory-target-realm.ts | Updates imports to new src/boxel + src/realm-operations. |
| packages/software-factory/src/factory-skill-loader.ts | Updates PACKAGE_ROOT resolution for new src/ location. |
| packages/software-factory/src/factory-prompt-loader.ts | Updates prompts directory path for new src/ location. |
| packages/software-factory/src/factory-loop.ts | Moves loop orchestrator into src/. |
| packages/software-factory/src/factory-implement.ts | Updates imports and PACKAGE_ROOT for the new layout. |
| packages/software-factory/src/factory-entrypoint.ts | Updates implement import to src/. |
| packages/software-factory/src/factory-context-builder.ts | Adds ContextBuilder under src/. |
| packages/software-factory/src/factory-agent.ts | Updates realm-auth import path and re-exports types/tool-use agent. |
| packages/software-factory/src/factory-agent-types.ts | Introduces shared agent/tool/test types module. |
| packages/software-factory/src/factory-agent-tool-use.ts | Updates realm-auth import path to new src/ location. |
| packages/software-factory/src/factory-agent-mocks.ts | Adds deterministic mock agents for unit/smoke tests. |
| packages/software-factory/src/darkfactory-schemas.ts | Moves runtime schema fetching + card doc builder into src/. |
| packages/software-factory/src/cli/smoke-realm.ts | Removes obsolete CLI entrypoint. |
| packages/software-factory/src/boxel.ts | Updates error-format import to new src/ location. |
| packages/software-factory/scripts/smoke-tests/smoke-test-realm.ts | Relocates smoke realm test script and updates imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-tools-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-skill-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-prompt-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-loop-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-context-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/smoke-tests/factory-agent-smoke.ts | Updates smoke test imports to src/. |
| packages/software-factory/scripts/run-realm-tests.ts | Updates imports to src/boxel and src/realm-operations. |
| packages/software-factory/scripts/pick-ticket.ts | Updates imports to src/boxel. |
| packages/software-factory/scripts/boxel-session.ts | Updates imports to src/boxel. |
| packages/software-factory/scripts/boxel-search.ts | Updates imports to src/boxel. |
| packages/software-factory/package.json | Removes obsolete smoke:realm script and points smoke:test-realm to new script location. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lukemelia
approved these changes
Apr 8, 2026
ad707ac to
65b7818
Compare
…/lib/) Move all 20 library modules from scripts/lib/ into src/ so there is a single canonical location for importable code. Remove the obsolete smoke-realm CLI entrypoint and relocate smoke-test-realm into scripts/smoke-tests/ where it belongs. Update every import path and __dirname-relative resolution across src/, scripts/, and tests/. All 386 node tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65b7818 to
220ddf3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/lib/intosrc/, eliminating the confusing split wherefactory-bootstrap.tslived insrc/butfactory-loop.tslived inscripts/lib/src/cli/smoke-realm.ts(Playwright specs and realm-read tool executor test now cover this path)src/cli/smoke-test-realm.tstoscripts/smoke-tests/alongside the other smoke testsNew layout
src/— all library modules (30 files)src/cli/— thin CLI entrypoints only (4 files)src/harness/— test infrastructure (unchanged)scripts/— standalone tools (boxel-search, pick-ticket, etc.)scripts/smoke-tests/— all smoke tests (7 files)Test plan
pnpm --filter software-factory test:node)pnpm --filter software-factory lint:js)../base/*.gtserrors, unrelated)Closes CS-10585
🤖 Generated with Claude Code