This guide will help you set up a test environment for Arc Memory, allowing you to experiment with the tool without affecting your production repositories.
# Create ADR directorymkdir -p docs/adr# Create first ADRcat > docs/adr/0001-calculator-architecture.md << EOF# 1. Calculator ArchitectureDate: 2023-01-15## StatusAccepted## ContextWe need to implement a calculator with basic operations.## DecisionWe will implement the calculator with separate functions for each operation.## ConsequencesThis will make the code more modular and testable.EOF# Create second ADRcat > docs/adr/0002-add-power-operation.md << EOF# 2. Add Power OperationDate: 2023-01-20## StatusAccepted## ContextUsers need to calculate powers in addition to basic operations.## DecisionWe will add a power operation to the calculator.## ConsequencesThis will increase the functionality of the calculator.EOF# Commit the ADRsgit add docs/adrgit commit -m "Add ADRs for calculator architecture and power operation"
Now you can run Arc Memory on your test repository:
Copy
# Build the knowledge grapharc build# Check the statusarc doctor# Trace the history of a filearc trace file src/calculator/operations.py# Show the decision trail for a linearc why file src/calculator/operations.py 5# Show related nodes for a commitarc relate node commit:<commit-hash># Run a simulationarc sim run
# Deactivate the virtual environmentdeactivate# Remove the Arc Memory databaserm -rf .arc# Optionally, remove the test repositorycd ..rm -rf arc-test-repo