feat: Location-IP Extract Report — NetBox v4.4+ scope compatibility & expanded CSV columns#1
Merged
Champion2005 merged 9 commits intomainfrom Mar 3, 2026
Merged
Conversation
- Fix tool-audit.log format: session ID moved to end, use [...] delimiters instead of '...' to eliminate confusing }' at line end - Fix subagent.log format: session/agent IDs moved to end of log lines - Fix session.log PreCompact format: session ID moved to end - Trim session-start.sh: remove irrelevant Azure, Terraform, Node.js checks not applicable to a Python/uv CLI project - Remove Azure delete block from pre-tool-safety.sh (not applicable) - Trim copilot-instructions.md to essentials only (safety invariant, core rules, workflow principles) — reduces context loaded every request - Add architecture.instructions.md with applyTo src/**/*.py — module layout, tech stack, commands table, build commands, branch naming now load only when editing source/test files - Add applyTo frontmatter to cli, client, models, tests instruction files — each now loads only when the matched files are in context - Add docs/workflow.md: full workflow reference covering prompts, subagents, skills, hooks, log formats, plan artifacts, CI/CD, and the daily dev cycle Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…inal ops, tailored hooks
Log paths moved from hooks/ to hooks/logs/:
- All hook scripts updated (session-start, tool-logger, pre-compact,
subagent-start, subagent-stop, session-stop)
- session-stop.sh archives from logs/ to logs/archive/ on session end
- Old tracked log files removed from git (session.log, tool-audit.log,
subagent.log) — now gitignored under hooks/logs/ pattern
- .gitignore: added hooks/logs/*.log entries + legacy path ignores
Tailored hooks for Python-only project (no Terraform, no Azure):
- session-start.sh: removed Node.js, Terraform, Azure checks
- pre-tool-safety.sh: removed terraform destroy + az delete blocks
and Azure auth warning; kept catastrophic deny, force-push/main
protection, and Python venv + GitHub auth warnings
Terminal ops delegated to subagents (execute removed from all prompts):
- START, PLAN, BUILD, END, git-COMMIT, git-PUSH, git-PR, git-ISSUE,
workflow-CUSTOMIZE, workflow-MIGRATE (10 prompts)
- copilot-instructions.md: 'never runs terminal commands directly'
workflow-MIGRATE.prompt.md: carried over from template SOT
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…l commands Synced from template SOT: - writer.agent.md: added execute tool; handles file ops + uv/pytest/ruff/mypy - copilot-instructions.md: explicit subagent routing table (writer for commands, reader read-only, github for git/gh) - BUILD.prompt.md: Step 1 is now Write & Verify; writer briefing includes commands to run; single subagent call covers implementation + verification Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…te SOT Bugs found during audit: - subagent-start.sh: additionalContext was truncated to 1 rule — restored all 5 (agent-initiated, read from disk, concise results, branch constraint, follow copilot-instructions.md) - tool-logger.sh: field order mismatch (session= was after out=) — aligned to template format: | session= | in= | out= - workflow-MIGRATE.prompt.md: stale copy missing template updates: explicit Azure/Terraform/Node.js removal steps in Step 6, and the hooks/logs/ path note in Rules Expected differences confirmed (no changes needed): - session-start.sh / pre-tool-safety.sh: intentionally tailored (Python+GitHub only) - workflow-context.instructions.md: project-specific (nbpull description, layout, prompts table) - BUILD.prompt.md: example commands use uv/mypy instead of terraform validate - skill-finder/SKILL.md: azure/terraform/mcp-builder entries removed (not used here) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Implements the Location-IP Extract Report feature (Phase 2 of the PRD) across 4 phases:
Phase 1 — Prefix Model Scope Fields
scope_type,scope_id,scopefields to thePrefixPydantic modelresolved_siteproperty: prefersscope(whenscope_type == "dcim.site") over legacysitefieldresolved_sitescenariosPhase 2 — CLI & Formatters Migration
prefix.site→prefix.resolved_site(6 locations in cli.py, 5 in formatters.py)Phase 3 — Expanded CSV Columns
location-reportCSV now emits 11 columns:ip_range,building,province_state,cityprefix,site,region,facility,tenant,description,statustest_location_report_csv_has_prd_columnsPhase 4 — Documentation
Verification
Closes no issue (PRD-driven feature work).