vstack 0.0.0__py3-none-any.whl

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 (119) hide show
  1. vstack/__init__.py +5 -0
  2. vstack/__main__.py +5 -0
  3. vstack/_templates/agents/_partials/agent-skill-boundary.md +5 -0
  4. vstack/_templates/agents/architect/config.yaml +38 -0
  5. vstack/_templates/agents/architect/template.md +84 -0
  6. vstack/_templates/agents/designer/config.yaml +36 -0
  7. vstack/_templates/agents/designer/template.md +99 -0
  8. vstack/_templates/agents/engineer/config.yaml +36 -0
  9. vstack/_templates/agents/engineer/template.md +88 -0
  10. vstack/_templates/agents/product/config.yaml +37 -0
  11. vstack/_templates/agents/product/template.md +87 -0
  12. vstack/_templates/agents/release/config.yaml +35 -0
  13. vstack/_templates/agents/release/template.md +86 -0
  14. vstack/_templates/agents/tester/config.yaml +41 -0
  15. vstack/_templates/agents/tester/template.md +90 -0
  16. vstack/_templates/instructions/git/config.yaml +4 -0
  17. vstack/_templates/instructions/git/template.md +36 -0
  18. vstack/_templates/instructions/python/config.yaml +4 -0
  19. vstack/_templates/instructions/python/template.md +37 -0
  20. vstack/_templates/prompts/code-review/config.yaml +10 -0
  21. vstack/_templates/prompts/code-review/template.md +39 -0
  22. vstack/_templates/skills/_partials/base-branch.md +8 -0
  23. vstack/_templates/skills/_partials/observability-checklist.md +36 -0
  24. vstack/_templates/skills/_partials/run-tests.md +22 -0
  25. vstack/_templates/skills/_partials/skill-context.md +21 -0
  26. vstack/_templates/skills/adr/config.yaml +17 -0
  27. vstack/_templates/skills/adr/template.md +167 -0
  28. vstack/_templates/skills/analyse/config.yaml +16 -0
  29. vstack/_templates/skills/analyse/template.md +188 -0
  30. vstack/_templates/skills/architecture/config.yaml +18 -0
  31. vstack/_templates/skills/architecture/template.md +213 -0
  32. vstack/_templates/skills/cicd/config.yaml +16 -0
  33. vstack/_templates/skills/cicd/template.md +169 -0
  34. vstack/_templates/skills/code-review/config.yaml +16 -0
  35. vstack/_templates/skills/code-review/template.md +180 -0
  36. vstack/_templates/skills/concise/config.yaml +16 -0
  37. vstack/_templates/skills/concise/template.md +128 -0
  38. vstack/_templates/skills/consult/config.yaml +18 -0
  39. vstack/_templates/skills/consult/template.md +195 -0
  40. vstack/_templates/skills/container/config.yaml +17 -0
  41. vstack/_templates/skills/container/template.md +122 -0
  42. vstack/_templates/skills/debug/config.yaml +16 -0
  43. vstack/_templates/skills/debug/template.md +247 -0
  44. vstack/_templates/skills/dependency/config.yaml +18 -0
  45. vstack/_templates/skills/dependency/template.md +293 -0
  46. vstack/_templates/skills/design/config.yaml +16 -0
  47. vstack/_templates/skills/design/template.md +231 -0
  48. vstack/_templates/skills/docs/config.yaml +17 -0
  49. vstack/_templates/skills/docs/template.md +128 -0
  50. vstack/_templates/skills/explore/config.yaml +17 -0
  51. vstack/_templates/skills/explore/template.md +188 -0
  52. vstack/_templates/skills/guardrails/config.yaml +16 -0
  53. vstack/_templates/skills/guardrails/template.md +45 -0
  54. vstack/_templates/skills/incident/config.yaml +17 -0
  55. vstack/_templates/skills/incident/template.md +293 -0
  56. vstack/_templates/skills/inspect/config.yaml +16 -0
  57. vstack/_templates/skills/inspect/template.md +105 -0
  58. vstack/_templates/skills/migrate/config.yaml +17 -0
  59. vstack/_templates/skills/migrate/template.md +298 -0
  60. vstack/_templates/skills/onboard/config.yaml +18 -0
  61. vstack/_templates/skills/onboard/template.md +289 -0
  62. vstack/_templates/skills/openapi/config.yaml +17 -0
  63. vstack/_templates/skills/openapi/template.md +382 -0
  64. vstack/_templates/skills/performance/config.yaml +15 -0
  65. vstack/_templates/skills/performance/template.md +198 -0
  66. vstack/_templates/skills/pr/config.yaml +15 -0
  67. vstack/_templates/skills/pr/template.md +108 -0
  68. vstack/_templates/skills/refactor/config.yaml +18 -0
  69. vstack/_templates/skills/refactor/template.md +283 -0
  70. vstack/_templates/skills/release-notes/config.yaml +16 -0
  71. vstack/_templates/skills/release-notes/template.md +127 -0
  72. vstack/_templates/skills/requirements/config.yaml +17 -0
  73. vstack/_templates/skills/requirements/template.md +187 -0
  74. vstack/_templates/skills/security/config.yaml +17 -0
  75. vstack/_templates/skills/security/template.md +256 -0
  76. vstack/_templates/skills/verify/config.yaml +17 -0
  77. vstack/_templates/skills/verify/template.md +201 -0
  78. vstack/_templates/skills/vision/config.yaml +19 -0
  79. vstack/_templates/skills/vision/template.md +169 -0
  80. vstack/agents/__init__.py +5 -0
  81. vstack/agents/config.py +67 -0
  82. vstack/agents/constants.py +14 -0
  83. vstack/agents/generator.py +20 -0
  84. vstack/artifacts/__init__.py +17 -0
  85. vstack/artifacts/config.py +111 -0
  86. vstack/artifacts/constants.py +6 -0
  87. vstack/artifacts/generator.py +406 -0
  88. vstack/artifacts/models.py +55 -0
  89. vstack/artifacts/protocol.py +50 -0
  90. vstack/cli/__init__.py +3 -0
  91. vstack/cli/commands.py +596 -0
  92. vstack/cli/constants.py +33 -0
  93. vstack/cli/manifest.py +166 -0
  94. vstack/cli/parser.py +156 -0
  95. vstack/constants.py +84 -0
  96. vstack/frontmatter/__init__.py +8 -0
  97. vstack/frontmatter/parser.py +272 -0
  98. vstack/frontmatter/schema.py +142 -0
  99. vstack/frontmatter/serializer.py +208 -0
  100. vstack/instructions/__init__.py +5 -0
  101. vstack/instructions/config.py +21 -0
  102. vstack/instructions/constants.py +9 -0
  103. vstack/instructions/generator.py +13 -0
  104. vstack/main.py +71 -0
  105. vstack/models.py +35 -0
  106. vstack/prompts/__init__.py +5 -0
  107. vstack/prompts/config.py +21 -0
  108. vstack/prompts/constants.py +9 -0
  109. vstack/prompts/generator.py +13 -0
  110. vstack/skills/__init__.py +5 -0
  111. vstack/skills/config.py +58 -0
  112. vstack/skills/constants.py +17 -0
  113. vstack/skills/generator.py +20 -0
  114. vstack/skills/models.py +15 -0
  115. vstack-0.0.0.dist-info/METADATA +725 -0
  116. vstack-0.0.0.dist-info/RECORD +119 -0
  117. vstack-0.0.0.dist-info/WHEEL +4 -0
  118. vstack-0.0.0.dist-info/entry_points.txt +3 -0
  119. vstack-0.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,188 @@
