Compare commits

..
Author SHA1 Message Date
sorokin.oleg.edu eda2d0d162 Update AGENTS.md 2026-09-23 09:53:14 +00:00
sorokin.oleg.edu 2a80e1699b Update PROJECT_GOAL.md 2026-09-23 09:49:44 +00:00
sorokin.oleg.edu 8307891085 Update PROJECT_GOAL.md 2026-09-23 09:48:44 +00:00
sorokin.oleg.edu 5ae9137276 Update AGENTS.md 2026-09-13 08:37:08 +00:00
sorokin.oleg.edu 72827ccefa Update AGENTS.md 2026-09-13 08:36:22 +00:00
sorokin.oleg.edu 8e0df9797d Update AGENTS.md 2026-09-12 10:42:57 +00:00
sorokin.oleg.edu 5fb9770df3 Update AGENTS.md 2026-09-12 10:39:37 +00:00
sorokin.oleg.edu 110a34d994 Merge branch 'main' of http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio 2026-09-12 13:39:04 +03:00
sorokin.oleg.edu 4aef6b0cb7 Update AGENTS.md 2026-09-12 10:38:14 +00:00
sorokin.oleg.edu 2b0b9d4df1 Update AGENTS file 2026-09-12 13:15:10 +03:00
sorokin.oleg.edu b9f14716b7 Update AGENTS.md 2026-09-11 17:09:07 +00:00
sorokin.oleg.edu fee30f9b40 Update PROJECT_GOAL.md 2026-09-11 17:07:59 +00:00
sorokin.oleg.edu 1d7f916083 Update PROJECT_GOAL.md 2026-09-11 16:50:42 +00:00
sorokin.oleg.edu 3d60fd5226 Update AGENTS.md 2026-09-11 16:50:20 +00:00
sorokin.oleg.edu e7f5bdff67 Update AGENTS.md 2026-09-11 12:54:29 +00:00
sorokin.oleg.edu 2e8a70aa05 Add sync agent instructions script 2026-09-11 14:35:39 +03:00
sorokin.oleg.edu 0337f57087 Update AGENTS.md 2026-09-11 11:24:13 +00:00
sorokin.oleg.edu e4336d11db Update project goal
Rust checks / check (windows-latest) (push) Canceled after 0s
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
2026-09-11 11:16:31 +03:00
3 changed files with 93 additions and 14 deletions
+79
View File
@@ -0,0 +1,79 @@
param(
[string]$Remote = "gitea",
[string]$MainBranch = "main"
)
$ErrorActionPreference = "Stop"
# Verify remote exists.
$remotes = git remote
if ($remotes -notcontains $Remote) {
throw "Git remote '$Remote' does not exist. Available remotes: $($remotes -join ', ')"
}
Write-Host "Using remote: $Remote"
Write-Host "Canonical branch: $MainBranch"
# Update remote references.
git fetch $Remote --prune
# Update local main from the selected remote.
git switch $MainBranch
git pull --ff-only $Remote $MainBranch
# Get all branches on this specific remote.
$remotePrefix = "$Remote/"
$branches = git for-each-ref `
--format="%(refname:short)" `
"refs/remotes/$Remote" |
Where-Object {
$_ -ne "$Remote/$MainBranch" -and
$_ -ne "$Remote/HEAD"
}
foreach ($remoteBranch in $branches) {
# Remove "<remote>/" prefix while preserving branch names such as
# agent/foo/bar.
$branch = $remoteBranch.Substring($remotePrefix.Length)
Write-Host ""
Write-Host "Updating $branch..."
# Check whether the local branch already exists.
git show-ref --verify --quiet "refs/heads/$branch"
if ($LASTEXITCODE -eq 0) {
git switch $branch
# Make sure the local branch reflects the latest remote branch
# before modifying the instruction files.
git pull --ff-only $Remote $branch
}
else {
git switch --track -c $branch "$Remote/$branch"
}
# Force these files to exactly match canonical main.
git restore `
--source "$MainBranch" `
-- AGENTS.md PROJECT_GOAL.md
git add AGENTS.md PROJECT_GOAL.md
# Commit only when one of the files actually changed.
git diff --cached --quiet
if ($LASTEXITCODE -ne 0) {
git commit -m "Sync agent instructions from $MainBranch"
git push $Remote $branch
}
else {
Write-Host "Already up to date."
}
}
git switch $MainBranch
Write-Host ""
Write-Host "Finished synchronizing AGENTS.md and PROJECT_GOAL.md."