Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
5bfb3f7
phase-0: scaffold jcode-provider-service crate
Jun 19, 2026
50722d1
phase-1: add in-memory and keyring-backed CredentialService impls
Jun 19, 2026
36bc22f
phase-2: persistent IntegrationService wired to CredentialService
Jun 19, 2026
8ecdf5f
phase-3: DefaultProviderService facade with RouteResolver
Jun 19, 2026
848c044
chore: lockfile entry for jcode-provider-service
Jun 19, 2026
5d36814
phase-4: providerctl CLI binary exercising the new service stack
Jun 19, 2026
3b6de2f
docs: README for jcode-provider-service
Jun 19, 2026
5c23bab
chore: lockfile picks up clap (optional dep for providerctl)
Jun 19, 2026
82b4465
phase-6: boot helper wiring real jcode-llm-protocols routes
Jun 19, 2026
aa287b2
phase-5: TUI provider/model picker data model
Jun 19, 2026
a8a55b4
phase-7: remove dead jcode-provider-app crate
Jun 19, 2026
0d4fcc2
phase-4: complete ProviderProfile resolution (ByLabel + Named)
Jun 19, 2026
eb07ffd
phase-6.5: migration helper from legacy auth_mode to new Credential
Jun 19, 2026
b164083
docs: complete audit summary in README
Jun 19, 2026
cccd3cd
phase-3+4: defaults store, model list/default/show, connect command
Jun 19, 2026
2d45944
phase-2: OAuth credential auto-refresh (criterion 11)
Jun 19, 2026
ce6327d
phase-4: retrofit layer for legacy --provider flag (criteria 6, 13)
Jun 19, 2026
a791fc0
phase-6: rate-limit failover chain (criterion 12)
Jun 19, 2026
aa533bb
fix: deterministic failover order, updated tests
Jun 19, 2026
0ef6600
docs: update completion audit for the 13 Success Criteria
Jun 19, 2026
a2a6351
phase-5: modelpicker TUI binary (criteria 8, 9 partial)
Jun 19, 2026
750afbb
phase-4: unified login command dispatches OAuth or API key (criterion 5)
Jun 19, 2026
0d21ccb
phase-6: runtime::start_session single-call session entry (criterion 7)
Jun 19, 2026
7656c55
docs: update completion audit — 11 of 13 criteria fully landed
Jun 19, 2026
29e2852
chore: clean up unused imports in failover, runtime, modelpicker
Jun 19, 2026
d3bf822
refactor: split OAuthAttempt into its own attempt module (plan §3 Pha…
Jun 19, 2026
53ba9cb
phase-0+3: add ProviderRegistry trait and CompositeRegistry (plan §3)
Jun 19, 2026
e1ee384
phase-2: OAuth callback server for auto-mode (plan §3 Phase 2 detail)
Jun 19, 2026
8226610
phase-6: error classifier for failover decisions (plan §3 Phase 6)
Jun 19, 2026
eed206d
docs: add MIGRATION.md mapping old auth_mode/selection to new types
Jun 19, 2026
ae548d4
docs: update README counts (129 tests, 30 commits, 25 modules)
Jun 19, 2026
8ab7d8d
phase-4: bridge 36 metadata profiles into Integration entries (plan §…
Jun 19, 2026
d0b05dc
phase-4: providerctl metadata {list,register} subcommands
Jun 19, 2026
0d50a29
phase-6: live connection state + end-to-end integration tests
Jun 19, 2026
88bb0a5
docs: update README counts (141 tests, 34 commits, 26 modules)
Jun 19, 2026
8210282
phase-4: cmd_list shows connection status + auth method hints
Jun 19, 2026
02446eb
phase-7: model aliases (sonnet/opus/haiku/best + max/pro/free)
Jun 19, 2026
4dde5a4
phase-7: Retry-After header parser (oh-my-pi reference)
Jun 19, 2026
9fbe35a
phase-7: a/b/c auth credential rotation (oh-my-pi reference)
Jun 19, 2026
281c34a
fix: stable test for credential_rotation fallback
Jun 19, 2026
f5c1de9
docs: README counts (163 tests, 40 commits)
Jun 19, 2026
275ddb2
phase-2: OAuth attempt scrubber (plan §3 Phase 2 detail)
Jun 19, 2026
2c6751c
phase-1: jcode secrets {list,set,delete} CLI (plan §3 Phase 1)
Jun 19, 2026
bf495ba
phase-4: 'disconnect' alias for 'logout' (plan §3 Phase 4)
Jun 19, 2026
d841a90
phase-5: persistent model prefs (favorites + recents)
Jun 19, 2026
b545ba5
test: cover ByLabel and WithAuth profile paths in runtime::start_session
Jun 19, 2026
a9a8f98
phase-2: callback server end-to-end test + listener injection
Jun 19, 2026
0945ddd
fix: gemini base URL override + protocol-string test coverage
Jun 19, 2026
65cfdd7
phase-3: compile-time plugin registration via inventory (plan §3 Phas…
Jun 19, 2026
7fa5514
chore: lockfile update
Jun 20, 2026
35b4157
phase-5: modelpicker persists favorites to model_prefs.json
Jun 20, 2026
63c7fdf
phase-5: record recents on every start_session
Jun 20, 2026
af737c1
phase-5: modelpicker loads persistent recents on startup
Jun 20, 2026
d1a339e
phase-3: wire real inventory::iter call (was stubbed)
Jun 20, 2026
9d91a83
phase-6: idle stream governor (oh-my-pi reference)
Jun 20, 2026
18f0c23
test: integration test for runtime::start_session recents round-trip
Jun 20, 2026
6c238ad
phase-0: boot-time hooks (CCB reference)
Jun 20, 2026
03c0c17
phase-5: model_prefs default + CLI wiring
Jun 20, 2026
ef854c8
phase-2: credential expiry inspection helper
Jun 20, 2026
38c0da0
test: cover ResolveError display + #[from] conversion
Jun 20, 2026
efb162e
phase-6: providerctl session start (end-to-end runtime entry)
Jun 20, 2026
c032c52
docs: providerctl help text covers all 18 subcommands
Jun 20, 2026
5b5aaa7
test: integration test for error_classify dispatch
Jun 20, 2026
fceb9b7
test: integration test for runtime catalog-default fallback
Jun 20, 2026
4fbeccf
feat(provider-service): implement JCODE_PROVIDER plan + opencode-styl…
claude Jun 20, 2026
c82e481
feat(catalog): opencode-style default() with release-date sort
claude Jun 20, 2026
7b460bd
fix(catalog): align small() with opencode exact logic
claude Jun 20, 2026
7ca0ad9
fix: opencode-align default() user-set check + detect() env var check
claude Jun 20, 2026
6950261
feat(keywords): wire TUI input highlighting with rainbow colors
quangdang46 Jun 20, 2026
8c09fa1
fix(jcode-tui): batch fix 30/37 pre-existing errors
claude Jun 20, 2026
bb0f535
fix(jcode-tui): down to 6 E0061 arg count errors only
claude Jun 20, 2026
1a8c183
fix(jcode-tui): 37->0 errors + Phase 4 CLI wiring + Phase 7 cleanup
claude Jun 20, 2026
b1f0ed4
fix(catalog): align available() with opencode logic + add api_key field
claude Jun 20, 2026
22349ef
fix(catalog): available() now checks api_key + opencode 4-condition l…
claude Jun 20, 2026
47d6fbc
fix(test): update integration test for new available() behavior
claude Jun 20, 2026
fcda0cc
feat(catalog): projectModel-style dynamic route from ProviderInfo met…
claude Jun 20, 2026
0f26168
Replace agentgrep with FFS engine
quangdang46 Jun 20, 2026
4530bc6
feat(provider): full opencode parity — Catalog/Integration/Credential…
quangdang46 Jun 20, 2026
c206812
feat(tui): wire Catalog + ModelPrefs into pickers + auto-load default…
quangdang46 Jun 20, 2026
1251ca6
fix(parity): align remaining opencode gaps in provider system
quangdang46 Jun 20, 2026
672fecb
feat(provider): projectModel request merge + small() per-provider scope
quangdang46 Jun 20, 2026
00e5f99
fix(tui): disable compute_highlights to prevent OOM panic loop
quangdang46 Jun 21, 2026
7a8e413
fix(tui): prevent OOM panic loop from unchecked message slice access
quangdang46 Jun 21, 2026
b55fd61
style: apply cargo fmt formatting fixes
quangdang46 Jun 21, 2026
82850d5
fix: patch asupersync with stable-compatible copy to fix Quality Guar…
quangdang46 Jun 21, 2026
02e6dd4
fix: remove unstable try_trait_v2/residual impls from asupersync Outc…
quangdang46 Jun 21, 2026
a0851a2
fix: disable try_catalog_provider (RouteProvider complete() stub) + p…
quangdang46 Jun 21, 2026
a24c1c1
Fix CI: add secret-service runtime feature and windows cross-targets
quangdang46 Jun 21, 2026
8ab0e94
fix: use nightly toolchain for fmt and quality guardrails CI jobs
quangdang46 Jun 21, 2026
b11a9ff
fix: repair Format and Quality Guardrails CI checks
quangdang46 Jun 21, 2026
ae3b9e5
fix: resolve all clippy warnings in Quality Guardrails
quangdang46 Jun 21, 2026
e16b346
fix: apply cargo fmt to fix Format and Quality Guardrails checks
quangdang46 Jun 21, 2026
08cbfc5
fix: collapse nested if blocks, remove redundant closure/cast/format/…
quangdang46 Jun 21, 2026
a769776
fix: resolve clippy warnings-as-errors in jcode-tui for Quality Guard…
quangdang46 Jun 21, 2026
fe0ade4
Fix formatting (rustfmt) across 5 files
quangdang46 Jun 21, 2026
22854f4
fix: rename parameter _path to path in detect_filesystem_type to reso…
quangdang46 Jun 21, 2026
94e9de0
fix: repair clippy errors in memory_recall_bench to pass Quality Guar…
quangdang46 Jun 21, 2026
99307d4
fix(tui): prevent OOM panic loop from unchecked message slice access
quangdang46 Jun 21, 2026
3e82873
fix: disable jemalloc feature in Windows cross-target x64 check
quangdang46 Jun 21, 2026
9c420bc
fix: log rustls crypto provider init failure instead of silently swal…
quangdang46 Jun 21, 2026
cf1b0ab
fix: use Debug format for CryptoProvider error in rustls init warning
quangdang46 Jun 21, 2026
b0424bc
fix(tui): restore handle_disabled_mission_command to upstream master …
quangdang46 Jun 21, 2026
d4c54d0
feat(tui): extend /auth command with opencode-style subcommands
quangdang46 Jun 21, 2026
0968622
feat(tui): add /provider (singular) and /providers as aliases for /auth
quangdang46 Jun 21, 2026
7148721
fix(tui): make /auth login (no args) open interactive login picker
quangdang46 Jun 21, 2026
7c8735e
Revert "fix(tui): make /auth login (no args) open interactive login p…
quangdang46 Jun 21, 2026
0c7afea
Revert "feat(tui): add /provider (singular) and /providers as aliases…
quangdang46 Jun 21, 2026
b355fa9
Revert "feat(tui): extend /auth command with opencode-style subcommands"
quangdang46 Jun 21, 2026
e4ff8f5
feat(tui): add /connect slash command (matches opencode TUI pattern)
quangdang46 Jun 21, 2026
cc82b68
feat(tui): register /connect slash command in tab completion
quangdang46 Jun 21, 2026
d243b39
polish(tui): surface /connect in onboarding error messages and /help
quangdang46 Jun 21, 2026
54fb0f3
feat(tui): unify auth slash commands around /connect (opencode TUI)
quangdang46 Jun 21, 2026
581068c
chore: drop debug [DEBUG-KEY-EVENT] / [DEBUG-TERM-KEY] log lines
quangdang46 Jun 21, 2026
4183376
refactor(tui): strict unification to /connect (drop /login, /logout, …
quangdang46 Jun 21, 2026
1be19b0
fix(tui): handle_export_command must not claim unknown slashes
quangdang46 Jun 21, 2026
1145229
feat(tui): /connect <space> shows provider autocomplete (matches /log…
quangdang46 Jun 21, 2026
0178d12
feat(tui): auto-append space after typing /connect for instant autoco…
quangdang46 Jun 21, 2026
57344da
feat(tui): auto-open provider picker when /connect is typed (no Enter)
quangdang46 Jun 21, 2026
3fb87c6
revert(tui): drop /connect auto-open-picker on type, back to Enter
quangdang46 Jun 21, 2026
49b3d40
revert(tui): drop /connect auto-append-space on type
quangdang46 Jun 21, 2026
0b4ba2c
polish(tui): replace stale /login and /auth in autocomplete with /con…
quangdang46 Jun 21, 2026
f3880c4
feat(tui): add /exit slash (opencode TUI), keep /quit as alias
quangdang46 Jun 21, 2026
b712bfb
chore: remove dead asupersync-patched crate
quangdang46 Jun 21, 2026
21df0c7
chore(deps): update mempalace-core v0.4.0 -> v0.6.5
quangdang46 Jun 21, 2026
f2fc798
style: apply cargo fmt
quangdang46 Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
337 changes: 337 additions & 0 deletions .agents/skills/feature-planning/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
---
name: feature-planning
description: >
Deep feature research and implementation planning for AI coding agent projects. Use this skill
whenever a user asks about a feature they want to implement, improve, add, or design — especially
in the context of AI coding agents, CLI tools, terminal agents, or LLM-powered developer tools.
Triggers on: "I want to add X feature", "how do I implement X", "can we improve X", "I want to
build X into my agent", "feature request for X", "how does X work in these tools", or any phrasing
that implies implementing/improving a capability. This skill clones 7 reference repos, spawns
sub-agents for deep per-repo research, runs an ultra-QA interview with the user, then produces a
comprehensive implementation plan with code, pseudocode, test cases, benchmarks, and direct repo
links — so the user can go from idea to working implementation with total confidence.
---

# Feature Planning Skill

Comprehensive feature research + implementation planning using 9 reference repos as the knowledge base.

## Reference Repositories

| Alias | Repo URL | Stack | What it teaches |
|-------|----------|-------|-----------------|
| `oh-my-openagent` | https://github.com/code-yeongyu/oh-my-openagent | TypeScript / OpenCode plugin | Multi-agent orchestration, model routing, tmux sessions, delegate-task patterns |
| `opencode` | https://github.com/anomalyco/opencode | TypeScript / Bun monorepo | Open-source AI coding agent architecture, provider abstraction, TUI |
| `oh-my-pi` | https://github.com/can1357/oh-my-pi | TypeScript + Rust / Bun | 40+ providers, 32 tools, LSP+DAP ops, benchmarked edits, IDE wiring |
| `codebuff` | https://github.com/CodebuffAI/codebuff | TypeScript / multi-agent | File picker + planner + editor + reviewer pipeline, beats Codex on evals |
| `codex` | https://github.com/openai/codex | TypeScript / Node | OpenAI Codex CLI, sandboxed execution, hardened tool use |
| `Codex` | https://github.com/Codex-best/Codex | TypeScript / Bun | CCB — decompiled Codex with Pipe IPC, ACP, remote control, monitoring |
| `pi-agent-rust` | https://github.com/Dicklesworthstone/pi_agent_rust | Rust 2024 edition | High-perf Rust agent, SQLite sessions, SSE streaming, WASM extension security |
| `oh-my-Codex` | https://github.com/Yeachan-Heo/oh-my-Codex | TypeScript / Codex plugin | Codex extension with hooks, guards, permission modes, multi-agent tools |
| `oh-my-codex` | https://github.com/Yeachan-Heo/oh-my-codex | TypeScript / Codex plugin | Codex extension with approval modes, sandbox config, tool gating |

---

## Workflow (follow this order every time)

### Phase 1 — Clone & Sub-agent Research

When the skill is triggered, immediately clone all 9 repos (shallow `--depth=1`) and spawn one research sub-agent per repo. Each sub-agent gets the full repo and the feature request — its job is to autonomously explore **the entire repo** to find everything relevant. The sub-agent decides what to read; nothing is off-limits and nothing is assumed to be the right place to look.

Each sub-agent should:

1. **Map the repo first** — list all files and directories to understand the full shape before diving in. No assumptions about where things live.
2. **Follow the feature signal** — search for keywords, types, patterns, and concepts related to the requested feature across every file, every directory, every language. If a Rust file has relevant logic, read it. If a config YAML has relevant keys, read it. If a test file shows how a concept is used, read it. If a benchmark shows performance constraints, read it.
3. **Trace implementations end-to-end** — when a relevant function/type/module is found, follow its call chain in both directions (callers and callees) until the full picture is clear. Don't stop at the first hit.
4. **Extract everything useful** — architecture patterns, API surfaces, data structures, config hooks, test patterns, benchmark approaches, error handling strategies, extension points, anything that could inform the feature design.
5. **Return a structured summary** (see **Sub-agent Report Format** below)

The sub-agent must NOT limit itself to any predefined set of files or folders. If it finds something unexpected in an unusual location, it should read it. Thoroughness is the goal.

Run sub-agents in parallel. Collect all 9 reports before continuing.

```bash
# Clone command template
for repo in \
"https://github.com/code-yeongyu/oh-my-openagent" \
"https://github.com/anomalyco/opencode" \
"https://github.com/can1357/oh-my-pi" \
"https://github.com/CodebuffAI/codebuff" \
"https://github.com/openai/codex" \
"https://github.com/Codex-best/Codex" \
"https://github.com/Dicklesworthstone/pi_agent_rust" \
"https://github.com/Yeachan-Heo/oh-my-Codex" \
"https://github.com/Yeachan-Heo/oh-my-codex"; do
git clone --depth=1 "$repo" /tmp/feature-research/$(basename $repo)
done
```

#### Sub-agent Report Format

Each sub-agent returns a structured block:

```
## [repo-name] Research Report

### Relevance Score: [HIGH / MEDIUM / LOW / NONE]
### Why relevant: [1-2 sentences]

### Key Files
- path/to/file.ts — [what it does re: the feature]

### Relevant Code Snippets
[short excerpts with file:line references]

### Architecture Pattern
[how this repo approaches the feature domain]

### Direct Links
- https://github.com/[org]/[repo]/blob/main/[file]#L[line]

### Gaps / What's Missing
[what this repo doesn't cover that the user might need]
```

---

### Phase 2 — Present Per-Repo Report to User

After collecting sub-agent reports, present a consolidated **Research Report** to the user with one section per repo. Format:

```
# Feature Research: [FEATURE NAME]

## Summary
[2-3 sentence overview of what you found across all repos]

---

## 1. oh-my-openagent
[sub-agent report content]

## 2. opencode
...

## 7. pi-agent-rust
...

---

## Cross-Repo Patterns
[What approaches are consistent across repos — these are proven patterns]

## Unique Insights
[Interesting divergences or novel approaches from individual repos]
```

---

### Phase 3 — Ultra QA Interview

After presenting the research report, enter a deep QA loop with the user. Ask questions in rounds — never dump all questions at once. Use this question bank, picking the most relevant ones for the feature at hand:

**Round 1 — Scope & Goal**
- What is the exact outcome you want after implementing this? (demo it to me in words)
- Is this a new feature or improving an existing one? If existing, what's broken/missing?
- Which repo(s) are you building in / most inspired by?
- What stack? (TypeScript, Rust, Python, other)

**Round 2 — Constraints & Context**
- What existing code does this feature touch or depend on?
- Are there performance requirements? (latency targets, memory limits, throughput)
- Security constraints? (sandboxing, capability gating, trust levels)
- Will this need to work across multiple LLM providers or just one?

**Round 3 — Design Preferences**
- Do you prefer a plugin/extension architecture or embedded implementation?
- Should this be synchronous, async, or streaming?
- How should failures be handled? (silent fallback, hard error, user prompt)
- How will users configure or toggle this feature?

**Round 4 — Testing & Quality**
- What does a successful implementation look like? How will you verify it?
- Are there existing tests in the repos we can adapt?
- Any edge cases you're already worried about?

**Round 5 — Stretch Goals**
- What would a "10x better" version of this look like?
- Are there benchmark targets you want to hit?
- Future integrations you want to leave room for?

Keep asking follow-up questions until you have clear answers to at minimum Round 1 and Round 2. Rounds 3–5 can be inferred from research if the user is in a hurry.

---

### Phase 4 — Comprehensive Implementation Plan

After the QA interview, produce the final plan. This is the deliverable the user keeps. It must include ALL of the following sections:

---

```markdown
# Implementation Plan: [FEATURE NAME]
> Generated from research across 9 repos + user interview
> Goal: [User's stated goal in 1 sentence]

---

## 1. Executive Summary
[3-5 sentences: what we're building, why this approach, expected outcome]

---

## 2. Architecture Decision
### Chosen Approach
[Which pattern from the research repos we're following, and why]

### Alternatives Considered
| Approach | Source Repo | Pros | Cons | Decision |
|----------|-------------|------|------|----------|

---

## 3. Data Structures & Types

```typescript // or Rust, Python, etc.
// Core types for the feature
interface FeatureConfig {
// ...
}
```

---

## 4. Pseudocode — Core Algorithm

```
FUNCTION implementFeature(input):
// Step-by-step logic in plain pseudocode
// No language-specific syntax
// Shows all branches and edge cases
```

---

## 5. Implementation Code

### File: [path/to/new-or-modified-file]
```typescript
// Full implementation code
// With inline comments explaining non-obvious choices
// References to source repos where patterns were borrowed
```

### File: [path/to/another-file]
```typescript
// ...
```

---

## 6. Configuration & Wiring
[How to register/hook the feature into the existing system]
[Config file changes, env vars, flags]

---

## 7. Repo References

Direct links to the most relevant code in each source repo:

| Feature Aspect | Repo | File | Link |
|----------------|------|------|------|
| [aspect] | oh-my-openagent | src/agents/... | https://github.com/... |
| [aspect] | codebuff | packages/... | https://github.com/... |
| ... | | | |

---

## 8. Test Cases

### Happy Path Tests
```typescript
describe('[feature]', () => {
it('should [happy case 1]', async () => {
// setup
// act
// assert
});

it('should [happy case 2]', async () => {
// ...
});
});
```

### Edge Cases
```typescript
it('should handle [edge case: empty input]', ...);
it('should handle [edge case: provider failure]', ...);
it('should handle [edge case: concurrent calls]', ...);
it('should handle [edge case: large payload]', ...);
it('should handle [edge case: timeout]', ...);
```

### Integration Tests
```typescript
// End-to-end test that exercises the full flow
```

---

## 9. Benchmarks

### What to Measure
| Metric | Baseline | Target | How to Measure |
|--------|----------|--------|----------------|
| Latency (p50) | - | [Xms] | [method] |
| Latency (p99) | - | [Xms] | [method] |
| Memory delta | - | [XMB] | [method] |
| Throughput | - | [X/s] | [method] |

### Benchmark Code
```typescript
// Benchmark harness adapted from oh-my-pi / pi-agent-rust patterns
```

---

## 10. Migration / Rollout
[If improving existing feature: how to migrate without breaking changes]
[Feature flags, gradual rollout, deprecation path]

---

## 11. Known Limitations & Future Work
- [ ] [Thing not covered in this plan]
- [ ] [Stretch goal for v2]
- [ ] [Integration left for later]

---

## 12. Success Criteria Checklist
- [ ] Core happy path works end-to-end
- [ ] All edge case tests pass
- [ ] Performance meets targets from Section 9
- [ ] No regressions in existing tests
- [ ] [User's specific success criterion from interview]
```

---

## Quality Standards

The plan must meet these bars before presenting to the user:

- **No broken links** — all GitHub links must point to real files in the cloned repos
- **No vague pseudocode** — every step in the pseudocode must be implementable
- **No placeholder tests** — every test case must have real setup/act/assert
- **Benchmark section is never empty** — even if targets are TBD, the measurement method must be specified
- **Every architectural choice has a "why"** referencing a source repo
- **The user should be able to hand this plan to a junior engineer and get working code back**

---

## References

See `references/repo-summaries.md` for static summaries of all 9 repos (useful when cloning is slow or unavailable).
Loading
Loading