@c0x12c/spartan-ai-toolkit 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/VERSION +1 -1
- package/claude-md/30-infrastructure.md +1 -1
- package/commands/spartan/tf-cost.md +2 -0
- package/commands/spartan/tf-deploy.md +1 -0
- package/commands/spartan/tf-drift.md +1 -0
- package/commands/spartan/tf-import.md +2 -0
- package/commands/spartan/tf-module.md +3 -0
- package/commands/spartan/tf-plan.md +1 -0
- package/commands/spartan/tf-review.md +4 -0
- package/commands/spartan/tf-scaffold.md +3 -0
- package/commands/spartan/tf-security.md +1 -0
- package/package.json +1 -1
- package/rules/infrastructure/MODULES.md +7 -1
- package/rules/infrastructure/NAMING.md +7 -1
- package/rules/infrastructure/PROVIDERS.md +7 -1
- package/rules/infrastructure/SECURITY.md +7 -1
- package/rules/infrastructure/STATE_AND_BACKEND.md +7 -1
- package/rules/infrastructure/STRUCTURE.md +7 -1
- package/rules/infrastructure/VARIABLES.md +7 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.12.0
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
Two template variants: [Multi-Root](https://github.com/spartan-stratos/template-infra-terraform-multiple-root) (per-env directories) and [Single-Root](https://github.com/spartan-stratos/template-infra-terraform-single-root) (envs/ layout, supports ECS + EKS).
|
|
9
9
|
|
|
10
|
-
Rules in `rules/infrastructure/` are
|
|
10
|
+
Rules in `rules/infrastructure/` load automatically when `.tf`, `.hcl`, or `.tfvars` files are in context (Claude Code path-scoped rules). All `/spartan:tf-*` commands also import relevant rules explicitly.
|
|
11
11
|
|
|
12
12
|
### Infrastructure Commands
|
|
13
13
|
|
|
@@ -4,6 +4,8 @@ description: Cost estimation guidance — sizing recommendations, common pattern
|
|
|
4
4
|
argument-hint: "[optional: resource-type]"
|
|
5
5
|
preamble-tier: 2
|
|
6
6
|
---
|
|
7
|
+
@rules/infrastructure/STRUCTURE.md
|
|
8
|
+
@rules/infrastructure/MODULES.md
|
|
7
9
|
|
|
8
10
|
# Terraform Cost Estimation: {{ args[0] | default: "infrastructure review" }}
|
|
9
11
|
|
|
@@ -4,6 +4,8 @@ description: Import existing AWS resources into Terraform state with config gene
|
|
|
4
4
|
argument-hint: "[resource-type resource-id]"
|
|
5
5
|
preamble-tier: 3
|
|
6
6
|
---
|
|
7
|
+
@rules/infrastructure/STRUCTURE.md
|
|
8
|
+
@rules/infrastructure/NAMING.md
|
|
7
9
|
|
|
8
10
|
# Terraform Import: {{ args[0] | default: "existing resource" }}
|
|
9
11
|
|
|
@@ -4,6 +4,9 @@ description: Create or extend a Terraform module with proper interface, docs, an
|
|
|
4
4
|
argument-hint: "[module-name]"
|
|
5
5
|
preamble-tier: 3
|
|
6
6
|
---
|
|
7
|
+
@rules/infrastructure/MODULES.md
|
|
8
|
+
@rules/infrastructure/NAMING.md
|
|
9
|
+
@rules/infrastructure/VARIABLES.md
|
|
7
10
|
|
|
8
11
|
# Terraform Module: {{ args[0] | default: "new module" }}
|
|
9
12
|
|
|
@@ -4,6 +4,10 @@ description: PR review for Terraform changes — 8-stage checklist covering stru
|
|
|
4
4
|
argument-hint: "[optional: branch or PR]"
|
|
5
5
|
preamble-tier: 3
|
|
6
6
|
---
|
|
7
|
+
@rules/infrastructure/STRUCTURE.md
|
|
8
|
+
@rules/infrastructure/MODULES.md
|
|
9
|
+
@rules/infrastructure/PROVIDERS.md
|
|
10
|
+
@rules/infrastructure/NAMING.md
|
|
7
11
|
|
|
8
12
|
# Terraform Review: {{ args[0] | default: "current changes" }}
|
|
9
13
|
|
|
@@ -4,6 +4,9 @@ description: Scaffold service-level Terraform with live/, modules/, envs/ struct
|
|
|
4
4
|
argument-hint: "[service-name]"
|
|
5
5
|
preamble-tier: 3
|
|
6
6
|
---
|
|
7
|
+
@rules/infrastructure/STRUCTURE.md
|
|
8
|
+
@rules/infrastructure/NAMING.md
|
|
9
|
+
@rules/infrastructure/VARIABLES.md
|
|
7
10
|
|
|
8
11
|
# Terraform Scaffold: {{ args[0] | default: "new service" }}
|
|
9
12
|
|
package/package.json
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Module Design and Composition
|
|
2
8
|
|
|
3
9
|
> Full guide: use `/spartan:tf-module` command
|
|
@@ -251,4 +257,4 @@ module "rds" {
|
|
|
251
257
|
| Module interface | Explicit `variables.tf` + `outputs.tf`, no hardcoded values |
|
|
252
258
|
| Sensitive for_each | Fix at source module, not consumer |
|
|
253
259
|
| Shared modules | `live/shared/` for multi-root cross-environment reuse |
|
|
254
|
-
| Variable declarations | Declare all variables, even if sourced from remote state |
|
|
260
|
+
| Variable declarations | Declare all variables, even if sourced from remote state |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Resource and File Naming Conventions
|
|
2
8
|
|
|
3
9
|
## File Naming
|
|
@@ -187,4 +193,4 @@ resource "aws_sqs_queue" "jobs" {
|
|
|
187
193
|
| IAM roles | `{service}-{env}-irsa` |
|
|
188
194
|
| State buckets | `{project}-{region_short}-tf-{env}` |
|
|
189
195
|
| Tags | Provider `default_tags`, never per-resource |
|
|
190
|
-
| K8s resources | `{service}` for namespace and service account |
|
|
196
|
+
| K8s resources | `{service}` for namespace and service account |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Provider Configuration
|
|
2
8
|
|
|
3
9
|
## Providers Only in Live Layer
|
|
@@ -300,4 +306,4 @@ provider "helm" {
|
|
|
300
306
|
| Kubernetes/Helm | Configured from EKS module outputs |
|
|
301
307
|
| required_version | Always set (e.g., `>= 1.11`) |
|
|
302
308
|
| Provider versions | Pessimistic pinning (`~> X.Y`) on all providers |
|
|
303
|
-
| Module providers | Modules inherit, never declare their own |
|
|
309
|
+
| Module providers | Modules inherit, never declare their own |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Security Patterns and Requirements
|
|
2
8
|
|
|
3
9
|
> Full guide: use `/spartan:tf-security` command
|
|
@@ -301,4 +307,4 @@ resource "aws_iam_policy" "s3_access" {
|
|
|
301
307
|
| Security groups | VPC CIDR scoped, never `0.0.0.0/0` |
|
|
302
308
|
| IAM policies | Least privilege, specific actions and resources |
|
|
303
309
|
| S3 | Block public access, versioning, SSE |
|
|
304
|
-
| Encryption | At rest and in transit for all data stores |
|
|
310
|
+
| Encryption | At rest and in transit for all data stores |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# State Management
|
|
2
8
|
|
|
3
9
|
> Full guide: use `/spartan:tf-plan` or `/spartan:tf-deploy` commands
|
|
@@ -228,4 +234,4 @@ terraform {
|
|
|
228
234
|
| Init command | `terraform init -backend-config=envs/{env}/state.config` |
|
|
229
235
|
| Isolation | One state file per environment, never shared |
|
|
230
236
|
| Remote state | `terraform_remote_state` to read other layers |
|
|
231
|
-
| State moves | `terraform state mv` + verify with `terraform plan` |
|
|
237
|
+
| State moves | `terraform state mv` + verify with `terraform plan` |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Project Organization and Layering
|
|
2
8
|
|
|
3
9
|
> Full guide: use `/spartan:tf-scaffold` command
|
|
@@ -225,4 +231,4 @@ locals {
|
|
|
225
231
|
| File per resource | One resource type per `.tf` file in modules |
|
|
226
232
|
| Locals | ALL in `locals.tf`, never scattered |
|
|
227
233
|
| Providers | Only in `live/` layer |
|
|
228
|
-
| Environment config | `envs/{env}/` with state.config, terraform.tfvars, secrets.tfvars |
|
|
234
|
+
| Environment config | `envs/{env}/` with state.config, terraform.tfvars, secrets.tfvars |
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.tf"
|
|
4
|
+
- "**/*.hcl"
|
|
5
|
+
- "**/*.tfvars"
|
|
6
|
+
---
|
|
1
7
|
# Variable Design and Validation
|
|
2
8
|
|
|
3
9
|
## Validation Blocks
|
|
@@ -276,4 +282,4 @@ module "config_aws" {
|
|
|
276
282
|
| Sizing defaults | Provide dev-appropriate defaults, override in tfvars |
|
|
277
283
|
| Config modules | `config/` for shared constants (region, AZs, tags) |
|
|
278
284
|
| Variable naming | `snake_case` with resource prefix |
|
|
279
|
-
| Descriptions | Every variable must have a `description` |
|
|
285
|
+
| Descriptions | Every variable must have a `description` |
|