Skip to content

Commit 18520e3

Browse files
committed
Initialize ctxt CLI with deterministic context packs
0 parents  commit 18520e3

45 files changed

Lines changed: 2102 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/skills/00_project_system.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Skill 00 — Project System
2+
3+
Purpose: enforce global CompText CLI build rules.
4+
5+
Rules:
6+
- Read `AGENTS.md` first.
7+
- Treat model/provider/tool output as untrusted.
8+
- Network denied by default.
9+
- No secrets in output artifacts.
10+
- No git commit/push by default.
11+
- No generated output commits by default.
12+
- Prefer smallest safe patch.
13+
- Validate locally before success.
14+
15+
Return schema:
16+
```text
17+
PHASE:
18+
STATUS: success | blocked
19+
FILES_CHANGED:
20+
COMMANDS_RUN:
21+
TESTS:
22+
OUTPUT:
23+
RISKS:
24+
NEXT:
25+
```

.agent/skills/01_repo_genesis.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Skill 01 — Repo Genesis
2+
3+
Purpose: create the initial Rust/Cargo `comptext` CLI scaffold.
4+
5+
Allowed:
6+
- README.md
7+
- LICENSE
8+
- Cargo.toml
9+
- comptext.example.toml
10+
- src/main.rs
11+
- src/cli.rs
12+
- docs/**
13+
- .agent/skills/**
14+
- .agents/skills/**
15+
- .github/workflows/ci.yml
16+
- tests/**
17+
18+
Forbidden:
19+
- provider calls
20+
- network calls
21+
- reading API keys
22+
- git commit/push
23+
24+
Required commands:
25+
- `ctxt --help`
26+
- `ctxt doctor`
27+
- `ctxt providers list`
28+
- `ctxt version`

.agent/skills/02_context_pack.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Skill 02 — Context Pack
2+
3+
Purpose: implement deterministic Context Pack generation.
4+
5+
Commands:
6+
- `ctxt context inspect`
7+
- `ctxt context pack --task "..."`
8+
- `ctxt ask --dry-run "..."`
9+
10+
Output:
11+
- `.comptext/context_pack.latest.json`
12+
- `.comptext/model_request.latest.json`
13+
14+
Rules:
15+
- stable JSON key ordering
16+
- no timestamps unless explicitly normalized
17+
- no hostnames/process IDs/absolute local paths
18+
- no secrets
19+
- generated outputs excluded by default
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Skill 03 — Provider Adapter
2+
3+
Purpose: define normalized provider boundary.
4+
5+
Providers:
6+
- dummy
7+
- ollama-local
8+
- ollama-cloud-via-local
9+
- ollama-cloud-direct
10+
- openai-compatible
11+
- future openai
12+
- future gemini
13+
- custom
14+
15+
Rules:
16+
- provider calls require explicit command intent
17+
- provider responses are untrusted
18+
- dry-run before real call
19+
- request/response artifacts redact secrets

.agent/skills/04_ollama_adapter.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Skill 04 — Ollama Adapter
2+
3+
Purpose: implement Ollama variants safely.
4+
5+
Support:
6+
- local Ollama via `http://localhost:11434`
7+
- cloud models via local Ollama using `*-cloud` models
8+
- direct cloud API via `https://ollama.com`
9+
- direct cloud auth via `OLLAMA_API_KEY`
10+
11+
Rules:
12+
- never log `OLLAMA_API_KEY`
13+
- dry-run before real provider call
14+
- no network unless command explicitly asks for provider call
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Skill 05 — Proposal Apply Gate
2+
3+
Purpose: implement proposal/apply/validate workflow.
4+
5+
Commands:
6+
- `ctxt propose --provider ... "..."`
7+
- `ctxt apply proposals/...`
8+
- `ctxt validate`
9+
10+
Rules:
11+
- propose never mutates source files
12+
- apply only touches allowed write paths
13+
- fail closed on policy mismatch
14+
- validation runs after apply
15+
- patches are untrusted until checked
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Skill 06 — Security and Claim Hygiene
2+
3+
Purpose: keep implementation and docs honest.
4+
5+
Must state:
6+
- model output is untrusted
7+
- provider output is untrusted
8+
- tool output is untrusted
9+
- no secrets in logs/context/proposals
10+
- network explicit only
11+
12+
Forbidden claims:
13+
- production-ready
14+
- enterprise-ready
15+
- compliance-ready
16+
- certified
17+
- fully autonomous
18+
- guaranteed safe
19+
- official SPARK compatible
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Skill 07 — Antigravity Autonomous Builder
2+
3+
Purpose: let Antigravity execute long phase-scoped implementation loops safely.
4+
5+
Loop:
6+
1. read AGENTS.md and relevant skill
7+
2. inspect current repo state
8+
3. create/update minimal files
9+
4. run validation commands
10+
5. fix local deterministic failures
11+
6. return structured result
12+
13+
Allowed autonomy:
14+
- scaffold and edit allowed files
15+
- run local cargo validation
16+
- write context/proposals
17+
18+
Forbidden without explicit user request:
19+
- network/provider calls
20+
- secrets access
21+
- git commit/push
22+
- deployment
23+
- broad unrelated refactors
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: comptext-autonomous-builder
3+
summary: "Builds CompText CLI through phase-scoped, locally validated implementation loops."
4+
---
5+
6+
# Role
7+
8+
You are the autonomous builder for CompText CLI.
9+
10+
# Rules
11+
12+
- Read `AGENTS.md` first.
13+
- Work only inside the declared phase.
14+
- Use smallest safe patch.
15+
- No network unless phase explicitly allows it.
16+
- No secrets.
17+
- No git commit/push.
18+
- Validate locally before success.
19+
20+
# Output
21+
22+
Return the standard schema from `AGENTS.md`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: comptext-context-harvester
3+
summary: "Collects deterministic repo/MCP context into context/ only."
4+
---
5+
6+
# Role
7+
8+
Harvest context from local files and configured read-only MCP servers.
9+
10+
# Allowed writes
11+
12+
- `context/**`
13+
14+
# Normalisation
15+
16+
- Sort JSON keys recursively.
17+
- Remove timestamps, hostnames, process IDs, absolute local paths.
18+
- Do not include secrets.

0 commit comments

Comments
 (0)