opencastle 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +16 -7
  2. package/bin/cli.mjs +2 -3
  3. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  4. package/dist/cli/adapters/claude-code.js +7 -3
  5. package/dist/cli/adapters/claude-code.js.map +1 -1
  6. package/dist/cli/adapters/cursor.d.ts.map +1 -1
  7. package/dist/cli/adapters/cursor.js +27 -9
  8. package/dist/cli/adapters/cursor.js.map +1 -1
  9. package/dist/cli/dashboard.d.ts.map +1 -1
  10. package/dist/cli/dashboard.js +7 -4
  11. package/dist/cli/dashboard.js.map +1 -1
  12. package/dist/cli/eject.d.ts +1 -1
  13. package/dist/cli/eject.d.ts.map +1 -1
  14. package/dist/cli/eject.js +6 -1
  15. package/dist/cli/eject.js.map +1 -1
  16. package/dist/cli/gitignore.d.ts +11 -0
  17. package/dist/cli/gitignore.d.ts.map +1 -0
  18. package/dist/cli/gitignore.js +61 -0
  19. package/dist/cli/gitignore.js.map +1 -0
  20. package/dist/cli/init.d.ts +1 -1
  21. package/dist/cli/init.d.ts.map +1 -1
  22. package/dist/cli/init.js +81 -5
  23. package/dist/cli/init.js.map +1 -1
  24. package/dist/cli/mcp.d.ts +3 -2
  25. package/dist/cli/mcp.d.ts.map +1 -1
  26. package/dist/cli/mcp.js +23 -5
  27. package/dist/cli/mcp.js.map +1 -1
  28. package/dist/cli/run/schema.d.ts.map +1 -1
  29. package/dist/cli/run/schema.js +28 -1
  30. package/dist/cli/run/schema.js.map +1 -1
  31. package/dist/cli/run.d.ts.map +1 -1
  32. package/dist/cli/run.js +16 -0
  33. package/dist/cli/run.js.map +1 -1
  34. package/dist/cli/stack-config.d.ts +13 -0
  35. package/dist/cli/stack-config.d.ts.map +1 -1
  36. package/dist/cli/stack-config.js +20 -0
  37. package/dist/cli/stack-config.js.map +1 -1
  38. package/dist/cli/update.d.ts.map +1 -1
  39. package/dist/cli/update.js +16 -3
  40. package/dist/cli/update.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/cli/adapters/claude-code.ts +7 -5
  43. package/src/cli/adapters/cursor.ts +28 -13
  44. package/src/cli/dashboard.ts +9 -4
  45. package/src/cli/eject.ts +7 -1
  46. package/src/cli/gitignore.ts +77 -0
  47. package/src/cli/init.ts +88 -5
  48. package/src/cli/mcp.ts +31 -6
  49. package/src/cli/run/schema.ts +26 -1
  50. package/src/cli/run.ts +4 -0
  51. package/src/cli/stack-config.ts +33 -0
  52. package/src/cli/update.ts +18 -3
  53. package/src/orchestrator/agent-workflows/README.md +2 -0
  54. package/src/orchestrator/agent-workflows/bug-fix.md +2 -0
  55. package/src/orchestrator/agent-workflows/data-pipeline.md +2 -0
  56. package/src/orchestrator/agent-workflows/database-migration.md +2 -0
  57. package/src/orchestrator/agent-workflows/feature-implementation.md +2 -0
  58. package/src/orchestrator/agent-workflows/performance-optimization.md +2 -0
  59. package/src/orchestrator/agent-workflows/refactoring.md +2 -0
  60. package/src/orchestrator/agent-workflows/schema-changes.md +2 -0
  61. package/src/orchestrator/agent-workflows/security-audit.md +2 -0
  62. package/src/orchestrator/agent-workflows/shared-delivery-phase.md +2 -0
  63. package/src/orchestrator/agents/api-designer.agent.md +2 -0
  64. package/src/orchestrator/agents/architect.agent.md +2 -0
  65. package/src/orchestrator/agents/content-engineer.agent.md +2 -0
  66. package/src/orchestrator/agents/copywriter.agent.md +2 -0
  67. package/src/orchestrator/agents/data-expert.agent.md +2 -0
  68. package/src/orchestrator/agents/database-engineer.agent.md +2 -0
  69. package/src/orchestrator/agents/developer.agent.md +2 -0
  70. package/src/orchestrator/agents/devops-expert.agent.md +2 -0
  71. package/src/orchestrator/agents/documentation-writer.agent.md +2 -0
  72. package/src/orchestrator/agents/performance-expert.agent.md +2 -0
  73. package/src/orchestrator/agents/release-manager.agent.md +2 -0
  74. package/src/orchestrator/agents/researcher.agent.md +2 -0
  75. package/src/orchestrator/agents/reviewer.agent.md +2 -0
  76. package/src/orchestrator/agents/security-expert.agent.md +2 -0
  77. package/src/orchestrator/agents/seo-specialist.agent.md +2 -0
  78. package/src/orchestrator/agents/team-lead.agent.md +2 -0
  79. package/src/orchestrator/agents/testing-expert.agent.md +3 -1
  80. package/src/orchestrator/agents/ui-ux-expert.agent.md +5 -3
  81. package/src/orchestrator/copilot-instructions.md +2 -0
  82. package/src/orchestrator/instructions/ai-optimization.instructions.md +2 -0
  83. package/src/orchestrator/instructions/general.instructions.md +2 -0
  84. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +2 -0
  85. package/src/orchestrator/prompts/brainstorm.prompt.md +2 -0
  86. package/src/orchestrator/prompts/bug-fix.prompt.md +2 -0
  87. package/src/orchestrator/prompts/create-skill.prompt.md +2 -0
  88. package/src/orchestrator/prompts/generate-task-spec.prompt.md +2 -0
  89. package/src/orchestrator/prompts/implement-feature.prompt.md +2 -0
  90. package/src/orchestrator/prompts/metrics-report.prompt.md +2 -0
  91. package/src/orchestrator/prompts/quick-refinement.prompt.md +2 -0
  92. package/src/orchestrator/prompts/resolve-pr-comments.prompt.md +2 -0
  93. package/src/orchestrator/skills/accessibility-standards/SKILL.md +2 -0
  94. package/src/orchestrator/skills/agent-hooks/SKILL.md +2 -0
  95. package/src/orchestrator/skills/agent-memory/SKILL.md +2 -0
  96. package/src/orchestrator/skills/api-patterns/SKILL.md +2 -0
  97. package/src/orchestrator/skills/browser-testing/SKILL.md +14 -26
  98. package/src/orchestrator/skills/code-commenting/SKILL.md +2 -0
  99. package/src/orchestrator/skills/contentful-cms/SKILL.md +2 -0
  100. package/src/orchestrator/skills/context-map/SKILL.md +2 -0
  101. package/src/orchestrator/skills/convex-database/SKILL.md +2 -0
  102. package/src/orchestrator/skills/data-engineering/SKILL.md +2 -0
  103. package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +2 -0
  104. package/src/orchestrator/skills/documentation-standards/SKILL.md +2 -0
  105. package/src/orchestrator/skills/fast-review/SKILL.md +2 -0
  106. package/src/orchestrator/skills/frontend-design/SKILL.md +2 -0
  107. package/src/orchestrator/skills/jira-management/SKILL.md +2 -0
  108. package/src/orchestrator/skills/memory-merger/SKILL.md +2 -0
  109. package/src/orchestrator/skills/nextjs-patterns/SKILL.md +2 -0
  110. package/src/orchestrator/skills/nx-workspace/SKILL.md +2 -0
  111. package/src/orchestrator/skills/panel-majority-vote/SKILL.md +2 -0
  112. package/src/orchestrator/skills/panel-majority-vote/panel-report.template.md +2 -0
  113. package/src/orchestrator/skills/performance-optimization/SKILL.md +2 -0
  114. package/src/orchestrator/skills/react-development/SKILL.md +2 -0
  115. package/src/orchestrator/skills/sanity-cms/SKILL.md +2 -0
  116. package/src/orchestrator/skills/security-hardening/SKILL.md +2 -0
  117. package/src/orchestrator/skills/self-improvement/SKILL.md +2 -0
  118. package/src/orchestrator/skills/seo-patterns/SKILL.md +2 -0
  119. package/src/orchestrator/skills/session-checkpoints/SKILL.md +2 -0
  120. package/src/orchestrator/skills/slack-notifications/SKILL.md +2 -0
  121. package/src/orchestrator/skills/strapi-cms/SKILL.md +2 -0
  122. package/src/orchestrator/skills/supabase-database/SKILL.md +2 -0
  123. package/src/orchestrator/skills/task-management/SKILL.md +2 -0
  124. package/src/orchestrator/skills/team-lead-reference/SKILL.md +2 -0
  125. package/src/orchestrator/skills/teams-notifications/SKILL.md +2 -0
  126. package/src/orchestrator/skills/testing-workflow/SKILL.md +4 -2
  127. package/src/orchestrator/skills/validation-gates/SKILL.md +4 -2
  128. package/dist/cli/diff.d.ts +0 -3
  129. package/dist/cli/diff.d.ts.map +0 -1
  130. package/dist/cli/diff.js +0 -27
  131. package/dist/cli/diff.js.map +0 -1
  132. package/src/cli/diff.ts +0 -44
