create-foundry-workspace 1.0.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 (126) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -0
  3. package/bin/index.js +2 -0
  4. package/dist/adapters/adapter.interface.d.ts +13 -0
  5. package/dist/adapters/adapter.interface.js +2 -0
  6. package/dist/adapters/agents.adapter.d.ts +10 -0
  7. package/dist/adapters/agents.adapter.js +16 -0
  8. package/dist/adapters/claude.adapter.d.ts +10 -0
  9. package/dist/adapters/claude.adapter.js +30 -0
  10. package/dist/adapters/codex.adapter.d.ts +10 -0
  11. package/dist/adapters/codex.adapter.js +33 -0
  12. package/dist/adapters/copilot.adapter.d.ts +10 -0
  13. package/dist/adapters/copilot.adapter.js +40 -0
  14. package/dist/adapters/cursor.adapter.d.ts +10 -0
  15. package/dist/adapters/cursor.adapter.js +41 -0
  16. package/dist/adapters/gemini.adapter.d.ts +10 -0
  17. package/dist/adapters/gemini.adapter.js +34 -0
  18. package/dist/adapters/generic.adapter.d.ts +10 -0
  19. package/dist/adapters/generic.adapter.js +34 -0
  20. package/dist/adapters/registry.d.ts +12 -0
  21. package/dist/adapters/registry.js +38 -0
  22. package/dist/bin.d.ts +3 -0
  23. package/dist/bin.js +7 -0
  24. package/dist/cli/command.d.ts +2 -0
  25. package/dist/cli/command.js +96 -0
  26. package/dist/cli/formatters.d.ts +5 -0
  27. package/dist/cli/formatters.js +30 -0
  28. package/dist/cli/prompts.d.ts +11 -0
  29. package/dist/cli/prompts.js +140 -0
  30. package/dist/config/defaults.d.ts +8 -0
  31. package/dist/config/defaults.js +7 -0
  32. package/dist/config/schema.d.ts +95 -0
  33. package/dist/config/schema.js +51 -0
  34. package/dist/core/context.d.ts +3 -0
  35. package/dist/core/context.js +16 -0
  36. package/dist/core/generator.d.ts +10 -0
  37. package/dist/core/generator.js +97 -0
  38. package/dist/core/interpolator.d.ts +6 -0
  39. package/dist/core/interpolator.js +13 -0
  40. package/dist/detection/detector.d.ts +13 -0
  41. package/dist/detection/detector.js +67 -0
  42. package/dist/detection/rules/go.d.ts +3 -0
  43. package/dist/detection/rules/go.js +19 -0
  44. package/dist/detection/rules/java.d.ts +3 -0
  45. package/dist/detection/rules/java.js +30 -0
  46. package/dist/detection/rules/node.d.ts +8 -0
  47. package/dist/detection/rules/node.js +36 -0
  48. package/dist/detection/rules/python.d.ts +3 -0
  49. package/dist/detection/rules/python.js +30 -0
  50. package/dist/detection/rules/rust.d.ts +3 -0
  51. package/dist/detection/rules/rust.js +19 -0
  52. package/dist/index.d.ts +12 -0
  53. package/dist/index.js +12 -0
  54. package/dist/io/paths.d.ts +11 -0
  55. package/dist/io/paths.js +21 -0
  56. package/dist/io/writer.d.ts +23 -0
  57. package/dist/io/writer.js +56 -0
  58. package/dist/templates/agents.d.ts +3 -0
  59. package/dist/templates/agents.js +41 -0
  60. package/dist/templates/ai-context.d.ts +3 -0
  61. package/dist/templates/ai-context.js +28 -0
  62. package/dist/templates/ai-dir/architecture.d.ts +3 -0
  63. package/dist/templates/ai-dir/architecture.js +13 -0
  64. package/dist/templates/ai-dir/context.d.ts +3 -0
  65. package/dist/templates/ai-dir/context.js +14 -0
  66. package/dist/templates/ai-dir/decisions.d.ts +3 -0
  67. package/dist/templates/ai-dir/decisions.js +21 -0
  68. package/dist/templates/ai-dir/rules.d.ts +3 -0
  69. package/dist/templates/ai-dir/rules.js +12 -0
  70. package/dist/templates/ai-dir/tasks.d.ts +3 -0
  71. package/dist/templates/ai-dir/tasks.js +31 -0
  72. package/dist/templates/app-types/api.d.ts +2 -0
  73. package/dist/templates/app-types/api.js +5 -0
  74. package/dist/templates/app-types/cli.d.ts +2 -0
  75. package/dist/templates/app-types/cli.js +5 -0
  76. package/dist/templates/app-types/data-ml.d.ts +2 -0
  77. package/dist/templates/app-types/data-ml.js +5 -0
  78. package/dist/templates/app-types/fullstack.d.ts +2 -0
  79. package/dist/templates/app-types/fullstack.js +5 -0
  80. package/dist/templates/app-types/index.d.ts +3 -0
  81. package/dist/templates/app-types/index.js +30 -0
  82. package/dist/templates/app-types/library.d.ts +2 -0
  83. package/dist/templates/app-types/library.js +5 -0
  84. package/dist/templates/app-types/mobile.d.ts +2 -0
  85. package/dist/templates/app-types/mobile.js +5 -0
  86. package/dist/templates/app-types/other.d.ts +2 -0
  87. package/dist/templates/app-types/other.js +5 -0
  88. package/dist/templates/app-types/web.d.ts +2 -0
  89. package/dist/templates/app-types/web.js +5 -0
  90. package/dist/templates/base/guardrails.d.ts +3 -0
  91. package/dist/templates/base/guardrails.js +20 -0
  92. package/dist/templates/contributing.d.ts +3 -0
  93. package/dist/templates/contributing.js +19 -0
  94. package/dist/templates/docs/architecture-doc.d.ts +3 -0
  95. package/dist/templates/docs/architecture-doc.js +22 -0
  96. package/dist/templates/docs/decisions-doc.d.ts +3 -0
  97. package/dist/templates/docs/decisions-doc.js +19 -0
  98. package/dist/templates/docs/development-doc.d.ts +3 -0
  99. package/dist/templates/docs/development-doc.js +21 -0
  100. package/dist/templates/docs/docs-readme.d.ts +3 -0
  101. package/dist/templates/docs/docs-readme.js +15 -0
  102. package/dist/templates/gitignore.d.ts +3 -0
  103. package/dist/templates/gitignore.js +109 -0
  104. package/dist/templates/guardrails-doc.d.ts +3 -0
  105. package/dist/templates/guardrails-doc.js +15 -0
  106. package/dist/templates/languages/go.d.ts +4 -0
  107. package/dist/templates/languages/go.js +11 -0
  108. package/dist/templates/languages/index.d.ts +7 -0
  109. package/dist/templates/languages/index.js +27 -0
  110. package/dist/templates/languages/java.d.ts +4 -0
  111. package/dist/templates/languages/java.js +11 -0
  112. package/dist/templates/languages/javascript.d.ts +4 -0
  113. package/dist/templates/languages/javascript.js +11 -0
  114. package/dist/templates/languages/other.d.ts +4 -0
  115. package/dist/templates/languages/other.js +11 -0
  116. package/dist/templates/languages/python.d.ts +4 -0
  117. package/dist/templates/languages/python.js +11 -0
  118. package/dist/templates/languages/rust.d.ts +4 -0
  119. package/dist/templates/languages/rust.js +11 -0
  120. package/dist/templates/languages/typescript.d.ts +4 -0
  121. package/dist/templates/languages/typescript.js +11 -0
  122. package/dist/templates/manifest.d.ts +3 -0
  123. package/dist/templates/manifest.js +17 -0
  124. package/dist/templates/readme.d.ts +3 -0
  125. package/dist/templates/readme.js +35 -0
  126. package/package.json +64 -0
