Skip to content

Commit 0da494c

Browse files
committed
Document contributor setup and agent workflow conventions.
Add build prerequisites for submodules/dependencies/JDK selection in README and introduce AGENTS.md to standardize LLM-assisted development practices. Made-with: Cursor
1 parent 9a6846b commit 0da494c

3 files changed

Lines changed: 77 additions & 0 deletions

File tree

.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11.0.26

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AGENTS Guide
2+
3+
This file documents collaboration conventions for human and LLM agents working on this repository.
4+
5+
## Environment prerequisites
6+
7+
- Use JDK 11+ for Maven build and test.
8+
- Initialize git submodules before development:
9+
- `git submodule update --init --recursive`
10+
- Install local dependencies before running full builds:
11+
- Build and install `utils` module: `cd utils && mvn install -DskipTests && cd ..`
12+
- Install local jars: `sh ./lib_install.sh`
13+
14+
## Branching and commit policy
15+
16+
- Do not develop directly on `master`.
17+
- Use feature branches with focused commits.
18+
- Keep infrastructure/docs commits separate from feature implementation commits when possible.
19+
20+
## Language frontend migration policy
21+
22+
- Keep existing language frontends stable unless explicitly changing them.
23+
- Prefer parallel introduction of new frontend options (for example `java-ts`) before replacement.
24+
- Preserve CLI compatibility and existing analyzer output contracts.
25+
26+
## Testing policy
27+
28+
- Always run targeted tests for changed modules first.
29+
- Before merging, run:
30+
- `mvn clean test`
31+
- `mvn clean package`
32+
- If tests fail due to environment mismatch, fix environment first, then retry tests.
33+
34+
## Safety and scope
35+
36+
- Do not remove existing extractor implementations during migration iterations.
37+
- Avoid irreversible git operations unless explicitly requested.
38+
- Do not commit local IDE-only settings unless explicitly requested.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,44 @@ and then unzip the ```depends-*version*.tgz``` file in any directory of your com
1717

1818
*Depends* is written in java, so it could be run on any OS with a JRE or JDK environment (like Windows, Linux or Mac OS).
1919

20+
## Build from source (for contributors)
21+
22+
If you are developing on this repository locally, run the following steps before `mvn test` or `mvn package`.
23+
24+
1. Initialize submodules:
25+
26+
```bash
27+
git submodule update --init --recursive
28+
```
29+
30+
2. Install the `utils` submodule into your local Maven repo:
31+
32+
```bash
33+
cd utils
34+
mvn install -DskipTests
35+
cd ..
36+
```
37+
38+
3. Install local third-party jars (CDT/JRuby) into your local Maven repo:
39+
40+
```bash
41+
sh ./lib_install.sh
42+
```
43+
44+
4. Use JDK 11+ for Maven build (ANTLR plugin requires this):
45+
46+
```bash
47+
jenv local 11.0.26
48+
export JAVA_HOME="$(jenv prefix)"
49+
```
50+
51+
5. Run build:
52+
53+
```bash
54+
mvn clean test
55+
mvn clean package
56+
```
57+
2058
## Run it from command line
2159

2260
Following the single responsibility principle, *Depends* is designed for the purpose of extracting dependencies only. It only provides CLI interface, without GUI. But you can convert the output of *Depends* into the GUI of other tools, such as GraphViz(http://graphviz.org/), PlantUML(http://plantuml.com/), and DV8 (https://www.archdia.com).

0 commit comments

Comments
 (0)