@@ -3,6 +3,8 @@ name: react-development
3
3
  description: "React development standards for functional components, hooks, TypeScript integration, state management, styling with CSS Modules/Sass, and testing patterns. Use when creating or modifying React components, custom hooks, or component tests."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # React Development Standards
7
9
 
8
10
  Modern React patterns following the official React documentation at https://react.dev.
@@ -3,6 +3,8 @@ name: sanity-cms
3
3
  description: "Sanity CMS development rules, GROQ query patterns, and content management best practices. Use when working with Sanity schemas, writing GROQ queries, modifying content models, or managing CMS configuration."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Sanity CMS
7
9
 
8
10
  Generic Sanity CMS development methodology. For project-specific configuration, schemas, plugins, document types, and GROQ examples, see [sanity-config.md](../../customizations/stack/sanity-config.md).
@@ -3,6 +3,8 @@ name: security-hardening
3
3
  description: "Security architecture including authentication, authorization, RLS policies, security headers, CSP, input validation, API security, and OAuth patterns. Use when implementing auth flows, writing RLS policies, configuring security headers, validating inputs, or auditing security."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Security Hardening
7
9
 
8
10
  ## Security Architecture
@@ -3,6 +3,8 @@ name: self-improvement
3
3
  description: "Protocol for reading and updating the lessons-learned knowledge base. MUST be followed by ALL agents — read lessons before work, write lessons after retries. This makes the agent team self-improving across sessions."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Self-Improvement Protocol
