Skip to content

Commit 6206e5e

Browse files
authored
feat(binary-mapping): add binary and stream mapper support (#98)
* feat(git-workflow): add comprehensive documentation and examples for commit, branch, and PR workflows - Introduced detailed guides for branch, commit, and pull request workflows under `docs/`. - Added shared references for scope detection, safety rules, file inclusion policy, and conventional types. - Included example workflows for `feat`, `fix`, and `ci` to set clear expectations. - Added templates for pull requests and release notes. - Ensured alignment with safety and inclusion standards. * feat(integration-tests): add canonical model integration tests for DynamoDB mappers - Introduced comprehensive integration tests for `CanonicalIntegrationModel` and related mappers. - Validated `ToItem` and `FromItem` conversion logic for various data structures and attributes. - Added support for binary attributes, scalar byte arrays, and streams in assertions. - Enhanced test coverage for round-trip consistency and data equivalence. - Registered the new test project in the solution file. * feat(binary-mapping): add support for binary and stream attributes in DynamoDB mappers - Implemented `SetBinary`, `GetBinary`, `SetStream`, and `GetStream` methods in attribute extensions. - Added comprehensive tests for round-trip mapping of streams and binary data. - Updated property mapping logic to handle `byte[]` and `Stream` types seamlessly. - Enhanced type resolution strategy to include support for binary and stream scalar members. - Updated snapshots and generated mapper files for new cases including byte arrays and streams. * chore(build): bump version prefix to 1.2.0 - Updated `VersionPrefix` in `Directory.Build.props` from 1.1.0 to 1.2.0. - Ensures proper version tracking for upcoming changes.
1 parent 867ef87 commit 6206e5e

35 files changed

Lines changed: 2357 additions & 312 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: git-workflow
3+
description: >-
4+
Git workflow automation for committing, branching, and opening pull requests.
5+
Use this whenever the user asks to commit their work, create a branch, or
6+
create/open/draft a PR.
7+
---
8+
9+
# Git Workflow
10+
11+
Use this skill whenever the user asks to:
12+
13+
- commit these changes
14+
- create a commit
15+
- save my work
16+
- stage and commit
17+
- commit current work
18+
- create a branch
19+
- start a feature branch
20+
- make a branch for this work
21+
- start working on a change
22+
- create a PR
23+
- open a PR
24+
- draft a PR
25+
- prepare a pull request
26+
- commit and open a PR
27+
- create a branch and PR
28+
- submit the current work
29+
30+
______________________________________________________________________
31+
32+
## Shared references
33+
34+
Before executing any workflow, load all four shared references:
35+
36+
- [Scope Detection](shared/scope-detection.md)
37+
- [File Inclusion Policy](shared/file-inclusion-policy.md)
38+
- [Safety Rules](shared/safety-rules.md)
39+
- [Conventional Types](shared/conventional-types.md)
40+
41+
______________________________________________________________________
42+
43+
## Intent routing
44+
45+
Based on the user's request, load exactly one workflow doc:
46+
47+
| User intent | Load |
48+
| ----------------------------------------------- | -------------------------------- |
49+
| Commit work, save changes, stage and commit | [docs/commit.md](docs/commit.md) |
50+
| Create a branch, start a feature branch | [docs/branch.md](docs/branch.md) |
51+
| Create/open/draft a PR, submit the current work | [docs/pr.md](docs/pr.md) |
52+
53+
When intent is ambiguous, prefer the more complete workflow. If the user says "commit and open a PR", load `docs/pr.md` — it covers the full lifecycle including commit and branch.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Branch Workflow
2+
3+
## Shared references
4+
5+
Load before executing:
6+
7+
- [Scope Detection](../shared/scope-detection.md)
8+
- [Conventional Types](../shared/conventional-types.md)
9+
- [Safety Rules](../shared/safety-rules.md)
10+
11+
______________________________________________________________________
12+
13+
## Goal
14+
15+
Create a properly named branch for the current work based on inferred change intent, then switch to it.
16+
17+
## Branch naming format
18+
19+
```
20+
<type>/<scope>-<short-description>
21+
```
22+
23+
If no scope applies:
24+
25+
```
26+
<type>/<short-description>
27+
```
28+
29+
Rules:
30+
31+
- lowercase only
32+
- hyphen-separated
33+
- concise and descriptive
34+
- remove punctuation
35+
36+
Examples:
37+
38+
- `feat/core-add-pr-automation`
39+
- `fix/github-handle-detached-head`
40+
- `docs/update-readme`
41+
- `ci/github-improve-release-workflow`
42+
43+
## Workflow
44+
45+
1. Inspect repository status and changed files
46+
2. Infer change type (see [Conventional Types](../shared/conventional-types.md))
47+
3. Infer optional scope (see [Scope Detection](../shared/scope-detection.md))
48+
4. Generate branch name
49+
5. Create the branch
50+
6. Switch to the branch
51+
52+
## Branch-specific safety
53+
54+
If a branch with the same name already exists, append a short numeric suffix (e.g. `-2`) rather than overwriting it.
55+
56+
See also [Safety Rules](../shared/safety-rules.md) for general constraints.
57+
58+
## Output
59+
60+
Report:
61+
62+
- branch name created
63+
- branch switched to
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Commit Workflow
2+
3+
## Shared references
4+
5+
Load before executing:
6+
7+
- [Scope Detection](../shared/scope-detection.md)
8+
- [File Inclusion Policy](../shared/file-inclusion-policy.md)
9+
- [Safety Rules](../shared/safety-rules.md)
10+
- [Conventional Types](../shared/conventional-types.md)
11+
12+
______________________________________________________________________
13+
14+
## Goal
15+
16+
Create a commit representing the user's current working changes using a conventional commit format.
17+
18+
## Commit format
19+
20+
```
21+
<type>[optional scope]: <description>
22+
23+
[optional body]
24+
25+
[optional footer(s)]
26+
```
27+
28+
The description must immediately follow the colon and space. Scope is wrapped in parentheses when present: `feat(parser): add CSV support`.
29+
30+
For breaking changes, append `!` after the type/scope and/or include a `BREAKING CHANGE:` footer. See [Conventional Types](../shared/conventional-types.md) for details.
31+
32+
## Workflow
33+
34+
1. Inspect repository status
35+
2. Identify all modified files
36+
3. Stage all user-modified files (see [File Inclusion Policy](../shared/file-inclusion-policy.md))
37+
4. Exclude only obvious junk artifacts
38+
5. Infer `<type>` and `<scope>` (see [Conventional Types](../shared/conventional-types.md) and [Scope Detection](../shared/scope-detection.md))
39+
6. Generate and create the commit
40+
41+
## Output
42+
43+
Report:
44+
45+
- commit message used
46+
- files committed
47+
- any files excluded and why
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# PR Workflow
2+
3+
## Shared references
4+
5+
Load before executing:
6+
7+
- [Scope Detection](../shared/scope-detection.md)
8+
- [File Inclusion Policy](../shared/file-inclusion-policy.md)
9+
- [Safety Rules](../shared/safety-rules.md)
10+
- [Conventional Types](../shared/conventional-types.md)
11+
12+
______________________________________________________________________
13+
14+
## Goal
15+
16+
Prepare the current work for review and create a pull request that includes:
17+
18+
- a correctly named branch
19+
- a conventional commit message
20+
- a PR title following the required format
21+
- a reviewable PR body that explains what changed, why, validation, and risk
22+
23+
Template location: `../templates/pull-request-template.md`
24+
25+
______________________________________________________________________
26+
27+
## PR title format
28+
29+
```
30+
<type>[optional scope]: <description>
31+
```
32+
33+
For breaking changes, append `!` after the type/scope: `feat(api)!: remove deprecated endpoint`
34+
35+
Example: `feat(core): add automated PR workflow`
36+
37+
______________________________________________________________________
38+
39+
## Branch rules
40+
41+
Create a new branch if:
42+
43+
- the current branch is `main`
44+
- the repository is in detached `HEAD`
45+
46+
If already on a feature branch, use the current branch.
47+
48+
Branch naming follows `<type>/<scope>-<short-description>` (or `<type>/<short-description>` when no scope applies). See [Branch Workflow](branch.md) for full naming rules.
49+
50+
______________________________________________________________________
51+
52+
## Execution flow
53+
54+
### 1 — Inspect repository
55+
56+
Determine: current branch, whether HEAD is detached, git status, modified files, diff summary, and commit history against the base branch.
57+
58+
### 2 — Infer metadata
59+
60+
Determine: PR type, optional scope, short description, PR title, branch name.
61+
62+
### 3 — Prepare branch
63+
64+
If on `main` or detached `HEAD`, create a new branch and switch to it. Otherwise stay on the current branch.
65+
66+
### 4 — Commit work
67+
68+
Stage all user-modified files per [File Inclusion Policy](../shared/file-inclusion-policy.md). Exclude only obvious junk. Create commit. Skip if nothing to commit.
69+
70+
### 5 — Push branch
71+
72+
Push to origin. Set upstream if necessary.
73+
74+
### 6 — Generate PR body
75+
76+
Load `../templates/pull-request-template.md` and adapt it to the actual change.
77+
78+
Treat the template as a default outline, not a rigid contract. Prioritize reviewer scanability and signal quality over filling every heading.
79+
80+
Required information:
81+
82+
- what changed
83+
- why it changed
84+
- how it was validated
85+
86+
Default outline (adapt as needed):
87+
88+
- Summary - 2-4 sentences covering what changed and why
89+
- Changes - grouped in the way that makes the diff easiest to review (for example by concern, subsystem, workflow, or user impact)
90+
- Validation - concrete tests, manual verification, and confidence signals
91+
- Breaking Changes - include only when applicable
92+
- Related Issues - include only when applicable; do not invent issue numbers
93+
- Release Notes - include only for user-visible or package-relevant changes
94+
- Notes for Reviewers - include when review guidance, risks, tradeoffs, follow-up context, or requested feedback focus would help; for UI changes, include screenshots/video links when useful
95+
96+
Review mode:
97+
98+
- open as draft when implementation is incomplete, checks are pending, or early feedback is requested
99+
- when draft, state what is incomplete and what feedback is being requested
100+
101+
Rules:
102+
103+
- omit empty sections entirely (do not include `N/A`, `None`, or `No related issues`)
104+
- prefer fewer, high-signal sections over boilerplate
105+
- use backticks for identifiers, commands, files, and code terms
106+
- keep the Summary concise and focused on intent, not file-by-file trivia
107+
108+
### 7 — Create PR
109+
110+
Create the pull request using the generated title and body, as draft or ready-for-review based on the review mode rules above.
111+
112+
______________________________________________________________________
113+
114+
## Output
115+
116+
Report:
117+
118+
- branch name and whether it was created
119+
- commit message and whether a commit was created
120+
- PR title
121+
- PR body
122+
- any files excluded and why
123+
- any assumptions or blockers
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Example: CI PR
2+
3+
## Scenario
4+
5+
Current work updates GitHub Actions and release automation for NuGet publishing.
6+
7+
## Expected branch
8+
9+
`ci/github-improve-nuget-release-workflow`
10+
11+
## Expected commit
12+
13+
`ci(github): improve NuGet release workflow`
14+
15+
## Expected PR title
16+
17+
`ci(github): improve NuGet release workflow`
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Example: Feature PR
2+
3+
## Scenario
4+
5+
Current work adds automatic PR template loading and branch creation when running from `main`.
6+
7+
## Expected branch
8+
9+
`feat/core-automate-pr-workflow`
10+
11+
## Expected commit
12+
13+
`feat(core): automate PR workflow from main`
14+
15+
## Expected PR title
16+
17+
`feat(core): automate PR workflow from main`
18+
19+
## Example PR body
20+
21+
# 🚀 Pull Request
22+
23+
## 📋 Summary
24+
25+
> Adds automation for branch preparation and PR generation when opening a pull request from the current repository state. This removes manual branch setup when starting from `main` and keeps PR metadata generation consistent with inferred change intent.
26+
27+
______________________________________________________________________
28+
29+
## 📝 Changes
30+
31+
- Branch preparation flow
32+
- Detects `main` and detached `HEAD` before PR creation
33+
- Creates and switches to a generated branch only when needed
34+
- Metadata and PR drafting
35+
- Infers PR metadata (`type`, optional `scope`, short description)
36+
- Loads the local PR template and builds the PR body from current repository state
37+
- Workflow consistency
38+
- Reuses shared scope and inclusion policy logic so commit and PR behavior stay aligned
39+
40+
______________________________________________________________________
41+
42+
## 🧪 Validation
43+
44+
- Build/test status: Not explicitly verified by the agent
45+
- Manual verification performed: Reviewed repository status, branch behavior, and generated PR content paths
46+
- Edge cases checked: Existing feature branch path and detached `HEAD` path
47+
48+
______________________________________________________________________
49+
50+
## 💬 Notes for Reviewers
51+
52+
> Please focus on branch creation guardrails and metadata inference fallbacks, especially when repository state is ambiguous.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Example: Fix PR
2+
3+
## Scenario
4+
5+
Current work fixes a bug in GitHub workflow handling for detached HEAD repositories.
6+
7+
## Expected branch
8+
9+
`fix/github-handle-detached-head`
10+
11+
## Expected commit
12+
13+
`fix(github): handle detached HEAD when opening PRs`
14+
15+
## Expected PR title
16+
17+
`fix(github): handle detached HEAD when opening PRs`

0 commit comments

Comments
 (0)