Skip to content

Commit 5985b4b

Browse files
committed
fix: clarify AGENTS.md submodule guidance (#909)
Clarifies AGENTS.md guidance for typescript-go submodule commits and resets.
1 parent 42a817b commit 5985b4b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TSGolint is a static analysis tool, based on typescript-go, for implementing and
44

55
## ⚠️ CRITICAL: typescript-go Submodule Warning
66

7-
**DO NOT COMMIT SUBMODULE CHANGES WHEN FINALIZING WORK**
7+
**DO NOT COMMIT SUBMODULE POINTER CHANGES**
88

99
The `typescript-go/` directory is a Git submodule that references Microsoft's TypeScript Go port.
1010

@@ -14,11 +14,11 @@ The `typescript-go/` directory is a Git submodule that references Microsoft's Ty
1414
- You can freely modify and commit within the `typescript-go/` folder
1515
- Use normal git commands within the typescript-go directory as needed
1616

17-
### Before Finalizing Work
17+
### Before Creating a TSGolint Commit
1818

19-
- Convert any typescript-go changes into patch files in the `patches/` directory
20-
- **NEVER** commit the submodule pointer changes to the TSGolint repository
21-
- When you see `modified: typescript-go (new commits)` in git status, do NOT stage/commit this change
19+
- Check `git status` before committing.
20+
- **NEVER** stage or commit submodule pointer changes unless explicitly performing a `typescript-go` submodule update.
21+
- If you are performing a submodule update, make sure to stage and commit the new pointer to the upstream typescript-go commit. MAKE SURE this pointer DOES NOT include the additional patches.
2222

2323
### Creating Permanent Changes
2424

@@ -27,7 +27,7 @@ If you need to modify typescript-go functionality permanently:
2727
1. Test your changes locally in the typescript-go directory
2828
2. Create a patch file in `patches/` using `git format-patch`
2929
3. Document the patch purpose in `patches/README.md`
30-
4. Reset the typescript-go submodule to its original state
30+
4. Reset the typescript-go submodule only after the patch has been created and the user has approved, or when the task explicitly requires the patch workflow
3131
5. The patches are applied during project initialization (`just init`) using `git am --3way --no-gpg-sign ../patches/*.patch`
3232

3333
### Exposing New Functions

0 commit comments

Comments
 (0)