Skip to content

Commit 8b2d942

Browse files
committed
chore: improve agents instructions
1 parent d139316 commit 8b2d942

4 files changed

Lines changed: 19 additions & 106 deletions

File tree

.github/copilot-instructions.md

Lines changed: 16 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Follows these guidelines precisely to ensure consistency and maintainability of
99

1010
## Stack
1111

12-
- Language: Go (Go 1.24+)
12+
- Language: Go (Go 1.26+)
1313
- Framework: Go standard library
1414
- Testing: Go's built-in testing package
1515
- Build Tool: `make` using the Makefile with all the targets defined to build, test, and run the application
@@ -21,101 +21,6 @@ Follows these guidelines precisely to ensure consistency and maintainability of
2121
- Database: PostgreSQL
2222
- Logging: `slog` package from the standard library
2323

24-
## Project Structure
25-
26-
This project implements a kind of Model-View-Controller (MVC) architecture, the main components are:
27-
28-
- Core: located in the `internal/core` package, it contains the business logic of the application.
29-
- Config: located in the `internal/config` package, it contains the configuration of the application
30-
- Model: located in the `internal/model` package, it contains the data structures or entities used in the application.
31-
- Repository: located in the `internal/repository` package, it contains the data access layer for interacting with the database.
32-
- Identity Provider conversion: located in the `internal/idp/` package, This is the glue between the logic into `internal/core` and the identity provider located at `pkg/google/` package.
33-
- SCIM conversion: located in the `internal/scim/` package, This is the glue between the logic into `internal/core` and the SCIM API located at `pkg/aws/` package.
34-
35-
The project structure is organized as follows:
36-
37-
```plaintext
38-
.
39-
├── build
40-
│   ├── coverage.txt
41-
│   ├── idpscim
42-
│   └── idpscimcli
43-
├── cmd
44-
│   ├── idpscim
45-
│   │   ├── cmd
46-
│   │   │   └── root.go
47-
│   │   └── main.go
48-
│   └── idpscimcli
49-
│   ├── cmd
50-
│   │   ├── aws.go
51-
│   │   ├── common.go
52-
│   │   ├── gws.go
53-
│   │   └── root.go
54-
│   └── main.go
55-
├── CODE_OF_CONDUCT.md
56-
├── CONTRIBUTING.md
57-
├── coverage.out
58-
├── DCO
59-
├── Dockerfile
60-
├── docs
61-
│   ├── AWS-SAM-Template.md
62-
│   ├── AWS-SAM.md
63-
│   ├── Configuration.md
64-
│   ├── Demo.md
65-
│   ├── Development.md
66-
│   ├── idpscim.md
67-
│   ├── idpscimcli.md
68-
│   ├── images
69-
│   │   ├── demo
70-
│   │   │   ├── aws-groups-developers.png
71-
│   │   │   ├── aws-groups.png
72-
│   │   │   ├── aws-s3-state-file.png
73-
│   │   │   ├── aws-users.png
74-
│   │   │   ├── gws-groups-developers.png
75-
│   │   │   ├── gws-groups.png
76-
│   │   │   ├── gws-users.png
77-
│   │   │   ├── idpscim-help.png
78-
│   │   │   ├── state-file.png
79-
│   │   │   ├── sync-1.png
80-
│   │   │   └── sync-2.png
81-
│   │   └── diagrams
82-
│   │   ├── idpscim--workflow.drawio.html
83-
│   │   ├── idpscim--workflow.drawio.png
84-
│   │   └── ipd-scim-sync.drawio.png
85-
│   ├── Release.md
86-
│   ├── State-File-example.md
87-
│   └── Using-SSO.md
88-
├── extras
89-
│   └── infra
90-
│   ├── 1_cfn-slashdevops-iam-oidc-github-provider.template
91-
│   ├── 2_cfn-slashdevops-iam-role-idp-scim-sync.template
92-
│   ├── 3_cfn-slashdevops-ecr-repo-idp-scim-sync.template
93-
│   ├── 4_cfn-slashdevops-iam-policy-idp-scim-sync-ecr.template
94-
│   ├── 4_cfn-slashdevops-s3-idp-scim-sync-sam.template
95-
│   ├── 5_cfn-slashdevops-iam-policy-idp-scim-sync-sam.template
96-
│   └── README.md
97-
├── go.mod
98-
├── go.sum
99-
├── internal
100-
│   ├── config
101-
│   ├── core
102-
│   ├── deepcopy
103-
│   ├── idp
104-
│   ├── model
105-
│   ├── repository
106-
│   ├── scim
107-
│   └── version
108-
├── LICENSE
109-
├── Makefile
110-
├── mocks
111-
├── pkg
112-
│   ├── aws
113-
│   └── google
114-
├── README.md
115-
├── SECURITY.md
116-
└── template.yaml
117-
```
118-
11924
## Code Style
12025

12126
- Follow Go's idiomatic style defined in
@@ -128,14 +33,19 @@ The project structure is organized as follows:
12833
- Use comments to explain complex logic or decisions.
12934
- Use dependency injection for services and repositories to facilitate testing and maintainability.
13035

131-
## Testing
36+
## Post-Change Checklist
37+
38+
Prefer the Make targets that the repo already defines after making changes:
39+
40+
```bash
41+
go fix ./... # Optional manual step for Go 1.26+ syntax
42+
make go-fmt # Format code
43+
make go-betteralign # Align struct fields for optimal memory layout
44+
golangci-lint run ./... # Run linter (also checks formatting, vet, and other issues)
45+
make build # Verify build
46+
make test # Run tests
47+
```
48+
49+
If you are intentionally modernizing syntax or APIs for Go 1.26+, run `go fix ./...` manually as a separate step.
13250

133-
- Write unit tests implementing test tables for all functions when applicable.
134-
- Use the `testing` package for writing tests.
135-
- Use `go test` to run tests.
136-
- Use `go test -cover` to check code coverage.
137-
- Use `go test -race` to check for race conditions.
138-
- Use `go test -bench` to run benchmarks.
139-
- Use `go test -v` for verbose output during testing.
140-
- Use `go test -run` to run specific tests.
141-
- Use `go test -short` to run short tests.
51+
Always keep `README.md` and `docs/` updated for any architectural changes, new commands/flags, removed flags, new packages, or changes to the development workflow. This includes command usage examples, flag tables, and CLI reference sections.

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"AWSS",
88
"AWSSCIM",
99
"Babs",
10+
"betteralign",
1011
"bjensen",
1112
"christiangda",
1213
"cmpopts",

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/copilot-instructions.md

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/copilot-instructions.md

0 commit comments

Comments
 (0)