feat: auto-run quick project scan so agent has immediate project context#1
Draft
zurd46 wants to merge 1 commit intoclaude/typescript-cli-deepagents-O2EKxfrom
Draft
Conversation
…iate project context Previously autoInit skipped the scan entirely — users had to run `ua scan` manually before the agent knew anything about the project. Now autoInit performs a fast, local-only scan (no LLM call) that generates docs/scan.md with directory tree, dependencies, scripts, key files, test files, API routes and git info. The agent picks this up automatically via the existing scan.md injection in agent-factory. Full AI-powered architecture analysis remains available via `ua scan --force` or the new `ua scan --quick` flag for explicit quick scans.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoInitnow runs a quick scan (local-only, no LLM call) on first session, so the agent immediately knows the project (tree, deps, scripts, key files, tests, API routes, git info) viadocs/scan.md.quickoption onscanProject/scanCommand— skips the AI analysis phase. Exposed asua scan --quick/-q.autoInitonly regeneratesdocs/scan.mdif it doesn't already exist — safe to call repeatedly.ua scan --force.Why
Previously users had to run
ua scanmanually before the agent had any real project context. With Gemma as the default model, the agent would frequently ask about or guess structure it could have known fromdocs/scan.md. The quick scan is fast enough to run on every first session without blocking the user.Test plan
.ultraagent/is created anddocs/scan.mdappears without any LLM callua scan --quickproduces scan.md without triggering the LLMua scan --forcestill performs the full AI analysishttps://claude.ai/code/session_017vLiHKV6jN42JoDRo7QJNr