7
9
 
8
10
  This skill defines how agents learn from mistakes and share knowledge so the same pitfalls are never repeated.
@@ -3,6 +3,8 @@ name: seo-patterns
3
3
  description: "Technical SEO patterns for meta tags, structured data, sitemaps, URL strategy, and rendering. Use when optimizing pages for search engines or implementing SEO features."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # SEO Patterns
7
9
 
8
10
  ## Meta Tags & Open Graph
@@ -3,6 +3,8 @@ name: session-checkpoints
3
3
  description: "Protocol for saving and restoring session state across agent sessions. Enables replay, fork, and resume of interrupted work — inspired by Sandcastle Run Time Machine."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Skill: Session Checkpoints
7
9
 
8
10
  Use this skill when working on multi-session features or when a session may be interrupted. Checkpoints allow any future session to resume work without re-analyzing the entire codebase.
@@ -3,6 +3,8 @@ name: slack-notifications
3
3
  description: "Slack MCP integration for agent-to-human notifications and bi-directional communication. Use when agents need to post progress updates, request approvals, or read user responses via Slack channels and threads."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Slack Notifications
7
9
 
8
10
  Agent communication patterns via the Slack MCP server. Enables agents to post progress updates, request human approvals, and read responses — all through Slack channels and threads.
@@ -3,6 +3,8 @@ name: strapi-cms
3
3
  description: "Strapi CMS development patterns, REST/GraphQL API usage, content type building, plugin development, and deployment best practices. Use when working with Strapi content types, controllers, services, or plugins."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Strapi CMS
7
9
 
8
10
  Generic Strapi CMS development methodology. For project-specific configuration, content types, and deployment details, see [cms-config.md](../../customizations/stack/cms-config.md).
@@ -3,6 +3,8 @@ name: supabase-database
3
3
  description: "Supabase database migration rules, RLS policy patterns, and auth integration best practices. Use when designing database tables, writing migrations, configuring RLS policies, implementing auth, or managing user roles."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Supabase Database
7
9
 
8
10
  Generic Supabase development methodology. For project-specific schema, roles, migration history, auth flow, and key files, see [supabase-config.md](../../customizations/stack/supabase-config.md).