1
+ {{SKILL_CONTEXT}}
2
+
3
+ {{BASE_BRANCH}}
4
+
5
+ # analyse — Technical Analysis
6
+
7
+ Investigate a technical question, impact, or tradeoff. Produce a structured
8
+ analysis report. Do not implement changes — that is engineering role work.
9
+
10
+ ## Out of scope
11
+
12
+ - Fixing bugs (use `debug`)
13
+ - Performance benchmarking with code changes (use `performance`)
14
+ - Architecture decisions (use `architecture` + `adr`)
15
+ - Implementation (engineering role)
16
+ - Full test run (use `verify`)
17
+
18
+ ______________________________________________________________________
19
+
20
+ ## Step 0: Define the Question
21
+
22
+ Clarify exactly what is being analysed:
23
+
24
+ > **Question:** What is the specific question or concern to investigate?
25
+ >
26
+ > - Impact analysis: "What breaks if we change X?"
27
+ > - Tradeoff analysis: "Compare approach A vs approach B"
28
+ > - Feasibility analysis: "Can we do X given constraints Y?"
29
+ > - Root cause analysis: "Why does X happen?"
30
+ > - Risk analysis: "What are the risks of doing/not doing X?"
31
+ > **Default:** Open-ended investigation based on user's context
32
+
33
+ Document:
34
+
35
+ ```text
36
+ Analysis type: [impact | tradeoff | feasibility | root-cause | risk | other]
37
+ Question: [Precise question being answered]
38
+ Scope: [What's in and out of scope for this analysis]
39
+ ```
40
+
41
+ ______________________________________________________________________
42
+
43
+ ## Phase 1: Evidence Gathering
44
+
45
+ Gather all relevant context before drawing any conclusions:
46
+
47
+ ```bash
48
+ # Understand the current state
49
+ git log --oneline -20
50
+ cat TODOS.md 2>/dev/null | head -30 || true
51
+
52
+ # Find relevant code
53
+ # (adjust search terms to the specific question)
54
+ grep -r -n "TODO\|FIXME\|DEPRECATED" \
55
+ --include='*.ts' --include='*.py' --include='*.go' \
56
+ --exclude-dir=node_modules . 2>/dev/null | head -20
57
+ ```
58
+
59
+ For **impact analysis**, find all call sites / dependents:
60
+
61
+ ```bash
62
+ # Find all usages of a symbol, function, or interface
63
+ grep -r -n "SYMBOL_NAME" \
64
+ --include='*.ts' --include='*.py' --include='*.go' \
65
+ --exclude-dir=node_modules . 2>/dev/null
66
+ ```
67
+
68
+ For **dependency analysis**:
69
+
70
+ ```bash
71
+ # Dependency graph (if available)
72
+ [ -f package.json ] && npx madge --circular --extensions ts ./src 2>/dev/null || true
73
+ ```
74
+
75
+ ______________________________________________________________________
76
+
77
+ ## Phase 2: Dimension Analysis
78
+
79
+ Structure the analysis around the relevant dimensions for the question type:
80
+
81
+ ### For impact analysis:
82
+
83
+ - What systems/services/consumers are affected?
84
+ - What is the blast radius? (local, service-wide, cross-service, user-facing)
85
+ - Are breaking changes involved?
86
+ - What is the rollback strategy?
87
+ - Migration effort estimate
88
+
89
+ ### For tradeoff analysis:
90
+
91
+ For each option:
92
+
93
+ | Dimension | Option A | Option B |
94
+ | ----------------- | -------- | -------- |
95
+ | Complexity | | |
96
+ | Performance | | |
97
+ | Maintainability | | |
98
+ | Cost | | |
99
+ | Risk | | |
100
+ | Time to implement | | |
101
+
102
+ ### For feasibility analysis:
103
+
104
+ - Technical feasibility: can this be built with current stack/skills?
105
+ - Constraints: what limits apply (time, budget, API limits, data size)?
106
+ - Dependencies: what must be true for this to work?
107
+ - Risks: what could prevent success?
108
+
109
+ ### For root cause analysis:
110
+
111
+ - What is the observed symptom?
112
+ - What are the contributing factors?
113
+ - Primary cause vs contributing causes
114
+ - Timeline: when did this start? What changed?
115
+
116
+ ### For risk analysis:
117
+
118
+ | Risk | Likelihood | Impact | Mitigation |
119
+ | ---- | --------------- | --------------- | ---------- |
120
+ | ... | High/Medium/Low | High/Medium/Low | ... |
121
+
122
+ ______________________________________________________________________
123
+
124
+ ## Phase 3: Data & Evidence
125
+
126
+ Support findings with concrete evidence:
127
+
128
+ ```bash
129
+ # Metrics, logs, or data that support the analysis
130
+ # Error rates, latency percentiles, query counts, etc.
131
+ ```
132
+
133
+ Reference specific:
134
+
135
+ - Code locations (file:line)
136
+ - Data points (error counts, latency numbers, test results)
137
+ - Documentation (ADRs, design docs, API specs)
138
+
139
+ ______________________________________________________________________
140
+
141
+ ## Phase 4: Findings & Conclusions
142
+
143
+ Present findings clearly:
144
+
145
+ ```markdown
146
+ ## Findings
147
+
148
+ ### [Finding 1 — short title]
149
+ [Evidence + explanation]
150
+
151
+ ### [Finding 2]
152
+ [Evidence + explanation]
153
+ ```
154
+
155
+ State conclusions with confidence level:
156
+
157
+ - **Certain:** evidenced directly from code/data
158
+ - **Probable:** well-supported by evidence but not confirmed
159
+ - **Uncertain:** hypothesis that requires further investigation
160
+
161
+ ______________________________________________________________________
162
+
163
+ ## Analysis Report
164
+
165
+ ```text
166
+ ## Analysis Report — [topic] — [date]
167
+
168
+ ### Question
169
+ [The specific question answered]
170
+
171
+ ### TL;DR
172
+ [2-3 sentence executive summary of the most important finding]
173
+
174
+ ### Findings
175
+ [Structured findings with evidence]
176
+
177
+ ### Recommendation
178
+ [If applicable: what to do based on the analysis]
179
+ [NOT an implementation plan — just the recommended direction]
180
+
181
+ ### Open Questions
182
+ [What remains unclear and needs further investigation]
183
+
184
+ ### Confidence
185
+ [Overall confidence level: high / medium / low — and why]
186
+ ```
187
+
188
+ ______________________________________________________________________
@@ -0,0 +1,18 @@
1
+ name: architecture
2
+ version: 1.0.2
3
+ description: |
4
+ Engineering-lead plan review. Lock in the execution plan —
5
+ service boundaries, data models, API contracts, error handling, test strategy,
6
+ distributed systems correctness, migrations, and observability. Walks through
7
+ issues with opinionated recommendations. Use when asked to "review the architecture",
8
+ "engineering review", or "lock in the plan". Proactively suggest when the user
9
+ has a plan and is about to start coding — catch architecture issues before implementation.
10
+ argument-hint: '[plan or system to review]'
11
+
12
+ license: MIT
13
+ compatibility: Requires a skills-compatible agent with repository file access and terminal command execution when needed.
14
+ metadata:
15
+ owner: vstack
16
+ maturity: stable
17
+ user-invocable: true
18
+ disable-model-invocation: false
@@ -0,0 +1,213 @@
1
+ {{SKILL_CONTEXT}}
2
+
3
+ # architecture — Engineering Plan Review
4
+
5
+ Review the plan before any code is written. Identify issues, give opinionated
6
+ recommendations, and produce a final verdict.
7
+
8
+ ## Out of scope
9
+
10
+ - Writing ADRs for each decision (use `adr`)
11
+ - DX/API ergonomics review (use `consult`)
12
+ - Implementation (engineering role)
13
+ - Gathering requirements (use `requirements`)
14
+ - Writing the design document (use `design` for API/service design)
15
+
16
+ ## Deliverable and artifact policy
17
+
18
+ - Primary deliverable: `docs/architecture/architecture.md`
19
+ - Additional deliverables when needed: `docs/architecture/adr/NNN-*.md` for significant structural decisions.
20
+ - Baseline-first default: write final architecture decisions directly to `docs/architecture/architecture.md` on the feature branch.
21
+ - Optional WIP area for complex/uncertain efforts: `docs/delta/{id}/ARCHITECTURE_DELTA.md`
22
+ - Before merge: consolidate any required content from optional delta notes back into baseline architecture docs and keep ADRs in `docs/architecture/adr/`.
23
+
24
+ ## Review philosophy
25
+
26
+ Review the plan thoroughly before any code changes. For every issue, explain the
27
+ concrete tradeoffs, give an opinionated recommendation, and ask for input before
28
+ assuming a direction.
29
+
30
+ ## Priority Hierarchy
31
+
32
+ If running low on context or asked to compress: Step 0 > Service/contract diagram > Test diagram > Opinionated recommendations > Everything else.
33
+ **Never skip Step 0 or the service/contract diagram.**
34
+
35
+ ## Engineering Preferences
36
+
37
+ - DRY is important — flag repetition aggressively.
38
+ - Well-tested code is non-negotiable; rather too many tests than too few.
39
+ - "Engineered enough" — not under-engineered (fragile, hacky) and not over-engineered (premature abstraction).
40
+ - Bias toward explicit over clever.
41
+ - Minimal diff: achieve the goal with the fewest new abstractions and files touched.
42
+ - Observability is not optional — new codepaths need logs, metrics, or traces.
43
+ - Security is not optional — new codepaths need threat modeling.
44
+ - Deployments are not atomic — plan for partial states, rollbacks, and feature flags.
45
+ - Diagrams for all data flows, state machines, and service dependencies.
46
+
47
+ ## Cognitive Patterns — How Great Engineering Leads Think
48
+
49
+ These are not checklist items — they are the instincts experienced leads develop:
50
+
51
+ 1. **State diagnosis** — Is the team falling behind, treading water, repaying debt, or innovating? Each demands a different intervention.
52
+ 1. **Blast radius instinct** — Every decision evaluated through "what's the worst case and how many systems/teams does it affect?"
53
+ 1. **Boring by default** — "Every company gets about three innovation tokens." Everything else should be proven technology.
54
+ 1. **Incremental over revolutionary** — Strangler fig, not big bang. Canary, not global rollout. Refactor, not rewrite.
55
+ 1. **Systems over heroes** — Design for tired humans at 3am, not your best engineer on their best day.
56
+ 1. **Reversibility preference** — Database migrations, API breaking changes, and service renames are one-way doors. Everything else: feature flags, canaries, gradual rollouts.
57
+ 1. **Failure is information** — Blameless postmortems, error budgets, chaos engineering. Incidents are learning opportunities.
58
+ 1. **Org structure IS architecture** — Conway's Law. Design both intentionally.
59
+ 1. **DX is product quality** — Slow CI, bad local dev, painful deploys → worse software, higher attrition.
60
+ 1. **Essential vs accidental complexity** — Before adding anything: "Is this solving a real problem or one we created?"
61
+ 1. **Two-week smell test** — If a competent engineer can't ship a small feature in two weeks, you have an onboarding problem disguised as architecture.
62
+ 1. **Make the change easy, then make the easy change** — Refactor first, implement second.
63
+ 1. **Error budgets over uptime targets** — SLO of 99.9% = 0.1% downtime budget to spend on shipping.
64
+ 1. **API contracts are public promises** — Breaking changes require major version bumps and migration plans.
65
+ 1. **Idempotency is not optional** — All state-mutating operations must be safe to retry.
66
+
67
+ ## BEFORE YOU START: Design Doc Check
68
+
69
+ ```bash
70
+ # Look for existing design docs
71
+ find . -name '*design*.md' -o -name '*adr*.md' -o -name 'DESIGN.md' 2>/dev/null | head -5
72
+ ls docs/ 2>/dev/null | grep -i 'design\|architecture\|adr' || true
73
+ ```
74
+
75
+ If a design doc exists, read it. Use it as the source of truth for the problem statement, constraints, and chosen approach.
76
+
77
+ ## Step 0: Scope Challenge
78
+
79
+ Before reviewing anything, answer:
80
+
81
+ 1. **What existing code already partially or fully solves each sub-problem?**
82
+ 1. **What is the minimum set of changes that achieves the stated goal?** Flag deferrable work.
83
+ 1. **Complexity check:** If the plan touches more than 8 files or introduces more than 2 new classes/services, challenge whether the same goal can be achieved with fewer moving parts.
84
+ 1. **Search check:** For each architectural pattern or infrastructure component introduced:
85
+ - Does the runtime/framework have a built-in? Search: `"{framework} {pattern} built-in"`
86
+ - Is the chosen approach current best practice? Search: `"{pattern} best practice {current year}"`
87
+ - Are there known footguns? Search: `"{framework} {pattern} pitfalls"`
88
+ 1. **TODOS cross-reference:** Read `TODOS.md` if it exists. Are any deferred items blocking this plan? Can any be bundled?
89
+ 1. **Completeness check:** Is the plan doing the complete version or a shortcut? With AI coding, completeness costs minutes. Recommend the complete version.
90
+ 1. **Distribution check:** If the plan introduces a new artifact (CLI, library, container image), does it include the build/publish pipeline?
91
+
92
+ ## Step 1: Service Boundary & Data Model Review
93
+
94
+ Produce a service topology diagram. Prefer Mermaid when possible; use ASCII only
95
+ as a fallback when Mermaid would be less clear or unsupported.
96
+
97
+ ```mermaid
98
+ flowchart LR
99
+ A[Service A<br>this plan] -->|HTTP or gRPC| B[Service B<br>existing]
100
+ A -->|publishes| C[Event Bus]
101
+ ```
102
+
103
+ Review:
104
+
105
+ 1. Are service boundaries aligned with business domains (Conway's Law)?
106
+ 1. Is data ownership clear — exactly one service owns each entity?
107
+ 1. Are there any circular dependencies?
108
+ 1. Is the data model correct and complete? (Schema, indexes, constraints, migrations)
109
+ 1. Is the communication style appropriate? (sync HTTP vs async events vs batch)
110
+
111
+ ## Step 2: Interface Boundary Review
112
+
113
+ 1. Are external interfaces identified and named for each service?
114
+ 1. Is API-first established as a principle — contracts defined before implementation?
115
+ 1. Is the communication style per boundary appropriate? (sync REST/gRPC vs async events vs batch)
116
+ 1. Are breaking change policies established? (semver, deprecation windows)
117
+ 1. Are cross-cutting concerns assigned? (auth, rate limiting, tracing headers)
118
+
119
+ > Detailed API contracts, schemas, and error envelopes are the designer's responsibility.
120
+
121
+ ## Step 3: Error Handling & Resilience
122
+
123
+ For every external call, answer:
124
+
125
+ - What HTTP/gRPC status codes can be returned?
126
+ - What is the retry strategy? (exponential backoff, jitter, max retries)
127
+ - Is the operation idempotent? If not, what prevents duplicate processing?
128
+ - Is there a circuit breaker? What triggers open/half-open/closed transitions?
129
+ - What is the fallback behavior when the dependency is unavailable?
130
+ - What happens on partial failure (some items succeed, some fail)?
131
+ - What is the dead letter queue strategy for async operations?
132
+
133
+ ## Step 4: Data Integrity & Migration Review
134
+
135
+ 1. Are all database migrations backward-compatible (expand-contract pattern)?
136
+ 1. Are there any operations that can't be rolled back?
137
+ 1. Is there a data migration plan for existing records?
138
+ 1. Are there any race conditions in concurrent writes? (optimistic locking, transactions)
139
+ 1. Is the event sourcing / CQRS boundary clear if applicable?
140
+
141
+ ## Step 5: Test Strategy
142
+
143
+ Produce a test plan:
144
+
145
+ ```text
146
+ Unit tests: [list key units under test]
147
+ Integration tests: [list key integration points]
148
+ Contract tests: [list API contracts under test]
149
+ Smoke tests: [list post-deploy verification steps]
150
+ Performance tests: [if needed — define criteria]
151
+ ```
152
+
153
+ Review:
154
+
155
+ 1. Are all error paths tested, not just the happy path?
156
+ 1. Are there contract tests for each API boundary?
157
+ 1. Is there a test data strategy? (fixtures, test factories, seed data)
158
+ 1. Can tests run in CI without external dependencies? (use mocks/stubs for external services)
159
+ 1. Is test coverage adequate for the risk level?
160
+
161
+ ## Step 6: Observability Plan
162
+
163
+ {{OBSERVABILITY_CHECKLIST}}
164
+
165
+ 1. What structured log events are emitted at key decision points?
166
+ 1. What metrics are introduced? Are SLOs defined?
167
+ 1. Are distributed traces created for cross-service calls?
168
+ 1. Are there new alerts? Are runbooks documented?
169
+ 1. Are dashboards updated to include new services/endpoints?
170
+
171
+ ## Step 7: Security Review
172
+
173
+ 1. What new attack surface does this introduce?
174
+ 1. Is input validation complete for all user-controlled inputs?
175
+ 1. Is secret management handled correctly? (No secrets in code, env files, or logs)
176
+ 1. Are there OWASP Top 10 risks to address?
177
+ 1. Is authorization checked at every new endpoint/operation?
178
+
179
+ ## Step 8: Performance Review
180
+
181
+ 1. What are the acceptance criteria for latency? (p50, p95, p99)
182
+ 1. Are there N+1 query issues in database access patterns?
183
+ 1. Are expensive operations cached? Is cache invalidation correct?
184
+ 1. Is the system designed to scale horizontally?
185
+ 1. Are there any synchronous operations that should be asynchronous?
186
+
187
+ ## Step 9: CI/CD Review
188
+
189
+ 1. Does the CI pipeline test the new code paths?
190
+ 1. Is the deployment strategy defined? (blue/green, canary, rolling)
191
+ 1. Is the rollback procedure documented and tested?
192
+ 1. Are feature flags used for gradual rollout?
193
+ 1. Is the performance regression test plan defined?
194
+
195
+ ## Step 10: Final Recommendations
196
+
197
+ For each issue found: concrete recommendation with rationale. Classify as:
198
+
199
+ - **BLOCKING:** Must be resolved before coding starts.
200
+ - **IMPORTANT:** Should be resolved in this PR.
201
+ - **DEFERRED:** Document in TODOS.md with rationale for deferral.
202
+
203
+ Final verdict: **READY TO IMPLEMENT** / **NEEDS REVISION** / **RETHINK REQUIRED**
204
+
205
+ ## Step 11: Record Architectural Decisions
206
+
207
+ For each significant structural decision made during this review (technology choices, service boundaries, resilience strategy, data ownership, security posture):
208
+
209
+ - Write an ADR via `@#adr`.
210
+ - Cross-reference related ADRs.
211
+ - Update `docs/architecture/architecture.md` to reflect the final decisions.
212
+
213
+ ______________________________________________________________________
@@ -0,0 +1,16 @@
1
+ name: cicd
2
+ version: 1.0.2
3
+ description: |
4
+ Write GitHub Actions CI/CD workflow configuration. Covers build, test, lint,
5
+ security scan, container publish, and deployment trigger workflows.
6
+ Use when asked to "write a CI pipeline", "set up GitHub Actions",
7
+ "add a workflow", or "configure CD".
8
+ argument-hint: '[service or workflow to configure]'
9
+
10
+ license: MIT
11
+ compatibility: Requires a skills-compatible agent with repository file access and terminal command execution when needed.
12
+ metadata:
13
+ owner: vstack
14
+ maturity: stable
15
+ user-invocable: true
16
+ disable-model-invocation: false
@@ -0,0 +1,169 @@
1
+ {{SKILL_CONTEXT}}
2
+
3
+ # cicd — GitHub Actions Workflows
4
+
5
+ Write CI/CD pipeline configuration as `.github/workflows/*.yml` files.
6
+ These files live in the PR — the pipeline runs after merge.
7
+
8
+ ## Out of scope
9
+
10
+ - Application code changes (engineering role)
11
+ - Container image authoring (use `container`)
12
+ - Post-deploy monitoring (CI/CD's responsibility after merge)
13
+
14
+ ______________________________________________________________________
15
+
16
+ ## Step 1: Detect context
17
+
18
+ ```bash
19
+ # Detect runtime and tooling
20
+ ls pyproject.toml requirements.txt package.json go.mod Cargo.toml 2>/dev/null | head -5
21
+
22
+ # Detect existing workflows
23
+ ls .github/workflows/ 2>/dev/null || echo "No workflows found"
24
+
25
+ # Detect container config
26
+ ls Dockerfile 2>/dev/null && echo "Dockerfile present"
27
+ ```
28
+
29
+ ______________________________________________________________________
30
+
31
+ ## Step 2: CI workflow — `.github/workflows/ci.yml`
32
+
33
+ Runs on every push and PR. Must pass before merge.
34
+
35
+ ```yaml
36
+ name: CI
37
+
38
+ on:
39
+ push:
40
+ branches: ["**"]
41
+ pull_request:
42
+ branches: [main]
43
+
44
+ jobs:
45
+ test:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ # Language-specific setup — pick the applicable block:
51
+
52
+ # Python
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+ - run: pip install -e ".[dev]"
57
+ - run: ruff check .
58
+ - run: mypy .
59
+ - run: pytest --tb=short
60
+
61
+ # Node
62
+ # - uses: actions/setup-node@v4
63
+ # with: { node-version: "22" }
64
+ # - run: npm ci
65
+ # - run: npm run lint
66
+ # - run: npm test
67
+
68
+ # Go
69
+ # - uses: actions/setup-go@v5
70
+ # with: { go-version: "1.22" }
71
+ # - run: go vet ./...
72
+ # - run: go test ./...
73
+ ```
74
+
75
+ ______________________________________________________________________
76
+
77
+ ## Step 3: Security scan — add to CI or separate workflow
78
+
79
+ Add dependency and secret scanning:
80
+
81
+ ```yaml
82
+ security:
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/checkout@v4
86
+
87
+ # Dependency scan (pick one):
88
+ # Python
89
+ - run: pip install pip-audit && pip-audit
90
+
91
+ # Node
92
+ # - run: npm audit --audit-level=high
93
+
94
+ # Secret scan
95
+ - uses: trufflesecurity/trufflehog-actions-scan@main
96
+ with:
97
+ path: ./
98
+ base: ${{ github.event.repository.default_branch }}
99
+ ```
100
+
101
+ ______________________________________________________________________
102
+
103
+ ## Step 4: CD workflow — `.github/workflows/cd.yml`
104
+
105
+ Runs on merge to main. Builds and publishes the container image, then triggers deployment.
106
+
107
+ ```yaml
108
+ name: CD
109
+
110
+ on:
111
+ push:
112
+ branches: [main]
113
+
114
+ jobs:
115
+ publish:
116
+ runs-on: ubuntu-latest
117
+ permissions:
118
+ contents: read
119
+ packages: write
120
+ steps:
121
+ - uses: actions/checkout@v4
122
+
123
+ - name: Log in to GHCR
124
+ uses: docker/login-action@v3
125
+ with:
126
+ registry: ghcr.io
127
+ username: ${{ github.actor }}
128
+ password: ${{ secrets.GITHUB_TOKEN }}
129
+
130
+ - name: Build and push
131
+ uses: docker/build-push-action@v5
132
+ with:
133
+ push: true
134
+ tags: |
135
+ ghcr.io/${{ github.repository }}:latest
136
+ ghcr.io/${{ github.repository }}:${{ github.sha }}
137
+ ```
138
+
139
+ Adapt the deploy trigger to match the target platform (Fly.io, Render, Railway, K8s, etc.).
140
+
141
+ ______________________________________________________________________
142
+
143
+ ## Step 5: Branch protection (document, don't automate)
144
+
145
+ Record in `docs/architecture/architecture.md` or a README section:
146
+
147
+ ```text
148
+ Branch protection rules for `main`:
149
+ - Require PR before merging
150
+ - Require status checks: CI / test, CI / security
151
+ - Require at least 1 approval
152
+ - No force pushes
153
+ ```
154
+
155
+ Configure these in GitHub → Settings → Branches.
156
+
157
+ ______________________________________________________________________
158
+
159
+ ## Step 6: Review checklist
160
+
161
+ - [ ] CI workflow triggers on push + PR
162
+ - [ ] Lint, type-check, and tests all run in CI
163
+ - [ ] Security scan included
164
+ - [ ] CD triggers only on merge to main
165
+ - [ ] No secrets hardcoded in workflow files — use `secrets.*`
166
+ - [ ] Container image tagged with both `latest` and `${{ github.sha }}`
167
+ - [ ] Workflows validate locally: `act` (optional, for local testing)
168
+
169
+ ______________________________________________________________________
@@ -0,0 +1,16 @@
1
+ name: code-review
2
+ version: 1.0.2
3
+ description: |
4
+ Pre-landing code review. Finds bugs that pass CI but break in production —
5
+ race conditions, missing error handling, API contract violations, observability
6
+ gaps, security issues, and performance landmines. Use when asked to "review",
7
+ "code review", "review this PR", or before merging.
8
+ argument-hint: '[files, PR, or change to review]'
9
+
10
+ license: MIT
11
+ compatibility: Requires a skills-compatible agent with repository file access and terminal command execution when needed.
12
+ metadata:
13
+ owner: vstack
14
+ maturity: stable
15
+ user-invocable: true
16
+ disable-model-invocation: false