Skip to content

docs: add 10-minute quickstart guide with 3 runnable examples#150

Open
dgenio wants to merge 1 commit intomainfrom
docs/quickstart-guide-76
Open

docs: add 10-minute quickstart guide with 3 runnable examples#150
dgenio wants to merge 1 commit intomainfrom
docs/quickstart-guide-76

Conversation

@dgenio
Copy link
Owner

@dgenio dgenio commented Mar 20, 2026

Summary

Create a dedicated 10-minute quickstart guide so new users can install contextweaver, run three working examples, and see tangible output with copy-paste commands.

Fixes #76

Changes

  • docs/quickstart.md (new) — six-section quickstart guide:
    1. Prerequisites (Python version check, venv setup for Linux/macOS/Windows)
    2. Install (PyPI and editable-mode paths)
    3. First context build (ingest events → build_sync() → prompt + stats)
    4. Context firewall demo (large tool result → summary + artifact store)
    5. Tool routing demo (catalog → TreeBuilderRouter → focused shortlist)
    6. What to try next (links to existing docs + note about planned integration guides)
  • README.md — added a prominent "10-Minute Quickstart" section linking to the new guide; fixed the context pipeline feature description from "seven-stage" to "eight-stage" (matching AGENTS.md and the actual pipeline)
  • CHANGELOG.md — added entries under ## [Unreleased]

Checklist

  • Tests added or updated for every new/changed public function
    • N/A — docs-only change, no public API modified
  • make ci passes locally (fmt + lint + type + test + example + demo)
    • make unavailable on Windows; ran CI-equivalent commands individually:
      • ruff format --check src/ tests/ examples/ — 80 files already formatted
      • ruff check src/ tests/ examples/ — all checks passed
      • mypy src/ — no issues in 41 source files
      • pytest -q — 536 passed
      • All 7 example scripts — passed
      • python -m contextweaver demo — passed
  • CHANGELOG.md updated under ## [Unreleased]
  • Docstrings added for all new public APIs (Google-style)
    • N/A — no new public APIs
  • Every modified module stays ≤ 300 lines (or a decomposition issue is linked above)
    • N/A — no source modules modified
  • Related issue linked in the summary above
  • Agent-facing docs updated if pipeline, API, or conventions changed
    • Reviewed AGENTS.md, .github/copilot-instructions.md, .claude/CLAUDE.md — no updates needed. The quickstart is user-facing, and the "seven→eight" fix in README aligns it with what AGENTS.md already documents.

Notes for reviewers

  • Spec delta from issue docs: create 10-minute quickstart guide with 3 runnable examples #76: the issue's sample code used pack.token_count and pack.budget, which do not exist on ContextPack. The quickstart uses pack.stats.* fields that actually exist. The issue also linked to future framework integration guides not yet authored — the quickstart links to existing docs instead and notes integrations as planned separately.
  • Expected output is shown as excerpts (not exact full dumps) so the guide stays accurate across minor formatting changes.
  • Cross-platform: prerequisites include both source .venv/bin/activate (Linux/macOS) and .venv\Scripts\Activate.ps1 (Windows PowerShell).
  • CI coverage: local validation ran on Windows with Python 3.14. CI will cover Ubuntu on Python 3.10/3.11/3.12.

Create docs/quickstart.md with prerequisites, install, three copy-paste examples (context build, firewall, routing), expected output excerpts, and next-step links.

Update README.md with a prominent quickstart section and fix the context pipeline count from seven to eight stages.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated quickstart entry point to help new users install contextweaver and run three end-to-end examples, and updates top-level docs to point to it and keep pipeline wording consistent.

Changes:

  • Added docs/quickstart.md with a 10-minute guide and 3 runnable examples (context build, firewall, routing).
  • Updated README.md to link prominently to the quickstart and corrected the pipeline stage count to eight.
  • Updated CHANGELOG.md under [Unreleased] to note the new guide and README change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/quickstart.md New quickstart guide with install steps + runnable examples + next-step links.
README.md Adds “10-Minute Quickstart” section and corrects pipeline stage count wording.
CHANGELOG.md Documents the quickstart addition and README change under Unreleased.

```powershell
.venv\Scripts\Activate.ps1
```

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows PowerShell venv activation command can fail on default Windows setups due to the ExecutionPolicy blocking scripts (common error: “running scripts is disabled on this system”). Consider adding a short note with a safe workaround (e.g., using activate.bat for cmd.exe or setting execution policy for CurrentUser) so the quickstart remains copy-paste runnable on Windows.

Suggested change
If you see an error like `running scripts is disabled on this system`, either:
- run the activation script from **Command Prompt (cmd.exe)** instead:
```cmd
.venv\Scripts\activate.bat
  • or relax the execution policy for your current user in PowerShell (recommended only on machines you control):

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Copilot uses AI. Check for mistakes.
Comment on lines +191 to +193
- The tool result was large enough to trigger the firewall during context build.
- `contextweaver` stored the raw result in the artifact store.
- The prompt kept a compact summary plus an artifact reference instead of the full payload.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “What just happened” bullets imply the firewall only triggers when the tool result is “large enough”, but apply_firewall() currently intercepts all tool_result items during build (it always stores the raw output as an artifact and replaces text with a summary). Please adjust this explanation to match current behavior, or update the demo to use ContextManager.ingest_tool_result(..., firewall_threshold=...) if you specifically want to demonstrate size-threshold triggering.

Suggested change
- The tool result was large enough to trigger the firewall during context build.
- `contextweaver` stored the raw result in the artifact store.
- The prompt kept a compact summary plus an artifact reference instead of the full payload.
- The tool result was processed by the firewall during context build (all `tool_result` items go through it by default).
- `contextweaver` stored the raw result in the artifact store.
- The prompt kept only a compact summary plus an artifact reference instead of the full payload.

Copilot uses AI. Check for mistakes.
## 10-Minute Quickstart

For a guided setup with prerequisites, three runnable examples, expected output,
and next steps, see [docs/quickstart.md](docs/quickstart.md).
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relative link [docs/quickstart.md](docs/quickstart.md) will render correctly on GitHub, but it will likely be broken on PyPI because pyproject.toml sets readme = "README.md" and PyPI doesn’t resolve repo-relative links. Consider linking to the full GitHub URL (or a docs site URL) so the “10-Minute Quickstart” section works wherever the README is rendered.

Suggested change
and next steps, see [docs/quickstart.md](docs/quickstart.md).
and next steps, see [docs/quickstart.md](https://github.com/dgenio/contextweaver/blob/main/docs/quickstart.md).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: create 10-minute quickstart guide with 3 runnable examples

2 participants