-
Notifications
You must be signed in to change notification settings - Fork 155
feat: dogfood APM on microsoft/apm -- .apm/ primitives, compile, --check gate #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
06c5d90
fix(compilation): route timing output through logger and use determin…
fc3dde9
fix(compilation): add path containment to link_resolver._resolve_path
6e195cf
feat(compile): emit .github/copilot-instructions.md from root-scoped …
277f9af
feat(compile): add --check flag for read-only drift verification
12d9aa4
chore: add root apm.yml and populate .apm/ with repo primitives
a932dce
chore: regenerate agent-tool outputs via apm compile
2eb6453
ci: add apm compile --check gate to Tier 1
dec6095
docs: document apm compile --check and .apm/ dogfood workflow
fd8bffc
docs(readme): add Dogfooding section
0bab40e
chore: gitignore CLAUDE.md outputs; commit only GitHub-consumed outputs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| description: "Repository-wide contributor guidelines for APM" | ||
| --- | ||
| - This project uses uv to manage Python environments and dependencies. | ||
| - Use `uv sync` to create the virtual environment and install all dependencies automatically. | ||
| - Use `uv run <command>` to run commands in the uv-managed environment. | ||
| - For development dependencies, use `uv sync --extra dev`. | ||
| - **Running tests**: Use pytest via `uv run`. Prefer targeted test runs during development: | ||
| - **Targeted (fastest, use during iteration):** `uv run pytest tests/unit/path/to/relevant_test.py -x` | ||
| - **Unit suite (default validation):** `uv run pytest tests/unit tests/test_console.py -x` (~2,400 tests, matches CI) | ||
| - **Full suite (only before final commit):** `uv run pytest` | ||
| - When modifying a specific module, run only its corresponding test file(s) first. Run the full unit suite once as final validation before considering your work done. | ||
| - **Test coverage principle**: When modifying existing code, add tests for the code paths you touch, on top of tests for the new functionality. | ||
| - **Development Workflow**: To run APM from source while working in other directories: | ||
| - Install in development mode: `cd /path/to/awd-cli && uv run pip install -e .` | ||
| - Use absolute path: `/Users/danielmeppiel/Repos/awd-cli/.venv/bin/apm compile --verbose --dry-run` | ||
| - Or create alias: `alias apm-dev='/Users/danielmeppiel/Repos/awd-cli/.venv/bin/apm'` | ||
| - Changes to source code are immediately reflected (no reinstall needed) | ||
| - The solution must meet the functionality as explained in the [README.md](README.md) file. | ||
| - The general high-level basis to the solution is depicted in [APPROACH.md](../../APPROACH.md). | ||
| - When developing functionality, we need to respect our own [CONTRIBUTING.md](../../CONTRIBUTING.md) file. | ||
| The architectural decisions and basis for the project in that document are only the inspiring foundation. It can and should always be challenged when needed and is not meant as the only truth, but a very useful context and grounding research. | ||
| - The project is meant for the Open Source community and should be open to contributions and follow the standards of the community. | ||
| - The project is meant to be used by developers and should be easy to use, with a focus on developer experience. | ||
| - The philosophy when architecting and implementing the project is to prime speed and simplicity over complexity. Do NOT over-engineer, but rather build a solid foundation that can be iterated on. | ||
| - APM is an active OSS project under the `microsoft` org with a growing community (250+ stars, external contributors). Breaking changes should be communicated clearly (CHANGELOG.md), but we still favor shipping fast over lengthy deprecation cycles. | ||
| - The goal is to deliver a solid and scalable architecture but simple starting implementation. Not building something complex from the start and then having to simplify it later. Remember we are delivering a new tool to the developer community and we will need to rapidly adapt to what's really useful, evolving standards, etc. | ||
| - **Cross-platform encoding rule**: All source code and CLI output must stay within printable ASCII (U+0020–U+007E). Do NOT use emojis, Unicode symbols, box-drawing characters, em dashes, or any character outside the ASCII range in source files or CLI output strings. Use bracket notation for status symbols: `[+]` success, `[!]` warning, `[x]` error, `[i]` info, `[*]` action, `[>]` running. This is required to prevent `charmap` codec errors on Windows cp1252 terminals. | ||
| - **Path safety rule**: Any code that builds filesystem paths from user input or external data (marketplace names, plugin paths, lockfile entries, bundle contents) **must** use the centralized guards in `src/apm_cli/utils/path_security.py`. Use `validate_path_segments(value, context=)` at parse time to reject traversal sequences (`.`, `..`) with cross-platform backslash normalization, and `ensure_path_within(path, base_dir)` after resolution to assert containment (resolves symlinks). Never write ad-hoc `".." in x` checks. | ||
| - **Expert review panel**: For any non-trivial change (cross-cutting refactor, new CLI surface, dependency/auth/lockfile work, release or positioning decision), invoke the [APM Review Panel skill](skills/apm-review-panel/SKILL.md). It orchestrates seven personas (Python Architect, CLI Logging Expert, DevX UX Expert, Supply Chain Security Expert, APM CEO, OSS Growth Hacker) with explicit routing: specialists raise findings, the CEO arbitrates disagreements and strategic calls, the Growth Hacker side-channels conversion / `WIP/growth-strategy.md` insights to the CEO. Individual per-persona skills (`devx-ux`, `supply-chain-security`, `apm-strategy`, `oss-growth`) auto-activate on relevant edits even outside the panel. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,8 @@ | ||
| .github/workflows/*.lock.yml linguist-generated=true merge=ours | ||
| .github/workflows/*.lock.yml linguist-generated=true merge=ours | ||
|
|
||
| # Generated by `apm compile` from .apm/ primitives. Do not edit directly. | ||
| # CLAUDE.md outputs are gitignored (see .gitignore) -- only the outputs that | ||
| # GitHub-hosted consumers read directly need the linguist marker. | ||
| AGENTS.md linguist-generated=true | ||
| **/AGENTS.md linguist-generated=true | ||
| .github/copilot-instructions.md linguist-generated=true |
18 changes: 13 additions & 5 deletions
18
.github/instructions/cicd.instructions.md → .github/AGENTS.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This contributor instruction includes repo- and machine-specific paths (
awd-cli,/Users/.../Repos/...) which won't apply to most contributors and will quickly drift. Suggest replacing with repo-agnostic commands (e.g.,uv run pip install -e .,./.venv/bin/apm ..., oruv run apm ...) and removing personal absolute paths.