Metadata-Version: 2.4
Name: x-agentic-workflow
Version: 0.1.0
Summary: A clean-room terminal agentic coding assistant with BYOK model providers, sandboxed tools, sessions, skills, hooks, MCP, and multi-agent extension points.
Project-URL: Homepage, https://github.com/354685856-sn/x-agentic-workflow
Project-URL: Repository, https://github.com/354685856-sn/x-agentic-workflow
Project-URL: Issues, https://github.com/354685856-sn/x-agentic-workflow/issues
Project-URL: Documentation, https://github.com/354685856-sn/x-agentic-workflow#readme
Author: Nan Ge
License-Expression: MIT
License-File: LICENSE
License-File: NOTICE
Keywords: agent,byok,cli,coding-assistant,mcp,skills
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Terminals
Requires-Python: >=3.10
Requires-Dist: anthropic>=0.40.0
Requires-Dist: openai>=1.0.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: rich>=13.7.0
Requires-Dist: textual>=6.6.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == 'dev'
Requires-Dist: mypy>=1.10.0; extra == 'dev'
Requires-Dist: pytest>=8.2.0; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Description-Content-Type: text/markdown

# x-agentic-workflow

Clean-room Python terminal agentic coding assistant.

This repo contains two layers:

- the SAFe Agentic Workflow harness for developing the product;
- the `x-agentic-workflow` runtime in `src/x_agentic_workflow`.

The runtime targets the same category as Codex CLI, Gemini CLI, aider, Cline,
and Claude-style coding assistants, while using original Python code.

## v0.1 capability

- Hybrid terminal UI:
  - `xaw chat` interactive shell UI
  - `xaw run -p "..."` headless one-shot mode
  - `xaw tui` Textual full-screen terminal UI
- BYOK model providers:
  - Anthropic Messages API
  - OpenAI-compatible Chat Completions API
- Sandboxed tools:
  - `read_file`
  - `write_file`
  - `list_dir`
  - `search`
  - `run_command` with user approval
- Session save/resume.
- Local Skills loaded by name.
- Lifecycle Hooks directory.
- MCP configuration discovery interface.
- Multi-agent role prompt interface.

## Install for development

Install from TestPyPI during release validation:

```bash
python3 -m venv /tmp/xaw-testpypi
/tmp/xaw-testpypi/bin/python -m pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple \
  x-agentic-workflow
/tmp/xaw-testpypi/bin/xaw --version
```

After the production PyPI release:

```bash
pipx install x-agentic-workflow
```

For local development:

```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
```

## Configure

Secrets stay in environment variables, not in config files.

Anthropic:

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
xaw init --provider anthropic --model claude-3-5-sonnet-latest
```

OpenAI-compatible:

```bash
export OPENAI_API_KEY="sk-..."
xaw init \
  --provider openai-compatible \
  --base-url https://api.openai.com/v1 \
  --model gpt-4.1
```

For DeepSeek, OpenRouter, DashScope, Ollama, LM Studio, or another provider,
use its OpenAI-compatible base URL and model name.

## Run

```bash
xaw doctor
xaw chat
xaw tui
xaw run -p "list this project and explain what it does"
```

Resume a session:

```bash
xaw sessions
xaw chat --session 20260630-120000
```

## Safety model

- File access is restricted to the selected project directory.
- Path traversal such as `../outside` is blocked.
- Commands run in the project directory and require explicit approval by
  default.
- Config files store provider metadata only. API keys stay in environment
  variables.

## Clean-room rule

See [docs/product/clean-room-scope.md](docs/product/clean-room-scope.md).

The project may align product capabilities with existing terminal AI coding
assistants, but it must not copy or translate restricted source code,
implementation structure, private prompts, private constants, or UI text.

## Development checks

```bash
python -m pytest
python -m ruff check .
python -m mypy src/x_agentic_workflow
xaw smoke-openai-compatible --allow-skip
```

## Release status

Version `0.1.0` is published to TestPyPI for install verification:

<https://test.pypi.org/project/x-agentic-workflow/0.1.0/>

Production PyPI publishing should use a fresh PyPI API token and `twine upload
dist/*` after the release checklist passes.
