feat(P02): opencode integration layer (#2)

18 CI agents, 11 workflows, 11 commands, 5 references, 3 contexts. Zero learnship dependencies.
This commit was merged in pull request #2.
This commit is contained in:
2026-05-29 13:27:29 +00:00
parent eedcdd4282
commit 2f738c33b7
50 changed files with 3113 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
---
description: Initialize a new CI project — specification → clarify → create .ci/ reference files → initial commit
---
# CI Init
Initialize a new CI project with specification parsing, clarification, and .ci/ reference file creation.
**Usage:** `ci-init [description]`
## Step 1: Check Prerequisites
Verify git is initialized:
```bash
[ -d .git ] && echo "GIT_EXISTS" || echo "NO_GIT"
```
If NO_GIT: `git init`
Check if `.ci/config.json` already exists:
```bash
[ -f .ci/config.json ] && echo "ALREADY_INITIALIZED" || echo "NEW"
```
If ALREADY_INITIALIZED: stop. Use `ci-status` to see project state.
## Step 2: Parse Specification
If a description was provided, use it as the project specification. Otherwise, ask:
"What is the project specification? Describe the objective, requirements, constraints, and out-of-scope items."
Extract from the specification:
- Objective (what the project builds)
- Requirements (what it must do)
- Constraints (what it must not do or must use)
- Out of scope (what is explicitly excluded)
## Step 3: Clarify
Analyze the specification for ambiguities. For each ambiguity:
1. Generate a clarify question with default answer
2. If autonomy level is `full`: accept defaults automatically
3. If autonomy level is `supervised` or `guided`: present question, wait for answer
4. Log all clarification decisions
Record decisions in the `---ci---` block of the init commit.
## Step 4: Create .ci/ Files
Use CiFiles to create the project structure:
1. `.ci/config.json` — default CI configuration with autonomy level
2. `.ci/PROJECT.md` — vision, requirements, constraints, key decisions
3. `.ci/ARCHITECTURE.md` — system architecture (initial, may be incomplete)
4. `.ci/ROADMAP.md` — phase breakdown (to be refined by roadmapper)
5. `.ci/REQUIREMENTS.md` — formal requirements with REQ-IDs
## Step 5: Create Initial Branches
```bash
git checkout -b milestone/v1.0-initial
```
## Step 6: Initial Commit
```
docs(init): initialize [project-name] ([N] phases)
---ci---
phase: 0
milestone: v1.0
status: specify
decisions:
- id: D-001
decision: [clarification decision]
rationale: [why]
confidence: 0.XX
alternatives: []
---/ci---
Specification: [objective]
Requirements: [req1, req2, ...]
Constraints: [constraint1, ...]
Out of scope: [item1, ...]
```
## Step 7: Done
Report project initialized, .ci/ files created, initial branch created.
Next: `ci-run` to execute the pipeline, or `ci-quick` for ad-hoc tasks.