@@ -3,6 +3,8 @@ name: task-management
3
3
  description: "Linear board conventions for tracking feature work — issue naming, labels, priorities, status workflow, and session continuity. Use when decomposing features into tasks or resuming interrupted sessions."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Task Management with Linear
7
9
 
8
10
  Conventions for tracking feature work on the Linear board via MCP tools. For project-specific team ID, workflow state UUIDs, and label UUIDs, see [linear-config.md](../../customizations/project/linear-config.md).
@@ -3,6 +3,8 @@ name: team-lead-reference
3
3
  description: "Reference data for Team Lead orchestration — model routing, pre-delegation checks, cost tracking template, and DLQ format. Load when starting a delegation session."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Team Lead Reference
7
9
 
8
10
  For the specialist agent registry and model assignments, see [agent-registry.md](../../customizations/agents/agent-registry.md).
@@ -3,6 +3,8 @@ name: teams-notifications
3
3
  description: "Microsoft Teams MCP integration for agent-to-human notifications and bi-directional communication. Use when agents need to post progress updates, request approvals, or read user responses via Teams channels and chats."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Teams Notifications
7
9
 
8
10
  Agent communication patterns via the Microsoft Teams MCP server (Microsoft Agent 365). Enables agents to post progress updates, request human approvals, and read responses — all through Teams channels and chats.
@@ -3,6 +3,8 @@ name: testing-workflow
3
3
  description: "Comprehensive testing workflow including test planning, unit/integration/E2E testing patterns, coverage requirements, and common testing mistakes. Use when writing tests, planning test strategies, or validating feature completeness."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Testing Workflow
7
9
 
8
10
  ## Core Principles
@@ -60,7 +62,7 @@ Before implementing any feature, create a plan covering:
60
62
 
61
63
  ### 6. Responsive Breakpoint Tests (MANDATORY for UI changes)
62
64
 
63
- **Every UI feature must be tested at all three breakpoints** (Mobile 375px, Tablet 768px, Desktop 1440px). Most layout bugs only surface at mobile or tablet widths.
65
+ **Every UI feature must be tested at all responsive breakpoints** defined in your project's testing config. Most layout bugs only surface at smaller viewports.
64
66
 
65
67
  > **Detailed breakpoint definitions, resize commands, and per-breakpoint checklists:** See the **browser-testing** skill. The **validation-gates** skill (Gate 3) defines the mandatory testing protocol.
66
68
 
@@ -119,7 +121,7 @@ After completing any feature:
119
121
  - [ ] Verified data changes match expectations
120
122
  - [ ] Checked edge cases
121
123
  - [ ] Confirmed empty states display correctly
122
- - [ ] **Tested at Mobile (375px), Tablet (768px), and Desktop (1440px) breakpoints**
124
+ - [ ] **Tested at all project-defined responsive breakpoints**
123
125
  - [ ] **No horizontal overflow or layout breakage at any breakpoint**
124
126
  - [ ] Taken screenshots of key scenarios
125
127
  - [ ] Verified URL parameters are correct
@@ -3,6 +3,8 @@ name: validation-gates
3
3
  description: "Shared validation gates for all orchestration workflows — deterministic checks, browser testing, cache management, regression checks. Referenced by prompt templates to maintain single source of truth."
4
4
  ---
5
5
 
6
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the customizations/ directory instead. -->
7
+
6
8
  # Validation Gates
7
9
 
8
10
  Canonical reference for validation gates shared across all orchestration workflows. Prompt templates reference this skill to avoid duplication.
@@ -56,11 +58,11 @@ Run these commands before starting the dev server for browser testing.
56
58
  2. **Navigate to affected pages** — Verify the new feature renders correctly
57
59
  3. **Verify SPECIFIC features** — Check every feature listed in the acceptance criteria. If the criteria say "icons, groups, and AND/OR toggle", you must see all three in the browser
58
60
  4. **Test interactions** — Click buttons, fill forms, toggle filters, submit data
59
- 5. **Test responsive** — Resize to mobile (375px), tablet (768px), desktop (1440px)
61
+ 5. **Test responsive** — Resize to each breakpoint defined in your project's testing config
60
62
  6. **Test edge cases** — Empty states, error states, loading states, long content
61
63
  7. **Screenshot evidence (REQUIRED)** — Take screenshots of key states. These are mandatory proof
62
64
 
63
- > **Anti-pattern:** Testing only at desktop width and assuming Tailwind classes work. They can be wrong — always verify at all three breakpoints.
65
+ > **Anti-pattern:** Testing only at desktop width and assuming responsive classes work. They can be wrong — always verify at all defined breakpoints.
64
66
 
