Skip to content

V0.4.0/git story teller#11

Merged
gimlichael merged 14 commits intomainfrom
v0.4.0/git-story-teller
May 3, 2026
Merged

V0.4.0/git story teller#11
gimlichael merged 14 commits intomainfrom
v0.4.0/git-story-teller

Conversation

@gimlichael
Copy link
Copy Markdown
Member

This pull request introduces the new git-story-teller skill for deterministic repository story generation, improves documentation, and adds foundational agent guidelines. The most important changes are grouped below.


New Skill: Repository Story Generation

  • Added the git-story-teller skill, which generates source-grounded repository stories using a bundled .NET context extractor (scripts/story.cs). It produces a deterministic workspace, supports Repomix and web API fallbacks, and enforces grounding and context-budget rules. [1] [2] [3] [4] [5]

Documentation and Guidelines

  • Documented git-story-teller installation and usage in the README.md, including workflow details, expected outputs, and integration notes. [1] [2] [3]
  • Added Karpathy rules to AGENTS.md—a set of behavioral guidelines for LLM-driven coding, emphasizing explicit assumptions, simplicity, minimal changes, and goal-driven execution.

Release Management

  • Created a new 0.4.0 release in the CHANGELOG.md, summarizing the addition of git-story-teller, the bundled context packer, Karpathy rules, and workspace improvements.
  • Updated changelog links for version 0.4.0.

Workspace and Tooling

  • Updated .gitignore and documentation to recognize the .bot/ workspace pattern for local agentic workspaces and ephemeral state.

These changes lay the groundwork for robust, reproducible repository story generation and establish clear agent coding practices.

aicia-bot added 12 commits May 3, 2026 15:53
Projects using .bot/ folder for local agentic workspaces and ephemeral state should not leak those artifacts into source control.
Introduce deterministic repository story generation workflow. The skill bundles a .NET file-based context generator (scripts/story.cs) that clones a repository, discovers package targets, extracts deterministic evidence using repomix, and writes manifest, instructions, and context files. The agent then uses that evidence to write target stories before generating the overview, enforcing grounding, context-budget awareness, and no-invention rules.
Add git-story-teller to the installation instructions table and usage guidance sections. Explain the bundled C# runner approach, repository-generic input contract, deterministic output structure, and grounding-first prose model.
@gimlichael gimlichael self-assigned this May 3, 2026
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add git-story-teller skill with deterministic context packing and Karpathy agent guidelines

✨ Enhancement 📝 Documentation

Grey Divider

Walkthroughs

Description
• Introduces git-story-teller skill for deterministic repository story generation
  - Bundles .NET 10 file-based context extractor (scripts/story.cs) with 1100+ lines
  - Discovers .NET package targets, extracts grounded evidence via Repomix with web API and .NET
  fallbacks
  - Generates manifest, instructions, and per-target context files for agent-authored prose
• Adds Karpathy rules to AGENTS.md for LLM-driven coding best practices
  - Think before coding, simplicity first, surgical changes, goal-driven execution
• Documents git-story-teller in README with installation, usage, and workflow guidance
• Updates .gitignore to recognize .bot/ workspace pattern for local agentic workspaces
• Releases v0.4.0 with changelog entries and version links
Diagram
flowchart LR
  RepoURL["Repository URL"]
  Runner["scripts/story.cs<br/>Runner"]
  Repomix["Repomix Local"]
  WebAPI["Repomix Web API"]
  DotNetPacker[".NET Fallback<br/>Packer"]
  Context["Context Files<br/>manifest.json<br/>instructions.md<br/>*.context.md"]
  Agent["Agent Prose<br/>Writer"]
  Results["Result Files<br/>result/Index.md<br/>result/{Target}.md"]
  
  RepoURL -->|"--repo-url"| Runner
  Runner -->|"tries first"| Repomix
  Repomix -->|"unavailable"| WebAPI
  WebAPI -->|"unavailable"| DotNetPacker
  Repomix -->|"success"| Context
  WebAPI -->|"success"| Context
  DotNetPacker -->|"success"| Context
  Context -->|"reads"| Agent
  Agent -->|"writes"| Results
Loading

Grey Divider

File Changes

