This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

105 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
set -e
format_one () {
source_dir="$1"
command="$2"
attributes="$3"
path="$source_dir/Documentation/$command.adoc"
if ! test -f "$path"
then
echo >&2 "No such file $path"
exit 1
fi
state=0
while read line
do
case "$state" in
0)
case "$line" in
git*\(*\)|scalar*\(*\))
mansection="${line##*\(}"
mansection="${mansection%\)}"
;;
NAME)
state=1;;
esac
;;
1)
if test "$line" = "----"
then
state=2
fi
;;
2)
description="$line"
break
;;
esac
done <"$path"
if test -z "$mansection"
then
echo "No man section found in $path" >&2
exit 1
fi
if test -z "$description"
then
echo >&2 "No description found in $path"
exit 1
fi
case "$description" in
"$command - "*)
text="${description#$command - }"
printf "linkgit:%s[%s]::\n\t" "$command" "$mansection"
case "$attributes" in
*" deprecated "*)
printf "(deprecated) "
;;
esac
printf "$text.\n\n"
;;
*)
echo >&2 "Description does not match $command: $description"
exit 1
;;
esac
}
source_dir="$1"
build_dir="$2"
shift 2
for out
do
category="${out#cmds-}"
category="${category%.adoc}"
path="$build_dir/$out"
while read command command_category attributes
do
case "$command" in
"#"*)
continue;;
esac
case "$command_category" in
"$category")
format_one "$source_dir" "$command" " $attributes ";;
esac
done <"$source_dir/command-list.txt" >"$build_dir/$out+"
if cmp "$build_dir/$out+" "$build_dir/$out" >/dev/null 2>&1
then
rm "$build_dir/$out+"
else
mv "$build_dir/$out+" "$build_dir/$out"
fi
done