65
67
  Load the **browser-testing** skill for Chrome MCP commands, breakpoint details, and reporting format.
66
68
 
@@ -1,3 +0,0 @@
1
- import type { CliContext } from './types.js';
2
- export default function diff({ pkgRoot }: CliContext): Promise<void>;
3
- //# sourceMappingURL=diff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/cli/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,wBAA8B,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzE"}
package/dist/cli/diff.js DELETED
@@ -1,27 +0,0 @@
1
- import { resolve } from 'node:path';
2
- import { readFile } from 'node:fs/promises';
3
- import { readManifest } from './manifest.js';
4
- export default async function diff({ pkgRoot }) {
5
- const projectRoot = process.cwd();
6
- const manifest = await readManifest(projectRoot);
7
- if (!manifest) {
8
- console.error(' ✗ No OpenCastle installation found. Run "npx opencastle init" first.');
9
- process.exit(1);
10
- }
11
- const pkg = JSON.parse(await readFile(resolve(pkgRoot, 'package.json'), 'utf8'));
12
- if (manifest.version === pkg.version) {
13
- console.log(` No changes — installed version matches package version (v${pkg.version}).`);
14
- return;
15
- }
16
- console.log(`\n 🏰 OpenCastle diff: v${manifest.version} → v${pkg.version}\n`);
17
- console.log(' Framework files that would be updated:\n');
18
- for (const path of manifest.managedPaths?.framework ?? []) {
19
- console.log(` ↻ ${path}`);
20
- }
21
- console.log('\n Customization files that would be preserved:\n');
22
- for (const path of manifest.managedPaths?.customizable ?? []) {
23
- console.log(` ✓ ${path}`);
24
- }
25
- console.log(`\n Run "npx opencastle update" to apply.\n`);
26
- }
27
- //# sourceMappingURL=diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/cli/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,EAAE,OAAO,EAAc;IACxD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAEjC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,CAAA;IAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CACX,wEAAwE,CACzE,CAAA;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAClC,CAAA;IAExB,IAAI,QAAQ,CAAC,OAAO,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CACT,8DAA8D,GAAG,CAAC,OAAO,IAAI,CAC9E,CAAA;QACD,OAAM;IACR,CAAC;IAED,OAAO,CAAC,GAAG,CACT,4BAA4B,QAAQ,CAAC,OAAO,OAAO,GAAG,CAAC,OAAO,IAAI,CACnE,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAA;IAEzD,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,YAAY,EAAE,SAAS,IAAI,EAAE,EAAE,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;IAC9B,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAA;IAEjE,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,YAAY,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;IAC9B,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAA;AAC5D,CAAC"}
package/src/cli/diff.ts DELETED
@@ -1,44 +0,0 @@
1
- import { resolve } from 'node:path'
2
- import { readFile } from 'node:fs/promises'
3
- import { readManifest } from './manifest.js'
4
- import type { CliContext } from './types.js'
5
-
6
- export default async function diff({ pkgRoot }: CliContext): Promise<void> {
7
- const projectRoot = process.cwd()
8
-
9
- const manifest = await readManifest(projectRoot)
10
- if (!manifest) {
11
- console.error(
12
- ' ✗ No OpenCastle installation found. Run "npx opencastle init" first.'
13
- )
14
- process.exit(1)
15
- }
16
-
17
- const pkg = JSON.parse(
18
- await readFile(resolve(pkgRoot, 'package.json'), 'utf8')
19
- ) as { version: string }
20
-
21
- if (manifest.version === pkg.version) {
22
- console.log(
23
- ` No changes — installed version matches package version (v${pkg.version}).`
24
- )
25
- return
26
- }
27
-
28
- console.log(
29
- `\n 🏰 OpenCastle diff: v${manifest.version} → v${pkg.version}\n`
30
- )
31
- console.log(' Framework files that would be updated:\n')
32
-
33
- for (const path of manifest.managedPaths?.framework ?? []) {
34
- console.log(` ↻ ${path}`)
35
- }
36
-
37
- console.log('\n Customization files that would be preserved:\n')
38
-
39
- for (const path of manifest.managedPaths?.customizable ?? []) {
40
- console.log(` ✓ ${path}`)
41
- }
42
-
43
- console.log(`\n Run "npx opencastle update" to apply.\n`)
44
- }