Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# Codacy Rules
Configuration for AI behavior when interacting with Codacy's MCP Server

## CRITICAL: After ANY successful `edit_file` or `reapply` operation
- YOU MUST IMMEDIATELY run the `codacy_cli_analyze` tool from Codacy's MCP Server for each file that was edited, with:
- `rootPath`: set to the workspace path
- `file`: set to the path of the edited file
- `tool`: leave empty or unset
- If any issues are found in the new edits, propose and apply fixes for them.
- > NOTE: Failure to follow this rule is considered a critical error.

## After every response
- If you made any file edits in this conversation, verify you ran `codacy_cli_analyze` tool from Codacy's MCP Server

## When there are no Codacy MCP Server tools available, or the MCP Server is not reachable
- Suggest the user the following troubleshooting steps:
- Try to reset the MCP on the extension
- If the user is using VSCode, suggest them to review their Copilot > MCP settings in Github, under their organization or personal account. Refer them to Settings > Copilot > Enable MCP servers in Copilot. Suggested URL (https://github.com/settings/copilot/features) or https://github.com/organizations/{organization-name}/settings/copilot/features (This can only be done by their organization admins / owners)
- If none of the above steps work, suggest the user to contact Codacy support

## Trying to call a tool that needs a rootPath as a parameter
- Always use the standard, non-URL-encoded file system path

## CRITICAL: Dependencies and Security Checks
- IMMEDIATELY after ANY of these actions:
- Running npm/yarn/pnpm install
- Adding dependencies to package.json
- Adding requirements to requirements.txt
- Adding dependencies to pom.xml
- Adding dependencies to build.gradle
- Any other package manager operations
- You MUST run the `codacy_cli_analyze` tool with:
- `rootPath`: set to the workspace path
- `tool`: set to "trivy"
- `file`: leave empty or unset
- If any vulnerabilities are found because of the newly added packages:
- Stop all other operations
- Propose and apply fixes for the security issues
- Only continue with the original task after security issues are resolved
- EXAMPLE:
- After: npm install react-markdown
- Do: Run codacy_cli_analyze with trivy
- Before: Continuing with any other tasks

## General
- Repeat the relevant steps for each modified file.
- "Propose fixes" means to both suggest and, if possible, automatically apply the fixes.
- You MUST NOT wait for the user to ask for analysis or remind you to run the tool.
- Do not run `codacy_cli_analyze` looking for changes in duplicated code or code complexity metrics.
- Do not run `codacy_cli_analyze` looking for changes in code coverage.
- Do not try to manually install Codacy CLI using either brew, npm, npx, or any other package manager.
- If the Codacy CLI is not installed, just run the `codacy_cli_analyze` tool from Codacy's MCP Server.
- When calling `codacy_cli_analyze`, only send provider, organization and repository if the project is a git repository.

## Whenever a call to a Codacy tool that uses `repository` or `organization` as a parameter returns a 404 error
- Offer to run the `codacy_setup_repository` tool to add the repository to Codacy
- If the user accepts, run the `codacy_setup_repository` tool
- Do not ever try to run the `codacy_setup_repository` tool on your own
- After setup, immediately retry the action that failed (only retry once)
---
65 changes: 65 additions & 0 deletions .github/instructions/codacy.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
description: Configuration for AI behavior when interacting with Codacy's MCP Server
applyTo: '**'
---
---
# Codacy Rules
Configuration for AI behavior when interacting with Codacy's MCP Server

## CRITICAL: After ANY successful `edit_file` or `reapply` operation
- YOU MUST IMMEDIATELY run the `codacy_cli_analyze` tool from Codacy's MCP Server for each file that was edited, with:
- `rootPath`: set to the workspace path

Check notice on line 11 in .github/instructions/codacy.instructions.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/instructions/codacy.instructions.md#L11

Expected: 0; Actual: 1
- `file`: set to the path of the edited file
- `tool`: leave empty or unset

Check notice on line 13 in .github/instructions/codacy.instructions.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/instructions/codacy.instructions.md#L13

Expected: 0; Actual: 1
- If any issues are found in the new edits, propose and apply fixes for them.
- > NOTE: Failure to follow this rule is considered a critical error.

## After every response
- If you made any file edits in this conversation, verify you ran `codacy_cli_analyze` tool from Codacy's MCP Server

## When there are no Codacy MCP Server tools available, or the MCP Server is not reachable
- Suggest the user the following troubleshooting steps:
- Try to reset the MCP on the extension
- If the user is using VSCode, suggest them to review their Copilot > MCP settings in Github, under their organization or personal account. Refer them to Settings > Copilot > Enable MCP servers in Copilot. Suggested URL (https://github.com/settings/copilot/features) or https://github.com/organizations/{organization-name}/settings/copilot/features (This can only be done by their organization admins / owners)
- If none of the above steps work, suggest the user to contact Codacy support

## Trying to call a tool that needs a rootPath as a parameter
- Always use the standard, non-URL-encoded file system path

## CRITICAL: Dependencies and Security Checks
- IMMEDIATELY after ANY of these actions:
- Running npm/yarn/pnpm install

Check notice on line 31 in .github/instructions/codacy.instructions.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/instructions/codacy.instructions.md#L31

Expected: 0; Actual: 1
- Adding dependencies to package.json
- Adding requirements to requirements.txt

Check notice on line 33 in .github/instructions/codacy.instructions.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/instructions/codacy.instructions.md#L33

Expected: 0; Actual: 1
- Adding dependencies to pom.xml
- Adding dependencies to build.gradle
- Any other package manager operations
- You MUST run the `codacy_cli_analyze` tool with:
- `rootPath`: set to the workspace path
- `tool`: set to "trivy"
- `file`: leave empty or unset
- If any vulnerabilities are found because of the newly added packages:
- Stop all other operations
- Propose and apply fixes for the security issues

Check notice on line 43 in .github/instructions/codacy.instructions.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/instructions/codacy.instructions.md#L43

Expected: 0; Actual: 1
- Only continue with the original task after security issues are resolved
- EXAMPLE:
- After: npm install react-markdown
- Do: Run codacy_cli_analyze with trivy
- Before: Continuing with any other tasks

## General
- Repeat the relevant steps for each modified file.
- "Propose fixes" means to both suggest and, if possible, automatically apply the fixes.
- You MUST NOT wait for the user to ask for analysis or remind you to run the tool.
- Do not run `codacy_cli_analyze` looking for changes in duplicated code or code complexity metrics.
- Do not run `codacy_cli_analyze` looking for changes in code coverage.
- Do not try to manually install Codacy CLI using either brew, npm, npx, or any other package manager.
- If the Codacy CLI is not installed, just run the `codacy_cli_analyze` tool from Codacy's MCP Server.
- When calling `codacy_cli_analyze`, only send provider, organization and repository if the project is a git repository.

## Whenever a call to a Codacy tool that uses `repository` or `organization` as a parameter returns a 404 error
- Offer to run the `codacy_setup_repository` tool to add the repository to Codacy
- If the user accepts, run the `codacy_setup_repository` tool
- Do not ever try to run the `codacy_setup_repository` tool on your own
- After setup, immediately retry the action that failed (only retry once)
---
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ Cargo.lock
/.vs
.git-credentials
.gitconfig


#Ignore vscode AI rules
.github\instructions\codacy.instructions.md
82 changes: 43 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,55 @@ license = "MIT"
repository = "https://github.com/kalisam/amazon_rose_forest_01"

[dependencies]
tokio = { version = "1.28.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = "0.3"
futures = "0.3"
dashmap = "5.4.0"
rand = "0.8"
bytes = "1.4"
uuid = { version = "1.3", features = ["v4", "serde"] }
async-trait = "0.1"
chrono = { version = "0.4", features = ["serde"] }
hashbrown = "0.14"
prometheus = "0.13"
once_cell = "1.18.0"
rand_distr = "0.4"
sha2 = "0.10.7" # Added SHA-2 cryptographic hash functions
sha3 = { version = "0.10", optional = true }
blake3 = { version = "1", optional = true }
serde_bytes = "0.11"
wide = "0.7"
warp = "0.3"
bulletproofs = "4.0.0"
tokio = { version = "1.47.1", features = ["full"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.142"
thiserror = "2.0.12"
anyhow = "1.0.98"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
futures = "0.3.31"
dashmap = "6.1.0"
rand = "0.9.2"
bytes = "1.10.1"
uuid = { version = "1.17.0", features = ["v4", "serde"] }
async-trait = "0.1.88"
chrono = { version = "0.4.41", features = ["serde"] }
hashbrown = "0.15.5"
prometheus = "0.14.0"
once_cell = "1.21.3"
rand_distr = "0.5.1"
sha2 = "0.10.9" # Added SHA-2 cryptographic hash functions
sha3 = { version = "0.10.8", optional = true }
blake3 = { version = "1.8.2", optional = true }
serde_bytes = "0.11.17"
wide = "0.7.33"
reqwest = { version = "0.12.22", features = ["json", "multipart"] }
warp = { version = "0.4.1", features = ["websocket","server"] }

bulletproofs = "5.0.0"
ad4m-client = "0.10.1-release-candidate-3"
sysinfo = "0.28"
sysinfo = "0.36.1"


# Holochain dependencies
hdk = "0.1.0"
holo_hash = "0.1.0"
holochain_zome_types = "0.1.0"
holochain = { version = "0.1.0", optional = true }
petgraph = "0.6.3"
nalgebra = "0.32.2"
opentelemetry = "0.19.0"
opentelemetry-otlp = "0.12.0"
hdk = "0.5.4"
hdi = "0.6.4"
holochain_types = "0.5.4"
holo_hash = "0.5.4"
holochain_zome_types = "0.5.4"
holochain = { version = "0.5.4", optional = true }
petgraph = "0.8.2"
nalgebra = "0.34.0"
opentelemetry = "0.30.0"
opentelemetry-otlp = "0.30.0"

[dev-dependencies]
criterion = "0.4"
tokio-test = "0.4"
proptest = "1.1"
rand = "0.8"
rand_chacha = "0.3"
criterion = "0.7.0"
tokio-test = "0.4.4"
proptest = "1.7.0"
rand = "0.9.2"
rand_chacha = "0.9.0"

[features]
default = ["sha2"]
Expand Down
Loading