git-aware-coding-agent 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. git_aware_coding_agent-1.0.0/.agents/README.md +89 -0
  2. git_aware_coding_agent-1.0.0/.claude/CLAUDE.md +118 -0
  3. git_aware_coding_agent-1.0.0/.claude/agents/avos-researcher.md +96 -0
  4. git_aware_coding_agent-1.0.0/.claude/commands/avos-ask.md +40 -0
  5. git_aware_coding_agent-1.0.0/.claude/commands/avos-history.md +40 -0
  6. git_aware_coding_agent-1.0.0/.claude/commands/avos-ingest-pr.md +54 -0
  7. git_aware_coding_agent-1.0.0/.claude/instincts/avos-workflow.yaml +81 -0
  8. git_aware_coding_agent-1.0.0/.codex/instructions.md +66 -0
  9. git_aware_coding_agent-1.0.0/.cursor/plans/sprint_1_foundation_implementation_54dc2296.plan.md +328 -0
  10. git_aware_coding_agent-1.0.0/.cursor/rules/avos-agent-workflow.mdc +118 -0
  11. git_aware_coding_agent-1.0.0/.cursor/skills/avos-history/SKILL.md +132 -0
  12. git_aware_coding_agent-1.0.0/.cursor/skills/avos-ingest-pr/SKILL.md +108 -0
  13. git_aware_coding_agent-1.0.0/.cursor/skills/avos-search/SKILL.md +120 -0
  14. git_aware_coding_agent-1.0.0/.github/workflows/ci.yml +111 -0
  15. git_aware_coding_agent-1.0.0/.github/workflows/publish.yml +102 -0
  16. git_aware_coding_agent-1.0.0/.gitignore +48 -0
  17. git_aware_coding_agent-1.0.0/CHANGELOG.md +57 -0
  18. git_aware_coding_agent-1.0.0/CONTRIBUTING.md +101 -0
  19. git_aware_coding_agent-1.0.0/LICENSE +201 -0
  20. git_aware_coding_agent-1.0.0/Makefile +27 -0
  21. git_aware_coding_agent-1.0.0/PKG-INFO +390 -0
  22. git_aware_coding_agent-1.0.0/README.md +347 -0
  23. git_aware_coding_agent-1.0.0/SECURITY.md +29 -0
  24. git_aware_coding_agent-1.0.0/avos_cli/__init__.py +3 -0
  25. git_aware_coding_agent-1.0.0/avos_cli/agents/avos_ask_agent.md +47 -0
  26. git_aware_coding_agent-1.0.0/avos_cli/agents/avos_ask_agent_JSON_converter.md +78 -0
  27. git_aware_coding_agent-1.0.0/avos_cli/agents/avos_hisotry_agent_JSON_converter.md +92 -0
  28. git_aware_coding_agent-1.0.0/avos_cli/agents/avos_history_agent.md +58 -0
  29. git_aware_coding_agent-1.0.0/avos_cli/agents/git_diff_agent.md +63 -0
  30. git_aware_coding_agent-1.0.0/avos_cli/artifacts/__init__.py +17 -0
  31. git_aware_coding_agent-1.0.0/avos_cli/artifacts/base.py +47 -0
  32. git_aware_coding_agent-1.0.0/avos_cli/artifacts/commit_builder.py +35 -0
  33. git_aware_coding_agent-1.0.0/avos_cli/artifacts/doc_builder.py +30 -0
  34. git_aware_coding_agent-1.0.0/avos_cli/artifacts/issue_builder.py +37 -0
  35. git_aware_coding_agent-1.0.0/avos_cli/artifacts/pr_builder.py +50 -0
  36. git_aware_coding_agent-1.0.0/avos_cli/cli/__init__.py +1 -0
  37. git_aware_coding_agent-1.0.0/avos_cli/cli/main.py +504 -0
  38. git_aware_coding_agent-1.0.0/avos_cli/commands/__init__.py +1 -0
  39. git_aware_coding_agent-1.0.0/avos_cli/commands/ask.py +541 -0
  40. git_aware_coding_agent-1.0.0/avos_cli/commands/connect.py +363 -0
  41. git_aware_coding_agent-1.0.0/avos_cli/commands/history.py +549 -0
  42. git_aware_coding_agent-1.0.0/avos_cli/commands/hook_install.py +260 -0
  43. git_aware_coding_agent-1.0.0/avos_cli/commands/hook_sync.py +231 -0
  44. git_aware_coding_agent-1.0.0/avos_cli/commands/ingest.py +506 -0
  45. git_aware_coding_agent-1.0.0/avos_cli/commands/ingest_pr.py +239 -0
  46. git_aware_coding_agent-1.0.0/avos_cli/config/__init__.py +1 -0
  47. git_aware_coding_agent-1.0.0/avos_cli/config/hash_store.py +93 -0
  48. git_aware_coding_agent-1.0.0/avos_cli/config/lock.py +122 -0
  49. git_aware_coding_agent-1.0.0/avos_cli/config/manager.py +180 -0
  50. git_aware_coding_agent-1.0.0/avos_cli/config/state.py +90 -0
  51. git_aware_coding_agent-1.0.0/avos_cli/exceptions.py +272 -0
  52. git_aware_coding_agent-1.0.0/avos_cli/models/__init__.py +58 -0
  53. git_aware_coding_agent-1.0.0/avos_cli/models/api.py +75 -0
  54. git_aware_coding_agent-1.0.0/avos_cli/models/artifacts.py +99 -0
  55. git_aware_coding_agent-1.0.0/avos_cli/models/config.py +56 -0
  56. git_aware_coding_agent-1.0.0/avos_cli/models/diff.py +117 -0
  57. git_aware_coding_agent-1.0.0/avos_cli/models/query.py +234 -0
  58. git_aware_coding_agent-1.0.0/avos_cli/parsers/__init__.py +21 -0
  59. git_aware_coding_agent-1.0.0/avos_cli/parsers/artifact_ref_extractor.py +173 -0
  60. git_aware_coding_agent-1.0.0/avos_cli/parsers/reference_parser.py +117 -0
  61. git_aware_coding_agent-1.0.0/avos_cli/services/__init__.py +1 -0
  62. git_aware_coding_agent-1.0.0/avos_cli/services/chronology_service.py +68 -0
  63. git_aware_coding_agent-1.0.0/avos_cli/services/citation_validator.py +134 -0
  64. git_aware_coding_agent-1.0.0/avos_cli/services/context_budget_service.py +104 -0
  65. git_aware_coding_agent-1.0.0/avos_cli/services/diff_resolver.py +398 -0
  66. git_aware_coding_agent-1.0.0/avos_cli/services/diff_summary_service.py +141 -0
  67. git_aware_coding_agent-1.0.0/avos_cli/services/git_client.py +351 -0
  68. git_aware_coding_agent-1.0.0/avos_cli/services/github_client.py +443 -0
  69. git_aware_coding_agent-1.0.0/avos_cli/services/llm_client.py +312 -0
  70. git_aware_coding_agent-1.0.0/avos_cli/services/memory_client.py +323 -0
  71. git_aware_coding_agent-1.0.0/avos_cli/services/query_fallback_formatter.py +108 -0
  72. git_aware_coding_agent-1.0.0/avos_cli/services/reply_output_service.py +341 -0
  73. git_aware_coding_agent-1.0.0/avos_cli/services/sanitization_service.py +218 -0
  74. git_aware_coding_agent-1.0.0/avos_cli/utils/__init__.py +1 -0
  75. git_aware_coding_agent-1.0.0/avos_cli/utils/dotenv_load.py +50 -0
  76. git_aware_coding_agent-1.0.0/avos_cli/utils/hashing.py +22 -0
  77. git_aware_coding_agent-1.0.0/avos_cli/utils/logger.py +77 -0
  78. git_aware_coding_agent-1.0.0/avos_cli/utils/output.py +232 -0
  79. git_aware_coding_agent-1.0.0/avos_cli/utils/sanitization_diagnostics.py +81 -0
  80. git_aware_coding_agent-1.0.0/avos_cli/utils/time_helpers.py +56 -0
  81. git_aware_coding_agent-1.0.0/coverage.xml +3407 -0
  82. git_aware_coding_agent-1.0.0/docs/dev/README.md +88 -0
  83. git_aware_coding_agent-1.0.0/docs/user/README.md +127 -0
  84. git_aware_coding_agent-1.0.0/docs/user/commands/ask.md +93 -0
  85. git_aware_coding_agent-1.0.0/docs/user/commands/connect.md +30 -0
  86. git_aware_coding_agent-1.0.0/docs/user/commands/history.md +78 -0
  87. git_aware_coding_agent-1.0.0/docs/user/commands/hook-install.md +68 -0
  88. git_aware_coding_agent-1.0.0/docs/user/commands/ingest-pr.md +120 -0
  89. git_aware_coding_agent-1.0.0/docs/user/commands/ingest.md +30 -0
  90. git_aware_coding_agent-1.0.0/docs/user/troubleshooting.md +108 -0
  91. git_aware_coding_agent-1.0.0/pyproject.toml +153 -0
  92. git_aware_coding_agent-1.0.0/tests/__init__.py +0 -0
  93. git_aware_coding_agent-1.0.0/tests/artifacts/__init__.py +1 -0
  94. git_aware_coding_agent-1.0.0/tests/cli/__init__.py +1 -0
  95. git_aware_coding_agent-1.0.0/tests/cli/test_cli_commands.py +429 -0
  96. git_aware_coding_agent-1.0.0/tests/commands/__init__.py +1 -0
  97. git_aware_coding_agent-1.0.0/tests/config/__init__.py +1 -0
  98. git_aware_coding_agent-1.0.0/tests/contract/__init__.py +1 -0
  99. git_aware_coding_agent-1.0.0/tests/contract/test_contract_add_memory.py +120 -0
  100. git_aware_coding_agent-1.0.0/tests/contract/test_contract_delete_note.py +75 -0
  101. git_aware_coding_agent-1.0.0/tests/contract/test_contract_search.py +103 -0
  102. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/add_memory_success.json +5 -0
  103. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/error_401.json +4 -0
  104. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/error_403.json +4 -0
  105. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/error_422.json +4 -0
  106. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/error_429.json +4 -0
  107. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/error_503.json +3 -0
  108. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/search_empty.json +4 -0
  109. git_aware_coding_agent-1.0.0/tests/fixtures/contracts/search_success.json +11 -0
  110. git_aware_coding_agent-1.0.0/tests/fixtures/github_issues.json +22 -0
  111. git_aware_coding_agent-1.0.0/tests/fixtures/github_prs.json +32 -0
  112. git_aware_coding_agent-1.0.0/tests/golden/json_envelope_success.golden +1 -0
  113. git_aware_coding_agent-1.0.0/tests/integration/__init__.py +0 -0
  114. git_aware_coding_agent-1.0.0/tests/integration/test_connect_ingest_e2e.py +327 -0
  115. git_aware_coding_agent-1.0.0/tests/integration/test_diff_pipeline.py +467 -0
  116. git_aware_coding_agent-1.0.0/tests/integration/test_hook_workflows.py +400 -0
  117. git_aware_coding_agent-1.0.0/tests/integration/test_install_smoke.py +58 -0
  118. git_aware_coding_agent-1.0.0/tests/integration/test_query_error_matrix.py +114 -0
  119. git_aware_coding_agent-1.0.0/tests/integration/test_query_workflows.py +225 -0
  120. git_aware_coding_agent-1.0.0/tests/models/__init__.py +1 -0
  121. git_aware_coding_agent-1.0.0/tests/parsers/__init__.py +1 -0
  122. git_aware_coding_agent-1.0.0/tests/services/__init__.py +1 -0
  123. git_aware_coding_agent-1.0.0/tests/unit/__init__.py +0 -0
  124. git_aware_coding_agent-1.0.0/tests/unit/commands/__init__.py +0 -0
  125. git_aware_coding_agent-1.0.0/tests/unit/commands/test_ask.py +573 -0
  126. git_aware_coding_agent-1.0.0/tests/unit/commands/test_connect.py +464 -0
  127. git_aware_coding_agent-1.0.0/tests/unit/commands/test_history.py +517 -0
  128. git_aware_coding_agent-1.0.0/tests/unit/commands/test_hook_install.py +421 -0
  129. git_aware_coding_agent-1.0.0/tests/unit/commands/test_hook_sync.py +354 -0
  130. git_aware_coding_agent-1.0.0/tests/unit/commands/test_ingest.py +442 -0
  131. git_aware_coding_agent-1.0.0/tests/unit/commands/test_ingest_pr.py +304 -0
  132. git_aware_coding_agent-1.0.0/tests/unit/commands/test_query_reply_renderers.py +164 -0
  133. git_aware_coding_agent-1.0.0/tests/unit/config/__init__.py +0 -0
  134. git_aware_coding_agent-1.0.0/tests/unit/config/test_hash_store.py +159 -0
  135. git_aware_coding_agent-1.0.0/tests/unit/config/test_lock.py +157 -0
  136. git_aware_coding_agent-1.0.0/tests/unit/models/__init__.py +0 -0
  137. git_aware_coding_agent-1.0.0/tests/unit/models/test_diff_models.py +282 -0
  138. git_aware_coding_agent-1.0.0/tests/unit/parsers/__init__.py +0 -0
  139. git_aware_coding_agent-1.0.0/tests/unit/parsers/test_artifact_ref_extractor.py +479 -0
  140. git_aware_coding_agent-1.0.0/tests/unit/parsers/test_reference_parser.py +272 -0
  141. git_aware_coding_agent-1.0.0/tests/unit/services/__init__.py +0 -0
  142. git_aware_coding_agent-1.0.0/tests/unit/services/test_diff_resolver.py +496 -0
  143. git_aware_coding_agent-1.0.0/tests/unit/services/test_diff_summary_service.py +306 -0
  144. git_aware_coding_agent-1.0.0/tests/unit/services/test_reply_output_service.py +180 -0
  145. git_aware_coding_agent-1.0.0/tests/unit/test_artifact_builders.py +232 -0
  146. git_aware_coding_agent-1.0.0/tests/unit/test_benchmark_placeholder.py +18 -0
  147. git_aware_coding_agent-1.0.0/tests/unit/test_chronology_service.py +195 -0
  148. git_aware_coding_agent-1.0.0/tests/unit/test_ci_config.py +162 -0
  149. git_aware_coding_agent-1.0.0/tests/unit/test_citation_validator.py +215 -0
  150. git_aware_coding_agent-1.0.0/tests/unit/test_config.py +278 -0
  151. git_aware_coding_agent-1.0.0/tests/unit/test_context_budget_service.py +214 -0
  152. git_aware_coding_agent-1.0.0/tests/unit/test_fallback_formatter.py +159 -0
  153. git_aware_coding_agent-1.0.0/tests/unit/test_git_client.py +271 -0
  154. git_aware_coding_agent-1.0.0/tests/unit/test_github_client.py +561 -0
  155. git_aware_coding_agent-1.0.0/tests/unit/test_llm_client.py +286 -0
  156. git_aware_coding_agent-1.0.0/tests/unit/test_memory_client.py +253 -0
  157. git_aware_coding_agent-1.0.0/tests/unit/test_models.py +335 -0
  158. git_aware_coding_agent-1.0.0/tests/unit/test_output.py +196 -0
  159. git_aware_coding_agent-1.0.0/tests/unit/test_query_exceptions.py +155 -0
  160. git_aware_coding_agent-1.0.0/tests/unit/test_query_models.py +485 -0
  161. git_aware_coding_agent-1.0.0/tests/unit/test_query_sanitization.py +304 -0
  162. git_aware_coding_agent-1.0.0/tests/unit/test_sanitization_diagnostics.py +34 -0
  163. git_aware_coding_agent-1.0.0/tests/unit/test_scaffolding.py +279 -0
  164. git_aware_coding_agent-1.0.0/tests/unit/test_utils.py +158 -0
  165. git_aware_coding_agent-1.0.0/tests/utils/__init__.py +1 -0
