Skip to content

Commit 035efaf

Browse files
fix: added ISO synonyms for Macao and Mexico DIF
1 parent 5bbd82a commit 035efaf

6 files changed

Lines changed: 213 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ target/
22
out/
33
*.versionsBackup
44

5+
.gitnexus

AGENTS.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!-- gitnexus:start -->
2+
# GitNexus — Code Intelligence
3+
4+
This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
5+
6+
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
7+
8+
## Always Do
9+
10+
- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
11+
- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows.
12+
- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
13+
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
14+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
15+
16+
## When Debugging
17+
18+
1. `gitnexus_query({query: "<error or symptom>"})` — find execution flows related to the issue
19+
2. `gitnexus_context({name: "<suspect function>"})` — see all callers, callees, and process participation
20+
3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step
21+
4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed
22+
23+
## When Refactoring
24+
25+
- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`.
26+
- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code.
27+
- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed.
28+
29+
## Never Do
30+
31+
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
32+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
33+
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
34+
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
35+
36+
## Tools Quick Reference
37+
38+
| Tool | When to use | Command |
39+
|------|-------------|---------|
40+
| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` |
41+
| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` |
42+
| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` |
43+
| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` |
44+
| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` |
45+
| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` |
46+
47+
## Impact Risk Levels
48+
49+
| Depth | Meaning | Action |
50+
|-------|---------|--------|
51+
| d=1 | WILL BREAK — direct callers/importers | MUST update these |
52+
| d=2 | LIKELY AFFECTED — indirect deps | Should test |
53+
| d=3 | MAY NEED TESTING — transitive | Test if critical path |
54+
55+
## Resources
56+
57+
| Resource | Use for |
58+
|----------|---------|
59+
| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness |
60+
| `gitnexus://repo/mapcode-java/clusters` | All functional areas |
61+
| `gitnexus://repo/mapcode-java/processes` | All execution flows |
62+
| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace |
63+
64+
## Self-Check Before Finishing
65+
66+
Before completing any code modification task, verify:
67+
1. `gitnexus_impact` was run for all modified symbols
68+
2. No HIGH/CRITICAL risk warnings were ignored
69+
3. `gitnexus_detect_changes()` confirms changes match expected scope
70+
4. All d=1 (WILL BREAK) dependents were updated
71+
72+
## Keeping the Index Fresh
73+
74+
After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it:
75+
76+
```bash
77+
npx gitnexus analyze
78+
```
79+
80+
If the index previously included embeddings, preserve them by adding `--embeddings`:
81+
82+
```bash
83+
npx gitnexus analyze --embeddings
84+
```
85+
86+
To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.**
87+
88+
> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`.
89+
90+
## CLI
91+
92+
| Task | Read this skill file |
93+
|------|---------------------|
94+
| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` |
95+
| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` |
96+
| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` |
97+
| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` |
98+
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
99+
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |
100+
101+
<!-- gitnexus:end -->

CLAUDE.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!-- gitnexus:start -->
2+
# GitNexus — Code Intelligence
3+
4+
This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
5+
6+
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
7+
8+
## Always Do
9+
10+
- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
11+
- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows.
12+
- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
13+
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
14+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
15+
16+
## When Debugging
17+
18+
1. `gitnexus_query({query: "<error or symptom>"})` — find execution flows related to the issue
19+
2. `gitnexus_context({name: "<suspect function>"})` — see all callers, callees, and process participation
20+
3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step
21+
4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed
22+
23+
## When Refactoring
24+
25+
- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`.
26+
- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code.
27+
- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed.
28+
29+
## Never Do
30+
31+
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
32+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
33+
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
34+
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
35+
36+
## Tools Quick Reference
37+
38+
| Tool | When to use | Command |
39+
|------|-------------|---------|
40+
| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` |
41+
| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` |
42+
| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` |
43+
| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` |
44+
| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` |
45+
| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` |
46+
47+
## Impact Risk Levels
48+
49+
| Depth | Meaning | Action |
50+
|-------|---------|--------|
51+
| d=1 | WILL BREAK — direct callers/importers | MUST update these |
52+
| d=2 | LIKELY AFFECTED — indirect deps | Should test |
53+
| d=3 | MAY NEED TESTING — transitive | Test if critical path |
54+
55+
## Resources
56+
57+
| Resource | Use for |
58+
|----------|---------|
59+
| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness |
60+
| `gitnexus://repo/mapcode-java/clusters` | All functional areas |
61+
| `gitnexus://repo/mapcode-java/processes` | All execution flows |
62+
| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace |
63+
64+
## Self-Check Before Finishing
65+
66+
Before completing any code modification task, verify:
67+
1. `gitnexus_impact` was run for all modified symbols
68+
2. No HIGH/CRITICAL risk warnings were ignored
69+
3. `gitnexus_detect_changes()` confirms changes match expected scope
70+
4. All d=1 (WILL BREAK) dependents were updated
71+
72+
## Keeping the Index Fresh
73+
74+
After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it:
75+
76+
```bash
77+
npx gitnexus analyze
78+
```
79+
80+
If the index previously included embeddings, preserve them by adding `--embeddings`:
81+
82+
```bash
83+
npx gitnexus analyze --embeddings
84+
```
85+
86+
To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.**
87+
88+
> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`.
89+
90+
## CLI
91+
92+
| Task | Read this skill file |
93+
|------|---------------------|
94+
| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` |
95+
| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` |
96+
| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` |
97+
| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` |
98+
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
99+
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |
100+
101+
<!-- gitnexus:end -->

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@ Normally, one of our developers should be able to comment on them and fix.
480480

481481
These are the release notes for the Java library for mapcodes.
482482

483+
### 2.4.19
484+
485+
* Added synonyms for territories Maco CN-MO and Mexico MX-CMX.
486+
* Updated dependencies.
487+
483488
### 2.4.16-2.4.18
484489

485490
* Updated `log4j` and `gson` dependencies.

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<artifactId>mapcode</artifactId>
2525

2626
<packaging>jar</packaging>
27-
<version>2.4.18</version>
27+
<version>2.4.19</version>
2828

2929
<name>Mapcode Java Library</name>
3030
<description>
@@ -100,10 +100,10 @@
100100
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
101101

102102
<!-- libraries. -->
103-
<gson.version>2.9.0</gson.version>
103+
<gson.version>2.14.0</gson.version>
104104
<jsr305.version>3.0.2</jsr305.version>
105105
<junit.version>4.13.2</junit.version>
106-
<log4j.version>2.17.2</log4j.version>
106+
<log4j.version>2.26.0</log4j.version>
107107
<slf4j.version>1.7.36</slf4j.version>
108108
</properties>
109109

src/main/java/com/mapcode/Territory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public enum Territory {
4848
BLM(5, "Saint-Barthelemy"),
4949
NRU(6, "Nauru"),
5050
TUV(7, "Tuvalu"),
51-
MAC(8, "Macau", new Alphabet[]{Alphabet.CHINESE, Alphabet.ROMAN}, null, new String[]{"CN-92", "CHN-92", "CN-MC", "CHN-MC"}, new String[]{"Aomen"}),
51+
MAC(8, "Macau", new Alphabet[]{Alphabet.CHINESE, Alphabet.ROMAN}, null, new String[]{"CN-92", "CHN-92", "CN-MC", "CHN-MC", "CN-MO", "CHN-MO"}, new String[]{"Aomen"}),
5252
SXM(9, "Sint Maarten"),
5353
MAF(10, "Saint-Martin"),
5454
NFK(11, "Norfolk and Philip Island", null, null, new String[]{"AU-NF", "AUS-NF"},
@@ -277,7 +277,7 @@ public enum Territory {
277277
LBY(230, "Libya", new Alphabet[]{Alphabet.ARABIC, Alphabet.ROMAN, Alphabet.TIFINAGH}),
278278
SDN(231, "Sudan", new Alphabet[]{Alphabet.ARABIC, Alphabet.ROMAN}),
279279
IDN(232, "Indonesia"),
280-
MX_DIF(233, "Federal District", null, MEX, new String[]{"MX-DF"}),
280+
MX_DIF(233, "Federal District", null, MEX, new String[]{"MX-DF", "MX-CMX"}),
281281
MX_TLA(234, "Tlaxcala", null, MEX, new String[]{"MX-TL"}),
282282
MX_MOR(235, "Morelos", null, MEX, new String[]{"MX-MO"}),
283283
MX_AGU(236, "Aguascalientes", null, MEX, new String[]{"MX-AG"}),

0 commit comments

Comments
 (0)