structkit 3.1.0__tar.gz → 3.2.1__tar.gz
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.
- {structkit-3.1.0/structkit.egg-info → structkit-3.2.1}/PKG-INFO +8 -8
- {structkit-3.1.0 → structkit-3.2.1}/README.md +4 -4
- {structkit-3.1.0 → structkit-3.2.1}/pyproject.toml +4 -4
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/generate.py +19 -8
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/sources.py +7 -3
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/ansible-playbook.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/chef-cookbook.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/ci-cd-pipelines.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/cloudformation-files.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/chglog.yaml +4 -0
- structkit-3.2.1/structkit/contribs/configs/codeowners.yaml +6 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/devcontainer.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/editor-config.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/eslint.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/jshint.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/kubectl.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/configs/prettier.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/docker-files.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/documentation-template.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/git-hooks.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/chatmodes/plan.yaml +4 -0
- structkit-3.2.1/structkit/contribs/github/instructions/generic.yaml +9 -0
- structkit-3.2.1/structkit/contribs/github/prompts/generic.yaml +8 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/prompts/react-form.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/prompts/security-api.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/prompts/struct.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/templates.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/codeql.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/execute-tf-workflow.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/labeler.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/pre-commit.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/release-drafter.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/run-struct.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/stale.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/helm-chart.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/kubernetes-manifests.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/custom-structures.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/generic.yaml +6 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/go.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/java.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/n8n.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/nodejs.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/python.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/ruby.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/project/rust.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/prompts/run-struct-trigger.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/apps/aws-accounts.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/apps/environments.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/apps/generic.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/apps/github-organization.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/apps/init.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/terraform/modules/generic.yaml +5 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/vagrant-files.yaml +4 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/file_item.py +2 -0
- structkit-3.2.1/structkit/sources.py +371 -0
- structkit-3.2.1/structkit/struct_refs.py +140 -0
- {structkit-3.1.0 → structkit-3.2.1/structkit.egg-info}/PKG-INFO +8 -8
- {structkit-3.1.0 → structkit-3.2.1}/structkit.egg-info/SOURCES.txt +1 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_file_item.py +29 -0
- structkit-3.2.1/tests/test_sources_command.py +304 -0
- structkit-3.1.0/structkit/contribs/configs/codeowners.yaml +0 -3
- structkit-3.1.0/structkit/contribs/github/instructions/generic.yaml +0 -5
- structkit-3.1.0/structkit/contribs/github/prompts/generic.yaml +0 -4
- structkit-3.1.0/structkit/sources.py +0 -155
- structkit-3.1.0/tests/test_sources_command.py +0 -135
- {structkit-3.1.0 → structkit-3.2.1}/LICENSE +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/MANIFEST.in +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/setup.cfg +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/setup.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/__init__.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/__init__.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/completion.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/explain.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/generate_schema.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/graph.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/import.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/info.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/init.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/lint.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/list.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/mcp.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/search.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/validate.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/commands/vars.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/completers.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/content_fetcher.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/README.md +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/filters.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/input_store.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/logging_config.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/main.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/mcp_server.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/model_wrapper.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/template_renderer.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit/utils.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit.egg-info/dependency_links.txt +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit.egg-info/entry_points.txt +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit.egg-info/requires.txt +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/structkit.egg-info/top_level.txt +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_commands.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_commands_more.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_completers.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_completion_command.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_content_fetcher_more.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_env_var_cli_args.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_env_var_structures_path.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_explain_command.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_file_item_strategies.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_filters.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_filters_more.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_graph_command.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_hooks.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_init_command.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_input_store.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_mcp_integration.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_messages_and_summary.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_model_wrapper.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_search_command.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_template_helpers.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_template_renderer.py +0 -0
- {structkit-3.1.0 → structkit-3.2.1}/tests/test_utils_more.py +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: structkit
|
|
3
|
-
Version: 3.1
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
|
|
5
5
|
Author: httpdss
|
|
6
6
|
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://
|
|
7
|
+
Project-URL: Homepage, https://structkit.app/
|
|
8
8
|
Project-URL: Repository, https://github.com/httpdss/structkit
|
|
9
9
|
Project-URL: Issues, https://github.com/httpdss/structkit/issues
|
|
10
10
|
Project-URL: Discussions, https://github.com/httpdss/structkit/discussions
|
|
11
|
-
Project-URL: Documentation, https://
|
|
12
|
-
Project-URL: Funding, https://
|
|
11
|
+
Project-URL: Documentation, https://structkit.app/docs/
|
|
12
|
+
Project-URL: Funding, https://structkit.app/docs/funding/
|
|
13
13
|
Keywords: project-scaffolding,project-template,scaffolding,cookiecutter-alternative,copier-alternative,yaml-template,code-generation,devops,mcp,model-context-protocol,devex,platform-engineering,project-structure,boilerplate
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
@@ -59,8 +59,6 @@ Dynamic: license-file
|
|
|
59
59
|
|
|
60
60
|
> Define project structures once in YAML, then generate consistent repos, CI files, docs, Terraform modules, and app layouts locally, in CI, or through an AI assistant via MCP.
|
|
61
61
|
|
|
62
|
-

