Status: Ready to implement
Execution target: Local machine, launched from the repository root
Owner: Repository maintainer
Priority: Demonstrate a real, testable implementation rather than an architecture illustration
Build a working, self-contained demonstration repository showing how one primary Claude agent can use repository-local Markdown instructions, discoverable skills, optional subagent definitions, and executable Python tools to accomplish a useful task. The code and configuration belong in the repository. The Claude Code / Claude Agent SDK runtime executes on the local machine; it is not stored in the repository as source code. Do not provision Lambda, a microservice, a database, or GitHub Actions in this iteration.
Name this project Claude Repo-Native Agent Lab.
Demo task: Repository Readiness Report. Given a local directory (default: this repository’s sample project), inspect its files for a small number of deterministic readiness checks; redact common secrets from anything included in a report; generate readable Markdown and machine-readable JSON evidence; and have Claude explain the findings and suggest the next action. The whole demo must be useful, inexpensive to execute, and safe to run on a laptop.
A developer can clone/open the project, follow the README, install dependencies, run the tests, run an offline deterministic scan, and—when Claude credentials and the runtime are configured—run a real Claude-powered agent session. They can inspect the resulting report and evidence, see which skills were used, and distinguish deterministic tool results from Claude’s interpretation. Do not describe an offline script as an AI agent.
Create all of the following. Each file must contain meaningful working content or instructions; no empty or placeholder files. Add small support files only where required.
claude-repo-native-agent-lab/
├── README.md
├── pyproject.toml
├── .gitignore
├── agent.py
├── CLAUDE.md
├── intent/
│ └── current-feature.md
├── .claude/
│ ├── settings.json
│ ├── skills/
│ │ ├── implementation/
│ │ │ └── SKILL.md
│ │ └── validation/
│ │ └── SKILL.md
│ └── agents/
│ ├── reviewer.md
│ └── researcher.md
├── tools/
│ ├── __init__.py
│ ├── readiness.py
│ └── redact.py
├── samples/
│ └── demo_project/
│ ├── README.md
│ ├── app.py
│ ├── requirements.txt
│ └── .env.example
├── tests/
│ ├── test_readiness.py
│ ├── test_redact.py
│ └── test_cli.py
└── output/
└── .gitkeep
Exact roles of files:
agent.py: real CLI entry point. Its agent command launches the Claude Agent SDK (Python) against the repository and instructs it to use available project skills, inspect the sample project, invoke approved tool commands, and summarize findings. Its scan command runs the deterministic Python workflow only, without calling Claude. Its test command runs local tests. Handle SDK/runtime/credential errors with concise remediation; never silently substitute offline results for an AI agent run.CLAUDE.md: top-level project guidance, task purpose, minimum necessary autonomy, safe local working directory, required evidence, no network calls beyond the authenticated model invocation, and instruction to treat reports as evidence—not assertions of success.intent/current-feature.md: capture this task in condensed four-pillar form: Intent; Inputs/Context; Outputs; Success Criteria, plus constraints, stop conditions, and evidence..claude/skills/implementation/SKILL.md: a valid Claude Code skill with YAML frontmatter (name, description) and a precise procedure for running python agent.py scan --target ..., reading the JSON/Markdown evidence, and producing recommended fixes. Put supporting Python scripts under tools/, not in a massive instruction file..claude/skills/validation/SKILL.md: valid skill with YAML frontmatter, test invocation, success/failure criteria, report verification and clear stop conditions. Skill invocation should be discoverable in Claude Code; use documented syntax and conventions supported by the installed version..claude/agents/reviewer.md and researcher.md: optional valid Claude Code subagent definitions with frontmatter, role-specific instructions, and appropriately restricted tools. Do not invoke them automatically by default. Include a short explanation that a .md file is a definition, not a running agent; delegation starts an additional agent execution context only if explicitly requested or justified..claude/settings.json: valid minimal JSON with safe permissions and optional deterministic hooks only if compatible with installed Claude Code. Do not assume nonexistent keys or overly permissive Bash(*) grants. Document any permission prompts.tools/readiness.py: standard-library-first, testable scanner that checks: README present, tests directory present, Python files compile (without executing them), no accidental .env secrets file, and presence of dependency manifest (pyproject.toml or requirements.txt). Walk only under the selected target; ignore .git, virtual environments, caches, and output directories; avoid following symlinks outside target. Emit structured check IDs, statuses (pass, warn, fail), file references, and actionable guidance.tools/redact.py: deterministic redaction for report strings and snippets; mask probable API key assignments, authorization bearer tokens, and password/token assignments. No raw secrets in console logs, report outputs, or exception messages. Include tests for redaction and for harmless strings that must remain unchanged. Treat redaction as an enforced tool step, not an optional agent skill.samples/demo_project/: small safe sample with both passing and intentionally failing checks, clearly documented. .env.example contains fake placeholders only, never real secrets. Make it easy to fix the sample and observe a different result.tests/: working pytest tests for scanner behavior, report schemas, redaction, CLI success and failure paths. Do not require model credentials to run tests.README.md: copy/paste install, offline run, optional real Claude agent run, expected output locations, troubleshooting, and architecture overview.output/: generated report.md and evidence.json should be ignored by Git. .gitkeep may be the only tracked file in this directory.Implement these CLI commands (adjust syntax only when required by actual SDK compatibility and update README accordingly):
python -m pip install -e '.[dev]'
python agent.py test
python agent.py scan --target samples/demo_project
python agent.py agent --target samples/demo_project
scan must work completely offline after dependencies are installed. It must generate output/evidence.json and output/report.md in a deterministic way; print a concise summary and paths. agent must perform a real Claude Agent SDK session and make a meaningful contribution (interprets scan evidence and proposes prioritized fixes), not merely print a canned string. Use the current, officially supported Python SDK API, discover project-local skills correctly, limit turns and tools, set the working directory to repo root, and enforce read-only-by-default behavior for the demo. Never permit arbitrary edits outside repo. An authenticated Claude runtime, compatible SDK, and appropriate model access are prerequisites for agent mode; validate and explain those prerequisites.
The agent run should first cause the deterministic scan to be executed or validate current fresh scan evidence, then read output/evidence.json, invoke the validation procedure, and give a short evidence-grounded assessment. Keep the actual scan/report generation deterministic and locally reproducible. If Claude-specific calls are unavailable, fail with an actionable diagnostic rather than pretending an agent ran.
output/evidence.json must contain at minimum:
{
"schema_version": "1.0",
"target": "samples/demo_project",
"checks": [
{
"id": "readme_present",
"status": "pass",
"detail": "README.md exists",
"recommendation": "None"
}
],
"summary": {"pass": 0, "warn": 0, "fail": 0},
"redaction_applied": true
}
This is a shape example; counts and check results must be computed from actual scans. output/report.md must contain a clear title, target, summary, a table of all checks, recommended next actions, and evidence source. Reports must never expose secrets.
All must be demonstrated, not asserted:
python agent.py test exits zero; pytest covers both success and failure paths.python agent.py scan --target samples/demo_project exits zero for a completed scan even if readiness checks contain failures; reports are generated and parseable.agent path genuinely invokes Claude’s runtime when prerequisites exist. If unavailable, display the exact blocked prerequisite and the locally executable steps to resolve it.agent mode.output/ directory during the normal demo.claude-repo-native-agent-lab/ subdirectory unless the root is empty/new or I explicitly opened the target repo.agent mode if authenticated runtime access is already available; otherwise report what is missing. Do not request secrets in chat or log them.output/report.md and output/evidence.json; verify no fake sensitive strings survive unmasked in reports.Stop rather than guessing when a requested operation requires unavailable credentials, unexpected external privileges, destructive changes, or unsupported SDK behavior. Complete all safe local deterministic work first and disclose any blocked live-agent step. Do not stop after writing a plan; implement and execute the demo in this session.