Skip to content

docs: add a developer primer - #36

Merged
shreyaGupta1202 merged 5 commits into
envaar:mainfrom
Nitjsefnie-OSC:docs/9-primer
Jul 17, 2026
Merged

shreyaGupta1202 merged 5 commits into
envaar:mainfrom
Nitjsefnie-OSC:docs/9-primer

Conversation

@Nitjsefnie

@Nitjsefnie Nitjsefnie commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #9.

Adds docs/primer/README.md — a ~10-minute hands-on tour with the issue's requested sections (Foundations, Components, Getting Started, plus Where To Go Next), following the structure of the GitHub CLI primer the issue references (kept as one well-organized file since the content fits; happy to split into per-section files if you prefer that shape). One link line added to the README's Documentation paragraph.

Truthfulness bar: every command shown was executed against a locally built ./bin/vaar and every output block is real (trimmed) output from those runs against the repo's broken example; every flag mentioned exists in lint --help on current main. Notably the primer documents -o/--output (present and working, though absent from the lint guide — #23/#31 territory) and deliberately omits --list-rules (only exists in the open #30, not on main yet).

Components are mapped to their actual packages (cmd/vaar, internal/cli|fs|envfile|lint|lint/rules|report) and the run-flow description follows Runner in internal/lint/runner.go.

Gates: make lint/vet/build green (docs-only; the two chmod-0-as-root cli tests fail on clean main too, invisible to CI).

AI assistance disclosure

Written with AI assistance (Claude); all commands, outputs, and flags were verified against the real binary before opening.

Summary by CodeRabbit

  • Documentation
    • Added a new “Vaar Primer” for new developers, covering Vaar’s purpose (repo-aware .env linting), core principles, the full vaar lint workflow (rule selection, scoping, findings, optional --fix with re-check), and guidance on interpreting text/JSON output and exit codes.
    • Updated the main documentation to point new developers to the primer after the existing usage entry point.

Add docs/primer/README.md, a concise onboarding guide that teaches a new
developer what Vaar is, how a lint run flows through the packages and how to
run it. The primer follows the GitHub CLI primer's Foundations / Components /
Getting Started shape and links out to the existing reference docs. Every
command and output shown was produced against a local build. Link it from the
README Documentation section.

Closes envaar#9

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Vaar adds a developer primer covering its foundations, internal lint pipeline, build verification, CLI behavior, fixes, rule and scope selection, and related references. The main README links new developers to the primer.

Changes

Vaar Primer Documentation

Layer / File(s) Summary
Primer foundations and lint flow
docs/primer/README.md
Introduces Vaar, its design principles and components, and documents the lint execution sequence, findings, fixes, sorting, output, and exit-code selection.
Primer build and CLI usage
docs/primer/README.md
Documents build verification, first-run output, exit codes, JSON output, safe fixes, rule filters, and target selection.
Documentation navigation
README.md, docs/primer/README.md
Links the main documentation section to the primer and provides links to deeper reference and contribution documentation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: shreyagupta1202

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main change: adding a developer primer in docs.
Linked Issues check ✅ Passed The new docs/primer content matches issue #9 by covering Components, Getting Started, and Foundations for new developers.
Out of Scope Changes check ✅ Passed The PR changes are scoped to the primer addition and the README link update, with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/primer/README.md`:
- Around line 132-135: Update all clone-based command examples to invoke the
built binary consistently: use ./bin/vaar in docs/primer/README.md lines
132-135, 157-159, 177-180, and 191-194, including the JSON, fix, rule-selection,
and scope-selection examples.
- Around line 118-119: Update the output grammar description near the documented
severity/rule/file/message format to account for --fix runs: either scope the
existing format to non---fix output or document the optional “[fixed]” prefix
while preserving the clean-run and exit-code statements.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b5fc50ae-0255-4c01-991e-cc69bd7341b8

📥 Commits

Reviewing files that changed from the base of the PR and between 0bbc249 and 08cf107.

📒 Files selected for processing (2)
  • README.md
  • docs/primer/README.md

Comment thread docs/primer/README.md Outdated
Comment thread docs/primer/README.md
…mmar

Addresses CodeRabbit review on envaar#36.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Both addressed: the output-grammar line now mentions the [fixed] prefix that --fix runs add, and a note after the build step states the PATH prerequisite for the bare vaar invocations (kept bare rather than ./bin/vaar since the examples run from the repo being checked, not the vaar clone).

Nitjsefnie pushed a commit to Nitjsefnie-OSC/vaar that referenced this pull request Jul 16, 2026
…mmar

Addresses CodeRabbit review on envaar#36.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TFM-HITESH
TFM-HITESH requested a review from Copilot July 16, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 new developer primer under docs/primer/ and links to it from the root README to help new contributors understand Vaar’s architecture and run-flow quickly, per Issue #9 (modeled after the GitHub CLI primer structure).

Changes:

  • Add docs/primer/README.md as a hands-on, ~10-minute walkthrough covering Foundations, Components, Getting Started, and Next Steps.
  • Update root README.md Documentation section to link to the new Primer for onboarding.

Reviewed changes

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

File Description
README.md Adds a discoverable link to the new developer primer from the Documentation section.
docs/primer/README.md Introduces the new onboarding primer, including architecture mapping and practical CLI examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread docs/primer/README.md Outdated
Comment thread docs/primer/README.md Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/primer/README.md`:
- Around line 100-101: Correct the PATH guidance in the examples section: do not
instruct users to add the executable path `./bin/vaar` or a repository-relative
`./bin` directory. Show a usable absolute PATH export targeting the Vaar clone’s
bin directory, or keep `./bin/vaar` explicitly in every command example.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c02110e0-a5d4-46c8-8233-b3ea5e817945

📥 Commits

Reviewing files that changed from the base of the PR and between 3e7502f and f2e09dd.

📒 Files selected for processing (2)
  • README.md
  • docs/primer/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

Comment thread docs/primer/README.md Outdated
PATH entries must be directories, so pointing readers at ./bin/vaar (and implicitly a relative ./bin, which resolves inside the linted repository) never made the bare vaar invocations work. Show an absolute export from the Vaar clone instead. Also reword "can take the Primer" to "can read the Primer" in the root README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

CodeRabbit's PATH catch was right — the note I added earlier pointed PATH at the executable itself (and a relative ./bin would resolve inside the linted repository, not the Vaar clone), so the bare vaar invocations never worked as written. Fixed in a8436ee: the primer now shows an absolute export (export PATH="$PWD/bin:$PATH" run from the Vaar clone) with the installed-release alternative kept. Also reworded "can take the Primer" → "can read the Primer" in the root README per Copilot's phrasing comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@shreyaGupta1202
shreyaGupta1202 merged commit 9fe8491 into envaar:main Jul 17, 2026
14 checks passed
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 a primer Vaar

3 participants