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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Foundry Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # Foundry (`create-foundry-workspace`)
2
+
3
+ > **Deterministic, local-first, zero-LLM CLI for initializing AI-ready software development workspaces.**
4
+
5
+ [![CI](https://github.com/Harshitkant21/Foundry/actions/workflows/ci.yml/badge.svg)](https://github.com/Harshitkant21/Foundry/actions)
6
+ [![npm version](https://img.shields.io/npm/v/create-foundry-workspace.svg?style=flat&color=CB3837)](https://www.npmjs.com/package/create-foundry-workspace)
7
+ [![Node: >=18.0.0](https://img.shields.io/badge/Node->=18.0.0-green.svg)](package.json)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+ [![Zero-LLM Runtime](https://img.shields.io/badge/Architecture-Deterministic%20Zero--LLM-8A2BE2.svg)](docs/ARCHITECTURE.md)
10
+
11
+ ---
12
+
13
+ ## What is Foundry?
14
+
15
+ Modern developers increasingly rely on AI coding assistants such as **Cursor**, **Claude Code**, and **GitHub Copilot**. However, when starting a new project, developers are forced to manually author and repeatedly recreate AI instruction files, project rules, context files, and guardrails.
16
+
17
+ **Foundry** is an open-source, deterministic developer tool distributed via npm as **`create-foundry-workspace`**. When starting a new project, running:
18
+
19
+ ```bash
20
+ npx create-foundry-workspace
21
+ # or: npm create foundry-workspace
22
+ ```
23
+
24
+ asks a minimal set of meaningful project initialization questions and deterministically scaffolds an **AI-ready software workspace** based on predefined, versioned, and maintainable templates.
25
+
26
+ ---
27
+
28
+ ## What Foundry Does
29
+
30
+ - **Establishes a Canonical Contract:** Generates a clean, machine-readable `ai-workspace.yaml` manifest.
31
+ - **Generates Native Tool Adapters:** Renders native, complete instruction files for **Cursor** (`.cursor/rules/*.mdc`), **Claude Code** (`CLAUDE.md`), **GitHub Copilot** (`.github/copilot-instructions.md`), and the cross-tool open standard **`AGENTS.md`**.
32
+ - **Generates Project README:** Creates a deterministic, human-facing `README.md` tailored to the selected project stack, commands, and AI tools.
33
+ - **Enforces Architectural Guardrails:** Injects strict or standard code quality, security, and testing guardrails.
34
+ - **Safeguards Existing Files:** Supports non-destructive safe-merges, overwrite protection, and dry-run execution.
35
+
36
+ ---
37
+
38
+ ## What Foundry Explicitly Does NOT Do
39
+
40
+ Foundry is **NOT an AI agent** and does not use AI to generate workspaces:
41
+ - ❌ **NO OpenAI, Anthropic, or Gemini API calls**
42
+ - ❌ **NO local or remote LLM inference**
43
+ - ❌ **NO network requests at runtime** (100% offline and local-first)
44
+ - ❌ **NO hidden API keys or telemetry**
45
+ - ❌ **NO autonomous code generation**
46
+
47
+ Output is 100% deterministic: given the same inputs and version, the generated workspace is bit-for-bit identical every time.
48
+
49
+ ---
50
+
51
+ ## Quick Start
52
+
53
+ Initialize an AI-ready workspace in your current directory:
54
+ ```bash
55
+ npx create-foundry-workspace
56
+ # or: npm create foundry-workspace
57
+ ```
58
+
59
+ Or target a specific folder:
60
+ ```bash
61
+ npx create-foundry-workspace ./my-new-project
62
+ ```
63
+
64
+ ### Non-Interactive (CI / Scripted) Usage
65
+ ```bash
66
+ npx create-foundry-workspace ./my-new-service \
67
+ --name my-new-service \
68
+ --type api \
69
+ --lang python \
70
+ --strictness strict \
71
+ --ai cursor,claude,copilot,agents \
72
+ --yes
73
+ ```
74
+
75
+ ---
76
+
77
+ ## CLI Options
78
+
79
+ | Flag | Description | Default |
80
+ |---|---|---|
81
+ | `[directory]` | Target directory to initialize | `.` |
82
+ | `-n, --name <string>` | Project name | Inferred from folder or `package.json` |
83
+ | `-t, --type <type>` | `web` \| `api` \| `fullstack` \| `cli` \| `library` \| `data-ml` \| `mobile` \| `custom` | Inferred or `fullstack` |
84
+ | `-l, --lang <lang>` | `typescript` \| `javascript` \| `python` \| `java` \| `go` \| `rust` \| `other` | Inferred or `typescript` |
85
+ | `-r, --repo <repo>` | `github` \| `gitlab` \| `none` | `github` |
86
+ | `-s, --strictness <level>` | `standard` \| `strict` | `standard` |
87
+ | `-a, --ai <adapters>` | Comma-separated list of adapters (`claude,cursor,agents,copilot,codex,gemini,generic`) | `claude,cursor,agents` |
88
+ | `--dry-run` | Preview files in terminal without writing to disk | `false` |
89
+ | `-f, --force` | Overwrite conflicting files | `false` |
90
+ | `-y, --yes` | Accept all defaults non-interactively | `false` |
91
+ | `-v, --version` | Display version | |
92
+ | `-h, --help` | Display help | |
93
+
94
+ ---
95
+
96
+ ## Generated Workspace Structure
97
+
98
+ Foundry generates a deterministic, standardized workspace with zero bloat and zero hallucinations:
99
+
100
+ ```text
101
+ my-project/
102
+ ├── ai-workspace.yaml # Canonical machine contract
103
+ ├── README.md # Project documentation & stack guide
104
+ ├── AI_CONTEXT.md # System map and entrypoint for AI assistants
105
+ ├── PROJECT_GUARDRAILS.md # Standalone architectural guardrails & testing rules
106
+ ├── CONTRIBUTING.md # Contribution workflow & guidelines
107
+ ├── .gitignore # Language-tailored ignore rules
108
+ │
109
+ ├── .ai/ # AI operational intelligence directory
110
+ │ ├── context/project-context.md # Detailed project domain background
111
+ │ ├── rules/00-core-rules.md # Core workspace rules & coding conventions
112
+ │ ├── architecture/system-design.md # High-level architecture & layer boundaries
113
+ │ ├── decisions/0001-project-init.md # Initial architecture decision record (ADR)
114
+ │ └── tasks/task-backlog.md # Operational scratchpad for AI agent task execution
115
+ │
116
+ ├── docs/ # Human-facing project documentation
117
+ │ ├── README.md # Documentation index
118
+ │ ├── ARCHITECTURE.md # System architecture & component design
119
+ │ ├── DEVELOPMENT.md # Local setup, run, and test guides
120
+ │ └── DECISIONS.md # Architecture decision records index
121
+ │
122
+ └── [Tool Adapters] # Based on user selection:
123
+ ├── AGENTS.md # Multi-Agent open standard
124
+ ├── CLAUDE.md # Anthropic Claude Code CLI
125
+ ├── .cursor/rules/*.mdc # Cursor IDE modular rules
126
+ ├── .github/copilot-instructions.md # GitHub Copilot context
127
+ ├── .codex/instructions.md # OpenAI Codex context
128
+ ├── GEMINI.md # Google Antigravity & Gemini CLI
129
+ └── AI_INSTRUCTIONS.md # Generic AI assistant instructions
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Repository Architecture & Dogfooding
135
+
136
+ Foundry strictly practices **dogfooding**. The Foundry repository itself is governed by the same `ai-workspace.yaml`, `AGENTS.md`, `CLAUDE.md`, `.cursor/`, and `.github/` files that it generates for users.
137
+
138
+ For deeper architectural details, review the internal documentation:
139
+ - [docs/SPECIFICATION.md](file:///d:/Extentions/Foundry/docs/SPECIFICATION.md) — Formal specification of the AI Workspace contract.
140
+ - [docs/ARCHITECTURE.md](file:///d:/Extentions/Foundry/docs/ARCHITECTURE.md) — System architecture, module boundaries, and pure core pipeline.
141
+ - [docs/ADAPTERS.md](file:///d:/Extentions/Foundry/docs/ADAPTERS.md) — Adapter interface specification and registry design.
142
+ - [docs/DEVELOPMENT.md](file:///d:/Extentions/Foundry/docs/DEVELOPMENT.md) — Developer setup and testing guide.
143
+
144
+ ---
145
+
146
+ ## Development & Testing
147
+
148
+ ```bash
149
+ # Clone the repository
150
+ git clone https://github.com/Harshitkant21/Foundry.git
151
+ cd Foundry
152
+
153
+ # Install dependencies
154
+ npm install
155
+
156
+ # Run Vitest test suite
157
+ npm test
158
+
159
+ # Build TypeScript to dist/
160
+ npm run build
161
+
162
+ # Run local development CLI
163
+ npx tsx src/bin.ts --dry-run
164
+ ```
165
+
166
+ ---
167
+
168
+ ## License
169
+
170
+ MIT © Foundry Contributors
package/bin/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/bin.js';
@@ -0,0 +1,13 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ export interface GeneratedFile {
3
+ readonly relativePath: string;
4
+ readonly content: string;
5
+ }
6
+ export interface WorkspaceAdapter {
7
+ readonly id: string;
8
+ readonly name: string;
9
+ readonly description: string;
10
+ readonly defaultSelected: boolean;
11
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
12
+ }
13
+ //# sourceMappingURL=adapter.interface.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=adapter.interface.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class AgentsAdapter implements WorkspaceAdapter {
4
+ readonly id = "agents";
5
+ readonly name = "AGENTS.md";
6
+ readonly description = "Open-standard root instructions for AI agents";
7
+ readonly defaultSelected = true;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=agents.adapter.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { renderAgentsDocument } from '../templates/agents.js';
2
+ export class AgentsAdapter {
3
+ id = 'agents';
4
+ name = 'AGENTS.md';
5
+ description = 'Open-standard root instructions for AI agents';
6
+ defaultSelected = true;
7
+ render(context) {
8
+ return [
9
+ {
10
+ relativePath: 'AGENTS.md',
11
+ content: renderAgentsDocument(context),
12
+ },
13
+ ];
14
+ }
15
+ }
16
+ //# sourceMappingURL=agents.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class ClaudeAdapter implements WorkspaceAdapter {
4
+ readonly id = "claude";
5
+ readonly name = "Claude Code (CLAUDE.md)";
6
+ readonly description = "Compact CLI guidance and shell commands for Claude Code";
7
+ readonly defaultSelected = true;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=claude.adapter.d.ts.map
@@ -0,0 +1,30 @@
1
+ export class ClaudeAdapter {
2
+ id = 'claude';
3
+ name = 'Claude Code (CLAUDE.md)';
4
+ description = 'Compact CLI guidance and shell commands for Claude Code';
5
+ defaultSelected = true;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules } = context;
8
+ const content = `# Claude Code Guidelines — ${config.project.name}
9
+
10
+ ## Key Commands
11
+ - Build: \`${commands.build}\`
12
+ - Test: \`${commands.test}\`
13
+ - Dev: \`${commands.dev}\`
14
+ - Lint: \`${commands.lint}\`
15
+
16
+ ## Project Guardrails
17
+ ${baseGuardrails}
18
+
19
+ ## Language Conventions
20
+ ${languageRules}
21
+ `;
22
+ return [
23
+ {
24
+ relativePath: 'CLAUDE.md',
25
+ content,
26
+ },
27
+ ];
28
+ }
29
+ }
30
+ //# sourceMappingURL=claude.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class CodexAdapter implements WorkspaceAdapter {
4
+ readonly id = "codex";
5
+ readonly name = "Codex (CODEX.md)";
6
+ readonly description = "Instruction context for OpenAI Codex and IDE integrations";
7
+ readonly defaultSelected = false;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=codex.adapter.d.ts.map
@@ -0,0 +1,33 @@
1
+ export class CodexAdapter {
2
+ id = 'codex';
3
+ name = 'Codex (CODEX.md)';
4
+ description = 'Instruction context for OpenAI Codex and IDE integrations';
5
+ defaultSelected = false;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules, appTypeRules } = context;
8
+ const content = `# OpenAI Codex Guidelines — ${config.project.name}
9
+
10
+ ## Project Profile
11
+ - Application: ${config.project.name} (${config.project.type})
12
+ - Language: ${config.project.language}
13
+ - Strictness: ${config.strictness}
14
+
15
+ ## Standard Commands
16
+ - Build: \`${commands.build}\`
17
+ - Test: \`${commands.test}\`
18
+ - Dev: \`${commands.dev}\`
19
+ - Lint: \`${commands.lint}\`
20
+
21
+ ## Architecture
22
+ ${appTypeRules}
23
+
24
+ ## Language Conventions
25
+ ${languageRules}
26
+
27
+ ## Guardrails
28
+ ${baseGuardrails}
29
+ `;
30
+ return [{ relativePath: 'CODEX.md', content }];
31
+ }
32
+ }
33
+ //# sourceMappingURL=codex.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class CopilotAdapter implements WorkspaceAdapter {
4
+ readonly id = "copilot";
5
+ readonly name = "GitHub Copilot (.github/)";
6
+ readonly description = "Workspace prompt instruction block for GitHub Copilot";
7
+ readonly defaultSelected = true;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=copilot.adapter.d.ts.map
@@ -0,0 +1,40 @@
1
+ export class CopilotAdapter {
2
+ id = 'copilot';
3
+ name = 'GitHub Copilot (.github/)';
4
+ description = 'Workspace prompt instruction block for GitHub Copilot';
5
+ defaultSelected = true;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules, appTypeRules } = context;
8
+ const content = `# GitHub Copilot Workspace Instructions — ${config.project.name}
9
+
10
+ This file provides system context for GitHub Copilot when assisting on this repository.
11
+
12
+ ## Project Metadata
13
+ - Application Type: ${config.project.type}
14
+ - Language: ${config.project.language}
15
+ - Strictness Level: ${config.strictness}
16
+
17
+ ## Primary Commands
18
+ - Build: \`${commands.build}\`
19
+ - Test: \`${commands.test}\`
20
+ - Dev: \`${commands.dev}\`
21
+ - Lint: \`${commands.lint}\`
22
+
23
+ ## Architecture
24
+ ${appTypeRules}
25
+
26
+ ## Language Conventions
27
+ ${languageRules}
28
+
29
+ ## Safety & Quality Guardrails
30
+ ${baseGuardrails}
31
+ `;
32
+ return [
33
+ {
34
+ relativePath: '.github/copilot-instructions.md',
35
+ content,
36
+ },
37
+ ];
38
+ }
39
+ }
40
+ //# sourceMappingURL=copilot.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class CursorAdapter implements WorkspaceAdapter {
4
+ readonly id = "cursor";
5
+ readonly name = "Cursor (.cursor/rules/)";
6
+ readonly description = "Modular MDC rules with frontmatter for Cursor IDE";
7
+ readonly defaultSelected = true;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=cursor.adapter.d.ts.map
@@ -0,0 +1,41 @@
1
+ export class CursorAdapter {
2
+ id = 'cursor';
3
+ name = 'Cursor (.cursor/rules/)';
4
+ description = 'Modular MDC rules with frontmatter for Cursor IDE';
5
+ defaultSelected = true;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules, appTypeRules } = context;
8
+ const content = `---
9
+ description: Core Architecture Rules for ${config.project.name}
10
+ globs: *
11
+ alwaysApply: true
12
+ ---
13
+ # Cursor Core Rules — ${config.project.name}
14
+
15
+ ## Project Profile
16
+ - Application: ${config.project.name} (${config.project.type})
17
+ - Language: ${config.project.language}
18
+ - Strictness: ${config.strictness}
19
+
20
+ ## Standard Commands
21
+ - Build: \`${commands.build}\`
22
+ - Test: \`${commands.test}\`
23
+
24
+ ## Architectural Guidelines
25
+ ${appTypeRules}
26
+
27
+ ## Language Conventions
28
+ ${languageRules}
29
+
30
+ ## Guardrails
31
+ ${baseGuardrails}
32
+ `;
33
+ return [
34
+ {
35
+ relativePath: '.cursor/rules/00-core-rules.mdc',
36
+ content,
37
+ },
38
+ ];
39
+ }
40
+ }
41
+ //# sourceMappingURL=cursor.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class GeminiAdapter implements WorkspaceAdapter {
4
+ readonly id = "gemini";
5
+ readonly name = "Gemini (GEMINI.md)";
6
+ readonly description = "Context guidelines for Google Antigravity & Gemini CLI";
7
+ readonly defaultSelected = false;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=gemini.adapter.d.ts.map
@@ -0,0 +1,34 @@
1
+ export class GeminiAdapter {
2
+ id = 'gemini';
3
+ name = 'Gemini (GEMINI.md)';
4
+ description = 'Context guidelines for Google Antigravity & Gemini CLI';
5
+ defaultSelected = false;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules, appTypeRules } = context;
8
+ const content = `# Gemini Guidelines — ${config.project.name}
9
+
10
+ ## Project Overview
11
+ - Name: ${config.project.name}
12
+ - Type: ${config.project.type}
13
+ - Language: ${config.project.language}
14
+ - Strictness: ${config.strictness}
15
+
16
+ ## Build & Test Commands
17
+ - Build: \`${commands.build}\`
18
+ - Test: \`${commands.test}\`
19
+ - Dev: \`${commands.dev}\`
20
+ - Lint: \`${commands.lint}\`
21
+
22
+ ## Architecture Conventions
23
+ ${appTypeRules}
24
+
25
+ ## Language Conventions
26
+ ${languageRules}
27
+
28
+ ## Architectural Guardrails
29
+ ${baseGuardrails}
30
+ `;
31
+ return [{ relativePath: 'GEMINI.md', content }];
32
+ }
33
+ }
34
+ //# sourceMappingURL=gemini.adapter.js.map
@@ -0,0 +1,10 @@
1
+ import { ResolvedWorkspaceContext } from '../config/schema.js';
2
+ import { GeneratedFile, WorkspaceAdapter } from './adapter.interface.js';
3
+ export declare class GenericAdapter implements WorkspaceAdapter {
4
+ readonly id = "generic";
5
+ readonly name = "Generic (AI_INSTRUCTIONS.md)";
6
+ readonly description = "Tool-agnostic instruction file for any AI development environment";
7
+ readonly defaultSelected = false;
8
+ render(context: ResolvedWorkspaceContext): GeneratedFile[];
9
+ }
10
+ //# sourceMappingURL=generic.adapter.d.ts.map
@@ -0,0 +1,34 @@
1
+ export class GenericAdapter {
2
+ id = 'generic';
3
+ name = 'Generic (AI_INSTRUCTIONS.md)';
4
+ description = 'Tool-agnostic instruction file for any AI development environment';
5
+ defaultSelected = false;
6
+ render(context) {
7
+ const { config, commands, baseGuardrails, languageRules, appTypeRules } = context;
8
+ const content = `# AI Development Instructions — ${config.project.name}
9
+
10
+ ## Project Profile
11
+ - Application: ${config.project.name}
12
+ - Type: ${config.project.type}
13
+ - Language: ${config.project.language}
14
+ - Guardrails Tier: ${config.strictness}
15
+
16
+ ## Standard Commands
17
+ - Build: \`${commands.build}\`
18
+ - Test: \`${commands.test}\`
19
+ - Dev: \`${commands.dev}\`
20
+ - Lint: \`${commands.lint}\`
21
+
22
+ ## Architecture
23
+ ${appTypeRules}
24
+
25
+ ## Language Conventions
26
+ ${languageRules}
27
+
28
+ ## Guardrails
29
+ ${baseGuardrails}
30
+ `;
31
+ return [{ relativePath: 'AI_INSTRUCTIONS.md', content }];
32
+ }
33
+ }
34
+ //# sourceMappingURL=generic.adapter.js.map
@@ -0,0 +1,12 @@
1
+ import { WorkspaceAdapter } from './adapter.interface.js';
2
+ export declare class AdapterRegistry {
3
+ private adapters;
4
+ constructor();
5
+ register(adapter: WorkspaceAdapter): void;
6
+ get(id: string): WorkspaceAdapter | undefined;
7
+ getAll(): WorkspaceAdapter[];
8
+ getDefaultIds(): string[];
9
+ has(id: string): boolean;
10
+ }
11
+ export declare const defaultRegistry: AdapterRegistry;
12
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { AgentsAdapter } from './agents.adapter.js';
2
+ import { ClaudeAdapter } from './claude.adapter.js';
3
+ import { CodexAdapter } from './codex.adapter.js';
4
+ import { CopilotAdapter } from './copilot.adapter.js';
5
+ import { CursorAdapter } from './cursor.adapter.js';
6
+ import { GeminiAdapter } from './gemini.adapter.js';
7
+ import { GenericAdapter } from './generic.adapter.js';
8
+ export class AdapterRegistry {
9
+ adapters = new Map();
10
+ constructor() {
11
+ this.register(new AgentsAdapter());
12
+ this.register(new CursorAdapter());
13
+ this.register(new ClaudeAdapter());
14
+ this.register(new CopilotAdapter());
15
+ this.register(new CodexAdapter());
16
+ this.register(new GeminiAdapter());
17
+ this.register(new GenericAdapter());
18
+ }
19
+ register(adapter) {
20
+ this.adapters.set(adapter.id, adapter);
21
+ }
22
+ get(id) {
23
+ return this.adapters.get(id);
24
+ }
25
+ getAll() {
26
+ return Array.from(this.adapters.values());
27
+ }
28
+ getDefaultIds() {
29
+ return this.getAll()
30
+ .filter((a) => a.defaultSelected)
31
+ .map((a) => a.id);
32
+ }
33
+ has(id) {
34
+ return this.adapters.has(id);
35
+ }
36
+ }
37
+ export const defaultRegistry = new AdapterRegistry();
38
+ //# sourceMappingURL=registry.js.map
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
package/dist/bin.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from './cli/command.js';
3
+ runCli().catch((err) => {
4
+ console.error('\n[Foundry Error]:', err.message || err);
5
+ process.exit(1);
6
+ });
7
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1,2 @@
1
+ export declare function runCli(argv?: string[]): Promise<void>;
2
+ //# sourceMappingURL=command.d.ts.map