Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 31 additions & 13 deletions .ai/codebase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@
# This script creates a comprehensive text file containing the directory structure
# and all source code files from your project's source directory for AI processing.
#
# Customize the $sourceDirectory path to match your project's structure.
# You can target a specific subfolder with -SearchDirectory (relative to repo root)
# or provide an absolute path.

param(
[string]$SearchDirectory = 'src'
)

$repoRoot = git rev-parse --show-toplevel
Write-Host "Repository root: $repoRoot"

$sourceDirectory = Join-Path $repoRoot 'src'
$sourceDirectory = if ([System.IO.Path]::IsPathRooted($SearchDirectory)) {
$SearchDirectory
}
else {
Join-Path $repoRoot $SearchDirectory
}

if (-not (Test-Path -Path $sourceDirectory -PathType Container)) {
throw "Search directory does not exist or is not a folder: $sourceDirectory"
}

$sourceDirectory = (Resolve-Path $sourceDirectory).Path
Write-Host "Source directory: $sourceDirectory"

$outputDir = "$repoRoot/.ai/outputs"
Expand Down Expand Up @@ -35,20 +51,22 @@ Set-Content -Path $outputPath -Value $contextBlock

# Extension -> language mapping
$languageMap = @{
'.cs' = 'csharp'
'.ps1' = 'powershell'
'.json' = 'json'
'.xml' = 'xml'
'.yml' = 'yaml'
'.yaml' = 'yaml'
'.md' = 'markdown'
'.sh' = 'bash'
'.ts' = 'typescript'
'.js' = 'javascript'
'.cs' = 'csharp'
'.razor' = 'razor'
'.ps1' = 'powershell'
'.json' = 'json'
'.xml' = 'xml'
'.yml' = 'yaml'
'.yaml' = 'yaml'
'.md' = 'markdown'
'.sh' = 'bash'
'.ts' = 'typescript'
'.js' = 'javascript'
}

$keys = $languageMap.Keys | ForEach-Object { "*$_" }
# Grab all files, filtering out the excluded directories
$allFiles = Get-ChildItem -Path $sourceDirectory -Recurse -File -Include *.cs, *.ps1, *.json, *.xml, *.yml, *.yaml, *.md, *.sh, *.ts, *.js | Where-Object {
$allFiles = Get-ChildItem -Path $sourceDirectory -Recurse -File -Include $keys | Where-Object {
$_.FullName -notmatch $excludePattern
}

Expand Down
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,49 @@ dotnet loom --help

Use `init` to generate config and workflow files

```
```bash
dotnet loom init --force
```

Invoke pipeline by passing target as arg
## Subcommands

```
Loom provides subcommands for each build stage. You can run `dotnet loom [command] --help` for specific options.

### Test

Run your test suite:

```bash
dotnet loom test
```

configure loom.json to publish/pack artifacts
### Build & Publish

```
Configure `loom.json` to define artifacts, then build or publish them:

```bash
dotnet loom build
dotnet loom publish
```

artifacts are not cleaned unless explicitly set
### Clean & Fresh Runs

Manual clean:

```bash
dotnet loom clean
```

Prepend the `Clean` module to any pipeline run using the `--fresh` flag:

```bash
dotnet loom release --fresh
```
dotnet loom clean # The Clean module
dotnet release --clean # Prepends the Clean module to pipeline

### Global Options

Most commands support standard overrides:

```bash
dotnet loom build --rid win-x64
```
Loading
Loading