|
|
63
|
-
|
|
64
62
|
[](https://codecov.io/github/httpdss/structkit)
|
|
65
63
|

|
|
66
64
|

|
|
@@ -68,7 +66,7 @@ Dynamic: license-file
|
|
|
68
66
|
|
|
69
67
|
**StructKit** replaces copy-pasted boilerplate and aging "golden repos" with reusable YAML structures. It can render template variables, fetch canonical files from remote sources, preview changes before writing, and expose your scaffolds to AI assistants through the Model Context Protocol.
|
|
70
68
|
|
|
71
|
-
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](examples/)** | 🤖 **[MCP Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
69
|
+
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](examples/)** | 🤖 **[MCP / AI Agent Guide](docs/mcp-integration.md)** | 🧠 **[Agent Skills](docs/agent-skills.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
72
70
|
|
|
73
71
|
## ⚡ Try it in 60 seconds
|
|
74
72
|
|
|
@@ -115,6 +113,7 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
|
|
|
115
113
|
|
|
116
114
|
- **Remote-first content:** Reference your organization's canonical CI template from GitHub directly in your StructKit config. When the template updates, all new projects get the update — no copy-paste maintenance.
|
|
117
115
|
- **AI-native via MCP:** Start the StructKit MCP server so your AI assistant can generate project scaffolds from natural language using your templates as the source of truth.
|
|
116
|
+
- **Agent skill ready:** Install the companion [`httpdss/structkit-skills`](https://github.com/httpdss/structkit-skills) workflow skill so AI assistants consistently inspect, preview, generate, and validate StructKit structures.
|
|
118
117
|
- **YAML-first:** Define structures directly in YAML. No separate template repository is required.
|
|
119
118
|
- **Safe by default:** Use dry-run previews and file conflict strategies before writing into existing projects.
|
|
120
119
|
|
|
@@ -193,7 +192,8 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
193
192
|
- **[Hooks](docs/hooks.md)** - Pre and post-generation automation
|
|
194
193
|
- **[Mappings](docs/mappings.md)** - External data integration
|
|
195
194
|
- **[GitHub Integration](docs/github-integration.md)** - Automation with GitHub Actions
|
|
196
|
-
- **[MCP
|
|
195
|
+
- **[MCP / AI Agent Workflow](docs/mcp-integration.md)** - Model Context Protocol for approved-template scaffolding with AI assistants
|
|
196
|
+
- **[Agent Skills](docs/agent-skills.md)** - Installable StructKit workflow skill for AI assistants
|
|
197
197
|
- **[Command-Line Completion](docs/completion.md)** - Enhanced CLI experience
|
|
198
198
|
|
|
199
199
|
### 👩💻 Development
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> Define project structures once in YAML, then generate consistent repos, CI files, docs, Terraform modules, and app layouts locally, in CI, or through an AI assistant via MCP.
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-
|
|
7
5
|
[](https://codecov.io/github/httpdss/structkit)
|
|
8
6
|

|
|
9
7
|

|
|
@@ -11,7 +9,7 @@
|
|
|
11
9
|
|
|
12
10
|
**StructKit** replaces copy-pasted boilerplate and aging "golden repos" with reusable YAML structures. It can render template variables, fetch canonical files from remote sources, preview changes before writing, and expose your scaffolds to AI assistants through the Model Context Protocol.
|
|
13
11
|
|
|
14
|
-
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](examples/)** | 🤖 **[MCP Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
12
|
+
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](examples/)** | 🤖 **[MCP / AI Agent Guide](docs/mcp-integration.md)** | 🧠 **[Agent Skills](docs/agent-skills.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
15
13
|
|
|
16
14
|
## ⚡ Try it in 60 seconds
|
|
17
15
|
|
|
@@ -58,6 +56,7 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
|
|
|
58
56
|
|
|
59
57
|
- **Remote-first content:** Reference your organization's canonical CI template from GitHub directly in your StructKit config. When the template updates, all new projects get the update — no copy-paste maintenance.
|
|
60
58
|
- **AI-native via MCP:** Start the StructKit MCP server so your AI assistant can generate project scaffolds from natural language using your templates as the source of truth.
|
|
59
|
+
- **Agent skill ready:** Install the companion [`httpdss/structkit-skills`](https://github.com/httpdss/structkit-skills) workflow skill so AI assistants consistently inspect, preview, generate, and validate StructKit structures.
|
|
61
60
|
- **YAML-first:** Define structures directly in YAML. No separate template repository is required.
|
|
62
61
|
- **Safe by default:** Use dry-run previews and file conflict strategies before writing into existing projects.
|
|
63
62
|
|
|
@@ -136,7 +135,8 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
136
135
|
- **[Hooks](docs/hooks.md)** - Pre and post-generation automation
|
|
137
136
|
- **[Mappings](docs/mappings.md)** - External data integration
|
|
138
137
|
- **[GitHub Integration](docs/github-integration.md)** - Automation with GitHub Actions
|
|
139
|
-
- **[MCP
|
|
138
|
+
- **[MCP / AI Agent Workflow](docs/mcp-integration.md)** - Model Context Protocol for approved-template scaffolding with AI assistants
|
|
139
|
+
- **[Agent Skills](docs/agent-skills.md)** - Installable StructKit workflow skill for AI assistants
|
|
140
140
|
- **[Command-Line Completion](docs/completion.md)** - Enhanced CLI experience
|
|
141
141
|
|
|
142
142
|
### 👩💻 Development
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "structkit"
|
|
7
|
-
version = "3.1
|
|
7
|
+
version = "3.2.1"
|
|
8
8
|
description = "YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -78,12 +78,12 @@ dev = [
|
|
|
78
78
|
]
|
|
79
79
|
|
|
80
80
|
[project.urls]
|
|
81
|
-
Homepage = "https://
|
|
81
|
+
Homepage = "https://structkit.app/"
|
|
82
82
|
Repository = "https://github.com/httpdss/structkit"
|
|
83
83
|
Issues = "https://github.com/httpdss/structkit/issues"
|
|
84
84
|
Discussions = "https://github.com/httpdss/structkit/discussions"
|
|
85
|
-
Documentation = "https://
|
|
86
|
-
Funding = "https://
|
|
85
|
+
Documentation = "https://structkit.app/docs/"
|
|
86
|
+
Funding = "https://structkit.app/docs/funding/"
|
|
87
87
|
|
|
88
88
|
[project.scripts]
|
|
89
89
|
structkit = "structkit.main:main"
|
|
@@ -6,6 +6,7 @@ from structkit.file_item import FileItem, ContentFetchError
|
|
|
6
6
|
from structkit.completers import file_strategy_completer, structures_completer
|
|
7
7
|
from structkit.template_renderer import TemplateRenderer, TemplateVariableError
|
|
8
8
|
from structkit.sources import SourceError, resolve_structures_path
|
|
9
|
+
from structkit.struct_refs import SourceContext, resolve_struct_reference
|
|
9
10
|
from structkit.input_store import InputStoreError
|
|
10
11
|
|
|
11
12
|
import subprocess
|
|
@@ -208,7 +209,7 @@ class GenerateCommand(Command):
|
|
|
208
209
|
# Actually generate structure
|
|
209
210
|
try:
|
|
210
211
|
self._create_structure(args, mappings)
|
|
211
|
-
except (GenerateConfigError, TemplateVariableError, ContentFetchError, InputStoreError) as exc:
|
|
212
|
+
except (GenerateConfigError, SourceError, TemplateVariableError, ContentFetchError, InputStoreError) as exc:
|
|
212
213
|
self.logger.error(f"❗ {exc}")
|
|
213
214
|
raise SystemExit(1) from None
|
|
214
215
|
|
|
@@ -217,7 +218,7 @@ class GenerateCommand(Command):
|
|
|
217
218
|
self.logger.error("Post-hook failed.")
|
|
218
219
|
return
|
|
219
220
|
|
|
220
|
-
def _create_structure(self, args, mappings=None, summary=None, print_summary=True):
|
|
221
|
+
def _create_structure(self, args, mappings=None, summary=None, print_summary=True, source_context=None):
|
|
221
222
|
if isinstance(args, dict):
|
|
222
223
|
args = argparse.Namespace(**args)
|
|
223
224
|
|
|
@@ -225,6 +226,12 @@ class GenerateCommand(Command):
|
|
|
225
226
|
self._load_yaml_config(args.structure_definition, args.structures_path)
|
|
226
227
|
)
|
|
227
228
|
|
|
229
|
+
is_top_level_source_context = source_context is None
|
|
230
|
+
source_context = (source_context or SourceContext.from_global()).merge_inline(
|
|
231
|
+
config.get('sources'),
|
|
232
|
+
allow_override=is_top_level_source_context,
|
|
233
|
+
)
|
|
234
|
+
|
|
228
235
|
# Safely parse template variables
|
|
229
236
|
template_vars = self._parse_template_vars(args.vars) if getattr(args, 'vars', None) else {}
|
|
230
237
|
config_structure = config.get('files', config.get('structure', []))
|
|
@@ -395,10 +402,12 @@ class GenerateCommand(Command):
|
|
|
395
402
|
merged_vars = merged_vars if merged_vars else None
|
|
396
403
|
|
|
397
404
|
if isinstance(content['struct'], str):
|
|
405
|
+
child_structures_path, child_structure_definition = resolve_struct_reference(
|
|
406
|
+
content['struct'], args.structures_path, source_context)
|
|
398
407
|
self._create_structure({
|
|
399
|
-
'structure_definition':
|
|
408
|
+
'structure_definition': child_structure_definition,
|
|
400
409
|
'base_path': folder_path,
|
|
401
|
-
'structures_path':
|
|
410
|
+
'structures_path': child_structures_path,
|
|
402
411
|
'dry_run': args.dry_run,
|
|
403
412
|
'diff': getattr(args, 'diff', False),
|
|
404
413
|
'output': getattr(args, 'output', 'file'),
|
|
@@ -408,13 +417,15 @@ class GenerateCommand(Command):
|
|
|
408
417
|
'global_system_prompt': args.global_system_prompt,
|
|
409
418
|
'input_store': args.input_store,
|
|
410
419
|
'non_interactive': args.non_interactive,
|
|
411
|
-
}, mappings=mappings, summary=summary, print_summary=False)
|
|
420
|
+
}, mappings=mappings, summary=summary, print_summary=False, source_context=source_context)
|
|
412
421
|
elif isinstance(content['struct'], list):
|
|
413
422
|
for struct in content['struct']:
|
|
423
|
+
child_structures_path, child_structure_definition = resolve_struct_reference(
|
|
424
|
+
struct, args.structures_path, source_context)
|
|
414
425
|
self._create_structure({
|
|
415
|
-
'structure_definition':
|
|
426
|
+
'structure_definition': child_structure_definition,
|
|
416
427
|
'base_path': folder_path,
|
|
417
|
-
'structures_path':
|
|
428
|
+
'structures_path': child_structures_path,
|
|
418
429
|
'dry_run': args.dry_run,
|
|
419
430
|
'diff': getattr(args, 'diff', False),
|
|
420
431
|
'output': getattr(args, 'output', 'file'),
|
|
@@ -424,7 +435,7 @@ class GenerateCommand(Command):
|
|
|
424
435
|
'global_system_prompt': args.global_system_prompt,
|
|
425
436
|
'input_store': args.input_store,
|
|
426
437
|
'non_interactive': args.non_interactive,
|
|
427
|
-
}, mappings=mappings, summary=summary, print_summary=False)
|
|
438
|
+
}, mappings=mappings, summary=summary, print_summary=False, source_context=source_context)
|
|
428
439
|
else:
|
|
429
440
|
self.logger.warning(f"Unsupported content in folder: {folder}")
|
|
430
441
|
|
|
@@ -15,14 +15,18 @@ class SourcesCommand(Command):
|
|
|
15
15
|
def __init__(self, parser):
|
|
16
16
|
super().__init__(parser)
|
|
17
17
|
parser.description = "Manage named custom structure sources"
|
|
18
|
-
parser.add_argument(
|
|
18
|
+
parser.add_argument(
|
|
19
|
+
'--config-path',
|
|
20
|
+
type=str,
|
|
21
|
+
help='Override sources config path (env: STRUCTKIT_SOURCES_CONFIG)',
|
|
22
|
+
)
|
|
19
23
|
subparsers = parser.add_subparsers(dest='sources_command')
|
|
20
24
|
|
|
21
25
|
subparsers.add_parser('list', help='List configured sources').set_defaults(sources_func=self.list_sources)
|
|
22
26
|
|
|
23
|
-
add_parser = subparsers.add_parser('add', help='Add or update a local source')
|
|
27
|
+
add_parser = subparsers.add_parser('add', help='Add or update a local, GitHub, or git-backed source')
|
|
24
28
|
add_parser.add_argument('name')
|
|
25
|
-
add_parser.add_argument('path_or_url')
|
|
29
|
+
add_parser.add_argument('path_or_url', help='Local directory, owner/repo, github://owner/repo, or git URL')
|
|
26
30
|
add_parser.set_defaults(sources_func=self.add_source)
|
|
27
31
|
|
|
28
32
|
remove_parser = subparsers.add_parser('remove', help='Remove a configured source')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a generic GitHub Copilot instructions file (.github/instructions/generic.instruction.md)
|
|
3
|
+
as a blank starter template for defining AI coding guidelines and context.
|
|
4
|
+
|
|
5
|
+
files:
|
|
6
|
+
- .github/instructions/generic.instruction.md:
|
|
7
|
+
skip_if_exists: true
|
|
8
|
+
content: |
|
|
9
|
+
Your instructions here
|
{structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/execute-tf-workflow.yaml
RENAMED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a GitHub Actions workflow for running Terraform plan on PRs and apply on pushes
|
|
3
|
+
to main, scoped to a specific app path under .devops/apps/. Uses variables for app name,
|
|
4
|
+
working directory path, and GitHub token.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .github/workflows/execute-tf-{{@ app_name | slugify @}}.yaml:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a GitHub Actions labeler workflow (labeler.yaml) and a labeler config
|
|
3
|
+
(.github/labeler.yml) that auto-assigns PR labels based on changed file paths
|
|
4
|
+
and branch name patterns (feature, bug, docs, release).
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .github/labeler.yml:
|
|
3
8
|
content: |
|
{structkit-3.1.0 → structkit-3.2.1}/structkit/contribs/github/workflows/release-drafter.yaml
RENAMED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a release drafter workflow (z-release-drafter.yaml), a major tagging workflow
|
|
3
|
+
(z-major-tagging.yaml), and a release-drafter.yml config with feature/bugfix/patch
|
|
4
|
+
label categories and semantic versioning resolution.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .github/workflows/z-release-drafter.yaml:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates Kubernetes manifest files for deploying a containerised application:
|
|
3
|
+
Deployment, Service, Ingress, ConfigMap, Secret, and README.md.
|
|
4
|
+
Uses variables for app name, deployment name, and Docker image details.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- deployment.yaml:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates the scaffolding for a custom StructKit structures repository: README.md,
|
|
3
|
+
custom-mappings.yaml, a structures/ directory, and common configs via sub-structures
|
|
4
|
+
(devcontainer, editor-config, prettier, run-struct, release-drafter, pre-commit).
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- README.md:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a comprehensive generic project scaffold with standard directory structure
|
|
3
|
+
(.config, .build, src, test, doc, tools, dep), common config files (.editorconfig,
|
|
4
|
+
.gitignore, Dockerfile, docker-compose.yml), GitHub community files, and Terraform
|
|
5
|
+
environment apps (prod, stage, qa, dev, init).
|
|
6
|
+
|
|
1
7
|
files:
|
|
2
8
|
- .config/REMOVE_ME.md:
|
|
3
9
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a Java Maven project scaffold with pom.xml, standard Maven directory layout
|
|
3
|
+
(src/main/java, src/test/java), App.java and AppTest.java starters, .editorconfig,
|
|
4
|
+
.gitignore, README.md, and Apache 2.0 LICENSE.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .editorconfig:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a self-hosted n8n workflow automation setup with docker-compose.yaml
|
|
3
|
+
(n8n container + Traefik reverse proxy with automatic HTTPS), .env configuration,
|
|
4
|
+
and a local-files/ directory. Uses variables for domain, subdomain, timezone, and SSL email.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .gitignore:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a Python project scaffold with setup.py, setup.cfg, pyproject.toml,
|
|
3
|
+
Makefile (with venv management), requirements.txt, src and tests directories
|
|
4
|
+
with starter modules, .editorconfig, .gitignore, and Apache 2.0 LICENSE.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .editorconfig:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a Ruby project scaffold with .rubocop.yml, RSpec test structure (spec/),
|
|
3
|
+
lib directory with versioned module and main class, bin/console and bin/setup scripts,
|
|
4
|
+
.editorconfig, .gitignore, README.md, and Apache 2.0 LICENSE.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .editorconfig:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates a Rust project scaffold with Cargo.toml, src/main.rs and lib.rs, module files,
|
|
3
|
+
integration tests, benchmarks, .cargo/config for cross-compilation, .editorconfig,
|
|
4
|
+
.gitignore, README.md, and Apache 2.0 LICENSE.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- .editorconfig:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates an AI agent prompt file that instructs the assistant to query GitHub for
|
|
3
|
+
repositories matching a given topic in a specified organization, then trigger the
|
|
4
|
+
run-struct workflow on each of them.
|
|
5
|
+
|
|
1
6
|
files:
|
|
2
7
|
- run-struct-trigger.md:
|
|
3
8
|
content: |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates Terraform app directories for nonprod and prod AWS accounts under
|
|
3
|
+
.devops/apps/accounts/, each using the generic app structure with a remote backend,
|
|
4
|
+
plus execute-tf-workflow GitHub Actions workflows for each account.
|
|
5
|
+
|
|
1
6
|
folders:
|
|
2
7
|
- .devops/apps/accounts/nonprod:
|
|
3
8
|
struct: terraform/apps/generic
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
description: >
|
|
2
|
+
Creates Terraform app directories for four environments (dev, qa, stage, prod) under
|
|
3
|
+
.devops/apps/environments/, using the generic app structure with a remote backend,
|
|
4
|
+
plus execute-tf-workflow GitHub Actions workflows for each environment.
|
|
5
|
+
|
|
1
6
|
folders:
|
|
2
7
|
- .devops/apps/environments/dev:
|
|
3
8
|
struct: terraform/apps/generic
|