Skip to content

Update documentation and added function index - #32

Merged
Pr0cella merged 2 commits into
masterfrom
docs
Feb 28, 2026
Merged

Update documentation and added function index#32
Pr0cella merged 2 commits into
masterfrom
docs

Conversation

@Pr0cella

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 28, 2026 00:48
@Pr0cella
Pr0cella merged commit f2d7e99 into master Feb 28, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates maintainer documentation and introduces an auto-generated function declaration index to make the monolithic runtime easier to navigate, while also bumping the project version to 2.9.1 and integrating index regeneration into the release workflow.

Changes:

  • Add scripts/generate-function-index.py and commit docs/FUNCTION_INDEX.generated.md (machine-generated inventory).
  • Add curated docs/FUNCTION_INDEX.md and cross-link the indexes from README.md / DOCUMENTATION.md.
  • Bump version strings to 2.9.1 and run the generator as part of scripts/regenerate-release.sh.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
scripts/regenerate-release.sh Regenerates the generated function index before rebuilding release/ artifacts.
scripts/generate-function-index.py New Python generator that scans key runtime files and writes docs/FUNCTION_INDEX.generated.md.
docs/FUNCTION_INDEX.generated.md Added generated function declaration inventory.
docs/FUNCTION_INDEX.md Added curated, subsystem-oriented function index for maintainers.
README.md Updates wording, local-mode guidance, and adds links to function index docs.
DOCUMENTATION.md Large rewrite/simplification and adds references to function index docs.
CONTRIBUTING.md Adds doc-sync expectations for PRs.
CHANGELOG.md Adds 2.9.1 entry describing documentation + generator additions.
index.html Updates fallback APP_VERSION to 2.9.1.
config.js Updates CONFIG.version to 2.9.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DOCUMENTATION.md
> **Version:** 2.7.0
> **Scope:** Documents the current inline JavaScript implementation in `index.html` and the companion `config.js` + `stix-config.js`.
> **Purpose:** Serve as the definitive reference for the v3.0 modular refactoring (see `DETACH.md`).
> **Version:** 2.9.0

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

The document header still says Version: 2.9.0, but this PR bumps the shipped app version to 2.9.1 (see config.js and index.html). Update the header version (or clarify that this document is intentionally pinned to a different runtime version) to avoid confusion.

Suggested change
> **Version:** 2.9.0
> **Version:** 2.9.1

Copilot uses AI. Check for mistakes.
Comment thread DOCUMENTATION.md
Comment on lines +95 to +102
### 4.1 `CONFIG` Highlights (v2.9.0)

| Vocabulary Key | Used By |
|---------------|---------|
| `attack-motivation-ov` | Threat Actor, Intrusion Set |
| `attack-resource-level-ov` | Threat Actor, Intrusion Set |
| `identity-class-ov` | Identity |
| `indicator-type-ov` | Indicator |
| `infrastructure-type-ov` | Infrastructure |
| `malware-type-ov` | Malware |
| `malware-capabilities-ov` | Malware |
| `malware-result-ov` | Malware Analysis |
| `opinion-enum` | Opinion |
| `pattern-type-ov` | Indicator |
| `report-type-ov` | Report |
| `threat-actor-type-ov` | Threat Actor |
| `threat-actor-role-ov` | Threat Actor |
| `threat-actor-sophistication-ov` | Threat Actor |
| `tool-type-ov` | Tool |
| `region-ov` | Location |
| `sectors-ov` | Identity |
| `implementation-language-ov` | Malware |
| `processor-architecture-ov` | Malware |
| `grouping-context-ov` | Grouping |
- `version: '2.9.0'`
- `sources.attack.version: '18.1'`
- `imports.clearStixOnBundleImport`, `imports.clearStixOnKillChainImport`
- `navigation.confirmOnLeave`, `navigation.showStixBuilder`
- `visualizer.enabled`
- `ConfigIframeIPC.enableLocalIframeIPC`

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

In the CONFIG highlights list, the bullet version: '2.9.0' is now stale because config.js in this PR sets CONFIG.version to 2.9.1. Please update this bullet (and any other version literals in this section) so the documentation matches the shipped config.

Copilot uses AI. Check for mistakes.
Comment thread DOCUMENTATION.md
---