1. skills/git-story-teller/scripts/story.cs ✨ Enhancement +1112/-0

Implement bundled .NET story context generator with fallback packing

• New 1112-line .NET 10 file-based context extractor and repository story workspace generator
• Clones repositories, discovers .NET package targets from src/**/*.csproj files
• Extracts deterministic evidence using Repomix (local CLI, web API, or built-in .NET fallback)
• Generates manifest.json, instructions.md, and per-target context files with grounding rules
• Builds package and overview story prompts with editorial guidelines and validation rules

skills/git-story-teller/scripts/story.cs


2. AGENTS.md 📝 Documentation +60/-0

Add Karpathy rules for LLM coding best practices

• Added "Karpathy Rules" section with four behavioral guidelines for LLM-driven coding
• Rule 1: Think Before Coding - surface assumptions, tradeoffs, and uncertainty explicitly
• Rule 2: Simplicity First - minimum code, no speculative features or over-abstraction
• Rule 3: Surgical Changes - touch only required code, match existing style, clean up own mess
• Rule 4: Goal-Driven Execution - define verifiable success criteria and loop until verified

AGENTS.md


3. CHANGELOG.md 📝 Documentation +18/-1

Release v0.4.0 with git-story-teller and agent guidelines

• Created v0.4.0 release entry dated 2026-05-03 with focus on deterministic story generation
• Added section documenting git-story-teller skill, bundled C# context packer, Karpathy rules, and
 .bot/ workspace pattern
• Updated changelog links to point v0.4.0 as latest release and Unreleased to v0.4.0
• Documented Repomix web API and .NET packer fallbacks as implementation changes

CHANGELOG.md


View more (3)
4. README.md 📝 Documentation +30/-5

Document git-story-teller installation and usage guidance

• Added git-story-teller to installation table with full skill description
• Added installation command for git-story-teller in usage section
• Added "Why git-story-teller?" section explaining bundled runner, Repomix packing strategy,
 fallback paths, and workflow
• Documented repository-generic input contract, KISS principle, target-first workflow, and grounding
 rules

README.md


5. skills/git-story-teller/SKILL.md 📝 Documentation +217/-0

Add comprehensive git-story-teller skill documentation and evals

• New 217-line skill documentation with hero image reference
• Defines critical rules for deterministic context handling and grounding enforcement
• Documents runner contract, expected workspace structure, and six-step workflow
• Specifies context budget rules, publication guidelines, and validation characteristics
• Includes six evaluation scenarios covering manifest handling, workspace generation, and grounding
 verification

skills/git-story-teller/SKILL.md


6. skills/git-story-teller/evals/evals.json 🧪 Tests +79/-0

Add git-story-teller evaluation scenarios and expectations

• New evaluation suite with six test scenarios for git-story-teller skill
• Covers manifest-first workflow, workspace generation with .bot recommendation,
 target-before-overview ordering
• Tests grounding enforcement, dependency handling, and fallback packing behavior
• Validates Package selection section usage and validation gap reporting

skills/git-story-teller/evals/evals.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 3, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (3) 📎 Requirement gaps (0)

Grey Divider


Action required

1. SKILL description lacks triggers 📘 Rule violation ✧ Quality
Description
The new skills/git-story-teller/SKILL.md frontmatter description explains purpose/usage but does
not include at least two concrete trigger phrases users might say. This violates the requirement to
document trigger phrases for discoverability and consistent invocation.
Code

skills/git-story-teller/SKILL.md[R2-4]

+name: git-story-teller
+description: >
+  Generate source-grounded repository story markdown from deterministic ContentSync context bundles. Use when the user asks to create, refresh, or complete repo/package stories, family or project overview pages, .bot/stories output, ContentSync story workflows, or result/Index.md plus result/{TargetName}.md files for any repository URL. The skill runs its bundled .NET file-based context generator, writes target stories first, then writes the overview from completed target stories, and enforces grounding, context-budget, and no-invention rules.
Evidence
PR Compliance ID 111421 requires the SKILL description to include what the skill does, when to use
it, and at least 2 example trigger phrases; the added frontmatter description contains no concrete
example utterances.

