SDLC Status Dashboard

2026-08-10 11:20:04 +00:00

Current Phase
documentation
Phases Done
3 / 9
Completion
33%
Re-enter At
existing-solutions
3 completed6 remaining

Pipeline Progress ?
⚪ not started not yet begun
✏️ draft initial version
🔍 in review under review
🚧 in progress actively worked on
⛔ blocked waiting on dependency
✅ done completed
⏭️ skipped not applicable

Foundation
Done: completed requirementsNot Started: not yet begun existing-solutionsNot Started: not yet begun codebase-analysisNot Started: not yet begun feasibilityDone: completed specificationNot Started: not yet begun plan
Build
Not Started: not yet begun implementationDone: completed testing
Ship
Not Started: not yet begun documentation
❓ Open Questions📖 Vocabulary

Requirements: ProviderA source of model completions (Anthropic, OpenAI, Gemini, Bedrock, OpenRouter, etc.). Authentication

Overview

jcode lets users authenticate with a wide range of LLM providers so they can use existing subscriptions (Claude Max, ChatGPT Pro, Gemini) or API keys. The auth layer supports OAuthOpen Authorization flows, API keys, Azure Entra ID, and reuse of external credentials (e.g. Codex or Claude CLI auth files), with a browser-based login flow driven from the CLI (jcode login). This feature was reverse-engineered from the existing codebase during an SDLC sync; it documents already-implemented functionality.

Stakeholders

Stakeholder Interest
End users Low-friction login with their existing subscriptions, multi-account support, and clear auth status
Maintainer Accurate provider catalog, diagnosable auth failures, testable login flows

Functional Requirements

Order rows by priority: Must first, then Should, then May.

ID Priority Requirement
FR-1MustThe system shall support logging in to multiple built-in providers, including Anthropic Claude, OpenAI/Codex, Gemini, Azure OpenAI, and OpenAI-compatible API-key providers. Must The system shall support logging in to multiple built-in providers, including Anthropic Claude, OpenAI/Codex, Gemini, Azure OpenAI, and OpenAI-compatible API-key providers.
FR-2MustThe system shall support browser-based OAuthOpen Authorization login for providers that require it, including printing an auth URL and running a local callback server. Must The system shall support browser-based OAuthOpen Authorization login for providers that require it, including printing an auth URL and running a local callback server.
FR-3MustThe system shall support API-key login for providers that accept keys, via interactive prompt, `--api-key`, or environment variable. Must The system shall support API-key login for providers that accept keys, via interactive prompt, --api-key, or environment variable.
FR-4MustThe system shall detect and reuse external credentials from other CLIs (e.g. Codex auth.json, Claude .credentials.json) with ask-before-read and symlink rejection. Must The system shall detect and reuse external credentials from other CLIs (e.g. Codex auth.json, Claude .credentials.json) with ask-before-read and symlink rejection.
FR-5MustThe system shall store credentials securely (e.g. `~/.jcode/auth.json`, macOS Keychain) and support multiple accounts per provider. Must The system shall store credentials securely (e.g. ~/.jcode/auth.json, macOS Keychain) and support multiple accounts per provider.
FR-6MustThe system shall refresh expired tokens, coordinating refreshes so concurrent requests do not double-refresh. Must The system shall refresh expired tokens, coordinating refreshes so concurrent requests do not double-refresh.
FR-7ShouldThe system shall provide auth status and diagnostics (`jcode auth status`, `jcode auth doctor`) and end-to-end auth validation (`jcode auth-test`). Should The system shall provide auth status and diagnostics (jcode auth status, jcode auth doctor) and end-to-end auth validation (jcode auth-test).
FR-8ShouldThe system shall support experimental CLI providers (Cursor, GitHub Copilot, Antigravity) and named OpenAI-compatible provider profiles. Should The system shall support experimental CLI providers (Cursor, GitHub Copilot, Antigravity) and named OpenAI-compatible provider profiles.
FR-9MayThe system shall allow scriptable login via printed auth URL and callback (`--print-auth-url`, `--callback-url`, `--auth-code`). May The system shall allow scriptable login via printed auth URL and callback (--print-auth-url, --callback-url, --auth-code).

Non-Functional Requirements

Order rows by priority: Must first, then Should, then May.