@@ -0,0 +1,30 @@
1
+ import { apiRules } from './api.js';
2
+ import { cliRules } from './cli.js';
3
+ import { dataMlRules } from './data-ml.js';
4
+ import { fullstackRules } from './fullstack.js';
5
+ import { libraryRules } from './library.js';
6
+ import { mobileRules } from './mobile.js';
7
+ import { otherAppTypeRules } from './other.js';
8
+ import { webRules } from './web.js';
9
+ export function getAppTypeRules(type) {
10
+ switch (type) {
11
+ case 'web':
12
+ return webRules;
13
+ case 'api':
14
+ return apiRules;
15
+ case 'fullstack':
16
+ return fullstackRules;
17
+ case 'cli':
18
+ return cliRules;
19
+ case 'library':
20
+ return libraryRules;
21
+ case 'data-ml':
22
+ return dataMlRules;
23
+ case 'mobile':
24
+ return mobileRules;
25
+ case 'custom':
26
+ default:
27
+ return otherAppTypeRules;
28
+ }
29
+ }
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export declare const libraryRules = "### Library Architecture\n- Expose a minimal, carefully versioned public API surface through a dedicated entry point.\n- Keep internal implementation details in private modules inaccessible to consumers.\n- Maintain zero or minimal external dependencies to avoid dependency conflicts for downstream consumers.";
2
+ //# sourceMappingURL=library.d.ts.map
@@ -0,0 +1,5 @@
1
+ export const libraryRules = `### Library Architecture
2
+ - Expose a minimal, carefully versioned public API surface through a dedicated entry point.
3
+ - Keep internal implementation details in private modules inaccessible to consumers.
4
+ - Maintain zero or minimal external dependencies to avoid dependency conflicts for downstream consumers.`;
5
+ //# sourceMappingURL=library.js.map
@@ -0,0 +1,2 @@
1
+ export declare const mobileRules = "### Mobile Application Architecture\n- Separate UI view hierarchy from native device platform bridges and asynchronous networking.\n- Design defensively for offline states, background synchronizations, and volatile network connectivity.\n- Optimize memory usage, asset compression, and mobile battery consumption.";
2
+ //# sourceMappingURL=mobile.d.ts.map
@@ -0,0 +1,5 @@
1
+ export const mobileRules = `### Mobile Application Architecture
2
+ - Separate UI view hierarchy from native device platform bridges and asynchronous networking.
3
+ - Design defensively for offline states, background synchronizations, and volatile network connectivity.
4
+ - Optimize memory usage, asset compression, and mobile battery consumption.`;
5
+ //# sourceMappingURL=mobile.js.map
@@ -0,0 +1,2 @@
1
+ export declare const otherAppTypeRules = "### Architecture Conventions\n- Establish clear module boundaries and maintain separation of concerns throughout the codebase.\n- Document high-level system components and data flow in project documentation.\n- Maintain automated tests for core domain workflows.";
2
+ //# sourceMappingURL=other.d.ts.map
@@ -0,0 +1,5 @@
1
+ export const otherAppTypeRules = `### Architecture Conventions
2
+ - Establish clear module boundaries and maintain separation of concerns throughout the codebase.
3
+ - Document high-level system components and data flow in project documentation.
4
+ - Maintain automated tests for core domain workflows.`;
5
+ //# sourceMappingURL=other.js.map
@@ -0,0 +1,2 @@
1
+ export declare const webRules = "### Web Application Architecture\n- Organize UI components by domain or feature hierarchy with clear separation of presentational and container components.\n- Keep state management local where possible; lift state only when shared across distinct trees.\n- Maintain responsive layouts, accessible semantic HTML, and performant asset loading.";
2
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1,5 @@
1
+ export const webRules = `### Web Application Architecture
2
+ - Organize UI components by domain or feature hierarchy with clear separation of presentational and container components.
3
+ - Keep state management local where possible; lift state only when shared across distinct trees.
4
+ - Maintain responsive layouts, accessible semantic HTML, and performant asset loading.`;
5
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1,3 @@
1
+ import { Strictness } from '../../config/schema.js';
2
+ export declare const BASE_GUARDRAILS: Record<Strictness, string>;
3
+ //# sourceMappingURL=guardrails.d.ts.map
@@ -0,0 +1,20 @@
1
+ export const BASE_GUARDRAILS = {
2
+ standard: `### General Guardrails
3
+ - **Code Quality:** Maintain clean, modular code with consistent naming conventions and separation of concerns.
4
+ - **Verification:** Run the project test suite and linter before declaring any implementation task complete.
5
+ - **Security:** Never commit credentials, API keys, tokens, or raw secrets to version control.
6
+ - **Dependencies:** Avoid introducing unnecessary external dependencies. Prefer built-in language capabilities.`,
7
+ strict: `### Strict Guardrails (Non-Negotiable)
8
+ - **Type Safety & Zero Bypasses:** Strict static typing is enforced without exception. Never use bypass types (such as \`any\` in TypeScript, untyped signatures, or \`as unknown as T\`). Compiler type errors must not be suppressed without explicit written authorization (no unannotated \`@ts-ignore\` or \`type: ignore\`).
9
+ - **Mandatory Automated Test Verification:** Every modified function, API route, component, or core business logic flow must include automated unit/integration test verification before marking a task complete. Test suites must execute cleanly with zero failures.
10
+ - **Absolute Prohibition of Destructive Commands:** Destructive, irrevocable, or unscoped system commands are strictly prohibited. Never execute without explicit, verified human instruction:
11
+ - Destructive file/directory removal (\`rm -rf *\`, \`rmdir /s /q\`)
12
+ - Irreversible Git operations (\`git push --force\`, \`git reset --hard\`, \`git clean -fdx\`)
13
+ - Destructive database commands (\`DROP DATABASE\`, \`DROP TABLE\`, unbacked-up destructive migrations)
14
+ - **Layer Boundary Isolation:** Strictly respect architectural layer boundaries. Never import database models, queries, or raw infrastructure drivers directly into UI components or presentation views. No circular module dependencies permitted.
15
+ - **Zero Plaintext Secrets & Strict Environment Validation:** Never commit credentials, API keys, tokens, certificates, or raw secrets to version control. All external configuration must be validated at runtime via strict environment schemas.
16
+ - **Deterministic Error Handling:** Never swallow errors or use empty catch blocks. All asynchronous operations must include deterministic timeouts and typed error propagation. Failures must log actionable context without leaking sensitive data.
17
+ - **Dependency Lockdown & Supply Chain Discipline:** External packages require explicit architectural justification. Avoid redundant micro-packages. Never use floating wildcards (\`*\`) in dependency versions. Prefer native standard library primitives.
18
+ - **Determinism & Side-Effect Isolation:** Business logic must remain deterministic. Isolate non-deterministic behavior (timestamps, random number generators, network calls) behind testable interfaces.`,
19
+ };
20
+ //# sourceMappingURL=guardrails.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ export declare function renderContributing(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=contributing.d.ts.map
@@ -0,0 +1,19 @@
1
+ export function renderContributing(context) {
2
+ const { config, commands } = context;
3
+ return `# Contributing to ${config.project.name}
4
+
5
+ Thank you for contributing! Please follow the established development workflow and AI guidelines.
6
+
7
+ ## Development Workflow
8
+ 1. Fork or branch from \`main\`.
9
+ 2. Make modular, focused changes.
10
+ 3. Verify formatting and linting: \`${commands.lint}\`.
11
+ 4. Run the full test suite: \`${commands.test}\`.
12
+ 5. Ensure build succeeds: \`${commands.build}\`.
13
+
14
+ ## AI-Assisted Contributions
15
+ - When using AI coding assistants (Cursor, Claude, Copilot, etc.), ensure they respect [\`PROJECT_GUARDRAILS.md\`](./PROJECT_GUARDRAILS.md).
16
+ - AI-generated code must be fully understood, tested, and reviewed by a human contributor.
17
+ `;
18
+ }
19
+ //# sourceMappingURL=contributing.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../../config/schema.js';
2
+ export declare function renderArchitectureDoc(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=architecture-doc.d.ts.map
@@ -0,0 +1,22 @@
1
+ export function renderArchitectureDoc(context) {
2
+ const { config, appTypeRules, languageRules } = context;
3
+ return `# Architecture & System Design — ${config.project.name}
4
+
5
+ ## 1. High-Level Overview
6
+ - **Project Name:** ${config.project.name}
7
+ - **Application Classification:** ${config.project.type}
8
+ - **Primary Language:** ${config.project.language}
9
+ - **Strictness Tier:** ${config.strictness}
10
+
11
+ ## 2. Architectural Guidelines
12
+ ${appTypeRules}
13
+
14
+ ## 3. Language & Implementation Standards
15
+ ${languageRules}
16
+
17
+ ## 4. Component Boundaries
18
+ - Maintain high cohesion within modules and loose coupling between domains.
19
+ - Isolate external dependencies behind well-defined interface contracts.
20
+ `;
21
+ }
22
+ //# sourceMappingURL=architecture-doc.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../../config/schema.js';
2
+ export declare function renderDecisionsDoc(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=decisions-doc.d.ts.map
@@ -0,0 +1,19 @@
1
+ export function renderDecisionsDoc(context) {
2
+ const { config } = context;
3
+ return `# Architecture Decision Records (ADRs) — ${config.project.name}
4
+
5
+ This directory logs key architectural decisions made during the project lifecycle.
6
+
7
+ ## Decision Log
8
+ - [ADR 0001: Initial AI Workspace Setup](../.ai/decisions/0001-project-init.md) — *Accepted*
9
+
10
+ ## ADR Format Guidelines
11
+ New decisions should be added under \`.ai/decisions/\` following the format:
12
+ 1. **Title & Date**
13
+ 2. **Status:** Proposed / Accepted / Deprecated / Superseded
14
+ 3. **Context & Problem Statement**
15
+ 4. **Decision Outcome**
16
+ 5. **Consequences & Trade-offs**
17
+ `;
18
+ }
19
+ //# sourceMappingURL=decisions-doc.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../../config/schema.js';
2
+ export declare function renderDevelopmentDoc(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=development-doc.d.ts.map
@@ -0,0 +1,21 @@
1
+ export function renderDevelopmentDoc(context) {
2
+ const { config, commands } = context;
3
+ return `# Development Guide — ${config.project.name}
4
+
5
+ ## 1. Setup & Requirements
6
+ - Target Language: \`${config.project.language}\`
7
+ - Repository Hosting: \`${config.repository}\`
8
+
9
+ ## 2. Standard Commands
10
+ - **Compile / Build:** \`${commands.build}\`
11
+ - **Execute Test Suite:** \`${commands.test}\`
12
+ - **Local Dev Server / Runner:** \`${commands.dev}\`
13
+ - **Linter & Code Format:** \`${commands.lint}\`
14
+
15
+ ## 3. Pull Request & Verification Checklist
16
+ 1. Ensure all tests pass locally: \`${commands.test}\`.
17
+ 2. Confirm code passes static analysis with zero errors: \`${commands.lint}\`.
18
+ 3. Adhere to guardrails declared in [\`PROJECT_GUARDRAILS.md\`](../PROJECT_GUARDRAILS.md).
19
+ `;
20
+ }
21
+ //# sourceMappingURL=development-doc.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../../config/schema.js';
2
+ export declare function renderDocsReadme(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=docs-readme.d.ts.map
@@ -0,0 +1,15 @@
1
+ export function renderDocsReadme(context) {
2
+ const { config } = context;
3
+ return `# Documentation — ${config.project.name}
4
+
5
+ Welcome to the documentation directory for **${config.project.name}**.
6
+
7
+ ## Directory Index
8
+ - [\`ARCHITECTURE.md\`](./ARCHITECTURE.md): System design, component boundaries, and high-level architecture.
9
+ - [\`DEVELOPMENT.md\`](./DEVELOPMENT.md): Local development setup, testing, and debugging.
10
+ - [\`DECISIONS.md\`](./DECISIONS.md): Architectural Decision Records (ADRs) log.
11
+
12
+ For AI workspace rules and context, see \`.ai/\` and [\`AGENTS.md\`](../AGENTS.md).
13
+ `;
14
+ }
15
+ //# sourceMappingURL=docs-readme.js.map
@@ -0,0 +1,3 @@
1
+ import { Language } from '../config/schema.js';
2
+ export declare function renderGitignore(language: Language): string;
3
+ //# sourceMappingURL=gitignore.d.ts.map
@@ -0,0 +1,109 @@
1
+ export function renderGitignore(language) {
2
+ const common = `# Operating System Artifacts
3
+ .DS_Store
4
+ .DS_Store?
5
+ ._*
6
+ .Spotlight-V100
7
+ .Trashes
8
+ ehthumbs.db
9
+ Thumbs.db
10
+ Thumbs.db:encryptable
11
+ desktop.ini
12
+
13
+ # Environment Variables & Secrets
14
+ .env
15
+ .env.*
16
+ !.env.example
17
+ *.pem
18
+ *.key
19
+ *.cert
20
+ *.crt
21
+
22
+ # Editor & IDE State
23
+ .idea/
24
+ .vscode/*
25
+ !.vscode/settings.json
26
+ !.vscode/extensions.json
27
+ !.vscode/launch.json
28
+ *.sublime-project
29
+ *.sublime-workspace
30
+ *.swp
31
+ *.swo
32
+ *~
33
+
34
+ # Logs & Diagnostics
35
+ logs/
36
+ *.log
37
+ npm-debug.log*
38
+ yarn-debug.log*
39
+ yarn-error.log*
40
+ pnpm-debug.log*
41
+ `;
42
+ switch (language) {
43
+ case 'typescript':
44
+ case 'javascript':
45
+ return `${common}
46
+ # Node / TypeScript Dependencies & Build Output
47
+ node_modules/
48
+ dist/
49
+ build/
50
+ coverage/
51
+ .nyc_output/
52
+ *.tsbuildinfo
53
+ *.tsbuildinfo.*
54
+ .npm/
55
+ *.tgz
56
+ `;
57
+ case 'python':
58
+ return `${common}
59
+ # Python Bytecode & Environments
60
+ __pycache__/
61
+ *.py[cod]
62
+ *$py.class
63
+ *.so
64
+ .Python
65
+ env/
66
+ venv/
67
+ .venv/
68
+ dist/
69
+ build/
70
+ *.egg-info/
71
+ .pytest_cache/
72
+ .ruff_cache/
73
+ .mypy_cache/
74
+ `;
75
+ case 'go':
76
+ return `${common}
77
+ # Go Binaries & Tests
78
+ bin/
79
+ dist/
80
+ *.exe
81
+ *.test
82
+ *.out
83
+ vendor/
84
+ `;
85
+ case 'rust':
86
+ return `${common}
87
+ # Rust Target & Backups
88
+ target/
89
+ **/*.rs.bk
90
+ Cargo.lock
91
+ `;
92
+ case 'java':
93
+ return `${common}
94
+ # Java / Gradle / Maven
95
+ target/
96
+ build/
97
+ .gradle/
98
+ *.class
99
+ *.jar
100
+ *.war
101
+ `;
102
+ default:
103
+ return `${common}
104
+ dist/
105
+ build/
106
+ `;
107
+ }
108
+ }
109
+ //# sourceMappingURL=gitignore.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ export declare function renderProjectGuardrails(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=guardrails-doc.d.ts.map
@@ -0,0 +1,15 @@
1
+ export function renderProjectGuardrails(context) {
2
+ const { config, baseGuardrails } = context;
3
+ return `# Project Guardrails — ${config.project.name}
4
+
5
+ > Non-negotiable architectural and behavioral boundaries for humans and AI agents.
6
+
7
+ ${baseGuardrails}
8
+
9
+ ### Verification Protocol
10
+ 1. Run automated test suites before claiming tasks or PRs are ready.
11
+ 2. Confirm static analysis / lint passes with zero warnings.
12
+ 3. Verify that changes do not introduce unneeded external dependencies.
13
+ `;
14
+ }
15
+ //# sourceMappingURL=guardrails-doc.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const goCommands: CommandSet;
3
+ export declare const goRules = "### Go Conventions\n- Handle every returned error explicitly; never discard errors with `_`.\n- Use standard Go project layout (`cmd/`, `internal/`, `pkg/`).\n- Favor composition over inheritance and keep interfaces small.";
4
+ //# sourceMappingURL=go.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const goCommands = {
2
+ build: 'go build ./...',
3
+ test: 'go test -v ./...',
4
+ dev: 'go run main.go',
5
+ lint: 'golangci-lint run',
6
+ };
7
+ export const goRules = `### Go Conventions
8
+ - Handle every returned error explicitly; never discard errors with \`_\`.
9
+ - Use standard Go project layout (\`cmd/\`, \`internal/\`, \`pkg/\`).
10
+ - Favor composition over inheritance and keep interfaces small.`;
11
+ //# sourceMappingURL=go.js.map
@@ -0,0 +1,7 @@
1
+ import { CommandSet, Language } from '../../config/schema.js';
2
+ export interface LanguageTemplate {
3
+ commands: CommandSet;
4
+ rules: string;
5
+ }
6
+ export declare function getLanguageTemplate(lang: Language): LanguageTemplate;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,27 @@
1
+ import { goCommands, goRules } from './go.js';
2
+ import { javaCommands, javaRules } from './java.js';
3
+ import { javascriptCommands, javascriptRules } from './javascript.js';
4
+ import { otherCommands, otherRules } from './other.js';
5
+ import { pythonCommands, pythonRules } from './python.js';
6
+ import { rustCommands, rustRules } from './rust.js';
7
+ import { typescriptCommands, typescriptRules } from './typescript.js';
8
+ export function getLanguageTemplate(lang) {
9
+ switch (lang) {
10
+ case 'typescript':
11
+ return { commands: typescriptCommands, rules: typescriptRules };
12
+ case 'javascript':
13
+ return { commands: javascriptCommands, rules: javascriptRules };
14
+ case 'python':
15
+ return { commands: pythonCommands, rules: pythonRules };
16
+ case 'java':
17
+ return { commands: javaCommands, rules: javaRules };
18
+ case 'go':
19
+ return { commands: goCommands, rules: goRules };
20
+ case 'rust':
21
+ return { commands: rustCommands, rules: rustRules };
22
+ case 'other':
23
+ default:
24
+ return { commands: otherCommands, rules: otherRules };
25
+ }
26
+ }
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const javaCommands: CommandSet;
3
+ export declare const javaRules = "### Java Conventions\n- Follow standard Java packaging and class naming conventions.\n- Prefer immutability and record types for data transfer objects.\n- Explicitly check and document nullability expectations.";
4
+ //# sourceMappingURL=java.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const javaCommands = {
2
+ build: './gradlew build',
3
+ test: './gradlew test',
4
+ dev: './gradlew bootRun',
5
+ lint: './gradlew checkstyleMain',
6
+ };
7
+ export const javaRules = `### Java Conventions
8
+ - Follow standard Java packaging and class naming conventions.
9
+ - Prefer immutability and record types for data transfer objects.
10
+ - Explicitly check and document nullability expectations.`;
11
+ //# sourceMappingURL=java.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const javascriptCommands: CommandSet;
3
+ export declare const javascriptRules = "### JavaScript Conventions\n- Target modern ECMAScript (ESM) syntax using `import` and `export`.\n- Document non-trivial data structures and function parameters using JSDoc.\n- Always handle asynchronous Promise rejections explicitly with `try/catch`.";
4
+ //# sourceMappingURL=javascript.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const javascriptCommands = {
2
+ build: 'npm run build',
3
+ test: 'npm test',
4
+ dev: 'npm start',
5
+ lint: 'npm run lint',
6
+ };
7
+ export const javascriptRules = `### JavaScript Conventions
8
+ - Target modern ECMAScript (ESM) syntax using \`import\` and \`export\`.
9
+ - Document non-trivial data structures and function parameters using JSDoc.
10
+ - Always handle asynchronous Promise rejections explicitly with \`try/catch\`.`;
11
+ //# sourceMappingURL=javascript.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const otherCommands: CommandSet;
3
+ export declare const otherRules = "### General Language Conventions\n- Adhere to the established idiomatic style of the language.\n- Run project build, test, and lint commands before pushing code.\n- Keep dependencies lean and maintain explicit error handling.";
4
+ //# sourceMappingURL=other.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const otherCommands = {
2
+ build: '# Run project build command',
3
+ test: '# Run project test command',
4
+ dev: '# Run local development command',
5
+ lint: '# Run project linting command',
6
+ };
7
+ export const otherRules = `### General Language Conventions
8
+ - Adhere to the established idiomatic style of the language.
9
+ - Run project build, test, and lint commands before pushing code.
10
+ - Keep dependencies lean and maintain explicit error handling.`;
11
+ //# sourceMappingURL=other.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const pythonCommands: CommandSet;
3
+ export declare const pythonRules = "### Python Conventions\n- Follow PEP 8 style guidelines.\n- Use explicit type annotations on all function signatures.\n- Prefer Python standard library modules over third-party packages where possible.";
4
+ //# sourceMappingURL=python.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const pythonCommands = {
2
+ build: 'python -m build',
3
+ test: 'pytest',
4
+ dev: 'python -m app.main',
5
+ lint: 'ruff check .',
6
+ };
7
+ export const pythonRules = `### Python Conventions
8
+ - Follow PEP 8 style guidelines.
9
+ - Use explicit type annotations on all function signatures.
10
+ - Prefer Python standard library modules over third-party packages where possible.`;
11
+ //# sourceMappingURL=python.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const rustCommands: CommandSet;
3
+ export declare const rustRules = "### Rust Conventions\n- Explicitly propagate errors using the `?` operator; avoid `unwrap()` in non-test code.\n- Minimize memory allocations and leverage borrowing rather than cloning where practical.\n- Keep modules organized cleanly via `lib.rs` or `main.rs`.";
4
+ //# sourceMappingURL=rust.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const rustCommands = {
2
+ build: 'cargo build',
3
+ test: 'cargo test',
4
+ dev: 'cargo run',
5
+ lint: 'cargo clippy -- -D warnings',
6
+ };
7
+ export const rustRules = `### Rust Conventions
8
+ - Explicitly propagate errors using the \`?\` operator; avoid \`unwrap()\` in non-test code.
9
+ - Minimize memory allocations and leverage borrowing rather than cloning where practical.
10
+ - Keep modules organized cleanly via \`lib.rs\` or \`main.rs\`.`;
11
+ //# sourceMappingURL=rust.js.map
@@ -0,0 +1,4 @@
1
+ import { CommandSet } from '../../config/schema.js';
2
+ export declare const typescriptCommands: CommandSet;
3
+ export declare const typescriptRules = "### TypeScript Conventions\n- Enforce strict null checks and explicit function return types on public APIs.\n- Prefer interfaces for object contracts and type aliases for unions/intersections.\n- Avoid type assertions (`as UnknownType`); use proper type guards.";
4
+ //# sourceMappingURL=typescript.d.ts.map
@@ -0,0 +1,11 @@
1
+ export const typescriptCommands = {
2
+ build: 'npm run build',
3
+ test: 'npm test',
4
+ dev: 'npm run dev',
5
+ lint: 'npm run lint',
6
+ };
7
+ export const typescriptRules = `### TypeScript Conventions
8
+ - Enforce strict null checks and explicit function return types on public APIs.
9
+ - Prefer interfaces for object contracts and type aliases for unions/intersections.
10
+ - Avoid type assertions (\`as UnknownType\`); use proper type guards.`;
11
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1,3 @@
1
+ import { WorkspaceConfig } from '../config/schema.js';
2
+ export declare function renderManifest(config: WorkspaceConfig): string;
3
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1,17 @@
1
+ export function renderManifest(config) {
2
+ const adaptersYaml = config.adapters.map((a) => ` - ${a}`).join('\n');
3
+ return `version: "1"
4
+
5
+ project:
6
+ name: "${config.project.name}"
7
+ type: "${config.project.type}"
8
+ language: "${config.project.language}"
9
+
10
+ repository: "${config.repository}"
11
+ strictness: "${config.strictness}"
12
+
13
+ adapters:
14
+ ${adaptersYaml}
15
+ `;
16
+ }
17
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1,3 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ export declare function renderProjectReadme(context: ResolvedWorkspaceContext): string;
3
+ //# sourceMappingURL=readme.d.ts.map
@@ -0,0 +1,35 @@
1
+ export function renderProjectReadme(context) {
2
+ const { config, commands } = context;
3
+ const adapterDescriptions = {
4
+ agents: '- **AGENTS.md**: Standard root instructions for cross-tool AI agents.',
5
+ cursor: '- **Cursor (.cursor/rules/)**: Modular rules for Cursor IDE.',
6
+ claude: '- **Claude Code (CLAUDE.md)**: Guidelines and shell commands for Claude Code CLI.',
7
+ copilot: '- **GitHub Copilot (.github/)**: Workspace prompt instructions for Copilot.',
8
+ };
9
+ const configuredAdaptersList = config.adapters
10
+ .map((id) => adapterDescriptions[id] || `- **${id}**: Configured AI tool adapter.`)
11
+ .join('\n');
12
+ return `# ${config.project.name}
13
+
14
+ Welcome to **${config.project.name}**. This workspace is initialized with an AI-ready development contract generated by [Foundry](https://github.com/foundry-rs/foundry).
15
+
16
+ ## Application Profile
17
+ - **Application Type:** ${config.project.type}
18
+ - **Primary Language:** ${config.project.language}
19
+ - **Guardrail Strictness:** ${config.strictness}
20
+
21
+ ## Key Development Commands
22
+ - **Build:** \`${commands.build}\`
23
+ - **Test:** \`${commands.test}\`
24
+ - **Dev:** \`${commands.dev}\`
25
+ - **Lint:** \`${commands.lint}\`
26
+
27
+ ## Working with AI Coding Assistants
28
+ This project maintains consistent, deterministic AI instruction files to ensure that AI assistants (such as Cursor, Claude Code, and Copilot) follow project conventions and guardrails without manual prompt recreation:
29
+
30
+ ${configuredAdaptersList}
31
+
32
+ For the core architectural guidelines and non-negotiable rules governing this codebase, refer to [\`AGENTS.md\`](./AGENTS.md).
33
+ `;
34
+ }
35
+ //# sourceMappingURL=readme.js.map