Rule 111421: Document skill descriptions with purpose, usage context, and trigger phrases
skills/git-story-teller/SKILL.md[2-4]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`skills/git-story-teller/SKILL.md` frontmatter `description` is missing the required “Trigger phrases” section with at least 2 concrete example user utterances.
## Issue Context
Compliance requires skill descriptions to include: (1) what it does, (2) when to use it, and (3) trigger phrases users might actually say.
## Fix Focus Areas
- skills/git-story-teller/SKILL.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. DeriveRepoId() lowercases repo-id 📘 Rule violation ≡ Correctness
Description
The new runner forces the derived repo-id to lowercase via ToLowerInvariant(), even though
repo-id is a generic identifier derived from the repo name and is not documented/typed as
requiring lowercase. This violates the restriction against blanket lowercasing of identifiers unless
explicitly required.
Code

skills/git-story-teller/scripts/story.cs[R154-161]

+        var sanitized = Regex.Replace(lastSegment, "[^A-Za-z0-9._-]", "-").Trim('-', '.', '_');
+        if (string.IsNullOrWhiteSpace(sanitized))
+        {
+            throw new InvalidOperationException("Could not derive a filesystem-safe repo id from --repo-url.");
+        }
+
+        return sanitized.ToLowerInvariant();
+    }
Evidence
PR Compliance ID 124407 requires lowercasing to be limited to fields that explicitly require
lowercase; the new code lowercases the derived repo-id unconditionally.

Rule 124407: Restrict lowercasing to fields that explicitly require lowercase identifiers
skills/git-story-teller/scripts/story.cs[154-161]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`DeriveRepoId()` returns `sanitized.ToLowerInvariant()`, which lowercases a generic identifier (`repo-id`) without an explicit schema/doc requirement that this field must be lowercase.
## Issue Context
The compliance rule allows lowercasing only when the field is explicitly defined as a lowercase identifier. `repo-id` is derived from the repository URL and used for workspace paths, so either preserve case or explicitly constrain/document the field as lowercase in the skill contract.
## Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[139-161]
- skills/git-story-teller/SKILL.md[50-55]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Repo URL credential exfiltration 🐞 Bug ⛨ Security
Description
When local Repomix fails, the runner posts the provided --repo-url verbatim to the public Repomix
API for any https://github.com/... URL. If the URL contains embedded credentials/tokens (userinfo)
or other sensitive query data, those secrets are sent to a third-party service.
Code

skills/git-story-teller/scripts/story.cs[R745-763]