ID Priority Category Requirement
NFR-1MustThe system shall never read credential files through symlinks. Must Security The system shall never read credential files through symlinks.
NFR-2MustThe system shall keep tokens out of logs and error output. Must Security The system shall keep tokens out of logs and error output.
NFR-3ShouldA failed or missing login for one provider shall not prevent using other providers. Should Availability A failed or missing login for one provider shall not prevent using other providers.
NFR-4ShouldThe default provider shall be auto-detected from available credentials. Should Usability The default provider shall be auto-detected from available credentials.

Constraints

  • Must support both subscription-based (OAuthOpen Authorization) and API-key-based providers in one auth model.
  • Must run without a hosted auth service; callbacks are handled locally.

Acceptance Criteria

Every FR and NFR shall have at least one acceptance criterion.

Order criteria by FRs first (sorted by ID), then NFRs (sorted by ID).

Acceptance criteria verify how a requirement is proven done, they do not restate it. Write concrete, scenario-based criteria (happy path, edge cases and error states where applicable).

  • FR-1MustThe system shall support logging in to multiple built-in providers, including Anthropic Claude, OpenAI/Codex, Gemini, Azure OpenAI, and OpenAI-compatible API-key providers.
    • Given a clean ~/.jcode with no auth
    • When the user runs jcode login for a supported provider and completes the flow
    • Then the provider appears as authenticated and usable for sessions
  • FR-2MustThe system shall support browser-based OAuthOpen Authorization login for providers that require it, including printing an auth URL and running a local callback server.
    • Given an OAuthOpen Authorization provider selected for login
    • When the browser flow completes against the local callback server
    • Then the returned token is stored and a session can start with that provider
  • FR-3MustThe system shall support API-key login for providers that accept keys, via interactive prompt, `--api-key`, or environment variable.
    • Given an API-key provider
    • When a key is provided interactively or via --api-key/environment variable
    • Then the key is validated and stored
  • FR-4MustThe system shall detect and reuse external credentials from other CLIs (e.g. Codex auth.json, Claude .credentials.json) with ask-before-read and symlink rejection.
    • Given an external credential file (e.g. ~/.codex/auth.json)
    • When the user consents to reading it
    • Then the credential is used without copying it into jcode's own store
  • FR-5MustThe system shall store credentials securely (e.g. `~/.jcode/auth.json`, macOS Keychain) and support multiple accounts per provider.
    • Given stored credentials
    • When the user lists accounts or starts a session
    • Then multiple accounts are selectable and the chosen one is used
  • FR-6MustThe system shall refresh expired tokens, coordinating refreshes so concurrent requests do not double-refresh.
    • Given an expired token
    • When a request needs the token
    • Then it is refreshed once and concurrent requests share the refreshed token
  • FR-7ShouldThe system shall provide auth status and diagnostics (`jcode auth status`, `jcode auth doctor`) and end-to-end auth validation (`jcode auth-test`).
    • Given an installed jcode with configured providers
    • When the user runs jcode auth doctor or jcode auth-test
    • Then it reports each provider's auth state and pinpoints failures
  • FR-8ShouldThe system shall support experimental CLI providers (Cursor, GitHub Copilot, Antigravity) and named OpenAI-compatible provider profiles.
    • Given a configured named provider profile or experimental provider
    • When the user logs in with that profile
    • Then the profile is usable for sessions
  • FR-9MayThe system shall allow scriptable login via printed auth URL and callback (`--print-auth-url`, `--callback-url`, `--auth-code`).
    • Given a headless environment
    • When the user runs login with --print-auth-url and later supplies the auth code
    • Then the login completes without opening a browser
  • NFR-1MustThe system shall never read credential files through symlinks.
    • Given a symlink placed where a credential file is expected
    • When credential detection runs
    • Then the symlink is rejected and not followed
  • NFR-2MustThe system shall keep tokens out of logs and error output.
    • Given a login or token-refresh failure
    • When error output is produced
    • Then no token or secret material appears in logs or stderr
  • NFR-3ShouldA failed or missing login for one provider shall not prevent using other providers.
    • Given one misconfigured provider
    • When a session targets a different provider
    • Then the session succeeds regardless of the misconfigured provider
  • NFR-4ShouldThe default provider shall be auto-detected from available credentials.
    • Given exactly one set of credentials available
    • When jcode starts without a provider flag
    • Then the matching provider is auto-selected

Conflicts

None identified yet.

Open Questions

  1. Which provider/account selection UX should win when multiple credentials are available for the same provider? The current behavior is inferred from code, not verified end to end.