@@ -0,0 +1,89 @@
1
+ # Agent Integration Guide
2
+
3
+ This repository supports multiple AI coding agent platforms. Each platform has its own integration directory.
4
+
5
+ ## Platform-Specific Integrations
6
+
7
+ | Platform | Directory | Status |
8
+ |----------|-----------|--------|
9
+ | Cursor IDE | `.cursor/` | Implemented |
10
+ | Claude Code | `.claude/` | Implemented |
11
+ | OpenAI Codex | `.codex/` | Community stub |
12
+
13
+ ## Integration Structure
14
+
15
+ Each platform integration follows a similar pattern:
16
+
17
+ ```
18
+ .platform/
19
+ ├── README.md or PLATFORM.md # Main instructions
20
+ ├── commands/ # Command wrappers
21
+ ├── agents/ # Sub-agents
22
+ ├── skills/ # Skills (Cursor)
23
+ ├── rules/ # Rules (Cursor)
24
+ └── instincts/ # Instincts (Claude)
25
+ ```
26
+
27
+ ## Adding a New Platform
28
+
29
+ To add support for a new AI coding agent platform:
30
+
31
+ 1. Create a directory: `.platform-name/`
32
+ 2. Add main instructions file
33
+ 3. Create command wrappers for avos commands
34
+ 4. Add any platform-specific agents or skills
35
+ 5. Submit a PR with your integration
36
+
37
+ ## Available Avos Commands
38
+
39
+ All platforms should integrate these commands:
40
+
41
+ | Command | Purpose |
42
+ |---------|---------|
43
+ | `avos ask --json "question"` | Search memory for answers |
44
+ | `avos history --json "subject"` | Get chronological history |
45
+ | `avos ingest-pr --json org/repo N` | Ingest a single PR |
46
+
47
+ ## Workflow Guidelines
48
+
49
+ All platform integrations should follow these workflow guidelines:
50
+
51
+ 1. **Research Before Edit**: Check history and ask questions before modifying code
52
+ 2. **Ingest After PR**: Ingest PRs after pushing to remote
53
+ 3. **JSON Output**: Use `--json` for machine-readable output
54
+
55
+ ## JSON Output Format
56
+
57
+ All commands with `--json` return:
58
+
59
+ ```json
60
+ {
61
+ "success": true,
62
+ "data": { ... },
63
+ "error": null
64
+ }
65
+ ```
66
+
67
+ On error:
68
+
69
+ ```json
70
+ {
71
+ "success": false,
72
+ "data": null,
73
+ "error": {
74
+ "code": "ERROR_CODE",
75
+ "message": "Human-readable message",
76
+ "hint": "How to fix it",
77
+ "retryable": true
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## Contributing
83
+
84
+ Community contributions are welcome! Please:
85
+
86
+ 1. Follow the existing patterns in `.cursor/` and `.claude/`
87
+ 2. Include comprehensive documentation
88
+ 3. Test with the target platform
89
+ 4. Submit a PR with your integration
@@ -0,0 +1,118 @@
1
+ # Avos Dev CLI - Claude Code Integration
2
+
3
+ This repository uses **avos-dev-cli** for codebase memory. Follow these instructions when working on this codebase.
4
+
5
+ ## Project Overview
6
+
7
+ avos-dev-cli is a developer memory CLI that:
8
+
9
+ - Stores repository history (PRs, issues, commits, docs) in Avos Memory
10
+ - Enables semantic search over codebase context
11
+ - Provides chronological history of any subject
12
+
13
+ ## Required Environment Variables
14
+
15
+ Ensure these are set before using avos commands:
16
+
17
+ ```bash
18
+ export AVOS_API_KEY="your-avos-api-key"
19
+ export GITHUB_TOKEN="your-github-token"
20
+ export ANTHROPIC_API_KEY="your-anthropic-key"
21
+
22
+ # For JSON output formatting (optional but recommended)
23
+ export REPLY_MODEL="your-model-id"
24
+ export REPLY_MODEL_URL="https://api.example.com/v1/chat/completions"
25
+ export REPLY_MODEL_API_KEY="your-reply-model-key"
26
+ ```
27
+
28
+ ## Workflow
29
+
30
+ ### Before Modifying Code
31
+
32
+ Use these commands to understand the codebase:
33
+
34
+ - **Search memory**: `avos ask --json "your question"`
35
+ - **Get history**: `avos history --json "subject"`
36
+
37
+ ### After Pushing PRs
38
+
39
+ After pushing a PR to the remote:
40
+
41
+ ```bash
42
+ avos ingest-pr --json org/repo PR_NUMBER
43
+ ```
44
+
45
+ ## Best Practices
46
+
47
+ ### Check History for Medium/High-Risk Edits
48
+
49
+ Run these before medium/high-risk edits (existing production behavior, shared modules, refactors, multi-file changes):
50
+
51
+ ```bash
52
+ avos history --json "module or feature name"
53
+ avos ask --json "why was this implemented this way?"
54
+ ```
55
+
56
+ This helps you understand:
57
+
58
+ - Why the code was written this way
59
+ - Who made previous changes and why
60
+ - Related PRs, issues, and commits
61
+
62
+ You may skip for low-risk edits (docs/comments/typos, isolated new files, or test-only changes that do not affect runtime behavior).
63
+
64
+ ### Search Before Writing New Code
65
+
66
+ Before implementing new features:
67
+
68
+ ```bash
69
+ avos ask --json "is there existing implementation for X?"
70
+ avos ask --json "how do other parts of the codebase handle Y?"
71
+ ```
72
+
73
+ ## Available Commands
74
+
75
+ | Command | Purpose |
76
+ | ---------------------------------- | ------------------------- |
77
+ | `avos ask --json "question"` | Search memory for answers |
78
+ | `avos history --json "subject"` | Get chronological history |
79
+ | `avos ingest-pr --json org/repo N` | Ingest a single PR |
80
+
81
+ ## JSON Output Format
82
+
83
+ All commands with `--json` return:
84
+
85
+ ```json
86
+ {
87
+ "success": true,
88
+ "data": { ... },
89
+ "error": null
90
+ }
91
+ ```
92
+
93
+ On error:
94
+
95
+ ```json
96
+ {
97
+ "success": false,
98
+ "data": null,
99
+ "error": {
100
+ "code": "ERROR_CODE",
101
+ "message": "Human-readable message",
102
+ "hint": "How to fix it",
103
+ "retryable": true
104
+ }
105
+ }
106
+ ```
107
+
108
+ ## Slash Commands
109
+
110
+ Use these slash commands for quick access:
111
+
112
+ - `/avos-ask` - Search repository memory
113
+ - `/avos-history` - Get chronological history
114
+ - `/avos-ingest-pr` - Ingest a PR after pushing
115
+
116
+ ## Sub-Agents
117
+
118
+ - **avos-researcher** - Automatically searches memory and history before code changes
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: avos-researcher
3
+ description: Research repository context before code changes using avos memory
4
+ tools: Bash, Read
5
+ ---
6
+
7
+ # Avos Researcher Agent
8
+
9
+ You are a research agent that gathers context from repository memory before code changes are made.
10
+
11
+ ## Purpose
12
+
13
+ Before medium/high-risk code modifications, you search repository memory to understand:
14
+ - Why the code was written this way
15
+ - Who made previous changes and why
16
+ - Related PRs, issues, and commits
17
+ - Existing patterns and implementations
18
+
19
+ Trigger this agent when at least one applies:
20
+ - Editing existing production behavior
21
+ - Touching shared or unfamiliar modules
22
+ - Making broad/multi-file refactors or behavior changes
23
+
24
+ Skip for low-risk docs/comment/test-only edits.
25
+
26
+ ## Workflow
27
+
28
+ ### 1. Identify the Subject
29
+
30
+ When asked to research before modifying code, identify:
31
+ - The module or feature being modified
32
+ - The specific functionality being changed
33
+ - Related concepts or dependencies
34
+
35
+ ### 2. Search Memory
36
+
37
+ Run these commands to gather context:
38
+
39
+ ```bash
40
+ # Get chronological history
41
+ avos history --json "subject"
42
+
43
+ # Ask specific questions
44
+ avos ask --json "why was this implemented this way?"
45
+ avos ask --json "are there related implementations?"
46
+ ```
47
+
48
+ ### 3. Parse Results
49
+
50
+ Parse the JSON responses and extract:
51
+ - Timeline of changes
52
+ - Key decisions and their rationale
53
+ - Related PRs and issues
54
+ - Authors who worked on this area
55
+
56
+ ### 4. Report Findings
57
+
58
+ Summarize your findings:
59
+ - **History**: What changes were made and when
60
+ - **Rationale**: Why decisions were made
61
+ - **Related**: Connected code and dependencies
62
+ - **Recommendations**: What to consider before making changes
63
+
64
+ ## Example Research
65
+
66
+ For a request to modify the authentication module:
67
+
68
+ ```bash
69
+ avos history --json "authentication"
70
+ avos ask --json "why does authentication use JWT instead of sessions?"
71
+ avos ask --json "what security considerations were made for auth?"
72
+ ```
73
+
74
+ ## Output Format
75
+
76
+ Provide a structured summary:
77
+
78
+ ```
79
+ ## Research Summary: [Subject]
80
+
81
+ ### Timeline
82
+ - [Date]: [Event] by [Author]
83
+ - ...
84
+
85
+ ### Key Decisions
86
+ - [Decision]: [Rationale]
87
+ - ...
88
+
89
+ ### Related Code
90
+ - [File/Module]: [Relationship]
91
+ - ...
92
+
93
+ ### Recommendations
94
+ - [Consideration before making changes]
95
+ - ...
96
+ ```
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: Search repository memory for engineering context
3
+ allowed-tools: Bash
4
+ argument-hint: your question about the codebase
5
+ ---
6
+
7
+ # Avos Ask
8
+
9
+ Search the repository memory for answers to your question.
10
+
11
+ ## Usage
12
+
13
+ Run this command and parse the JSON output:
14
+
15
+ ```bash
16
+ avos ask --json "$ARGUMENTS"
17
+ ```
18
+
19
+ ## Response Handling
20
+
21
+ Parse the JSON response:
22
+
23
+ ```json
24
+ {
25
+ "success": true,
26
+ "data": {
27
+ "format": "avos.ask.v1",
28
+ "answer": { "text": "..." },
29
+ "evidence": { "items": [...] }
30
+ }
31
+ }
32
+ ```
33
+
34
+ If `success` is false, check `error.code` and `error.hint` for guidance.
35
+
36
+ ## Examples
37
+
38
+ - "why does authentication use JWT?"
39
+ - "how do other endpoints handle pagination?"
40
+ - "is there existing error handling middleware?"
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: Get chronological history of a subject in the repository
3
+ allowed-tools: Bash
4
+ argument-hint: subject or topic for timeline
5
+ ---
6
+
7
+ # Avos History
8
+
9
+ Get the chronological history of a subject in the repository.
10
+
11
+ ## Usage
12
+
13
+ Run this command and parse the JSON output:
14
+
15
+ ```bash
16
+ avos history --json "$ARGUMENTS"
17
+ ```
18
+
19
+ ## Response Handling
20
+
21
+ Parse the JSON response:
22
+
23
+ ```json
24
+ {
25
+ "success": true,
26
+ "data": {
27
+ "format": "avos.history.v1",
28
+ "timeline": { "months": [...] },
29
+ "summary": { "text": "..." }
30
+ }
31
+ }
32
+ ```
33
+
34
+ If `success` is false, check `error.code` and `error.hint` for guidance.
35
+
36
+ ## Examples
37
+
38
+ - "authentication module"
39
+ - "user registration flow"
40
+ - "database connection handling"
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: Ingest a single PR into repository memory
3
+ allowed-tools: Bash
4
+ argument-hint: org/repo PR_NUMBER
5
+ ---
6
+
7
+ # Avos Ingest PR
8
+
9
+ Ingest a single PR into repository memory after pushing.
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ avos ingest-pr --json $ARGUMENTS
15
+ ```
16
+
17
+ ## Response Handling
18
+
19
+ Parse the JSON response:
20
+
21
+ **Stored:**
22
+ ```json
23
+ {
24
+ "success": true,
25
+ "data": {
26
+ "pr_number": 123,
27
+ "action": "stored",
28
+ "note_id": "note-abc-123"
29
+ }
30
+ }
31
+ ```
32
+
33
+ **Skipped (already ingested):**
34
+ ```json
35
+ {
36
+ "success": true,
37
+ "data": {
38
+ "pr_number": 123,
39
+ "action": "skipped",
40
+ "reason": "already_ingested"
41
+ }
42
+ }
43
+ ```
44
+
45
+ ## When to Use
46
+
47
+ - After pushing a PR to the remote repository
48
+ - After a PR is merged
49
+ - To ensure PR context is available for future queries
50
+
51
+ ## Examples
52
+
53
+ - `myorg/myrepo 123`
54
+ - `company/project 456`
@@ -0,0 +1,81 @@
1
+ # Curated instincts for avos-dev-cli workflow
2
+ # Import with: /instinct-import .claude/instincts/avos-workflow.yaml
3
+
4
+ ---
5
+ id: avos-check-history-before-edit
6
+ trigger: "when modifying existing production code, shared modules, or making medium/large edits in a repository with avos"
7
+ confidence: 0.9
8
+ domain: workflow
9
+ source: repo-curation
10
+ source_repo: avos-dev-cli
11
+ ---
12
+ # Check History Before Editing
13
+
14
+ ## Action
15
+ Before medium/high-risk edits, run `avos history --json "subject"` and `avos ask --json "why was this implemented?"` to understand context and rationale.
16
+
17
+ Do this when:
18
+ - editing existing production behavior
19
+ - touching unfamiliar or shared modules
20
+ - making broad or multi-file changes
21
+
22
+ Skip for low-risk docs/comment/test-only edits.
23
+
24
+ ## Evidence
25
+ - Understanding history prevents breaking changes
26
+ - Previous decisions often have important context
27
+ - Related PRs and issues provide valuable information
28
+
29
+ ---
30
+ id: avos-ingest-after-pr
31
+ trigger: "after pushing a PR to a repository with avos"
32
+ confidence: 0.8
33
+ domain: workflow
34
+ source: repo-curation
35
+ source_repo: avos-dev-cli
36
+ ---
37
+ # Ingest PR After Push
38
+
39
+ ## Action
40
+ After pushing a PR to the remote repository, run `avos ingest-pr --json org/repo PR_NUMBER` to ensure the PR context is available for future queries.
41
+
42
+ ## Evidence
43
+ - PR context helps future developers understand changes
44
+ - Ingested PRs are searchable via `avos ask` and `avos history`
45
+ - Deduplication prevents duplicate entries
46
+
47
+ ---
48
+ id: avos-search-before-implementing
49
+ trigger: "when implementing substantial new functionality in a repository with avos"
50
+ confidence: 0.85
51
+ domain: workflow
52
+ source: repo-curation
53
+ source_repo: avos-dev-cli
54
+ ---
55
+ # Search Before Implementing
56
+
57
+ ## Action
58
+ Before substantial implementation work, run `avos ask --json "is there existing implementation for X?"` to check for prior patterns and avoid duplication.
59
+
60
+ ## Evidence
61
+ - Prevents code duplication
62
+ - Maintains consistency with existing patterns
63
+ - Leverages existing tested implementations
64
+
65
+ ---
66
+ id: avos-json-output-for-agents
67
+ trigger: "when using avos commands programmatically"
68
+ confidence: 0.9
69
+ domain: workflow
70
+ source: repo-curation
71
+ source_repo: avos-dev-cli
72
+ ---
73
+ # Use JSON Output for Programmatic Access
74
+
75
+ ## Action
76
+ Always use the `--json` flag when calling avos commands programmatically. Parse the JSON response and check `success` before using `data`.
77
+
78
+ ## Evidence
79
+ - JSON output is machine-readable
80
+ - Error codes and hints help with error handling
81
+ - Consistent format across all commands
@@ -0,0 +1,66 @@
1
+ # Codex Integration (Community)
2
+
3
+ This directory is reserved for OpenAI Codex CLI integration.
4
+
5
+ ## Reference Implementations
6
+
7
+ See these directories for reference implementations:
8
+
9
+ - `.cursor/` - Cursor IDE integration (skills + rules)
10
+ - `.claude/` - Claude Code integration (commands + agents + instincts)
11
+
12
+ ## Contributing
13
+
14
+ Community contributions for Codex integration are welcome. Follow the patterns established in `.cursor/` and `.claude/`:
15
+
16
+ 1. **Instructions file**: Main configuration and workflow guidance
17
+ 2. **Commands**: Individual command wrappers
18
+ 3. **Agents**: Specialized sub-agents for specific tasks
19
+
20
+ ## Avos Commands
21
+
22
+ The following avos commands are available for integration:
23
+
24
+ | Command | Purpose |
25
+ |---------|---------|
26
+ | `avos ask --json "question"` | Search memory for answers |
27
+ | `avos history --json "subject"` | Get chronological history |
28
+ | `avos ingest-pr --json org/repo N` | Ingest a single PR |
29
+
30
+ ## JSON Output Format
31
+
32
+ All commands with `--json` return:
33
+
34
+ ```json
35
+ {
36
+ "success": true,
37
+ "data": { ... },
38
+ "error": null
39
+ }
40
+ ```
41
+
42
+ On error:
43
+
44
+ ```json
45
+ {
46
+ "success": false,
47
+ "data": null,
48
+ "error": {
49
+ "code": "ERROR_CODE",
50
+ "message": "Human-readable message",
51
+ "hint": "How to fix it",
52
+ "retryable": true
53
+ }
54
+ }
55
+ ```
56
+
57
+ ## Required Environment Variables
58
+
59
+ - `AVOS_API_KEY` - Avos Memory API key
60
+ - `GITHUB_TOKEN` - GitHub personal access token
61
+ - `OPENAI_API_KEY` (default) or `ANTHROPIC_API_KEY` (when using Anthropic) - For LLM synthesis
62
+
63
+ For JSON output formatting:
64
+ - `REPLY_MODEL` - Model identifier
65
+ - `REPLY_MODEL_URL` - API endpoint
66
+ - `REPLY_MODEL_API_KEY` - API key