+    private static bool CanUseRepomixWebApi(string repoUrl)
+    {
+        return Uri.TryCreate(repoUrl, UriKind.Absolute, out var uri)
+            && uri.Scheme is "http" or "https"
+            && string.Equals(uri.Host, "github.com", StringComparison.OrdinalIgnoreCase);
+    }
+
+    private static async Task<string> PackWithRepomixWebApiAsync(string repoUrl, string includes)
+    {
+        using var http = new HttpClient();
+        using var content = new MultipartFormDataContent
+        {
+            { new StringContent(repoUrl, Encoding.UTF8), "url" },
+            { new StringContent("xml", Encoding.UTF8), "format" },
+            { new StringContent(BuildRepomixWebOptions(includes), Encoding.UTF8), "options" }
+        };
+
+        using var response = await http.PostAsync("https://api.repomix.com/api/pack", content);
+        var body = await response.Content.ReadAsStringAsync();
Evidence
The web-API fallback is enabled purely by scheme/host, and the POST body includes the raw repo URL;
there is no guard that rejects/strips uri.UserInfo or requires explicit consent before sending the
URL off-box, despite the skill docs warning to use the web fallback only when the user is
comfortable sending data to that service.

skills/git-story-teller/scripts/story.cs[745-767]
skills/git-story-teller/SKILL.md[57-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`PackWithRepomixWebApiAsync` sends `repoUrl` to `https://api.repomix.com/api/pack` without checking for embedded credentials (URI userinfo) or other sensitive components.
### Issue Context
The web fallback is triggered for `https://github.com/...` URLs when local Repomix is unavailable, but this can unintentionally transmit secrets if users pass credentialed URLs (common in CI).
### Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[745-789]
- skills/git-story-teller/scripts/story.cs[752-763]
### What to change
- Parse `repoUrl` as a `Uri` and **reject** (preferred) or **strip** `UserInfo` before calling the web API.
- Consider also rejecting URLs with non-empty `Query`/`Fragment` (or stripping them) for the web-API path.
- Print a clear warning before using the web API fallback that the URL is being sent to a third party.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. No validation feedback loop 📘 Rule violation ✧ Quality
Description
The SKILL doc includes a validation step and rg commands, but it does not describe a clear run →
interpret → fix → re-run loop until clean. This misses the required explicit feedback loop for
validation-based skills.
Code

skills/git-story-teller/SKILL.md[R161-180]

+### Step 6: Validate Grounding and Shape
+
+Before finishing, verify:
+
+- Every manifest target has a corresponding result file.
+- `result/Index.md` exists when the manifest includes an overview target.
+- Result filenames match manifest paths.
+- Required headings from the generated context are present verbatim.
+- No result file contains analysis notes, citations, XML, JSON, confidence scores, or chat commentary unless the generated prompt explicitly asks for them.
+- Code examples mention only APIs visible in the relevant context.
+- Target stories do not make broad claims such as robust, seamless, powerful, or comprehensive unless immediately grounded in concrete evidence.
+
+Use targeted searches instead of rereading everything:
+
+```powershell
+rg -n "TODO|TBD|confidence|citation|analysis notes|I cannot|as an AI" <workspace>/result
+rg -n "robust|seamless|powerful|comprehensive" <workspace>/result
+```
+
+Explain any remaining risk, especially missing tests, ambiguous APIs, oversized context, or targets whose purpose is unclear from source.
Evidence
PR Compliance ID 111423 requires SKILL.md to describe an ordered multi-step validation loop
including re-running the validator after fixes; the added validation section lists checks and
commands but omits explicit fix/re-run loop steps.

Rule 111423: Document feedback loop steps for validation-based skills in SKILL.md
skills/git-story-teller/SKILL.md[161-180]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The validation section provides checks and `rg` commands but does not explicitly instruct the user/agent to iterate: run validation, review output, fix files, and re-run until clean.
## Issue Context
Compliance requires a clearly ordered feedback loop for any skill that includes a validation step/tool.
## Fix Focus Areas
- skills/git-story-teller/SKILL.md[161-180]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. No process timeouts🐞 Bug ☼ Reliability
Description
The runner waits indefinitely for git clone and npx repomix to exit, with no timeout or
cancellation. A credential prompt, SSH host-key prompt, or hung subprocess can stall story workspace
generation forever.
Code

skills/git-story-teller/scripts/story.cs[R984-1015]

+    private static async Task RunProcessAsync(string executable, IReadOnlyList<string> arguments, string workingDirectory)
+    {
+        var startInfo = new ProcessStartInfo(executable)
+        {
+            WorkingDirectory = workingDirectory,
+            UseShellExecute = false,
+            RedirectStandardOutput = true,
+            RedirectStandardError = true,
+            CreateNoWindow = true
+        };
+
+        foreach (var argument in arguments)
+        {
+            startInfo.ArgumentList.Add(argument);
+        }
+
+        using var process = Process.Start(startInfo)
+            ?? throw new InvalidOperationException($"Could not start '{executable}'.");
+
+        var stdoutTask = process.StandardOutput.ReadToEndAsync();
+        var stderrTask = process.StandardError.ReadToEndAsync();
+
+        await process.WaitForExitAsync();
+        var stdout = await stdoutTask;
+        var stderr = await stderrTask;
+
+        if (process.ExitCode != 0)
+        {
+            var details = string.Join(Environment.NewLine, new[] { stdout.Trim(), stderr.Trim() }.Where(s => !string.IsNullOrWhiteSpace(s)));
+            throw new InvalidOperationException($"'{executable}' failed with exit code {process.ExitCode}.{Environment.NewLine}{details}".Trim());
+        }
+    }
Evidence
CloneRepositoryAsync and PackWithRepomixAsync both invoke RunProcessAsync, which
unconditionally awaits process.WaitForExitAsync() without a timeout/cancellation token; nothing
prevents indefinite hangs.

skills/git-story-teller/scripts/story.cs[163-167]
skills/git-story-teller/scripts/story.cs[700-709]
skills/git-story-teller/scripts/story.cs[984-1015]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`RunProcessAsync` can hang indefinitely because it has no timeout/cancellation.
### Issue Context
This script runs network-dependent tools (`git clone`, `npx repomix`). In real environments, prompts or network stalls can block forever.
### Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[163-167]
- skills/git-story-teller/scripts/story.cs[700-709]
- skills/git-story-teller/scripts/story.cs[984-1015]
### What to change
- Add a timeout parameter (e.g., `TimeSpan timeout`) to `RunProcessAsync` and enforce it via `CancellationTokenSource` + `WaitForExitAsync(token)`.
- On timeout, kill the process (and ideally the process tree).
- For `git`, set environment variables to avoid interactive prompts (e.g., `GIT_TERMINAL_PROMPT=0`; consider SSH batch-mode settings if you support `ssh://` URLs).
- Use different timeouts for clone vs repomix (clone typically needs longer).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Manifest breaks determinism 🐞 Bug ≡ Correctness
Description
The generated manifest.json includes generatedAt = DateTimeOffset.UtcNow, making the output
differ on every run even when repo content is unchanged. This conflicts with the runner’s own
“deterministic workspace” messaging and docs contract.
Code

skills/git-story-teller/scripts/story.cs[R960-964]

+        var manifest = new
+        {
+            schemaVersion = 1,
+            generatedAt = DateTimeOffset.UtcNow.ToString("O"),
+            repository = new
Evidence
The runner explicitly labels the output as deterministic, but the manifest always changes because it
embeds the current time. This makes workspace diffs/noise unavoidable and undermines
reproducibility/caching based on the manifest.

skills/git-story-teller/scripts/story.cs[81-85]
skills/git-story-teller/scripts/story.cs[398-406]
skills/git-story-teller/scripts/story.cs[960-964]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`manifest.json` includes a non-deterministic timestamp (`generatedAt` from `UtcNow`), contradicting the deterministic workspace goal.
### Issue Context
The manifest is intended to be authoritative for downstream agent behavior; noisy changes hinder versioning and repeatable runs.
### Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[960-982]
- skills/git-story-teller/scripts/story.cs[81-85]
- skills/git-story-teller/scripts/story.cs[398-406]
### What to change
- Prefer removing `generatedAt` entirely, or
- Replace it with a deterministic value derived from the cloned repo (e.g., HEAD commit SHA and commit timestamp), and/or
- If you keep wall-clock time, update messaging/docs to stop calling the workspace deterministic.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR introduces the git-story-teller skill, which uses a bundled .NET 10 script (scripts/story.cs) to clone a repository, discover packable targets, pack context via Repomix (with web-API and built-in .NET fallbacks), and produce a deterministic story workspace for agent-driven documentation generation. It also adds Karpathy Rules to AGENTS.md, updates the README and CHANGELOG for v0.4.0, and registers .bot/ in .gitignore.

  • The RunProcessAsync helper has no timeout or cancellation path, so a stalled git clone or npx repomix invocation will block the script indefinitely.

Confidence Score: 3/5

Mergeable but the missing process timeout in RunProcessAsync is a real operational risk worth addressing before wide use.

One P1 finding (no timeout on external processes) caps the score below 4. The rest of the changes are clean documentation, eval, and guideline additions. The P1 affects the core runner path but does not cause data corruption or security exposure.

skills/git-story-teller/scripts/story.cs — RunProcessAsync and the /**/ glob branch in MatchesIncludePattern.

Important Files Changed

Filename Overview
skills/git-story-teller/scripts/story.cs Core .NET script that clones repos, discovers packable targets, packs context via Repomix/web-API/.NET fallback, and writes deterministic workspaces; has no timeout on external processes (P1) and a zero-depth /**/ glob edge case (P2).
skills/git-story-teller/SKILL.md Well-structured skill definition covering runner contract, expected workspace shape, 6-step workflow, context budget rules, and good/bad output characteristics; no issues found.
skills/git-story-teller/evals/evals.json Six eval scenarios covering normal flow, fallback handling, ordering enforcement, grounding rules, missing deps, and degraded-mode behavior; comprehensive and aligned with SKILL.md contract.
AGENTS.md Appends Karpathy Rules section (think before coding, simplicity first, surgical changes, goal-driven execution); clean addition with no issues.
.gitignore Adds .bot/* ignore pattern for local agentic workspace; missing trailing newline (P2).

Sequence Diagram

sequenceDiagram
    participant User
    participant Agent
    participant Runner as story.cs (Runner)
    participant Git
    participant Repomix as npx repomix
    participant RepomixAPI as Repomix Web API
    participant DotNetPacker as Built-in .NET Packer

    User->>Agent: git-story-teller (repo-url, output-root)
    Agent->>Runner: dotnet run --file story.cs -- --repo-url --output-root
    Runner->>Git: git clone --depth 1 repo-url
    Git-->>Runner: cloned repo
    Runner->>Runner: DiscoverTargets (src/*.csproj)
    loop Each target
        Runner->>Repomix: npx repomix --include ...
        alt Repomix available
            Repomix-->>Runner: XML context
        else npx/npm unavailable (GitHub HTTPS only)
            Runner->>RepomixAPI: POST api.repomix.com/api/pack
            alt Web API available
                RepomixAPI-->>Runner: NDJSON result
            else Web API unavailable
                Runner->>DotNetPacker: PackWithDotNetPackerAsync
                DotNetPacker-->>Runner: XML (lower fidelity)
            end
        end
        Runner->>Runner: Write target.context.md
    end
    Runner->>Runner: Write overview.context.md, manifest.json, instructions.md
    Runner-->>Agent: workspace ready
    Agent->>Agent: Read manifest.json + instructions.md
    loop Each target (one at a time)
        Agent->>Agent: Read target.context.md, write result/target.md
    end
    Agent->>Agent: Read overview.context.md + target results, write result/Index.md
    Agent-->>User: Story workspace complete
Loading
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
skills/git-story-teller/scripts/story.cs:984-1015
**No timeout on external processes**

`RunProcessAsync` has no timeout or cancellation token. A `git clone` against a large repository, a slow network that stalls without fully disconnecting, or a hung `npx` invocation will block the script indefinitely. `Process.WaitForExitAsync` accepts a `CancellationToken`, so a `CancellationTokenSource` with a configurable (or fixed) deadline would bound the hang window and let the caller surface a clear error.

### Issue 2 of 3
skills/git-story-teller/scripts/story.cs:855-860
**`/**/` glob does not match zero-depth paths**

Standard glob semantics treat `a/**/b` as matching `a/b` (zero intermediate directories) as well as `a/x/b`, `a/x/y/b`, etc. The current implementation's `EndsWith("/" + parts[1])` check requires at least one separator before the trailing segment, so the pattern `.nuget/**/README.md` will not match `.nuget/README.md`. If a package places its README directly under `.nuget/`, that file would be silently omitted when the built-in fallback packer is active.

### Issue 3 of 3
.gitignore:20
**Missing newline at end of file**

The last line `.bot/*` has no trailing newline, which is flagged by many editors and linters and can cause unexpected diffs in future patches.

```suggestion
.bot/*
```

Reviews (1): Last reviewed commit: "📝 update overview story prompt to use p..." | Re-trigger Greptile

Comment thread skills/git-story-teller/scripts/story.cs Outdated
Comment thread skills/git-story-teller/scripts/story.cs
Comment thread .gitignore Outdated
Comment on lines +2 to +4
name: git-story-teller
description: >
Generate source-grounded repository story markdown from deterministic ContentSync context bundles. Use when the user asks to create, refresh, or complete repo/package stories, family or project overview pages, .bot/stories output, ContentSync story workflows, or result/Index.md plus result/{TargetName}.md files for any repository URL. The skill runs its bundled .NET file-based context generator, writes target stories first, then writes the overview from completed target stories, and enforces grounding, context-budget, and no-invention rules.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Skill description lacks triggers 📘 Rule violation ✧ Quality

The new skills/git-story-teller/SKILL.md frontmatter description explains purpose/usage but does
not include at least two concrete trigger phrases users might say. This violates the requirement to
document trigger phrases for discoverability and consistent invocation.
Agent Prompt
## Issue description
`skills/git-story-teller/SKILL.md` frontmatter `description` is missing the required “Trigger phrases” section with at least 2 concrete example user utterances.

## Issue Context
Compliance requires skill descriptions to include: (1) what it does, (2) when to use it, and (3) trigger phrases users might actually say.

## Fix Focus Areas
- skills/git-story-teller/SKILL.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +154 to +161
var sanitized = Regex.Replace(lastSegment, "[^A-Za-z0-9._-]", "-").Trim('-', '.', '_');
if (string.IsNullOrWhiteSpace(sanitized))
{
throw new InvalidOperationException("Could not derive a filesystem-safe repo id from --repo-url.");
}

return sanitized.ToLowerInvariant();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. deriverepoid() lowercases repo-id 📘 Rule violation ≡ Correctness

The new runner forces the derived repo-id to lowercase via ToLowerInvariant(), even though
repo-id is a generic identifier derived from the repo name and is not documented/typed as
requiring lowercase. This violates the restriction against blanket lowercasing of identifiers unless
explicitly required.
Agent Prompt
## Issue description
`DeriveRepoId()` returns `sanitized.ToLowerInvariant()`, which lowercases a generic identifier (`repo-id`) without an explicit schema/doc requirement that this field must be lowercase.

## Issue Context
The compliance rule allows lowercasing only when the field is explicitly defined as a lowercase identifier. `repo-id` is derived from the repository URL and used for workspace paths, so either preserve case or explicitly constrain/document the field as lowercase in the skill contract.

## Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[139-161]
- skills/git-story-teller/SKILL.md[50-55]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +745 to +763
private static bool CanUseRepomixWebApi(string repoUrl)
{
return Uri.TryCreate(repoUrl, UriKind.Absolute, out var uri)
&& uri.Scheme is "http" or "https"
&& string.Equals(uri.Host, "github.com", StringComparison.OrdinalIgnoreCase);
}

private static async Task<string> PackWithRepomixWebApiAsync(string repoUrl, string includes)
{
using var http = new HttpClient();
using var content = new MultipartFormDataContent
{
{ new StringContent(repoUrl, Encoding.UTF8), "url" },
{ new StringContent("xml", Encoding.UTF8), "format" },
{ new StringContent(BuildRepomixWebOptions(includes), Encoding.UTF8), "options" }
};

using var response = await http.PostAsync("https://api.repomix.com/api/pack", content);
var body = await response.Content.ReadAsStringAsync();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Repo url credential exfiltration 🐞 Bug ⛨ Security

When local Repomix fails, the runner posts the provided --repo-url verbatim to the public Repomix
API for any https://github.com/... URL. If the URL contains embedded credentials/tokens (userinfo)
or other sensitive query data, those secrets are sent to a third-party service.
Agent Prompt
### Issue description
`PackWithRepomixWebApiAsync` sends `repoUrl` to `https://api.repomix.com/api/pack` without checking for embedded credentials (URI userinfo) or other sensitive components.

### Issue Context
The web fallback is triggered for `https://github.com/...` URLs when local Repomix is unavailable, but this can unintentionally transmit secrets if users pass credentialed URLs (common in CI).

### Fix Focus Areas
- skills/git-story-teller/scripts/story.cs[745-789]
- skills/git-story-teller/scripts/story.cs[752-763]

### What to change
- Parse `repoUrl` as a `Uri` and **reject** (preferred) or **strip** `UserInfo` before calling the web API.
- Consider also rejecting URLs with non-empty `Query`/`Fragment` (or stripping them) for the web-API path.
- Print a clear warning before using the web API fallback that the URL is being sent to a third party.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

aicia-bot added 2 commits May 3, 2026 17:50
- Fix glob pattern matching for zero-depth paths (/**/suffix now matches prefix/suffix)
- Add configurable timeout and cancellation token to RunProcessAsync (default 5 min)
@gimlichael gimlichael merged commit 15b5e1e into main May 3, 2026
1 check passed
@gimlichael gimlichael deleted the v0.4.0/git-story-teller branch May 3, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants