Skip to content

Commit beb11db

Browse files
authored
feat: add source-driven skill publishing pipeline (#130)
* feat: add unified skill publishing pipeline Implement source-configured skill publishing flows across core, CLI, and dashboard, including personal publish modes, official contribution handling, bundle validation, and recursive resource support.\n\nAdd per-run advanced publish overrides (mode/base branch), official-source guardrails in UI/API, updated docs and schemas, and focused installer/dashboard/publish tests.\n\nStabilize the pre-commit test gate by cleaning stale compiled dist tests before build:quick so npm test executes only current compiled test sources. * fix: restore publish workflows and stabilize merged release state
1 parent 1219de6 commit beb11db

31 files changed

Lines changed: 4401 additions & 1793 deletions

CONTRIBUTING.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ We welcome contributions in many forms:
5353
4. Test your changes thoroughly
5454
5. Submit a pull request to the `dev` branch
5555

56+
### Contributing Skills to Official Source
57+
58+
If you are contributing a skill bundle, you can validate and propose via ICA:
59+
60+
```bash
61+
node dist/src/installer-cli/index.js skills validate --path=/path/to/skill --profile=official
62+
node dist/src/installer-cli/index.js skills contribute-official --path=/path/to/skill --message="Add my-skill"
63+
```
64+
65+
Expected skill structure:
66+
- required: `SKILL.md`
67+
- optional: `scripts/`, `references/`, `assets/`, and other files needed by the skill
68+
69+
Official contribution validation requires `SKILL.md` frontmatter fields:
70+
- `name`
71+
- `description`
72+
- `category`
73+
- `version`
74+
5675
## Branching Strategy
5776

5877
### Branch Structure
@@ -175,4 +194,4 @@ If you have questions about contributing:
175194
2. Ask in GitHub Discussions
176195
3. Create an issue with the `question` label
177196

178-
We appreciate all contributions, big and small. Thank you for helping make Intelligent Code Agents better!
197+
We appreciate all contributions, big and small. Thank you for helping make Intelligent Code Agents better!

README.md

Lines changed: 31 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,15 @@
11
# Intelligent Code Agents (ICA)
22

3-
ICA is the fastest path from "nothing installed" to a working, managed agent stack.
3+
ICA is a skills installer and manager for coding agents.
44

5-
Use one CLI and one local dashboard to install, sync, audit, and update skills across runtimes without hand-wired setup.
6-
7-
What ICA gives you:
8-
- one command surface for install/uninstall/sync/audit
9-
- source-aware skill management with explicit pinning (`<source>/<skill>`)
10-
- CLI + local dashboard workflows
11-
- verified bootstrap installers and reproducible releases
12-
13-
## Skills Repository + Contribution
14-
15-
Official skills live in the standalone Skills repository:
16-
- [intelligentcode-ai/skills](https://github.com/intelligentcode-ai/skills)
17-
18-
Want to add a custom skill?
19-
- Open a PR in the Skills repo: [Create Pull Request](https://github.com/intelligentcode-ai/skills/pulls)
20-
- Follow contribution requirements in: [How to Contribute](https://github.com/intelligentcode-ai/skills#how-to-contribute)
21-
22-
## Agent Bootstrap Prompt (IDE/Local Agent)
23-
24-
Use this when you want your local agent to do setup for you end-to-end.
25-
26-
Paste this into your coding agent:
27-
28-
```text
29-
Bootstrap ICA for this local environment.
30-
31-
Your task:
32-
1) Download and install this skill file into your own native skill storage (using your runtime's normal skill conventions):
33-
https://raw.githubusercontent.com/intelligentcode-ai/skills/master/skills/ica-bootstrap/SKILL.md
34-
2) Immediately execute the installed `ica-bootstrap` skill.
35-
3) Let `ica-bootstrap` complete end-to-end setup, including:
36-
- ICA CLI installation
37-
- skills source registration/refresh
38-
- installation of `ica-cli`
39-
- verification (`ica doctor`, `ica list`)
40-
41-
Behavior requirements:
42-
- Do the work directly on this machine.
43-
- Do not ask me where skill folders are.
44-
- Do not ask me to confirm routine steps.
45-
- Ask only if credentials, permissions, or security policy block execution.
46-
- If a command fails, diagnose and retry with the safest fallback automatically.
47-
48-
Final output:
49-
- What you installed
50-
- What you executed
51-
- Current ICA health/status
52-
- Exact blocker only if setup is still not complete
53-
```
54-
55-
Canonical prompt source:
56-
- [skills/ica-bootstrap/assets/INITIAL_PROMPT.md](https://github.com/intelligentcode-ai/skills/blob/master/skills/ica-bootstrap/assets/INITIAL_PROMPT.md)
5+
It gives you one clean control plane for:
6+
- installing, uninstalling, syncing, and auditing skills
7+
- managing multiple skill sources with explicit source pinning (`<source>/<skill>`)
8+
- running from CLI or a local-first dashboard
9+
- using verified bootstrap installers and signed, reproducible releases
5710

5811
## Install First (Verified Bootstrap)
5912

60-
If you're setting up manually, this is the safest and fastest starting point.
61-
62-
Bootstrap downloads the latest source artifact (`ica-<tag>-source.tar.gz`), verifies it against `SHA256SUMS.txt`, and installs `ica`.
63-
6413
macOS/Linux:
6514

6615
```bash
@@ -73,22 +22,17 @@ Windows PowerShell:
7322
iwr https://raw.githubusercontent.com/intelligentcode-ai/intelligent-code-agents/main/scripts/bootstrap/install.ps1 -UseBasicParsing | iex
7423
```
7524

76-
Then run:
77-
78-
```bash
79-
ica install
80-
ica serve --open=true
81-
```
82-
8325
## Multi-Source Skills (Clear + Explicit)
8426

8527
ICA supports multiple skill repositories side-by-side.
8628

8729
- Add official and custom repos (HTTPS/SSH)
8830
- Keep each source cached locally under `~/.ica/<source-id>/skills`
31+
- Keep each source publish workspace under `~/.ica/source-workspaces/<source-id>/repo`
8932
- Select skills explicitly as `<source>/<skill>` to avoid ambiguity
9033
- Remove a source without deleting already installed skills (they are marked orphaned)
9134
- Use the same model in CLI and dashboard
35+
- Configure per-source publishing defaults: `direct-push`, `branch-only`, or `branch-pr`
9236

9337
## Dashboard Preview
9438

@@ -115,10 +59,6 @@ Post-install evidence with expanded `Installed State` and `Operation Report`.
11559
![ICA Dashboard Management](docs/assets/dashboard/dashboard-step-05-management.png)
11660
Management action example (`Uninstall selected`) with updated state/report.
11761

118-
### 6) Manage hooks
119-
![ICA Dashboard Hooks](docs/assets/dashboard/dashboard-step-06-hooks.png)
120-
Dedicated hooks catalog/actions with source-aware hook install state.
121-
12262
## Build From Source
12363

12464
```bash
@@ -153,14 +93,16 @@ Commands:
15393
- `ica list`
15494
- `ica doctor`
15595
- `ica catalog`
156-
- `ica serve`
157-
- `ica launch` (alias; deprecated)
15896
- `ica sources list`
15997
- `ica sources add --repo-url=...` (or `--repo-path=...`; defaults to current directory when omitted)
16098
- `ica sources remove --id=...`
16199
- `ica sources auth --id=... --token=...`
162100
- `ica sources refresh [--id=...]`
163-
- `ica sources update --id=... --name=... --repo-url=...`
101+
- `ica sources update --id=... --name=... --repo-url=... --publish-default-mode=branch-pr --default-base-branch=main --provider-hint=github --official-contribution-enabled=false`
102+
- `ica skills validate --path=/path/to/skill --profile=personal`
103+
- `ica skills publish --source=<source-id> --path=/path/to/skill --message="feat(skill): publish my-skill"`
104+
- `ica skills contribute-official --path=/path/to/skill --message="Add my-skill"`
105+
- `ica container mount-project --project-path=/path --confirm`
164106

165107
Source-qualified example:
166108

@@ -173,37 +115,44 @@ node dist/src/installer-cli/index.js install --yes \
173115

174116
Legacy `--skills=<name>` is still accepted and resolves against the official source.
175117

118+
## Skill Publishing and Official Contribution
119+
120+
- `ica skills validate` supports `personal` and `official` profiles
121+
- Personal publishing uses the source's configured default mode:
122+
- `direct-push`: commits to base branch and pushes
123+
- `branch-only`: pushes a feature branch
124+
- `branch-pr`: pushes a feature branch and attempts PR creation when provider integration is available
125+
- Official contribution uses strict validation and PR-oriented flow (defaults to official source base branch `dev`)
126+
- Skill bundles are copied recursively and support `SKILL.md` + additional resources/assets/scripts/other files
127+
- Source settings include `officialContributionEnabled` to mark official contribution targets
128+
176129
Custom repositories are persisted in `~/.ica/sources.json` (or `$ICA_STATE_HOME/sources.json` when set).
177130

178131
Downloaded source skills are materialized under `~/.ica/<source-id>/skills` (or `$ICA_STATE_HOME/<source-id>/skills`).
179132
When install mode is `symlink`, ICA links installed skills from that local skills snapshot.
180133

181134
## Dashboard
182135

183-
Start locally (frontend container + host API control plane):
136+
Start locally (binds to `127.0.0.1`):
184137

185138
```bash
186-
ica serve --open=true
139+
npm ci
140+
npm run build
141+
npm run start:dashboard
187142
```
188143

189144
Open: `http://127.0.0.1:4173`
190145

191-
Architecture note:
192-
- `ica serve` runs the ICA API on localhost (`127.0.0.1`) with an ephemeral per-session API key.
193-
- The dashboard container serves static frontend assets only.
194-
- A host-side BFF proxies `/api/v1/*` and `/ws/events` as same-origin routes for the browser.
195-
196146
### GHCR Container
197147

198148
Dashboard highlights:
199149

200150
- Install, uninstall, and sync skills across multiple targets
201151
- Add/remove/auth/refresh skill sources (HTTPS + SSH)
202152
- Target discovery plus user/project scope management
203-
- Native project directory picker via localhost CLI API
153+
- Native project directory picker (host helper) plus container mount orchestration endpoint
204154
- Skill catalog filtering with bulk selection controls
205155
- Installed-state and operation-report inspection in the UI
206-
- Frontend-only container with host-BFF same-origin proxying
207156

208157
Container image can be built from `src/installer-dashboard/Dockerfile` and published to GHCR via `.github/workflows/dashboard-ghcr.yml`.
209158

@@ -216,11 +165,9 @@ docker build -f src/installer-dashboard/Dockerfile -t ica-dashboard:local .
216165
Run:
217166

218167
```bash
219-
docker run --rm -p 4173:80 ica-dashboard:local
168+
docker run --rm -p 4173:4173 ica-dashboard:local
220169
```
221170

222-
For full installer functionality (API + WS + container lifecycle), use `ica serve --open=true`.
223-
224171
## Supported Targets
225172

226173
- `claude`
@@ -262,6 +209,7 @@ Tag releases from `main` (`vX.Y.Z`). The `release-sign` workflow:
262209
## Documentation
263210

264211
- [Installation Guide](docs/installation-guide.md)
212+
- [Skill Publishing Guide](docs/skill-publishing-guide.md)
265213
- [Configuration Guide](docs/configuration-guide.md)
266214
- [Workflow Guide](docs/workflow-guide.md)
267215
- [Release Signing](docs/release-signing.md)

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Deployment documentation in this repo now reflects only:
66
- verified bootstrap installers
77
- `ica` CLI workflows
88
- dashboard workflows
9+
- skill publishing and official contribution workflows

docs/architecture.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Skills are the primary interface for specialized capabilities. They are:
2222
- Local `src/skills/*/SKILL.md` fallback has been removed as part of the repo split
2323
- Installed to your agent home `skills/` directory (for example `~/.claude/skills/` or `~/.codex/skills/`)
2424
- Invoked by skill name and intent (tool-dependent), with source-qualified IDs available as `<source>/<skill>`
25+
- Source publish settings support per-source defaults (`direct-push` | `branch-only` | `branch-pr`) and provider hints
26+
- Write-capable publish workspaces are separated from read-only sync caches under `~/.ica/source-workspaces/<source-id>/repo`
2527

2628
If one repository references another inside Git metadata, the precise term is **Git submodule** (not "subrepo").
2729

docs/configuration-guide.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,25 @@ Notes:
6666

6767
## Key Settings
6868

69+
### Autonomy + Work-Item Orchestration
70+
- `autonomy.level` (string) — L1/L2/L3 autonomy mode
71+
- `autonomy.work_item_pipeline_enabled` (bool, default `true`) — auto-run `create-work-items` -> `plan-work-items` -> `run-work-items` when actionable findings/comments are detected
72+
- `autonomy.work_item_pipeline_mode` (string, default `batch_auto`) — confirmation behavior for actionable finding ingestion
73+
- `batch_auto`: no extra confirmation
74+
- `batch_confirm`: one grouped confirmation
75+
- `item_confirm`: per-item confirmation
76+
77+
Example:
78+
79+
```json
80+
{
81+
"autonomy": {
82+
"work_item_pipeline_enabled": true,
83+
"work_item_pipeline_mode": "batch_auto"
84+
}
85+
}
86+
```
87+
6988
### Git
7089
- `git.privacy` (bool) — strip AI mentions from commits/PRs
7190
- `git.privacy_patterns` (array)
@@ -88,3 +107,24 @@ Notes:
88107

89108
### Models
90109
Model selection is **user‑controlled via Claude Code settings** (`.claude/settings.json` or `~/.claude/settings.json`) or `/model`.
110+
111+
## Source Registry Publish Settings
112+
113+
Skill publishing defaults are stored in the source registry (`~/.ica/sources.json` or `$ICA_STATE_HOME/sources.json`), not in `ica.config.json`.
114+
115+
Per-source publish fields:
116+
117+
- `publishDefaultMode`: `direct-push` | `branch-only` | `branch-pr`
118+
- `defaultBaseBranch`: target branch for publish operations
119+
- `providerHint`: `github` | `gitlab` | `bitbucket` | `unknown`
120+
- `officialContributionEnabled`: marks a source as eligible for official contribution flow
121+
122+
Update via CLI:
123+
124+
```bash
125+
node dist/src/installer-cli/index.js sources update --id=my-source \
126+
--publish-default-mode=branch-pr \
127+
--default-base-branch=main \
128+
--provider-hint=github \
129+
--official-contribution-enabled=false
130+
```

docs/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
1. [Installation Guide](installation-guide.md)
55
2. [Configuration Guide](configuration-guide.md)
66
3. [Workflow Guide](workflow-guide.md)
7-
4. [MCP Integration (Claude Code)](mcp-integration.md)
8-
5. [MCP Proxy (ICA-Owned)](mcp-proxy.md)
7+
4. [Skill Publishing Guide](skill-publishing-guide.md)
8+
5. [MCP Integration (Claude Code)](mcp-integration.md)
9+
6. [MCP Proxy (ICA-Owned)](mcp-proxy.md)
910

1011
## Core Concepts
1112
- [Roles and Skills](skills-reference.md)

docs/installation-guide.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,38 @@ node dist/src/installer-cli/index.js serve --open=true
4949
node dist/src/installer-cli/index.js sources list
5050
node dist/src/installer-cli/index.js sources add --repo-url=https://github.com/intelligentcode-ai/skills.git
5151
node dist/src/installer-cli/index.js sources add --repo-path=. # uses current directory as local source
52+
node dist/src/installer-cli/index.js sources update --id=my-source --publish-default-mode=branch-pr --default-base-branch=main --provider-hint=github
5253
node dist/src/installer-cli/index.js sources refresh
54+
node dist/src/installer-cli/index.js skills validate --path=/path/to/skill --profile=personal
55+
node dist/src/installer-cli/index.js skills publish --source=my-source --path=/path/to/skill
56+
node dist/src/installer-cli/index.js skills contribute-official --path=/path/to/skill
57+
```
58+
59+
## Skill Publishing Quick Start
60+
61+
1. Add or update a source:
62+
63+
```bash
64+
node dist/src/installer-cli/index.js sources add --repo-url=https://github.com/your-org/skills.git --name=my-source
65+
node dist/src/installer-cli/index.js sources update --id=my-source \
66+
--publish-default-mode=branch-pr \
67+
--default-base-branch=main \
68+
--provider-hint=github \
69+
--official-contribution-enabled=false
70+
```
71+
72+
2. Validate and publish:
73+
74+
```bash
75+
node dist/src/installer-cli/index.js skills validate --path=/path/to/skill --profile=personal
76+
node dist/src/installer-cli/index.js skills publish --source=my-source --path=/path/to/skill
77+
```
78+
79+
3. Propose to official source:
80+
81+
```bash
82+
node dist/src/installer-cli/index.js skills validate --path=/path/to/skill --profile=official
83+
node dist/src/installer-cli/index.js skills contribute-official --path=/path/to/skill
5384
```
5485

5586
Non-interactive example:

0 commit comments

Comments
 (0)