*Generated for AttackFlow v2.7.0. This document describes the monolithic implementation as it exists today, including STIX 2.1 support. For the planned v3.0 modular architecture, see [DETACH.md](DETACH.md), [API_DOCS.md](API_DOCS.md), and [tests/TEST_PLAN.md](tests/TEST_PLAN.md).*
*Generated for AttackFlow v2.9.0 from current workspace sources (`index.html`, `config.js`, `stix-config.js`, `docs/IPC_API-DOCS.md`).*

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

This footer line says the document was "Generated" from workspace sources and includes docs/IPC_API-DOCS.md, but the file is a curated reference and doesn’t appear to be auto-generated by any script in this PR. Consider rewording to "Updated for…" (and/or removing the source list) so readers don’t assume it can be regenerated or that it covers files it doesn’t.

Suggested change
*Generated for AttackFlow v2.9.0 from current workspace sources (`index.html`, `config.js`, `stix-config.js`, `docs/IPC_API-DOCS.md`).*
*Updated for AttackFlow v2.9.0 to reflect the current monolithic inline implementation (including `index.html`, `config.js`, and `stix-config.js`).*

Copilot uses AI. Check for mistakes.
Comment thread docs/FUNCTION_INDEX.md

---

*Last refreshed for v2.9.0 code layout. This file is intentionally line-agnostic to reduce churn while preserving maintainability.* No newline at end of file

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

The footer note says this index was last refreshed for v2.9.0, but this PR updates the app/version references to 2.9.1. Update the referenced version here (or clarify what the version refers to) to keep the docs consistent.

Suggested change
*Last refreshed for v2.9.0 code layout. This file is intentionally line-agnostic to reduce churn while preserving maintainability.*
*Last refreshed for v2.9.1 code layout. This file is intentionally line-agnostic to reduce churn while preserving maintainability.*

Copilot uses AI. Check for mistakes.
Comment on lines +86 to +96
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC")

lines: list[str] = []
lines.append("# AttackFlow — Generated Function Index")
lines.append("")
lines.append(
"This file is auto-generated by `scripts/generate-function-index.py`. Do not edit manually."
)
lines.append("")
lines.append(f"Generated: {timestamp}")
lines.append("")

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

The generator bakes a UTC timestamp into the output. That means docs/FUNCTION_INDEX.generated.md will change on every run even when the underlying source hasn’t changed, creating noisy diffs and making releases less reproducible. Consider omitting the timestamp or gating it behind an env flag (or using a reproducible value like SOURCE_DATE_EPOCH).

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +57
def extract_functions(file_path: Path) -> list[FunctionHit]:
lines = file_path.read_text(encoding="utf-8", errors="replace").splitlines()
seen: set[tuple[str, int]] = set()
hits: list[FunctionHit] = []

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

The new function index generator uses built-in generic type annotations like list[...], dict[...], set[...], which require Python 3.9+. Other existing scripts in scripts/ don’t require 3.9 and the repo docs only reference python3, so this may break release regeneration on systems with Python 3.8. Consider either (a) rewriting the annotations using typing.List/Dict/Set/Tuple (and/or from typing import ...) for 3.8 compatibility, or (b) documenting/enforcing a minimum Python version (and failing fast with a clear message).

Copilot uses AI. Check for mistakes.
Comment thread CONTRIBUTING.md
Comment on lines +30 to +33
- Update `CHANGELOG.md` for user-visible and security-relevant changes
- Update `README.md` when setup, usage, or feature surface changes
- Update `DOCUMENTATION.md` for architecture/runtime behavior changes
- Update `docs/FUNCTION_INDEX.md` and regenerate `docs/FUNCTION_INDEX.generated.md` when function surfaces change

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

These nested bullets are indented with literal tab characters. In Markdown this can render inconsistently (often as a code block) depending on viewer. Replace the tabs with spaces and use standard list indentation so the guideline section renders correctly on GitHub.

Suggested change
- Update `CHANGELOG.md` for user-visible and security-relevant changes
- Update `README.md` when setup, usage, or feature surface changes
- Update `DOCUMENTATION.md` for architecture/runtime behavior changes
- Update `docs/FUNCTION_INDEX.md` and regenerate `docs/FUNCTION_INDEX.generated.md` when function surfaces change
- Update `CHANGELOG.md` for user-visible and security-relevant changes
- Update `README.md` when setup, usage, or feature surface changes
- Update `DOCUMENTATION.md` for architecture/runtime behavior changes
- Update `docs/FUNCTION_INDEX.md` and regenerate `docs/FUNCTION_INDEX.generated.md` when function surfaces change

Copilot uses AI. Check for mistakes.
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