@arcbridge/core 0.2.1 → 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.
package/dist/index.js CHANGED
@@ -832,6 +832,41 @@ ${input.quality_priorities.map((q, i) => `| ${i + 1} | ${q} | *Describe what ${q
832
832
  };
833
833
  }
834
834
 
835
+ // src/templates/arc42/02-constraints.ts
836
+ function constraintsTemplate(input) {
837
+ return {
838
+ frontmatter: {
839
+ section: "constraints",
840
+ schema_version: 1
841
+ },
842
+ body: `# Architecture Constraints
843
+
844
+ Document the constraints that shape architectural decisions for ${input.name}. Constraints are non-negotiable requirements from the environment \u2014 they are not chosen, they are given.
845
+
846
+ ## Technical Constraints
847
+
848
+ | Constraint | Description |
849
+ |-----------|-------------|
850
+ | *e.g., Must run on Node.js 22+* | *Explain why this constraint exists* |
851
+ | *e.g., No native dependencies* | *Required for CI/CD compatibility* |
852
+
853
+ ## Organizational Constraints
854
+
855
+ | Constraint | Description |
856
+ |-----------|-------------|
857
+ | *e.g., Team of 1-2 developers* | *Impacts architecture complexity budget* |
858
+ | *e.g., Must ship MVP in 4 weeks* | *Impacts scope and technology choices* |
859
+
860
+ ## Legal / Compliance Constraints
861
+
862
+ | Constraint | Description |
863
+ |-----------|-------------|
864
+ | *e.g., GDPR compliance required* | *Impacts data storage and processing* |
865
+ | *e.g., MIT-compatible dependencies only* | *Impacts library selection* |
866
+ `
867
+ };
868
+ }
869
+
835
870
  // src/templates/arc42/03-context.ts
836
871
  function techStack(template) {
837
872
  switch (template) {
@@ -887,6 +922,47 @@ ${techStack(input.template)}
887
922
  };
888
923
  }
889
924
 
925
+ // src/templates/arc42/04-solution-strategy.ts
926
+ function solutionStrategyTemplate(input) {
927
+ return {
928
+ frontmatter: {
929
+ section: "solution-strategy",
930
+ schema_version: 1
931
+ },
932
+ body: `# Solution Strategy
933
+
934
+ Document the fundamental decisions and solution approaches that drive the architecture of ${input.name}. This section explains *why* the architecture looks the way it does \u2014 connecting quality goals to technical decisions.
935
+
936
+ ## Technology Decisions
937
+
938
+ | Decision | Rationale | Quality Goal |
939
+ |----------|-----------|-------------|
940
+ | *e.g., Use TypeScript* | *Type safety reduces runtime errors* | *Reliability, Maintainability* |
941
+ | *e.g., Use SQLite for local storage* | *Zero-config, no external service dependency* | *Maintainability* |
942
+
943
+ ## Architecture Approach
944
+
945
+ *Describe the high-level architecture pattern and why it was chosen.*
946
+
947
+ - *e.g., Layered architecture with clear module boundaries (enforced by ArcBridge building blocks)*
948
+ - *e.g., YAML as source of truth, DB as queryable cache \u2014 enables version control and human readability*
949
+
950
+ ## Quality Goal Strategies
951
+
952
+ | Quality Goal | Strategy |
953
+ |-------------|----------|
954
+ ${input.quality_priorities.map((q) => `| ${q} | *How will you achieve ${q}?* |`).join("\n")}
955
+
956
+ ## Decomposition Approach
957
+
958
+ *How is the system broken down into building blocks? What principles guide the decomposition?*
959
+
960
+ - *e.g., Feature-based: each major feature is a building block with clear interfaces*
961
+ - *e.g., Layer-based: presentation, business logic, data access*
962
+ `
963
+ };
964
+ }
965
+
890
966
  // src/templates/arc42/05-building-blocks.ts
891
967
  import { existsSync as existsSync2, readdirSync } from "fs";
892
968
  import { join as join3 } from "path";
@@ -2297,7 +2373,9 @@ function generateArc42(targetDir, input) {
2297
2373
  mkdirSync2(decisionsDir, { recursive: true });
2298
2374
  const sections = [
2299
2375
  { file: "01-introduction.md", template: introductionTemplate },
2376
+ { file: "02-constraints.md", template: constraintsTemplate },
2300
2377
  { file: "03-context.md", template: contextTemplate },
2378
+ { file: "04-solution-strategy.md", template: solutionStrategyTemplate },
2301
2379
  { file: "05-building-blocks.md", template: buildingBlocksTemplate },
2302
2380
  { file: "06-runtime-views.md", template: runtimeViewsTemplate },
2303
2381
  { file: "07-deployment.md", template: deploymentTemplate },
@@ -2335,7 +2413,7 @@ function phasePlanTemplate(_input) {
2335
2413
  id: "phase-0-setup",
2336
2414
  name: "Project Setup",
2337
2415
  phase_number: 0,
2338
- status: "in-progress",
2416
+ status: "planned",
2339
2417
  description: "Initialize project structure, install dependencies, configure tooling",
2340
2418
  gate_requirements: [
2341
2419
  "Project builds successfully",
@@ -2600,7 +2678,7 @@ function phasePlanTemplate2(_input) {
2600
2678
  id: "phase-0-setup",
2601
2679
  name: "Project Setup",
2602
2680
  phase_number: 0,
2603
- status: "in-progress",
2681
+ status: "planned",
2604
2682
  description: "Initialize Vite + React project, configure TypeScript, install dependencies",
2605
2683
  gate_requirements: [
2606
2684
  "Project builds successfully with Vite",
@@ -2866,7 +2944,7 @@ function phasePlanTemplate3(_input) {
2866
2944
  id: "phase-0-setup",
2867
2945
  name: "Project Setup",
2868
2946
  phase_number: 0,
2869
- status: "in-progress",
2947
+ status: "planned",
2870
2948
  description: "Initialize API service, configure TypeScript, set up database and middleware",
2871
2949
  gate_requirements: [
2872
2950
  "Project builds successfully",
@@ -3049,7 +3127,7 @@ function phasePlanTemplate4(_input) {
3049
3127
  id: "phase-0-setup",
3050
3128
  name: "Project Setup",
3051
3129
  phase_number: 0,
3052
- status: "in-progress",
3130
+ status: "planned",
3053
3131
  description: "Initialize ASP.NET Core project, configure DI, set up database and middleware pipeline",
3054
3132
  gate_requirements: [
3055
3133
  "Project builds and runs successfully",
@@ -3248,7 +3326,7 @@ function phasePlanTemplate5(_input) {
3248
3326
  id: "phase-0-setup",
3249
3327
  name: "Project Setup",
3250
3328
  phase_number: 0,
3251
- status: "in-progress",
3329
+ status: "planned",
3252
3330
  description: "Initialize Unity project structure, configure input system, core game loop, and assembly definitions",
3253
3331
  gate_requirements: [
3254
3332
  "Unity project opens and runs without errors",
@@ -3533,7 +3611,9 @@ You are responsible for maintaining these sections in \`.arcbridge/arc42/\`. Upd
3533
3611
  | Section | File | When to update |
3534
3612
  |---------|------|----------------|
3535
3613
  | **01 Introduction & Goals** | \`01-introduction.md\` | When project scope, stakeholders, or key goals change |
3614
+ | **02 Architecture Constraints** | \`02-constraints.md\` | When new constraints are discovered (technical, organizational, legal) |
3536
3615
  | **03 Context & Scope** | \`03-context.md\` | When adding/removing external systems, APIs, or integrations |
3616
+ | **04 Solution Strategy** | \`04-solution-strategy.md\` | When fundamental technology or architecture decisions change |
3537
3617
  | **05 Building Blocks** | \`05-building-blocks.md\` | When adding new modules, changing responsibilities, or restructuring layers |
3538
3618
  | **06 Runtime Views** | \`06-runtime-views.md\` | When adding key workflows (e.g., auth flow, order processing, data sync) |
3539
3619
  | **07 Deployment** | \`07-deployment.md\` | When changing infrastructure, environments, or deployment strategy |