opencode-onboard 0.0.1

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.
@@ -0,0 +1,327 @@
1
+ > Execute this command.
2
+
3
+ Analyze the architecture of this codebase with the goal of creating an ARCHITECTURE.md file in the project root and giving the user a file for easy copy & pasting.
4
+
5
+ Reference material:
6
+ Website : https://architecture.md/
7
+ Repo : https://github.com/timajwilliams/architecture
8
+
9
+ Requirements:
10
+ - Create a complete ARCHITECTURE.md document that enables rapid codebase comprehension for both human developers and AI agents.
11
+ - The file must be entirely self-contained. Do not say “see X file” as a substitute for explanation; include the relevant architectural facts directly in the document.
12
+ - Be specific and concrete: include actual directories, important files, modules, services, classes, APIs, commands, data stores, configuration points, and integration boundaries where they are discoverable from the codebase.
13
+ - Do not invent systems, services, infrastructure, deployment targets, databases, queues, third-party APIs, or security mechanisms that are not supported by evidence in the repository.
14
+ - When something cannot be determined from the codebase, explicitly mark it as “Not evident from the repository” rather than guessing.
15
+ - Prefer durable architectural facts over transient implementation details. Focus on things that help someone understand where to make changes and how the system fits together.
16
+ - Include diagrams using Mermaid where helpful, especially for system context, component relationships, request/data flow, and deployment topology.
17
+ - If Mermaid is not appropriate or the architecture is simple, include a clear text-based diagram instead.
18
+ - If architecture decisions or tradeoffs are visible from the code, document the rationale and consequences.
19
+ - Include technical debt, risks, unclear boundaries, and future architecture considerations when supported by TODOs, comments, docs, issue references, or code structure.
20
+ - Use Markdown only. Do not rely on external images, generated assets, or links to local files.
21
+ - Write the document as if it will be committed to the repository and maintained over time.
22
+
23
+ Recommended ARCHITECTURE.md structure:
24
+
25
+ # Architecture Overview
26
+
27
+ Briefly describe what the system is, what problem it solves, who/what uses it, and the major architectural style or pattern if evident.
28
+
29
+ ## 1. Project Structure
30
+
31
+ Provide a high-level annotated tree of the repository. Explain the purpose of each major directory and the architectural layer or concern it represents.
32
+
33
+ Include:
34
+ - Root-level files that affect architecture, build, runtime, deployment, or developer workflow
35
+ - Source directories and their responsibilities
36
+ - Test directories and their scope
37
+ - Configuration, scripts, generated code, migrations, schemas, or infrastructure directories if present
38
+
39
+ ## 2. High-Level System Diagram
40
+
41
+ Provide a Mermaid diagram or text diagram showing the major actors, applications, services, data stores, and external systems.
42
+
43
+ The diagram should emphasize:
44
+ - User or client entry points
45
+ - Application/runtime boundaries
46
+ - Internal services or modules
47
+ - Data stores
48
+ - External APIs or platforms
49
+ - Direction of communication/data flow
50
+
51
+ ## 3. Core Components
52
+
53
+ Describe each major component of the system.
54
+
55
+ For each component include:
56
+ - Name
57
+ - Responsibility
58
+ - Important files/directories
59
+ - Key technologies/frameworks
60
+ - Runtime role
61
+ - Main inputs and outputs
62
+ - Dependencies on other components
63
+ - Notes about ownership of business logic, state, or side effects
64
+
65
+ Use subsections such as:
66
+
67
+ ### 3.1 Frontend / User Interface
68
+
69
+ If present, document:
70
+ - Framework and rendering model
71
+ - Routing/page structure
72
+ - State management
73
+ - API/data access pattern
74
+ - Component organization
75
+ - Styling/design-system approach if architecturally relevant
76
+ - Build output and deployment assumptions
77
+
78
+ ### 3.2 Backend / Server / API
79
+
80
+ If present, document:
81
+ - Framework/runtime
82
+ - Entry points
83
+ - Routing/controller structure
84
+ - Service/business-logic layer
85
+ - Persistence layer
86
+ - Middleware
87
+ - Authentication/authorization flow
88
+ - Background jobs/workers if present
89
+
90
+ ### 3.3 Shared Libraries / Common Code
91
+
92
+ If present, document:
93
+ - Shared types
94
+ - Utilities
95
+ - Domain models
96
+ - Validation schemas
97
+ - Cross-cutting abstractions
98
+
99
+ ### 3.4 CLI / Scripts / Automation
100
+
101
+ If present, document:
102
+ - Command entry points
103
+ - Build/test/deploy automation
104
+ - Code generation
105
+ - Data seeding/migration scripts
106
+
107
+ ## 4. Data Flow
108
+
109
+ Explain how data moves through the system.
110
+
111
+ Include:
112
+ - Main request lifecycle
113
+ - Important user journeys or system workflows
114
+ - Read/write paths
115
+ - Validation boundaries
116
+ - Serialization/deserialization points
117
+ - Error handling paths
118
+ - Async/event-driven flows if present
119
+
120
+ Add a Mermaid sequence diagram for the most important runtime flow when possible.
121
+
122
+ ## 5. Data Stores
123
+
124
+ List and describe all persistent or semi-persistent storage mechanisms evident in the codebase.
125
+
126
+ For each data store include:
127
+ - Name
128
+ - Type/technology
129
+ - Purpose
130
+ - Main schemas/tables/collections/entities if discoverable
131
+ - Ownership boundaries
132
+ - Migration or schema management approach
133
+ - Backup, retention, or lifecycle details if evident
134
+
135
+ If no persistent storage is evident, say so.
136
+
137
+ ## 6. External Integrations / APIs
138
+
139
+ Document all external systems the codebase integrates with.
140
+
141
+ For each integration include:
142
+ - Service name
143
+ - Purpose
144
+ - Integration method, such as REST, GraphQL, SDK, webhook, OAuth, file import/export, message queue
145
+ - Where it is configured or called
146
+ - Authentication method if evident
147
+ - Failure/retry behavior if evident
148
+
149
+ ## 7. Key Technologies
150
+
151
+ Summarize the technical stack.
152
+
153
+ Include:
154
+ - Languages
155
+ - Frameworks
156
+ - Runtime/platform
157
+ - Package managers
158
+ - Build tools
159
+ - Testing tools
160
+ - Linters/formatters
161
+ - Infrastructure/deployment tools
162
+ - Observability tools
163
+ - Important libraries that shape the architecture
164
+
165
+ Explain why each technology matters architecturally, not just that it exists.
166
+
167
+ ## 8. Deployment & Infrastructure
168
+
169
+ Describe how the system appears to be built, packaged, configured, and deployed.
170
+
171
+ Include:
172
+ - Build artifacts
173
+ - Environment variables/configuration model
174
+ - Containerization if present
175
+ - Hosting/deployment target if evident
176
+ - CI/CD workflows
177
+ - Infrastructure-as-code
178
+ - Runtime process model
179
+ - Scaling assumptions if evident
180
+
181
+ If deployment is not evident from the repository, state that clearly and summarize what would need to be known.
182
+
183
+ ## 9. Security Architecture
184
+
185
+ Document security-relevant architecture.
186
+
187
+ Include:
188
+ - Authentication
189
+ - Authorization
190
+ - Session/token handling
191
+ - Secrets management
192
+ - Input validation
193
+ - Data encryption in transit/at rest if evident
194
+ - CORS/CSP/security headers if present
195
+ - Dependency or supply-chain security measures
196
+ - Trust boundaries
197
+ - Sensitive data handling
198
+
199
+ Do not claim security controls exist unless the codebase shows them.
200
+
201
+ ## 10. Monitoring & Observability
202
+
203
+ Document how the system can be debugged and observed.
204
+
205
+ Include:
206
+ - Logging approach
207
+ - Metrics
208
+ - Tracing
209
+ - Error reporting
210
+ - Health checks
211
+ - Audit logs
212
+ - Debug tooling
213
+ - Operational dashboards or monitoring services if evident
214
+
215
+ If observability is minimal or absent, say so and identify the current gaps.
216
+
217
+ ## 11. Performance & Scalability
218
+
219
+ Document performance-sensitive parts of the architecture.
220
+
221
+ Include:
222
+ - Caching
223
+ - Pagination
224
+ - Batching
225
+ - Background processing
226
+ - Database query patterns
227
+ - Asset optimization
228
+ - Concurrency model
229
+ - Known bottlenecks
230
+ - Scaling limits or assumptions
231
+
232
+ Only include claims supported by code, configuration, or documentation.
233
+
234
+ ## 12. Development Workflow
235
+
236
+ Explain how developers work with the project.
237
+
238
+ Include:
239
+ - Local setup
240
+ - Required tools/runtime versions
241
+ - Install commands
242
+ - Development server commands
243
+ - Test commands
244
+ - Build commands
245
+ - Lint/format/typecheck commands
246
+ - Database setup/migrations if present
247
+ - Common development loops
248
+
249
+ Keep this section architecture-focused; do not duplicate a README unless the workflow affects system structure.
250
+
251
+ ## 13. Testing Strategy
252
+
253
+ Describe the testing architecture.
254
+
255
+ Include:
256
+ - Test frameworks
257
+ - Unit/integration/e2e test locations
258
+ - Fixtures/mocks
259
+ - Test data strategy
260
+ - CI test execution
261
+ - Coverage or quality gates if evident
262
+ - Gaps in test coverage if inferable from the repository
263
+
264
+ ## 14. Architectural Decisions & Rationale
265
+
266
+ Capture important architectural choices visible in the codebase.
267
+
268
+ For each decision include:
269
+ - Decision
270
+ - Evidence in the codebase
271
+ - Rationale if inferable
272
+ - Consequences/tradeoffs
273
+ - Alternatives if mentioned in docs/comments
274
+
275
+ Do not invent historical rationale. If rationale is unclear, say “Rationale not documented.”
276
+
277
+ ## 15. Constraints, Risks, and Technical Debt
278
+
279
+ Document:
280
+ - Architectural constraints
281
+ - Known limitations
282
+ - Tight coupling
283
+ - Duplicated abstractions
284
+ - Missing boundaries
285
+ - Incomplete migrations
286
+ - TODO/FIXME items with architectural impact
287
+ - Operational risks
288
+ - Security or scalability concerns
289
+
290
+ Each item should include why it matters and where the evidence appears in the codebase.
291
+
292
+ ## 16. Future Considerations / Roadmap
293
+
294
+ Summarize future architectural changes that are evident from code comments, docs, TODOs, roadmap files, or incomplete abstractions.
295
+
296
+ Separate:
297
+ - Explicitly documented future work
298
+ - Reasonable architectural recommendations based on current structure
299
+
300
+ Clearly label recommendations as recommendations.
301
+
302
+ ## 17. Project Identification
303
+
304
+ Include:
305
+ - Project name
306
+ - Repository purpose
307
+ - Primary language(s)
308
+ - Application type
309
+ - Main runtime(s)
310
+ - Date of last architecture review
311
+ - Maintainer/team if evident
312
+
313
+ Use today’s date for “Date of last architecture review.”
314
+
315
+ ## 18. Glossary / Acronyms
316
+
317
+ Define project-specific terms, acronyms, domain concepts, and internal names that a new developer or AI agent needs to know.
318
+
319
+ Validation pass:
320
+ - Verify every named component, service, data store, integration, and technology against the repository.
321
+ - Remove placeholders.
322
+ - Remove generic template text.
323
+ - Replace vague statements with concrete codebase-specific facts.
324
+ - Ensure every major source directory is represented somewhere in the document.
325
+ - Ensure the high-level diagram matches the written component descriptions.
326
+ - Ensure the document is useful to someone trying to answer: “Where do I make a change, and what will it affect?”
327
+ - If access to a running local server, tests, build output, generated docs, API schema, database schema, Docker environment, or screenshots is available, use them to validate and revise the architecture description.
@@ -0,0 +1,26 @@
1
+ > Execute this command
2
+
3
+ Analyze the design system of this codebase with the goal of creating a DESIGN.md file in the project root and giving the user a file for easy copy & pasting.
4
+
5
+ Reference material:
6
+ Overview : https://stitch.withgoogle.com/docs/design-md/overview/
7
+ Format : https://stitch.withgoogle.com/docs/design-md/format/
8
+ Spec : https://github.com/google-labs-code/design.md
9
+
10
+ Examples from the spec repo:
11
+ https://github.com/google-labs-code/design.md/blob/main/examples/atmospheric-glass/DESIGN.md
12
+ https://github.com/google-labs-code/design.md/blob/main/examples/paws-and-paths/DESIGN.md
13
+
14
+ Requirements:
15
+ - Begin with YAML frontmatter containing all structured design tokens
16
+ (colors, typography, spacing, elevation, motion, radii, shadows, etc.)
17
+ - Follow with free-form Markdown that describes the look & feel and
18
+ captures design intent that token values alone cannot convey
19
+ - The file must be entirely self-contained — do not reference any
20
+ files, variables, or paths from the codebase
21
+ - All token values must use valid YAML design token format
22
+
23
+ If you have access to a running local server or screenshots of the
24
+ product, compare your DESIGN.md against the rendered UI. Revise until
25
+ both the YAML tokens and the written description faithfully capture
26
+ the product's visual identity.
File without changes
@@ -0,0 +1,20 @@
1
+ schema: spec-driven
2
+
3
+ # Project context (optional)
4
+ # This is shown to AI when creating artifacts.
5
+ # Add your tech stack, conventions, style guides, domain knowledge, etc.
6
+ # Example:
7
+ # context: |
8
+ # Tech stack: TypeScript, React, Node.js
9
+ # We use conventional commits
10
+ # Domain: e-commerce platform
11
+
12
+ # Per-artifact rules (optional)
13
+ # Add custom rules for specific artifacts.
14
+ # Example:
15
+ # rules:
16
+ # proposal:
17
+ # - Keep proposals under 500 words
18
+ # - Always include a "Non-goals" section
19
+ # tasks:
20
+ # - Break tasks into chunks of max 2 hours
File without changes
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "opencode-onboard",
3
+ "version": "0.0.1",
4
+ "description": "Prepare any brownfield codebase for AI agent workflows using OpenCode, OpenSpec, and ensemble orchestration.",
5
+ "keywords": [
6
+ "opencode",
7
+ "ai",
8
+ "agents",
9
+ "brownfield",
10
+ "onboarding",
11
+ "openspec",
12
+ "cli"
13
+ ],
14
+ "homepage": "https://github.com/ckgrafico/opencode-onboard",
15
+ "license": "MIT",
16
+ "author": "ckgrafico",
17
+ "type": "module",
18
+ "bin": {
19
+ "opencode-onboard": "./src/index.js"
20
+ },
21
+ "files": [
22
+ "src",
23
+ "content"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ }
28
+ }
package/src/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ console.log('opencode-onboard — coming soon');